".LA_ALREADY_LOGGED_DESC."

"; include("footer_inc.php"); exit; } $lExtraFieldArray=getMandatoryValues("",2); $i=0; if (is_array($lExtraFieldArray)) { foreach ($lExtraFieldArray as $item) { $value="e_" . $item["q_field"]; $lArray[$i]["id"]=$i; $lArray[$i]["field"]=$value; $lStr=$_REQUEST[$value]; $lValueStr=""; if ($lStr) { if (is_array($lStr)) { foreach ($lStr as $lItem) $lValueStr.="$lItem,"; $lValueStr=substr($lValueStr,0,-1); } else $lValueStr=$lStr; } elseif (getParam("submit","")=="") { $lValueStr=$row[$value]; } if (getParam("submit","") !="") { if ($item["q_mand"] && empty($lValueStr)) $error_str.= "
  • ".LA_YOU_MUST ." " . $item["q_question"] . "
  • "; else if (!empty($item["q_reg_exp"])) { if (preg_match($item["q_reg_exp"],$lValueStr)) $error_str.="
  • ".$item["q_reg_exp_errormsg"] ." ".$item["q_question"]."
  • "; } } $lArray[$i]["value"]=$lValueStr; $data.="$value='$lValueStr',"; $i++; } $lExtraArray=getExtraAdvValue("",2,$lArray); $tplRegister->assign("extra_fields_array",$lExtraArray); } if (isset($_POST["submit"])) { $result = mysql_query ("select * from $usr_tbl where user_email = '$lEmail'"); if (mysql_num_rows($result)>0) $error_str.= "
  • ".LA_ERROR_MSG20."
  • "; if (!validEmail($lEmail)) $error_str.= "
  • ".LA_ERROR_MSG21."
  • "; if (ereg(" ", $lPassOne) OR strlen($lPassOne)<$set_password_len) $error_str.= "
  • ". ereg_replace("%1%",$set_password_len,LA_ERROR_MSG24)."
  • "; if (($lPassOne <> $lPassTwo)) $error_str.= "
  • ".LA_ERROR_MSG22."
  • "; if (($set_agree_conditions==1 AND !$lAgreeCond)) $error_str.= "
  • ".LA_CONDITIONS_MANDATORY ."
  • "; if (($set_img_validation==1 AND $_SESSION["validate_sign_session"] <> $lValidateSign)) $error_str.= "
  • ".LA_IMG_VER_FAILED ."
  • "; if ($usr_1_mandatory AND $usr_1 == "") $error_str.= "
  • ".LA_FIELD." $usr_1_text ". LA_MAND ."
  • "; // Find Extra fields in user table and get values from not empty rows $i=0; $lRemoteIP=getRemoteIp(); if (!empty($lEmail)) $error_str.=ban($lBanList, $lEmail); if (!empty($lRemoteIP)) $error_str.=ban($lBanList, getRemoteIp()); //getRemoteIp if (!$error_str) { $temp_validate = ""; if ($opt_verify) { $temp_validate = generatePassword(5); } else { $random = 0; } $registered = time(); if (!$opt_verify) { $p = ""; } else { $p = $lPassOne; } $user_id=createUser($lEmail,$lPassOne,$lName,$lEmelding,$lHideEmail,$temp_validate,$data); if ($result) { $tplRegister=new TplLoad; $tplRegister->assign("registration_ok",1); if ($set_payments) { $sql="select count(pid) as num from $pkg_tbl"; $res_count=q($sql); $row_c=mysql_fetch_array($res_count); $num_packages=$row_c["num"]; // Create new admin user if admin table is empty if ($num_packages<1) { q("INSERT INTO `$pkg_tbl` (`pid`, `pname`, `pterm`, `pdur`, `pactive`, `pprice`, `pcurrency`, `pupload`, `pmessages`, `pchat`, `pgb`, `protation`, `pvisitor`, `pfav`, `pmatch`, `pflirts`) VALUES (99, 'Default', 1, 3, 2, 0.00, 'USD', 3, 4, 999, 1, 1, 10, 10, 10, 10)"); q("INSERT INTO `$pkg_tbl` (`pid`, `pname`, `pterm`, `pdur`, `pactive`, `pprice`, `pcurrency`, `pupload`, `pmessages`, `pchat`, `pgb`, `protation`, `pvisitor`, `pfav`, `pmatch`, `pflirts`) VALUES (1, 'Small', 2, 30, 1, 10.00, 'USD', 5, 20, 999, 1, 1, 1, 30, 30, 30)"); q("INSERT INTO `$pkg_tbl` (`pid`, `pname`, `pterm`, `pdur`, `pactive`, `pprice`, `pcurrency`, `pupload`, `pmessages`, `pchat`, `pgb`, `protation`, `pvisitor`, `pfav`, `pmatch`, `pflirts`) VALUES (2, 'Medium', 1, 60, 1, 25.00, 'USD', 25, 250, 999, 1, 1, 55, 55, 55, 55)"); q("INSERT INTO `$pkg_tbl` (`pid`, `pname`, `pterm`, `pdur`, `pactive`, `pprice`, `pcurrency`, `pupload`, `pmessages`, `pchat`, `pgb`, `protation`, `pvisitor`, `pfav`, `pmatch`, `pflirts`) VALUES (3, 'Gold', 1, 90, 1, 60.00, 'USD', 200, 200, 999, 1, 1, 200, 200, 200, 200)"); } addPackage($user_id,99); } if ($opt_verify) { $subject = formatString(LA_NEW_USER_MAIL_TITLE, array("$name_of_site")); $message = formatString(LA_NEW_USER_MAIL_MSG_VAL . LA_NEW_USER_MAIL_MSG2_VAL, array("http://$url/verify.php?verify=$temp_validate","$name_of_site")); sendEmail($lEmail, $from_adress_mail, $subject, $message); $tplRegister->assign("verify",1); } elseif ($approve_mem) { //$sql = "update $usr_tbl set months='" .round($_REQUEST["months"]) ."' where user_id=$user_id"; //$r = q($sql); $tplRegister->assign("wait_approval",1); } else { $subject = formatString(LA_NEW_USER_MAIL_TITLE, array("$name_of_site")); $message = formatString(LA_NEW_USER_MAIL_MSG . LA_NEW_USER_MAIL_MSG2, array("http://$url/member_login.php","$lEmail","$lPassOne","$name_of_site")); sendEmail($lEmail, $from_adress_mail, $subject, $message); $_SESSION["valid_user"] = $user_id; addLoginItem($user_id); } } } } if (!isset($_POST["submit"]) OR (isset($_POST["submit"]) AND !empty($error_str))) { $tplRegister->assign("show_regform",1); $tplRegister->caching = false; $tplRegister->assign("name",getParam("name","")); $tplRegister->assign("email",getParam("email","")); $tplRegister->assign("passwd",getParam("passwd","")); $tplRegister->assign("passwd2",getParam("passwd2","")); $tplRegister->assign("emelding",getParam("emelding","")); $tplRegister->assign("hide_email",getParam("hide_email","")); $tplRegister->assign("agree_cond",getParam("agree_cond","")); $tplRegister->assign("la_pass",eregi_replace("%1%",$set_password_len,LA_PASS1)); $tplRegister->assign("set_agree_conditions",$set_agree_conditions); $tplRegister->assign("LA_CONDITIONS_TEXT",formatString(LA_CONDITIONS,array(""))); if ($error_str) $error_str=""; $tplRegister->assign("errorMsg",$error_str); if ($set_img_validation==1) $tplRegister->assign("image_validation",1); } $tplRegister->display("register.tpl"); include_once("footer_inc.php"); ?>