Пример #1
0
    $send_ecommercemail = 0;
} else {
    $send_ecommercemail = 1;
}
$qry_select1 = "Select companyname,email ,url1  from cs_companydetails where userid='{$gatewayid}'";
$rst_select1 = mysql_query($qry_select1, $cnn_cs);
$rst_result1 = mysql_fetch_array($rst_select1);
$companyname1 = $rst_result1['companyname'];
$email1 = $rst_result1['email'];
$url1 = $rst_result1['url1'];
$current_date_time = func_get_current_date_time();
$user_nameexist = 0;
if ($company) {
    $user_nameexist = func_checkUsernameExistInAnyTable($username, $cnn_cs);
    $user_companyexist = func_checkCompanynameExistInAnyTable($companyname, $cnn_cs);
    $user_mailidexist = func_checkEmailExistInAnyTable($email, $cnn_cs);
    $qry_select_user = "******";
    //print $qry_select_user;
    if ($user_nameexist == 1) {
        $msgtodisplay = "<table width='350' height='100' align='center' valign='middle' style='border:1px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='1' color='red'>Existing username !! </font></td></tr><tr><td align='center'><a href='javascript:window.history.back();'><img border='0' src='images/back.jpg'></a></td></tr></table>";
    } elseif ($user_companyexist == 1) {
        $msgtodisplay = "<table width='350' height='100' align='center' valign='middle' style='border:1px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='1' color='red'>Existing Company name !! </font></td></tr><tr><td align='center'><a href='javascript:window.history.back();'><img border='0' src='images/back.jpg'></a></td></tr></table>";
    } elseif ($user_mailidexist == 1) {
        $msgtodisplay = "<table width='350' height='100' align='center' valign='middle' style='border:1px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='1' color='red'>Existing Mail ID !! </font></td></tr><tr><td align='center'><a href='javascript:window.history.back();'><img border='0' src='images/back.jpg'></a></td></tr></table>";
    } else {
        $qry_insert_user = "******";
        $qry_insert_user .= " values('{$username}','{$password}','{$companyname}','{$email}','{$voulmeNumber}',0,'{$transaction_type}','{$how_about_us}','{$reseller}','{$current_date_time}',{$send_ecommercemail},{$gatewayid})";
        if (!($show_sql = mysql_query($qry_insert_user))) {
            print mysql_errno() . ": " . mysql_error() . "<BR>";
            print "Cannot execute query <br>";
            print $qry_insert_user;
Пример #2
0
 if ($companyname == "" || $contactname == "") {
     $msgtodisplay = "Insufficient data.";
     message($msgtodisplay);
     exit;
 }
 if ($username == "") {
     $msgtodisplay = "Please enter user name.";
     message($msgtodisplay);
     exit;
 }
 if (func_checkUsernameExistInAnyTable($username, $cnn_cs)) {
     $msgtodisplay = "User name already exist.";
     message($msgtodisplay);
     exit;
 }
 if (func_checkEmailExistInAnyTable($email, $cnn_cs)) {
     $msgtodisplay = "Email already exist.";
     message($msgtodisplay);
     exit;
 }
 if (func_checkCompanynameExistInAnyTable($companyname, $cnn_cs)) {
     $msgtodisplay = "Company already exist.";
     message($msgtodisplay);
     exit;
 }
 if ($password == "") {
     $msgtodisplay = "Please enter Password.";
     message($msgtodisplay);
     exit;
 }
 $qry_select = "SELECT cs_companydetails.companyname, cs_companydetails.url1, cs_logo.logo_filename,cs_companydetails.email FROM cs_companydetails, cs_logo WHERE cs_companydetails.userId ='{$sgatewayCompanyId}' AND cs_companydetails.userId = cs_logo.Logo_company_id";