if ($contactid != "addnew") { echo " <a href=\"clientscontacts.php?userid="; echo $userid; echo "&contactid="; echo $contactid; echo "&resetpw=true"; echo generate_token("link"); echo "\"><img src=\"images/icons/resetpw.png\" border=\"0\" align=\"absmiddle\" /> "; echo $aInt->lang("clients", "resetsendpassword"); echo "</a>"; } echo "</td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "country"); echo "</td><td class=\"fieldarea\">"; include "../includes/countries.php"; echo getCountriesDropDown($country, "", "12"); echo "</td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "emailnotifications"); echo "</td><td class=\"fieldarea\">\n<label><input type=\"checkbox\" name=\"generalemails\" tabindex=\"14\" "; if ($generalemails) { echo "checked"; } echo "> General</label>\n<label><input type=\"checkbox\" name=\"invoiceemails\" tabindex=\"15\" "; if ($invoiceemails) { echo "checked"; } echo "> Invoice</label>\n<label><input type=\"checkbox\" name=\"supportemails\" tabindex=\"16\" "; if ($supportemails) { echo "checked"; } echo "> Support</label><br />\n<label><input type=\"checkbox\" name=\"productemails\" tabindex=\"17\" ";
echo "<s"; echo "elect name=\"securityqid\" style=\"width:225px;\" tabindex=\"6\"><option value=\"\" selected>"; echo $aInt->lang("global", "none"); echo "</option>"; foreach ($questions as $quest => $ions) { echo "<option value=" . $ions['id'] . ""; if ($ions['id'] == $securityqid) { echo " selected"; } echo ">" . $ions['question'] . "</option>"; } echo "</select></td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "country"); echo "</td><td class=\"fieldarea\">"; include "../includes/countries.php"; echo getCountriesDropDown($country, "", 13); echo "</td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "securityanswer"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"securityqans\" size=\"40\" value=\""; echo $securityqans; echo "\" tabindex=\"7\"></td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "phonenumber"); echo "</td><td class=\"fieldarea\"><input type=\"text\" size=\"20\" name=\"phonenumber\" value=\""; echo $phonenumber; echo "\" tabindex=\"14\"></td></tr>\n<tr><td class=\"fieldlabel\"><br /></td><td class=\"fieldarea\"></td><td class=\"fieldlabel\"></td><td class=\"fieldarea\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("clients", "latefees"); echo "</td><td class=\"fieldarea\"><input type=\"checkbox\" name=\"latefeeoveride\""; if ($latefeeoveride == "on") { echo " checked"; } echo " tabindex=\"15\"> ";
} $clientsdetails = getClientsDetails($_SESSION['uid'], "billing"); $cardtype = $clientsdetails['cctype']; $cardnum = $clientsdetails['cclastfour']; if (!$errormessage || $fromorderform) { $firstname = $clientsdetails['firstname']; $lastname = $clientsdetails['lastname']; $email = $clientsdetails['email']; $address1 = $clientsdetails['address1']; $address2 = $clientsdetails['address2']; $city = $clientsdetails['city']; $state = $clientsdetails['state']; $postcode = $clientsdetails['postcode']; $country = $clientsdetails['country']; $phonenumber = $clientsdetails['phonenumber']; } include "includes/countries.php"; $result = select_query("tblaccounts", "SUM(amountin)-SUM(amountout)", array("invoiceid" => $invoiceid)); $data = mysql_fetch_array($result); $amountpaid = $data[0]; $balance = $total - $amountpaid; $smartyvalues = array("firstname" => $firstname, "lastname" => $lastname, "address1" => $address1, "address2" => $address2, "city" => $city, "state" => $state, "postcode" => $postcode, "country" => $country, "countriesdropdown" => getCountriesDropDown($country), "phonenumber" => $phonenumber, "acceptedcctypes" => explode(",", $CONFIG['AcceptedCardTypes']), "ccinfo" => $ccinfo, "cardtype" => $cardtype, "cardnum" => $cardnum, "cctype" => $cctype, "ccnumber" => $ccnumber, "ccexpirymonth" => $ccexpirymonth, "ccexpiryyear" => $ccexpiryyear, "ccstartmonth" => $ccstartmonth, "ccstartyear" => $ccstartyear, "ccissuenum" => $ccissuenum, "cccvv" => $cccvv, "errormessage" => $errormessage, "invoiceid" => $invoiceid, "total" => formatCurrency($total), "balance" => formatCurrency($balance), "showccissuestart" => $CONFIG['ShowCCIssueStart'], "shownostore" => $CONFIG['CCAllowCustomerDelete']); $smartyvalues['months'] = $gateways->getCCDateMonths(); $smartyvalues['startyears'] = $gateways->getCCStartDateYears(); $smartyvalues['expiryyears'] = $smartyvalues['years'] = $gateways->getCCExpiryDateYears(); if (function_exists($params['paymentmethod'] . "_remoteinput")) { $buttoncode = call_user_func($params['paymentmethod'] . "_remoteinput", $params); $buttoncode = str_replace("<form", "<form target=\"3dauth\"", $buttoncode); $smartyvalues['remotecode'] = $buttoncode; } outputClientArea($templatefile);
echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"name\" size=\"30\" value=\""; echo $_POST['name']; echo "\" ></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "country"); echo "</td><td class=\"fieldarea\"><label><input type=\"radio\" name=\"countrytype\" value=\"any\" checked> "; echo $aInt->lang("taxconfig", "taxappliesallcountry"); echo "</label><br /><label><input type=\"radio\" name=\"countrytype\" value=\"specific\""; if ($_POST['countrytype'] == "specific") { echo " checked"; } echo "> "; echo $aInt->lang("taxconfig", "taxappliesspecificcountry"); echo ":<label> "; include "../includes/clientfunctions.php"; include "../includes/countries.php"; echo getCountriesDropDown($_POST['country']); echo "</td></tr>\n<tr><td class=\"fieldlabel\">State</td><td class=\"fieldarea\"><label><input type=\"radio\" name=\"statetype\" value=\"any\" checked> "; echo $aInt->lang("taxconfig", "taxappliesallstate"); echo "</label><br /><label><input type=\"radio\" name=\"statetype\" value=\"specific\""; if ($_POST['statetype'] == "specific") { echo " checked"; } echo "> "; echo $aInt->lang("taxconfig", "taxappliesspecificstate"); echo ":</label> <input type=\"text\" name=\"state\" size=\"25\" value=\""; echo $_POST['state']; echo "\" /></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "taxrate"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"taxrate\" size=\"10\" value=\""; echo isset($_POST['taxrate']) ? $_POST['taxrate'] : "0.00"; echo "\" /> %</td></tr>\n</table>\n<img src=\"images/spacer.gif\" height=\"10\" width=\"1\"><br>\n<div align=center><input type=\"submit\" value=\"";
echo "\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "city"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"domcity\" size=\"30\" value=\""; echo $CONFIG['RegistrarAdminCity']; echo "\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "state"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"domstate\" size=\"30\" value=\""; echo $CONFIG['RegistrarAdminStateProvince']; echo "\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "postcode"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"dompostcode\" size=\"30\" value=\""; echo $CONFIG['RegistrarAdminPostalCode']; echo "\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "country"); echo "</td><td class=\"fieldarea\">"; echo getCountriesDropDown($CONFIG['RegistrarAdminCountry'], "domcountry"); echo "</td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "phonenumber"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"domphone\" size=\"30\" value=\""; echo $CONFIG['RegistrarAdminPhone']; echo "\"></td></tr>\n</table>\n\n </div>\n</div>\n<!-- Mail -->\n<div id=\"tab4box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("general", "mailtype"); echo "</td><td class=\"fieldarea\">\n\t"; echo "<s"; echo "elect name=\"mailtype\">\n\t\t<option value=\"mail\""; if ($CONFIG['MailType'] == "mail") { echo " selected"; } echo ">"; echo $aInt->lang("general", "phpmail"); echo "</option>\n\t\t<option value=\"smtp\"";
if (!$errormessage) { $userid = addClient($firstname, $lastname, $companyname, $email, $address1, $address2, $city, $state, $postcode, $country, $phonenumber, $password, $securityqid, $securityqans); run_hook("ClientAreaRegister", array("userid" => $userid)); redir("", "clientarea.php"); } } $pagetitle = $_LANG['clientregistertitle']; $breadcrumbnav = "<a href=\"index.php\">" . $_LANG['globalsystemname'] . "</a> > <a href=\"register.php\">" . $_LANG['clientregistertitle'] . "</a>"; $pageicon = "images/order_big.gif"; initialiseClientArea($pagetitle, $pageicon, $breadcrumbnav); $templatefile = "clientregister"; if (!$CONFIG['AllowClientRegister']) { $smarty->assign("noregistration", true); } include "includes/countries.php"; $countriesdropdown = getCountriesDropDown($country); $smarty->assign("errormessage", $errormessage); $smarty->assign("clientfirstname", $firstname); $smarty->assign("clientlastname", $lastname); $smarty->assign("clientcompanyname", $companyname); $smarty->assign("clientemail", $email); $smarty->assign("clientaddress1", $address1); $smarty->assign("clientaddress2", $address2); $smarty->assign("clientcity", $city); $smarty->assign("clientstate", $state); $smarty->assign("clientpostcode", $postcode); $smarty->assign("clientcountriesdropdown", $countriesdropdown); $smarty->assign("clientphonenumber", $phonenumber); $smarty->assign("securityquestions", $securityquestions); $customfields = getCustomFields("client", "", "", "", "on", $customfield); $smarty->assign("customfields", $customfields);
echo "\"></td><td class=\"fieldlabel\">Postcode</td><td class=\"fieldarea\"><input type=\"text\" name=\"postcode\" size=\"30\" value=\""; echo $postcode; echo "\"></td></tr>\n<tr><td class=\"fieldlabel\">Currency</td><td class=\"fieldarea\">"; echo "<s"; echo "elect name=\"currency\">"; $result = select_query("tblcurrencies", "id,code,`default`", "", "code", "ASC"); while ($data = mysql_fetch_array($result)) { echo "<option value=\"" . $data['id'] . "\""; if ($currencyid && $data['id'] == $currencyid || !$currencyid && $data['default']) { echo " selected"; } echo ">" . $data['code'] . "</option>"; } echo "</select></td><td class=\"fieldlabel\">Country</td><td class=\"fieldarea\">"; include "../includes/countries.php"; echo getCountriesDropDown($country); echo "</td></tr>\n</table>\n</div>\n\n<h2>Line Items</h2>\n\n"; echo "<s"; echo "cript type=\"text/javascript\" src=\"../includes/jscript/jqueryag.js\"></script>\n\n<table width=100% cellspacing=1 bgcolor=\"#cccccc\" align=center><tr bgcolor=\"#efefef\" style=\"text-align:center;font-weight:bold\"><td width=\"50\">Qty</td><td>Description</td><td width=90>Unit Price</td><td width=90>Discount %</td><td width=90>Total</td><td width=50>Taxed</td><td width=20></td></tr>\n"; if ($id) { $result = select_query("tblquoteitems", "", array("quoteid" => $id), "id", "ASC"); $i = 0; while ($data = mysql_fetch_array($result)) { $line_id = $data['id']; $line_desc = $data['description']; $line_qty = $data['quantity']; $line_unitprice = $data['unitprice']; $line_discount = $data['discount']; $line_taxable = $data['taxable']; $line_total = formatCurrency($line_qty * $line_unitprice * (1 - $line_discount / 100)); echo "<tr bgcolor=#ffffff style=\"text-align:center;\"><td><input type=\"text\" name=\"qty[" . $line_id . "]" . "\" size=\"4\" value=\"" . $line_qty . "\"></td><td><textarea name=\"desc[" . $line_id . "]" . "\" class=\"expanding\" style=\"width:98%\">" . $line_desc . "</textarea></td><td><input type=\"text\" name=\"up[" . $line_id . "]" . "\" size=\"10\" value=\"" . $line_unitprice . "\"></td><td><input type=\"text\" name=\"discount[" . $line_id . "]" . "\" size=\"10\" value=\"" . $line_discount . "\"></td><td>" . $CONFIG['CurrencySymbol'] . $line_total . "</td><td><input type=\"checkbox\" name=\"taxable[" . $line_id . "]" . "\" value=\"1\"";
$smartyvalues['csr'] = $csr; $smartyvalues['additionalfields'] = $additionalfields; $smartyvalues['firstname'] = $firstname; $smartyvalues['lastname'] = $lastname; $smartyvalues['orgname'] = $orgname; $smartyvalues['jobtitle'] = $jobtitle; $smartyvalues['email'] = $email; $smartyvalues['address1'] = $address1; $smartyvalues['address2'] = $address2; $smartyvalues['city'] = $city; $smartyvalues['state'] = $state; $smartyvalues['postcode'] = $postcode; $smartyvalues['country'] = $country; $smartyvalues['phonenumber'] = $phonenumber; $smartyvalues['faxnumber'] = $faxnumber; $smartyvalues['countriesdropdown'] = getCountriesDropDown($country); } if ($step == "2") { if (count($result['approveremails'])) { $smartyvalues['displaydata'] = $result['displaydata']; $smartyvalues['approveremails'] = $result['approveremails']; $templatefile = "configuressl-steptwo"; } else { redir("cert=" . $cert . "&step=3"); } } if ($step == "3") { $templatefile = "configuressl-complete"; } } else { include "login.php";
if (count($_SESSION['cart']['domains'])) { $smartyvalues['domainsinorder'] = true; } $domaincontacts = array(); $result = select_query("tblcontacts", "", array("userid" => $_SESSION['uid'], "address1" => array("sqltype" => "NEQ", "value" => "")), "firstname` ASC,`lastname", "ASC"); while ($data = mysql_fetch_array($result)) { $domaincontacts[] = array("id" => $data['id'], "name" => $data['firstname'] . " " . $data['lastname']); } $smartyvalues['domaincontacts'] = $domaincontacts; $smartyvalues['contact'] = $contact; if ($contact == "addingnew") { $addcontact = true; } $smartyvalues['addcontact'] = $addcontact; $smartyvalues['domaincontact'] = array("firstname" => $domaincontactfirstname, "lastname" => $domaincontactlastname, "companyname" => $domaincontactcompanyname, "email" => $domaincontactemail, "address1" => $domaincontactaddress1, "address2" => $domaincontactaddress2, "city" => $domaincontactcity, "state" => $domaincontactstate, "postcode" => $domaincontactpostcode, "country" => $domaincontactcountry, "phonenumber" => $domaincontactphonenumber); $smartyvalues['domaincontactcountrydropdown'] = getCountriesDropDown($domaincontactcountry, "domaincontactcountry"); $gatewaysoutput = array(); foreach ($availablegateways as $module => $vals) { $params = getGatewayVariables($module); $params['amount'] = $carttotals['rawtotal']; $params['currency'] = $currency['code']; if (function_exists($module . "_orderformoutput")) { $gatewaysoutput[] = call_user_func($module . "_orderformoutput", $params); continue; } } $smartyvalues['gatewaysoutput'] = $gatewaysoutput; if ($cartsummary) { $ajax = "1"; $templatefile = "cartsummary"; $productinfo = $orderfrm->setPid($_SESSION['cart']['cartsummarypid']);