avatar_3xclus1v3

Как зарегистрироваться в MU Online: веб-сайты и помощь Web

Автор 3xclus1v3, 2012 Дек. 13, 01:30

« назад - далее »

0 Пользователи и 1 гость просматривают эту тему.

Ключевые слова [SEO] mu onlineВеб-сайтырегистрация

3xclus1v3

Добрый вечер!
Подскажите, в чем косяк.. Регистрируюсь, пишет что всё гуд, акаунт зарегистрирован, но в базе он не появляется...
Соответственно зайти на акаунт тоже нельзя, пишет неправильный акаунт/пароль...
Вот код registration.php
Спойлер
<h4><?php print phrase_select_reg;?></h4>
<?php
include"inc/m_protect.inc.php";

if (isset($_GET['ref'])){

$user_ip=getenv("REMOTE_ADDR");
$ref = stripslashes($_GET['ref']);
$ip_signup_acc = "select ip,acc,acc2,acc3 from ip_log WHERE ip='$user_ip'";
$ip_signup_acc = mssql_query( $ip_signup_acc );
$ip_signup_acc = mssql_fetch_row($ip_signup_acc);

if(empty($ip_signup_acc
  • )){$msquery7 ="INSERT INTO ip_log (ip,acc,acc2,acc3) VALUES ('$user_ip','$login',NULL,NULL)";
}

elseif(empty($ip_signup_acc[1]) OR $ip_signup_acc[1] == NULL){$msquery7 = "UPDATE ip_log Set acc='$login' Where ip='$user_ip'";
}

elseif(empty($ip_signup_acc[2]) OR $ip_signup_acc[2] == NULL){$msquery7 = "UPDATE ip_log Set acc2='$login' Where ip='$user_ip'";
}
elseif(empty($ip_signup_acc[3]) OR $ip_signup_acc[3] == NULL){$msquery7 = "UPDATE ip_log Set acc3='$login' Where ip='$user_ip'";
}
else{$reg_error_msg="Account Limit From 1 ip adress: 3.
Your accounts: $ip_signup_acc[1] ,$ip_signup_acc[2], $ip_signup_acc[3]";exit;
}
}
if (isset($_POST['s_start'])){

$login = strtolower(stripslashes($_POST['login']));
$nickname = stripslashes($_POST['nickname']);
$email = stripslashes($_POST['email']);
$pw = stripslashes($_POST['pass']);
$pw2 = stripslashes($_POST['re_pass']);
$sques = stripslashes($_POST['sicret_question']);
$sansw = stripslashes($_POST['sicret_answer']);
$sql_email_check = mssql_query("SELECT mail_addr FROM MEMB_INFO WHERE mail_addr='$email'");
$sql_username_check = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$login'");
$email_check = mssql_num_rows($sql_email_check);
$username_check = mssql_num_rows($sql_username_check);
$rules_verify = stripslashes($_POST['rules_verify']);
$ref = stripslashes($_POST['ref']);
$key=$_POST['code_in'];

$ip_signup_acc = "select ip,acc,acc2,acc3 from ip_log WHERE ip='$user_ip'";
$ip_signup_acc = mssql_query( $ip_signup_acc );
$ip_signup_acc = mssql_fetch_row($ip_signup_acc);

if (isset($_GET['ref'])){

if(empty($ip_signup_acc
  • )){$msquery7 ="INSERT INTO ip_log (ip,acc,acc2,acc3) VALUES ('$user_ip','$login',NULL,NULL)";
}

elseif(empty($ip_signup_acc[1]) OR $ip_signup_acc[1] == NULL){$msquery7 = "UPDATE ip_log Set acc='$login' Where ip='$user_ip'";
}

elseif(empty($ip_signup_acc[2]) OR $ip_signup_acc[2] == NULL){$msquery7 = "UPDATE ip_log Set acc2='$login' Where ip='$user_ip'";
}
elseif(empty($ip_signup_acc[3]) OR $ip_signup_acc[3] == NULL){$msquery7 = "UPDATE ip_log Set acc3='$login' Where ip='$user_ip'";
}
else{$reg_error_msg="Account Limit From 1 ip adress: 3.
Your accounts: $ip_signup_acc[1] ,$ip_signup_acc[2], $ip_signup_acc[3]";exit;
}
}
if (eregi("[^a-zA-Z0-9_-]", $login)) { header('Location: https://millenium-mu.ru/?pg=msg_reg&gtn=error');  exit(); }

if (empty($login) || empty($nickname) || empty($email) || empty($pw) || empty($pw2) || empty($sques) || empty($sansw))
{
$reg_error_msg = phrase_reg_fill_up_all;
}
elseif($_SESSION['random'] != md5($key)){
$reg_error_msg = phrase_reg_wrong_code;
}
elseif($sques==$sansw){$reg_error_msg=phrase_reg_q_e_a;
}
elseif($pw!=$pw2){$reg_error_msg=phrase_reg_pw_dont_match;
}
elseif($rules_verify != 'yes'){$reg_error_msg=phrase_reg_dont_agree_with_reg_terms;
}
elseif($email_check > 0){
$reg_error_msg = phrase_reg_already_exists_email;
}
elseif ($username_check > 0)
{
$reg_error_msg = phrase_reg_already_exists_login;
}

else
{
if($Web['account_activation']['is_enabled']== 1){
$bloc_code=1;
$is_not_activated=1;
$alphanum = "01234567890abcdefghijklmnopqrstuvwxyz";
$random_value= substr(str_shuffle($alphanum), 0, 8);

$activation_code=md5($login.$random_value.$email);

$activation_link=$Web['mail']['web_http_adress']."?pg=activate&c=$activation_code";


$mTo            = $email;
$mSubject        = ''.$Web['mail']['servername'].' [Account Registration]';
$mHeaders        = "From: ".$Web['mail']['from']."rn" .
"Reply-To: ".$Web['mail']['reply_to']."rn" .
"X-Mailer: X32 Kernel Engines (PHP/" . phpversion() . ")rn" .
"X32K: https://xap.tria.lv/MDaemonrn" .
"Content-type: text/plain; charset=UTF-8";
$mMessage        = "Привет $login!rn" .
"Вы получили отчёт о регистрации аккаунта на сервере ".$Web['mail']['web_http_adress']."rnrn" .
"В этом письме содержится дополнительная информация о вашем аккаунте.rn" .
"Login : $loginrn" .
"Pasword : $pwrnrn" .
"Pres On Link Below.rn" .
"$activation_linkrnrnrn" .
"Благодарим за понимание. Желаем увидеть вас в рядах наших войнов.";

if(!@mail($mTo, $mSubject, $mMessage, $mHeaders))
{
$reg_error_msg = "Sorry We have some problems with e-mile send, try later...<br /><br />Pres <a href="/?pg=news">Here</a> to go back to news.";
}
}
else{
$bloc_code='0';
$activation_code=NULL;
$is_not_activated='0';
}

if(!$reg_error_msg){

$rand = rand(10000, 99999);
if($Web['MD5'] == 1){
$md5_code=" [dbo].[UFN_MD5_ENCODEVALUE]('$pw', '$login')";
}
else{
$md5_code="'$pw'";
}


$msquery3 = "INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,post_code,addr_info,addr_deta,tel__numb
,mail_addr,phon_numb,fpas_ques,fpas_answ,job__code,appl_days,modi_days,out__days
,
true_days,mail_chek,bloc_code,ctl1_code,ref,is_not_activated,activation_code) VALUES ('$login',$md5_code,'$nickname', '1','1234','11111','','12343','$email','$email','$sques','$sansw','1','2003-11-23','2003-11-23','2003-11-23','2003-11-23','1','$bloc_code','1','$ref','$is_not_activated','$activation_code')";
$msquery4 = "INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Sect
ion,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days )  VALUES ('2005','1',1234,'$login','$nickname',1,'7','6','3','6','6','2003-11-23 10:36:00','0' )";
$msquery5 = "INSERT INTO DmN_Shop_Credits (memb___id,credits) VALUES ('$login','0')";
$msquery6 = "UPDATE MEMB_INFO Set ref_c=ref_c+1 Where memb___id='$ref'";

$msresults= mssql_query($msquery3);
$msresults= mssql_query($msquery4);
$msresults= mssql_query($msquery5);
$msresults= mssql_query($msquery6);
if (isset($msquery7)){
$msresults= mssql_query($msquery7);
}
unset($_SESSION['random']);
header('Location: https://millenium-mu.ru/?pg=msg_reg&gtn=success');
$Reg_Success='1';
}
}
}
if($reg_error_msg){print"<div class="msg-error"><ul><li>$reg_error_msg</li></ul></div>";
}
if(!$Reg_Success){
$alphanum = "01234567890";
$secure_img_url = "Secure-Image-".md5(substr(str_shuffle($alphanum), 0, 5)).".jpg";
?>

<form method="post" action="">
<table border="0" cellspacing="0" cellpadding="2" width="350" align="center">
<tr>
<td><b><?php print phrase_reg_login;?>:</b><BR></td>
<td><input type="text" size=15 class="txt-simple" name="login" value="<?php print $login;?>" size="20" maxLength="10" /></td>

</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>

<td><b><?php print phrase_reg_nick;?>:</b></td>
<td><input type="text" class="txt-simple" name="nickname" value="<?php print $nickname;?>" size="13" maxLength="15" /></td>
</tr>
<tr>
<td colspan="2" height="10"></td>

</tr>
<tr>
<td><b><?php print phrase_reg_pw;?>:</b></td>
<td><input type="password" class="txt-simple" name="pass" value="" size="15" maxLength="12" /></td>
</tr>
<tr>
<td><b><?php print phrase_reg_re_pw;?>:</b></td>
<td><input type="password" class="txt-simple" name="re_pass" value="" size="15" maxLength="12" /></td>

</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>

<td><b><?php print phrase_reg_mail;?>:</b></td>
<td><input type="text" class="txt-simple" name="email" value="<?php print $email;?>" size="15" maxLength="35" /></td>
</tr>
<tr>
<td colspan="2" class="rc"><?php print phrase_reg_mail_desc;?></td>
</tr>

<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>
<td><b><?php print phrase_reg_sq;?>:</b></td>
<td><input type="text" class="txt-simple" name="sicret_question" value="<?php print $sques;?>" size="15" maxLength="20" /></td>
</tr>
<tr>

<td><b><?php print phrase_reg_sa;?>:</b></td>
<td><input type="text" class="txt-simple" name="sicret_answer" value="<?php print $sansw;?>" size="15" maxLength="20" /></td>
</tr>
<tr>
<td colspan="2" height="10"></td>

</tr>
<tr>
<td><img src="<?php print $secure_img_url;?>"></td>
<td><input type="text" class="txt-simple" size="7" maxLength="5" name="code_in" /></td>
</tr>
<tr>
<td colspan="2" class="rc"><?php print phrase_reg_code;?></td>
</tr>

<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>
<td colspan="2">
<textarea name="Rules" cols="55" rows="15" disabled="disabled"><?php include "rules.txt";?></textarea>
<input type="checkbox" name="rules_verify" value="yes" /> <?php print phrase_reg_agree_with;?><br />

</td>
</tr>
<tr>
<td colspan="2" height="10"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="hidden" name="ref" value="<?php print $ref;?>"><input type="submit" class="bulett" name="s_start" value="<?php print phrase_reg;?>"></td>
</tr>
</table>
</form>
<?php
}
?>
[свернуть]


ausmann

сирейники меняем в мейнах тока так
а про МД 5 совсем забыли  

3xclus1v3

Закройте тему, проблема решена. Спасибо Profesor08, в базе не хватало столбцов и строчек...

Похожие темы (5)