oveRLuckEd
New Member
- Joined
- Apr 28, 2008
- Messages
- 1,776
- Reaction score
- 398
Това сложи ли в Query Analyze ?при мен не бачкат 3 неща пробвах с това в началото да заместя теглих упдейтнатия web пак същото ето моите проблеми не ми работят модулите Ranking top players online.. ето снимки
1.ImageShack® - Online Photo and Video Hosting - > Rankinga
2.ImageShack® - Online Photo and Video Hosting -> Top Players
3.ImageShack® - Online Photo and Video Hosting -> Online
alter table character add GrResets int not null default 0
да, просто трябва да се сложи 1 проверка дали написаният герой принадлежи на написаният акаунт
<?
include "config.php";
if(isset($_POST['submit']))
{
$acc = secure($_POST['account']);
$char = secure($_POST['character']);
$pass = secure($_POST['password']);
$query2=(mssql_num_rows(mssql_query("SELECT * from MEMB_INFO where memb___id='$acc' and memb__pwd='$pass'")));
if($query2 <= 0)
{
echo "Greshen Account ili Parola"; $error = 1;
}
$query = mssql_query("SELECT * FROM Character Where Name='$char' AND AccountID='$acc'");
$proverka= mssql_num_rows($query);
$geroi = mssql_fetch_array(mssql_query("SELECT * from Character where Name='$char'"));
if($proverka <= 0)
{
echo "nqma takuv geroi v akaunta"; $error = 1;
}
if($error != 1)
{
echo " Character: $char <br> Level:$geroi[cLevel]";
}
}
?>
<form method="POST">
Account: <input type='text' name='account'>
<br>
Character: <input type='text' name='character'>
<br>
password:<input type='password' name='password'>
<input type='submit' name='submit' value='Enter'>
</form>
$querychar = mssql_query("Select * from Character where Name='$character'");
$querychar = mssql_query("Select * from Character where Name='$character' and AccountID='$account'");
elseif(mssql_num_rows($charcheck) != 1) { echo"<font color='red'>This character is not in this account or does not exist! Please go back and try again!</font><br>"; $error=1; }
<?php
if(isset($_POST['submit'])) { lost_password(); }
?>
<?php
if(isset($_POST['submit'])) { lost_password(); }
?>
function lost_password()
{
$account = secure($_POST['login']);
$email = secure($_POST['email']);
$question = secure($_POST['question']);
$answer = secure($_POST['answer']);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email' and memb___id='$account'");
$mailcheck = mssql_num_rows($querymail);
$queryquestion = mssql_query("Select * from MEMB_INFO where fpas_ques='$question' and memb__id='$account' and mail_addr='$email'");
$questioncheck = mssql_num_rows($queryquestion);
$queryanswer = mssql_query("Select * from MEMB_INFO where fpas_answ='$answer' and fpas_ques='$question' and memb__id='$account' and mail_addr='$email'");
$answercheck = mssql_num_rows($queryanswer);
if(empty($account) or empty($email) or empty($question) or empty($answer)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($mailcheck <= 0) { echo"<font color='red'>Your E-Mail Address does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($questioncheck <= 0) { echo"<font color='red'>Your Secret Question does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($answercheck <= 0) { echo"<font color='red'>Your Secret Answer does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
if($error != 1) {
$passwordquery = mssql_query("Select memb__pwd from MEMB_INFO where memb___id='$account'");
$password = mssql_fetch_row($passwordquery);
echo"<font color='green'>Your password has been succesfully generated.Your password is:</font> $password[0] <font color='green'>Change it as fast as you can!</font><br>";
}
}
}
function register()
{
global $md5;
global $servername;
$account = secure($_POST['account']);
$password = secure($_POST['password']);
$repassword = secure($_POST['repassword']);
$email = secure($_POST['email']);
$question = secure($_POST['squestion']);
$awnser = secure($_POST['sanswer']);
$code = secure($_POST['turing']);
$accounts = strlen($account);
$passwords = strlen($password);
$repasswords = strlen($repassword);
$questions = strlen($question);
$awnsers = strlen($awnser);
check_inject();
$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);
$querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'");
$mailcheck = mssql_num_rows($querymail);
$date = date('Y-m-d H:i:s');
if(empty($account) or empty($password) or empty($repassword) or empty($email) or empty($question) or empty($awnser) or empty($code)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
if($_SESSION['image_random_value'] != md5($code)){ echo"<font color='red'>Numbers from image do not match!</font><br>"; $error=1; }
if($accounts < 4) { echo"<font color='red'>Account must be at least 4 symbols</font><br>"; $error=1; }
if($passwords < 4 or $repasswords < 4) { echo"<font color='red'>Password must be at least 4 symbols</font><br>"; $error=1; }
if($questions < 4) { echo"<font color='red'>Secret Question must be at least 4 symbols</font><br>"; $error=1; }
if($awnsers < 4) { echo"<font color='red'>Secret Answer must be at least 4 symbols</font><br>"; $error=1; }
if($password != $repassword) { echo"<font color='red'>Passwords didn't match!</font><br>"; $error=1; }
if($accountcheck != 0) { echo"<font color='red'>Account is already in use!</font><br>"; $error=1; }
if($mail != 0) { echo"<font color='red'>Email is already in use!</font><br>"; $error=1; }
if($error != 1) {
echo"<font color='green'>Account $account has been succsesfuly created on $date!</font><br>";
if($md5 == 0) {
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account','$password','$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )");
}
else
{
$a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account',md5($password),'$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')");
$b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )");
}
}
}
аз и тук не виждам ... уж всичко е както трябва... поне според мен ...
ще прикача и снимка на таблицата ... слага ги в правилните колони в memb_info
Code:function register() { global $md5; global $servername; $account = secure($_POST['account']); $password = secure($_POST['password']); $repassword = secure($_POST['repassword']); $email = secure($_POST['email']); $question = secure($_POST['squestion']); $awnser = secure($_POST['sanswer']); $code = secure($_POST['turing']); $accounts = strlen($account); $passwords = strlen($password); $repasswords = strlen($repassword); $questions = strlen($question); $awnsers = strlen($awnser); check_inject(); $queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'"); $accountcheck = mssql_num_rows($queryaccount); $querymail = mssql_query("Select * from MEMB_INFO where mail_addr='$email'"); $mailcheck = mssql_num_rows($querymail); $date = date('Y-m-d H:i:s'); if(empty($account) or empty($password) or empty($repassword) or empty($email) or empty($question) or empty($awnser) or empty($code)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; } if($_SESSION['image_random_value'] != md5($code)){ echo"<font color='red'>Numbers from image do not match!</font><br>"; $error=1; } if($accounts < 4) { echo"<font color='red'>Account must be at least 4 symbols</font><br>"; $error=1; } if($passwords < 4 or $repasswords < 4) { echo"<font color='red'>Password must be at least 4 symbols</font><br>"; $error=1; } if($questions < 4) { echo"<font color='red'>Secret Question must be at least 4 symbols</font><br>"; $error=1; } if($awnsers < 4) { echo"<font color='red'>Secret Answer must be at least 4 symbols</font><br>"; $error=1; } if($password != $repassword) { echo"<font color='red'>Passwords didn't match!</font><br>"; $error=1; } if($accountcheck != 0) { echo"<font color='red'>Account is already in use!</font><br>"; $error=1; } if($mail != 0) { echo"<font color='red'>Email is already in use!</font><br>"; $error=1; } if($error != 1) { echo"<font color='green'>Account $account has been succsesfuly created on $date!</font><br>"; if($md5 == 0) { $a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account','$password','$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')"); $b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )"); } else { $a = mssql_query("INSERT INTO MEMB_INFO (memb___id,memb__pwd,memb_name,sno__numb,mail_addr,appl_days,modi_days,out__days,true_days,mail_chek,bloc_code,ctl1_code,fpas_ques,fpas_answ) VALUES ('$account',md5($password),'$servername','1','$email','$date','$date','$date','$date','1','0','0','$question','$awnser')"); $b = mssql_query("INSERT INTO VI_CURR_INFO (ends_days,chek_code,used_time,memb___id,memb_name,memb_guid,sno__numb,Bill_Section,Bill_value,Bill_Hour,Surplus_Point,Surplus_Minute,Increase_Days ) VALUES ('2010','1',1234,'$account','$account',1,'7','6','3','6','6','$date','0' )"); } } }
function register()
funcion lost_password()