0) { $control_veri = mysql_fetch_array($user_control_sql); $control_hata = ""; if (($control_veri['username'] == $_REQUEST['username']) OR (strtolower($control_veri['username']) == $UserName)) { $control_hata .= "This e-mail address registered.Please enter another e-mail address.."; $userde_hatali = "
"; $username_renk = "bgcolor=FFDDDD"; $username_text_renk = " style=\"background-color: #FFFFE8\""; } if ($control_veri['email'] == $_REQUEST['email']) { $control_hata .= $userde_hatali."This e-mail address registered.Please enter another e-mail address.."; $email_renk = "bgcolor=FFDDDD"; $email_text_renk = " style=\"background-color: #FFFFE8\""; } $control_renk = "bgcolor=FFDDDD"; $control_text_renk = " style=\"background-color: #FFFFE8\""; $RegisterError = "On"; } if (strlen($_REQUEST['password']) < 4) { $pass_hata = "Your password not allowed. Please enter between 4 and 32 characters."; $pass_renk = "bgcolor=FFDDDD"; $pass_text_renk = " style=\"background-color: #FFFFE8\""; $RegisterError = "On"; } if ($_REQUEST['password'] != $_REQUEST['repassword']) { $pass2_hata = "Your password and re-password does not match.Please re-enter your password."; $pass2_renk = "bgcolor=FFDDDD"; $pass2_text_renk = " style=\"background-color: #FFFFE8\""; $RegisterError = "On"; } if ((!eregi(" ", $_REQUEST['user_name'])) OR (strlen($_REQUEST['user_name']) < 5)) { $name_hata = "Wrong last and first name."; $name_renk = "bgcolor=FFDDDD"; $name_text_renk = " style=\"background-color: #FFFFE8\""; $name_value = " value=\"".$_REQUEST['user_name']."\""; $RegisterError = "On"; } else { $name_value = " value=\"".$_REQUEST['user_name']."\""; } if (strlen($_REQUEST['company']) < 5) { $comp_hata = "Please enter your correct company name.."; $comp_renk = "bgcolor=FFDDDD"; $comp_text_renk = " style=\"background-color: #FFFFE8\""; $comp_value = " value=\"".$_REQUEST['company']."\""; $RegisterError = "On"; } else { $comp_value = " value=\"".$_REQUEST['company']."\""; } if ($_REQUEST['category'] == "noselect") { $cat_hata = "Please select your business category.."; $cat_renk = "bgcolor=FFDDDD"; $cat_text_renk = " style=\"background-color: #FFFFE8\""; $cat_value = $_REQUEST['category']; $RegisterError = "On"; } else { $cat_value = $_REQUEST['category']; } if ($_REQUEST['category'] == "maincat") { $cat_hata = "Only subcategories can be selected!"; $cat_renk = "bgcolor=FFDDDD"; $cat_text_renk = " style=\"background-color: #FFFFE8\""; $cat_value = $_REQUEST['category']; $RegisterError = "On"; } else { $cat_value = $_REQUEST['category']; } if (strlen($_REQUEST['address']) < 7) { $address_hata = "Please enter your correct business address..."; $address_renk = "bgcolor=FFDDDD"; $address_text_renk = " style=\"background-color: #FFFFE8\""; $address_value = $_REQUEST['address']; $RegisterError = "On"; } else { $address_value = $_REQUEST['address']; } if ($_REQUEST['country'] == "noselect") { $country_hata = "Please select a country."; $country_renk = "bgcolor=FFDDDD"; $country_text_renk = " style=\"background-color: #FFFFE8\""; $country_value = $_REQUEST['country']; $RegisterError = "On"; } else { $country_value = $_REQUEST['country']; } if (strlen($_REQUEST['state']) < 2) { $state_hata = "Please enter your state or city."; $state_renk = "bgcolor=FFDDDD"; $state_text_renk = " style=\"background-color: #FFFFE8\""; $state_value = " value=\"".$_REQUEST['state']."\""; $RegisterError = "On"; } else { $state_value = " value=\"".$_REQUEST['state']."\""; } list($tuk, $tak, $tnk) = explode(".", $_REQUEST['tel']); $etak = $tak; $etnk = $tnk; settype($tak, "integer"); settype($tnk, "integer"); $telefon_hatasi = "no"; if ($tak != $etak) { $telefon_hatasi = "yes"; } if ($tnk != $etnk) { $telefon_hatasi = "yes"; } if (substr($tuk, 0, 1) != '+') { $telefon_hatasi = "yes"; } if (strlen($tuk) < 2) { $telefon_hatasi = "yes"; } if (gettype($tak) != "integer") { $telefon_hatasi = "yes"; } if (strlen($tnk) < 5) { $telefon_hatasi = "yes"; } if (gettype($tnk) != "integer") { $telefon_hatasi = "yes"; } if ($telefon_hatasi == "yes") { $tel_hata = "Please enter your correct phone number. Example: +90.212.3209000"; $tel_renk = "bgcolor=FFDDDD"; $tel_text_renk = " style=\"background-color: #FFFFE8\""; $tel_value = " value=\"".$_REQUEST['tel']."\""; $RegisterError = "On"; } else { $tel_value = " value=\"".$tuk.".".$tak.".".$tnk."\""; } if ($_REQUEST['fax'] != "") { // fax control begin list($fuk, $fak, $fnk) = explode(".", $_REQUEST['fax']); $efak = $fak; $efnk = $fnk; settype($fak, "integer"); settype($fnk, "integer"); $fax_hatasi = "no"; if ($fak != $efak) { $fax_hatasi = "yes"; } if ($fnk != $efnk) { $fax_hatasi = "yes"; } if (substr($fuk, 0, 1) != '+') { $fax_hatasi = "yes"; } if (strlen($fuk) < 2) { $fax_hatasi = "yes"; } if (gettype($fak) != "integer") { $fax_hatasi = "yes"; } if (strlen($fnk) < 5) { $fax_hatasi = "yes"; } if (gettype($fnk) != "integer") { $fax_hatasi = "yes"; } if ($fax_hatasi == "yes") { $fax_hata = "Please enter your correct fax number. Example: +90.212.3209000"; $fax_renk = "bgcolor=FFDDDD"; $fax_text_renk = " style=\"background-color: #FFFFE8\""; $fax_value = " value=\"".$_REQUEST['fax']."\""; $RegisterError = "On"; } else { $fax_value = " value=\"".$fuk.".".$fak.".".$fnk."\""; } } if ($_REQUEST['on_check'] != "yes") { $oc_hata = "Sorry, You can not be a member of Turkeypages.com.Please accept Membership Agreement."; $oc_renk = "bgcolor=FFDDDD"; $oc_value = "no"; $oc_text_renk = " style=\"background-color: #FFFFE8\""; $RegisterError = "On"; } else { $oc_value = "yes"; } if ($_SESSION['resim_yazisi'] != $_REQUEST['verificode']) { $verified_hata = "Please type in the word shown above.."; $verified_renk = "bgcolor=FFDDDD"; $verified_value = "no"; $verified_text_renk = " style=\"background-color: #FFFFE8\""; $RegisterError = "On"; //$resim_yazisi = RAND(11111, 99999); session_register("resim_yazisi"); } //else { $resim_yazisi = RAND(11111, 99999); session_register("resim_yazisi"); } if ($RegisterError == "Off") { $encodepass = md5($_REQUEST['password']); $ConfirmCode = RandomChars(8); $sql = "INSERT INTO members (id, category, email, username, password, name, company, www, address, country, state, zip, phone, fax, regtime, confirmcode, status) VALUES ('', '".$cat_value."', '" . $_REQUEST['email'] . "', '" . $UserName . "', '" . $encodepass . "', '" . $_REQUEST['user_name'] . "', '" . $_REQUEST['company'] . "', '" . $_REQUEST['web_url'] . "', '" . $_REQUEST['address'] . "', '" . $_REQUEST['country'] . "', '" . $_REQUEST['state'] . "', '" . $_REQUEST['postalcode'] . "', '" . $_REQUEST['tel'] . "', '" . $_REQUEST['fax'] . "', '" . time() . "', '" . $ConfirmCode . "', '0')"; $add_member = mysql_query($sql); $header = "From: Turkeypages Registration \n"; $header .= "Content-Type: text/plain; charset=iso-8859-9\n"; $header .= "X-Sender: Turkeypages Registration \n"; $header .= "X-Mailer: Turkeypages\n"; $header .= "X-Priority: 1\n"; $header .= "Return-Path: <$SERVER_ADDR>\n"; $email_title = "Your Turkeypages Registration Confirmation"; $email_message = "Dear ". $_REQUEST['user_name'] .", Welcome to the Turkeypages Treading Area! Use your Member ID and Password for all FREE services on Turkeypages. Member ID: " . $_REQUEST['email'] . " Password: " . $_REQUEST['password'] . " Upon initial Sign In, a Verification Code must be entered to validate your registration. This verification, ensures accurate delivery of all Turkeypages services and also prevents fraud. Verification Code: ".$ConfirmCode." For initial Sign In, go to: ".$myurl."members/index.php Or Verify Address: ".$myurl."members/confirmation.php?email=".$_REQUEST['email']."&ConfirmCode=".$ConfirmCode."&Confirmation=yes http://www.turkeypages.com Treading Area"; @mail($_REQUEST['email'], $email_title, $email_message, $header); Header("Location: ".$myurl."members/confirmation.php?email=".$_REQUEST['email']); } } ?>

 Registration Form
 Some fields are missing or entered wrong. This fields shown in red color.." . $control_hata . ""; } ?>
 
E-Mail   *
Username   *
Password   *
Re-Password   *
 
Last and First Name   *
Company Name   *
Business Category   *
Web Address   *
Business Address   *
Country   *
State/City   *
Zip Code  
Business Phone   * (Sample: +90.212.3209000)
Fax Number   * (Sample: +90.212.3209000)
  name="on_check" value="yes"> I agree to Turkeypages.com's Use Agreement.
 Verify Your Registration " align="absmiddle"> *
Please type in the numbers shown above...