"; } //Check if User Login Id contains Maximum 16 characters or not //Check if User Login Id contains Minimum 3 characters or not if(strlen(trim($_POST["user_id"])) < 3 || strlen(trim($_POST["user_id"])) > 16) { $ERROR .= "- " . $lang["JS_Check_User_Login"] . "
"; } //Check if User ID is not start form no... if($user->checkUserName_No(trim($_POST["user_id"]))) { $ERROR .= "- " . $lang["JS_Check_User_Lenght"] . "
"; } //Check if User Id is Valid or Not if(!$user->checkUserName(trim(strtolower($_POST["user_id"])))) { $ERROR .= "- " . $lang["JS_Check_Special_Cha"] . "
"; } //Check if User Login Id is Unique or Not if(!$user->Check_User_Exist(trim($_POST["user_id"]))) { $ERROR .= "- " . $lang["User_ID_Not_Available"] . "
"; } //Check if Password is Empty or Not if(isset($_POST["password"]) && trim($_POST["password"]) == "") { $ERROR .= "- " . $lang["JS_Passwd"] . "
"; } //Check if Password Retype is Empty or Not if(isset($_POST["password_retype"]) && trim($_POST["password_retype"]) == "") { $ERROR .= "- " . $lang["JS_Re_Passwd"] . "
"; } //Check if Compair Password & Password Retype r same or not?? if($_POST["password"] != $_POST["password_retype"]) { $ERROR .= "- " . $lang["JS_Confirm"] . "
"; } //Check if First Name is Empty or Not if(isset($_POST["mem_fname"]) && trim($_POST["mem_fname"]) == "") { $ERROR .= "- " . $lang["JS_Fname"] . "
"; } //Check if Last Name is Empty or Not if(isset($_POST["mem_lname"]) && trim($_POST["mem_lname"]) == "") { $ERROR .= "- " . $lang["JS_Lname"] . "
"; } //Check if Phone is Empty or Not if(isset($_POST["mem_phone"]) && trim($_POST["mem_phone"]) == "") { $ERROR .= "- " . $lang["JS_Phone"] . "
"; } //Check if Address is Empty or Not if(isset($_POST["mem_address"]) && trim($_POST["mem_address"]) == "") { $ERROR .= "- " . $lang["JS_Address"] . "
"; } //Check if City is Empty or Not if(isset($_POST["mem_city"]) && trim($_POST["mem_city"]) == "") { $ERROR .= "- " . $lang["JS_City"] . "
"; } //Check if Zipcode is Empty or Not if(isset($_POST["mem_zipcode"]) && trim($_POST["mem_zipcode"]) == "") { $ERROR .= "- " . $lang["JS_Zipcode"] . "
"; } //Check if Country is selected or Not if($_POST["mem_country"] == 0) { $ERROR .= "- " . $lang["JS_Country"] . "
"; } //Check if User Email is Empty or Not if(isset($_POST["mem_email"]) && trim($_POST["mem_email"]) == "") { $ERROR .= "- " . $lang["JS_Mail"] . "
"; } //Check if User Email is Valid or Not elseif(!$user->checkUserEmail(trim($_POST["mem_email"]))) { $ERROR .= "- " . $lang["JS_Valid_Mail"] . "
"; } //Check if user email is already exists or not if(!$user->Check_Email_ID(trim($_POST['mem_email'])) == true) { $ERROR .= "- " . $lang["JS_Taken_Mail"] . "
"; } include_once("securimage/securimage.php"); $securimage = new Securimage(); if ( $securimage->check($_POST['captcha_code']) == false ) $ERROR .= "- " . 'Incorrect security code entered.
'; if ( $ERROR == "" ) { $verify_code = getActivationCode(); global $mail2; //$mail2 = ''; //$mail2 = new htmlMimeMail(); $tpl2 = new Smarty; $tpl2->compile_dir = $physical_path['Site_Root']. 'templates_c/'; $sendinfo = $emails->GetEmailDetails1(EMAIL_SIGNUP); //$mail2->setFrom($sendinfo->email_adress); //$mail2->setSubject($sendinfo->email_subject); $tpl2->assign(array("user_id" => $_POST['user_id'], "password" => $_POST['password'], "email_id" => $_POST['mem_email'], "verify_url_1" => "Click Here", "verify_url_2" => "Click Here", "verification_code" => $verify_code, )); $mail_content_header = $tpl2->fetch("email_template:".EMAIL_HEADER); $mail_content_footer = $tpl2->fetch("email_template:".EMAIL_FOOTER); $mail_content_reg = $tpl2->fetch("email_template:".EMAIL_SIGNUP); $mail_html = "
".$mail_content_header."
".$mail_content_reg."
".$mail_content_footer."
"; //$mail2->setHtml($mail_html); //asta aici deactivat //$result = $mail2->send(array($_POST['mem_email'])); $user_name = $_POST['user_id']; $user->Signup($_POST,$verify_code,$user_name); if($_POST['aff_user'] != '') { $uid = $user->Check_User_ID($_POST['aff_user']); if($uid == 0) { $user->Insert_Affilation($_POST['aff_user'],$user_name); } } $user->IsValidLogin($user_name,$_POST['password'],1); $_SESSION['Member_As_Buyer'] = $_POST['check_buyer']; $_SESSION['Member_As_Seller'] = $_POST['check_seller']; // if user is not as buyer or seller if($_SESSION['Member_As_Buyer'] != 1 && $_SESSION['Member_As_Seller'] != 1) { header("location: account.php"); exit(); } // if user is as buyer & not as seller if($_SESSION['Member_As_Buyer'] == 1 && $_SESSION['Member_As_Seller'] != 1) { header("location: editbuyerprofile.php"); exit(); } // if user is as seller & not as buyer if($_SESSION['Member_As_Buyer'] != 1 && $_SESSION['Member_As_Seller'] == 1) { header("location: editsellerprofile.php"); exit(); } // if user is as seller & as buyer if($_SESSION['Member_As_Buyer'] == 1 && $_SESSION['Member_As_Seller'] == 1) { header("location: editbuyerprofile.php"); exit(); } } else { $Action = A_VIEW; } } if($_GET['Checking'] == 'CheckID') { $user->Check_User_ID($_GET['check']); if($db->num_rows() == 0) $response = $lang['User_ID_Available']; if($db->num_rows() == 1) $response = $lang['User_ID_Not_Available']; print $response;die; } elseif($_GET['Checking'] == 'CheckEmail') { $result = $user->Check_Email_ID($_GET['check']); if($result == 1) $response = $lang['JS_Not_Taken_Mail']; if($result == 0) $response = $lang['JS_Taken_Mail']; print $response;die; } $user->Destroy(); if($_GET['aff'] != '') { $uid = $user->Check_User_ID($_GET['aff']); if($uid == 0) { $Action = A_VIEW; } else { header("location: not_affilate_user.php"); exit(); } } if($Action == ''|| $Action == A_VIEW) { $contry_list = $country1->GetCountryList(); $Country = fillDbCombo($contry_list,'country_id','country_name'); $file_name = 'en_reg_condition.txt'; $content = readFileContent($physical_path['Upload'].$file_name); $tpl->assign(array( "T_Body" => 'signup'. $config['tplEx'], "JavaScript" => array('signup.js',"check.js"), "lang" => $lang, "Country_List" => $Country, "msg" => $msg, "ERROR" => $ERROR, "checked" => "checked", "aff" => $_GET['aff'], "term1" => stripslashes($content), "tab" => 4, "classSU" => "active", "navigation" => '' )); $result = $cats->HomeCategory(); $rscnt = $db->num_rows(); $total = 0; $i=0; $arr_cats =explode(",",$mem_category); while($db->next_record()) { $arr_cat_name[$i] = $db->f('cat_name'); $arr_cat_id[$i] = $db->f('cat_id'); $i++; } $tpl->assign(array("catid" => $arr_cat_id, "catname" => $arr_cat_name, "Loop" => $rscnt, "checked_cat" => $arr_cats, )); } $tpl->display('default_layout'. $config['tplEx']); ?>