"; if(!valid_pass_repass($pass, $re_pass)) $msg_error .= $USR_MNG_FEEDBACK; //\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ if(is_null($msg_error)){ $rs_un = mysql_query("Select pk_infid From std_info ORDER BY pk_infid DESC LIMIT 1"); $cur_year = substr(get_jalali_date(date("Y-m-d")), 2, 2); //\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ if(mysql_num_rows($rs_un)==1 && ereg("^[8-9]{1}[0-9]{5}$", mysql_result($rs_un, 0)) ){ $last_no = (int)right(mysql_result($rs_un, 0), 4); $last_no ++; $new_no = $cur_year.str_pad($last_no, 4, "0", STR_PAD_LEFT); } else{ $last_no = ""; $new_no = $cur_year.str_pad($last_no, 4, "0", STR_PAD_LEFT); } //\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ mysql_query("Insert Into std_info(pk_infid, mail, password, name, family, session_id, last_login, s_date, actived, portrait) Values('$new_no', '$mail', '". md5($pass) ."', '".str_in_db($name, 50)."', '".str_in_db($family, 50)."', NULL, NULL, NULL, '0', '')") or die(mysql_error()); $_SESSION["OK"] = "OK".session_id(); mkdir($_SERVER['DOCUMENT_ROOT']."/-/experimental/$new_no", 0755); chmod ($_SERVER['DOCUMENT_ROOT']."/-/experimental/$new_no",0777); $source_file = $_SERVER['DOCUMENT_ROOT']."/_inc/std_index.php"; $dest_file = $_SERVER['DOCUMENT_ROOT']."/-/experimental/$new_no/index.php"; if(!copy($source_file, $dest_file)) die("failed to copy $source_file"); echo("

 

Dear ".$name."

Your registration is successful

Here is your user information

Your home page: http://".$_SERVER['REMOTE_ADDR']."/$new_no/

Your user ID: $new_no
(Please keep this number. You can announce it to friends to view your page)

Your Password: $pass

Click Here for login

"); include_once($_SERVER['DOCUMENT_ROOT']."/-/english/includes/footer_en.php"); exit(); } } else{ $mail = ""; $pass = ""; $re_pass = ""; $name = ""; $family = ""; } ?> Student Section

Email
*Password
*Confirm Password
Name
Family