lexis2004
07-27-2006, 05:46 PM
Hello,
I use Modernbill and have tried to integrate the domain lookup process into my main site. www.lexishosting.com. It works accept for the fact that if you enter a domain name it doesn't querry the registrar, it brings you to the signup page where you have to re-enter it to get it querried. Now if I was to remove the tow boxes I have set ie: "register" or "transfer" it works fine. Here is the code I have:
<form name="orderform" action="client_services/order/orderwiz.php?v=2" method="get">
<input type="hidden" name="v" value="1">
<input type="hidden" name="aid" value="">
<input type="hidden" name="c_code" value="">
<input type="hidden" name="submit" value="Lookup Domain >>">
<table width="240" cellpadding="2" cellspacing="0">
<tr valign="middle">
<td><input name="submit_domain" type="radio" value="register" >
<label> New Domain</label></td>
<td><input border="0" name="submit_domain" type="radio" value="transfer">
<label>Transfer Domain</label></td>
</tr>
<tr>
<td colspan="2" valign="middle"><div align="center"> www.
<input name="new_domain" type="text">
<select name="new_tld_extension">
<option>.com</option>
<option>.net</option>
<option>.org</option>
<option>.biz</option>
<option>.us</option>
<option>.info</option>
<option>.cn</option>
<option>.com.cn</option>
<option>.name</option>
<option>.cc</option>
<option>.tv</option>
</select>
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="Submit" type="submit" class="btnForm" value="CONTINUE" />
</div></td>
</tr>
</table>
</form>
horizon
07-27-2006, 05:52 PM
The reason why it might fail to validate the registrar information, is because your orderwiz.php file might contain a / some error(s). Would it be possible to post your PHP file's content (between [ php ] bbcode - without spaces and [ / php ] - without spaces) so that I could take a look at it ? ;)
lexis2004
07-27-2006, 06:05 PM
require("config.php");
if (function_exists('security_check_1')||!function_exists('scf')) { die("SF"); } scf('a496eb07a568d00c9328e865d0fffa81359afcbd');
// +----------------------------------------------------------------------+
// exit if config is missing
if (!is_array($_ORDER_CONFIG)) { exit; }
// setting some defaults
$order_totals = array();
$this_page = "orderwiz.php"; // do not change
$variable_type = "text";
$pass_variable_type = "password";
$radio_variable_type = "radio";
$checkbox_variable_type = "checkbox";
$stop = TRUE;
$orderwiz = TRUE;
$cart = $_GET; //removed session bug - Drak
$internal_order = FALSE;
// Reset order_completed session
$_SESSION['saved_order'] = array();
$_SESSION['order_completed'] = FALSE;
$_SESSION['call_in_progress'] = FALSE;
$_SESSION['fraud_action'] = '';
$_SESSION['vl_results'] = '';
$_SESSION['fg_results'] = '';
// Check for banned IPs
banned_ip_check($REMOTE_ADDR);
// SET AFFILIATE ID FROM URL
if (isset($aid) && $cart['affiliate']!=$aid) {
if ($debug) { echo "<br>-->SET AFFILIATE ID<--<br>"; }
$_sql = "SELECT count(aff_code) FROM affiliate_config WHERE aff_code='$aid'";
list($num) = adodb_one_data($_sql,'N');
if ($num==1) {
$cart['affiliate'] = $aid;
$_sql = "UPDATE affiliate_config SET aff_hits = aff_hits+1 WHERE aff_code='$aid'";
$_res = adodb_query($_sql);
}
}
// SET PASSED IN ADDON VARIABLE & VALUE
if (isset($vid) && isset($vvu)) {
$_SESSION['var_id'][$vid] = $vvu;
}
// Clean form input
include($DIR."include/misc/heart/validate_functions.inc.php");
// determine case to execute
if ( ($submit_package == 'domain') ||
($submit_package == 'package' && !empty($type3_package) && !empty($billing_cycle)) ) {
$op = NULL;
/*--------------------------------------
** VALIDATE COUPON
**-------------------------------------*/
if(isset($coupon_code))
{
if ($debug) echo "<br>-->VALIDATE COUPON<--<br>";
// Reset All Packages Add-Ons
$cart[coupons] = array();
list($coupon_id,
$coupon_code,
$coupon_percent_discount,
$coupon_dollar_discount,
$coupon_comments,
$coupon_status,
$coupon_start_stamp,
$coupon_end_stamp,
$coupon_expire_string,
$coupon_count,
$coupon_max_count,
$coupon_new_only,
$coupon_misc1,
$coupon_misc2) = validate_coupon($coupon_code,$v);
// Begin add by Cyberws - check for coupon match
// Check to see if any packages match coupon
// foreach($cart[packages] as $key => $value) {
// list($pack_id) = $value;
$id_array = explode(",",$coupon_misc2);
//Check for Domain only Discount
if ($allow_domain_discount && $coupon_misc2 ==1) { $couponmatch = 1;}
if (count($id_array)==0 || in_array($type3_package,$id_array)) {
$couponmatch = 1;
}
//}
// Check to see if any addons match coupon
// foreach($cart[addons] as $key => $value) {
// list($pack_id) = $value;
// if ($coupon_misc2 == $pack_id) {
// $couponmatch = 1;
// }
//}
//Check to see if any packages or addons matched coupon and that coupon is tied to a package
if ($couponmatch != 1 and $coupon_misc2 != "") {
$coupon_id = "";
}
// Reset coupon match variable for next coupon check
$couponmatch = 0;
//End add by Cyberws
if ($coupon_id)
{
if ( ( $coupon_start_stamp <= mktime(0,0,0,date("m"),date("d"),date("Y")) ) &&
( $coupon_end_stamp >= mktime(0,0,0,date("m"),date("d"),date("Y")) ) &&
( ( $coupon_max_count == 0 ) ||
( $coupon_count < $coupon_max_count ) ) )
{
$coupon_is_valid = TRUE;
$cart[coupons][] = array($coupon_id,
$coupon_code,
$coupon_percent_discount,
$coupon_dollar_discount,
$coupon_comments,
$coupon_status,
$coupon_start_stamp,
$coupon_end_stamp,
$coupon_expire_string,
$coupon_count,
$coupon_max_count,
$coupon_new_only,
$coupon_misc1,
$coupon_misc2);
}
else
{
$error_msg = $coupon_expire_string;
$coupon_is_valid = FALSE;
}
}
if ($debug) { echo "<pre>COUPON: $coupon_id</pre>"; }
$op = 'show_total';
if ($tax_enabled && $suppress_coupon && !$set_x_State && !$x_State && !$x_Country) {
$op = NULL;
}
}
} else {
$op = NULL;
}
_order_html_start();
_order_start_box('<center><font size=2>'.$_ORDER_CONFIG['order_display_title'].'</font></center>',$_ORDER_CONFIG['parent_header_font_color'],$_ORDER_CONFIG['parent_header_bgcolor'],$_ORDER_CONFIG['parent_border_bgcolor'],$_ORDER_CONFIG['parent_center_bgcolor'],$_ORDER_CONFIG['order_table_width'],'center');
echo "<br>";
// skip domain step if disabled
$submit_domain = ($disable_domain_step) ? 'skip' : $submit_domain ;
switch ($op) {
// The default order form wizard display logic
// -------------------------------------------
default:
// set some default variables
$submit_domain = (!empty($submit_domain)) ? $submit_domain : NULL; //'register';
$submit_package = (!empty($submit_package)) ? $submit_package : 'package';
$type3_package = (!empty($type3_package)) ? $type3_package : NULL;
$billing_cycle = (!empty($billing_cycle)) ? $billing_cycle : NULL;
?>
<style type="text/css">
tbody.on { display:table-row-group; }
tbody.off { display:none; }
</style>
<script type="text/JavaScript">
function toggleTbody(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'on';
} else {
tbod.className = 'off';
}
}
}
return false;
}
function toggleTbodyOff(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'off';
} else {
tbod.className = 'off';
}
}
}
return false;
}
function toggleTbodyOn(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'on';
} else {
tbod.className = 'on';
}
}
}
return false;
}
</script>
<form name="orderform" action="<?=$this_page?>" method="get">
<input type="hidden" name="v" value="<?=$v?>">
<?php if ($submit_package!='domain' && $type3_package!='') { ?>
<input type="hidden" name="type3_package" value="<?=strip_tags(trim($type3_package))?>">
<input type="hidden" name="submit_package" value="<?=$submit_package?>">
<?php } ?>
<?php if ($submit_package=='domain') { ?>
<input type="hidden" name="submit_package" value="<?=$submit_package?>">
<?php } ?>
<?php if ($billing_cycle!='') { ?>
<input type="hidden" name="billing_cycle" value="<?=strip_tags(trim($billing_cycle))?>">
<?php } ?>
<?php include($DIR.'include/misc/mod_orderwiz/wizard_main_steps.case.inc.php'); ?>
<br>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="2">
<tr>
<?php
$submit_title = (!empty($submit_title)) ? $submit_title : NEXT ;
$js = ($show_tax) ? "onClick=\"return checkState(orderform);\"" : NULL ;
?>
<td width="33%">
<?php if (isset($_GET[submit_domain])||isset($_GET[submit_package])) { ?>
<font size=1><a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true"><?=GOBACK?></a></font>
<?php } ?>
</td>
<td width="33%" align="center">
<input type="submit" name="submit" value="<?php echo $submit_title ?> >>" <?php echo $js ?>>
</td>
<td width="33%"> </td>
</tr>
</table>
</form>
<?php
break;
case 'show_total':
// set some default variables
$client_status = (!empty($client_status)) ? $client_status : 'new';
?>
<form name="orderform" action="<?=$script_url?>checkout.php" method="post">
<input type="hidden" name="v" value="<?=$v?>">
<input type="hidden" name="apidata" value="<?=urlencode(serialize($cart))?>">
<input type="hidden" name="apihash" value="<?=md5(serialize($cart).'password')?>">
<?php include($DIR.'include/misc/mod_orderwiz/wizard_show_total.case.inc.php'); ?>
<br>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="2">
<tr>
<script type="text/javascript" language="javascript">
function checkLogin() {
if (orderform.client_status[1]!=null && orderform.client_status[1].checked) {
if (orderform.client_username.value == '' || orderform.client_password.value == '') {
alert("<?php echo REQUIREDLOGIN ?>");
return false;
} else {
return true;
}
} else {
return true;
}
}
</script>
<?php
$js = "onClick=\"return checkLogin();\"";
?>
<td width="33%">
<?php if (isset($_GET[submit_domain])||isset($_GET[submit_package])) { ?>
<font size=1><a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true"><?=GOBACK?></a></font>
<?php } ?>
</td>
<td width="33%" align="center">
<input type="submit" name="submit" value="<?php echo CONTINUE_t ?> >>" <?php echo $js ?>>
</td>
<td width="33%"> </td>
</tr>
</table>
</form>
<?php
break;
}
_order_stop_box();
debug_array($_GET,'$_GET',0);
debug_array($cart,'$cart',0);
_order_html_stop();
horizon
07-27-2006, 06:14 PM
These codings seem to come from moderngigabyte.com . You might want to post on their forum to answer this question - since this is copyrighted codes.
lexis2004
07-27-2006, 07:03 PM
If you view the source in a browser it looks like this:
<script type="text/JavaScript">
function toggleTbody(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'on';
} else {
tbod.className = 'off';
}
}
}
return false;
}
function toggleTbodyOff(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'off';
} else {
tbod.className = 'off';
}
}
}
return false;
}
function toggleTbodyOn(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'on';
} else {
tbod.className = 'on';
}
}
}
return false;
}
</script>
<form name="orderform" action="orderwiz.php" method="get">
<input type="hidden" name="v" value="1">
<table width="97%" align="center" border="0" cellspacing="0" cellpadding="1" bgcolor="#000000">
<tr><td><table width="100%" bgcolor="#CC3300"><tr><td><b><font size="2" color="#FFFFFF">Select a domain option:</font></b></td></tr></table></td></tr>
<tr><td>
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr><td>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="2">
<input type="hidden" name="aid" value="">
<input type="hidden" name="c_code" value="">
<input type="hidden" name="submit" value="Lookup Domain >>">
<tr>
<td colspan="2" align=left>
<input type="radio"
name="submit_domain"
value="register"
CHECKED onclick="toggleTbodyOn('register');toggleTbodyOff('transfer');toggleTbodyOff('useMyDNS');"> Register New Domain<br>
</td>
</tr>
<tr>
<td colspan="2" align=left>
<input type="radio"
name="submit_domain"
value="transfer"
onclick="toggleTbodyOff('register');toggleTbodyOn('transfer');toggleTbodyOff('useMyDNS');"> Transfer My Existing Domain<br>
</td>
</tr>
<tr>
<td colspan="2" align=left>
<input type="radio"
name="submit_domain"
value="useMyDNS"
onclick="toggleTbodyOff('register');toggleTbodyOff('transfer');toggleTbodyOn('useMyDNS');"> I will use My Existing Domain and update My Nameservers only.<br>
</td>
</tr>
<tr>
<td colspan="2" align=left>
<input type="radio"
name="submit_domain"
value="skip"
onclick="toggleTbodyOff('register');toggleTbodyOff('transfer');toggleTbodyOff('useMyDNS');"> No Domain Needed<br>
</td>
</tr>
<tbody id="register">
<tr>
<td width=25%><br><nobr><B>New Domain:</B></td>
<td align=left><br><input type="text" name="new_domain" value="" size="35"> <select name="new_tld_extension" ><option value="com">.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="us">.us</option>
<option value="biz">.biz</option>
<option value="info">.info</option>
<option value="cn">.cn</option>
<option value=".com.cn">..com.cn</option>
<option value=".name">..name</option>
<option value=".cc">..cc</option>
<option value=".tv">..tv</option>
</select></td>
</tr>
</tbody>
<tbody id="transfer">
<tr>
<td width=25%><br><nobr><B>Transfer Domain:</B></td>
<td align=left><br><input type="text" name="transfer_domain" value="" size="35"> <select name="transfer_tld_extension" ><option value="com">.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="us">.us</option>
<option value="biz">.biz</option>
<option value="info">.info</option>
<option value="cn">.cn</option>
<option value=".com.cn">..com.cn</option>
<option value=".name">..name</option>
<option value=".cc">..cc</option>
<option value=".tv">..tv</option>
</select></td>
</tr>
</tbody>
<tbody id="useMyDNS">
<tr>
<td width=25%><br><nobr><B>Existing Domain:</B></td>
<td colspan=3><br><input type="text" name="existing_domain" value="" size="35" maxlength="255">.<input type="text" name="existing_tld_extension" value="" size="5" maxlength="255"></td>
</tr>
</tbody>
<script type="text/JavaScript">
toggleTbodyOff('transfer');
toggleTbodyOff('useMyDNS');
</script>
</table>
</td></tr></table>
</td></tr></table>
<br>
<table width="97%" border="0" align="center" cellpadding="1" cellspacing="2">
<tr>
<td width="33%">
</td>
<td width="33%" align="center">
<input type="submit" name="submit" value="next >>" >
</td>
<td width="33%"> </td>
</tr>
</table>
</form>
</td></tr></table>
</td></tr></table>
lexis2004
07-27-2006, 07:24 PM
Yes it is Modernbill script. I have posted on their site. I hae a license for the software as I use it on my site. the part of the code that you are not allowed to mess with is encoded but the rest you can, I just have not figured out how to make it do what I want.