Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 16:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



VSRO WebSite Problem ( LostPassword )

Discussion on VSRO WebSite Problem ( LostPassword ) within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2012
Posts: 23
Received Thanks: 2
VSRO WebSite Problem ( LostPassword )


Helo All,
I have a vsro server and the file "lostpassword.php" does not work properly.
the lostpassword working with pin code.
here is the code :
PHP Code:
<?php
if (isset($_SESSION['username'])) {
$sql->redirect("?page=index");
}
if (isset(
$_POST['submit'])) {
$id $_POST['ID'];
$Email $_POST['email'];
$pin $_POST['pin'];
$pw md5($_POST['pw']);
if (
strlen($id) < 5)
$msg[] = 'ID is shorter than 5 letters !';
if (
strlen($pin) < 0)
$msg[] = 'New password is shorter than 0 letters !';
if (
strlen($id) > 20)
$msg[] = 'ID is longer than 20 letters !';
if (
strlen($pin) > 20)
$msg[] = 'PIN is longer than 20 letters !';
if (!
$sql->isValidEmail($Email))
$msg[] = "Email is not valid";
if(!
$sql->is_secure($id)) die;
if(!
$sql->is_secure($Email)) die;
if(!
$sql->is_secure($pin)) die;
if(!
$sql->is_secure($pw)) die;
if (
count($msg) > 0) {
$error "";
for (
$i 0$i count($msg); $i++) {
$error .= "-$msg[$i]</br>";
}
echo 
"<dl id='system-message'>
<dt class='error'>Error</dt>
<dd class='error message fade'>
<ul>
$error
</ul>
</dd>
</dl>"
;
} else {
$query $sql->Query("SELECT * FROM TB_User WHERE StrUserID='$id'");
$row $sql->fetcharray($query);
if (
$Email != $row['Email'])
$msg1[] = 'Incorrect email';
if (
$pin != $row['certificate_num'])
$msg1[] = 'Pin is incorrect !';
if (
count($msg1) > 0) {
$error1 "";
for (
$i 0$i count($msg1); $i++) {
$error1 .= "-$msg1[$i]</br>";
}
echo 
"<dl id='system-message'>
<dt class='error'>Error</dt>
<dd class='error message fade'>
<ul>
$error1
</ul>
</dd>
</dl>"
;
} else {
$query $sql->Query("UPDATE TB_User SET password='$pw' WHERE StrUserID='$id'");
if (
$query) {
echo 
"<dl id='system-message'>
<dt class='message'>Message</dt>
<dd class='message message fade'>
<ul>
<li>Your password is sucessfully reset.</li>
</ul>
</dd>
</dl>"
;
} else {
echo 
"<dl id='system-message'>
<dt class='error'>Error</dt>
<dd class='error message fade'>
<ul>
<li>An error happened while reseting password,please contant the admin.</li>
</ul>
</dd>
</dl>"
;
}
}
}
}
?>
<?php
echo '<h2 class="title">Reset Password</h2>';
echo 
'<div class="content-bg">';
echo 
'<div class="content-bgtop">';
echo 
'<div class="content-bgbtm content">';
?>
<center>
<div id="login">
<form action="" method="post" name="login">
<input type="text" name="id" size="50" class="email" placeholder="UserName" />
<br>
<input type="text" name="pin" size="50" class="email" placeholder="PIN" />
<br>
<input type="text" name="email" size="50" class="email" placeholder="Email" />
<br>
<input type="password" name="pw" size="50" class="email" placeholder="New Password" />
<br>
<input type='submit' name='submit' value='Change class='submit'>
</form>
</div>
</center>
<?php
echo '</div>';
echo 
'</div>';
echo 
'</div>';
?>
one more file ( register ) for help :
PHP Code:
<?php
session_start
();
If (Isset(
$_SESSION['username'])) {
    
$sql->redirect("?page=index");
}

if (isset(
$_POST['submit'])) {
    
$username $sql->ms_escape_string($_POST['username']);
    
$password $sql->ms_escape_string($_POST['pw1']);
    
$password2 $sql->ms_escape_string($_POST['pw2']);
    
$md5pw md5($password);
    
$email $_POST['email'];
    
$pin $sql->ms_escape_string($_POST['pin']);
    if (empty(
$username) || empty($password) || empty($password2) || empty($pin) || empty($email) || $username == "Username" || $password == "Password(1)" || $password2 == "Password(2)" || $email == "Email")
        
$msg[] = 'WRONG';
    if (!
$sql->is_secure($username))
        
$msg[] = 'WRONG';
    if (!
$sql->is_secure($password) || !$sql->is_secure($password2))
        
$msg[] = 'WRONG';
    if (
$password != $password2)
        
$msg[] = 'WRONG';
    
$mail $sql->ms_escape_string($email);
    if (
strlen($username) > 16)
        
$msg[] = 'WRONG';
    if (
strlen($username) < 2)
        
$msg[] = 'WRONG';
    if (
strlen($password) > 32)
        
$msg[] = 'WRONG';
    if (
strlen($password) < 5)
        
$msg[] = 'WRONG';
    if (
strlen($password2) > 32)
        
$msg[] = 'WRONG';
    if (
strlen($password2) < 5)
        
$msg[] = 'WRONG';
    if (
strlen($email) > 32)
        
$msg[] = 'WRONG';
    if (
strlen($email) < 5)
        
$msg[] = 'WRONG';
    if(!
is_numeric($pin))
        
$msg[] = 'WRONG';
    if(
strlen($pin) <  5)
        
$msg[] = 'WRONG';
    if (!
eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$"$mail))
        
$msg[] = 'WRONG';
    
$resp recaptcha_check_answer($privatekey$_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
    if (!
$resp->is_valid)
       
$msg[] = 'WRONG';

    if (
count($msg) > 0) {
        
$error "";
        for (
$i 0$i count($msg); $i++) {
            
$error .= "-$msg[$i]</br>";
        }
        echo 
"<dl id='system-message'>
                 <dt class='error'>WRONG</dt>
                 <dd class='error message fade'>
                 <ul>
                 <li>
$error</li>
                 </ul>
                 </dd>
                 </dl>"
;
    } else {
        if (
$sql->rowcount($sql->Query("SELECT * FROM TB_User WHERE StrUserID='$username'")) > 0)
            
$msg1[] = "Username is already taken";
        if (
$sql->rowcount($sql->Query("SELECT * FROM TB_User WHERE Email = '$mail'")) > 0)
            
$msg1[] = "Email is already taken";
        if (
count($msg1) > 0) {
            
$error1 "";
            for (
$i 0$i count($msg1); $i++) {
                
$error1 .= "-$msg1[$i]</br>";
            }
            echo 
"<dl id='system-message'>
                 <dt class='error'>WRONG</dt>
                 <dd class='error message fade'>
                 <ul>
                 
$error1
                 </ul>
                 </dd>
                 </dl>"
;
        } else {
           
                
$query $sql->Query("INSERT INTO TB_User(StrUserID,password,Email,sec_primary,sec_content,reg_ip,certificate_num) values('$username','$md5pw','$mail',3,3,'$_SERVER[REMOTE_ADDR]','$pin')");
          
            if (!
$query) {
                echo 
"<dl id='system-message'>
                 <dt class='error'>WRONG</dt>
                 <dd class='error message fade'>
                 <ul>
                 <li>An error happened while registering,please contant the admin.</li>
                 </ul>
                 </dd>
                 </dl>"
;
            } else {
                echo 
"<dl id='system-message'>
                   <dd class='message message fade'>
                   <ul>
                   <li>Sucsess !</li>
                   </ul>
                   </dd>
                   </dl>"
;
            }
        }
    }
}
?>

<?php
echo '<script type="text/javascript">';
echo 
'var RecaptchaOptions = {';
echo 
'theme : "white"';
echo 
'}';
echo 
'</script>';
   echo 
'<h2 class="title">Register</h2>';
   echo 
'<div class="content-bg">';
   echo 
'<div class="content-bgtop">';
   echo 
'<div class="content-bgbtm content">';
?><center>
<div id="login">
                                         
                                           <form action="" method="post" name="login">
       
            <input type="text" name="username" size="50" class="email" placeholder="user name" />
        <br>
    
            <input type="password" name="pw1" size="50" class="email" placeholder="pass" />
<br>
      
            <input type="password" name="pw2" size="50" class="email" placeholder="pass again" />
       <br>
       
            <input type="text" name="email" size="50" class="email" class="email" placeholder="mail"">
       <br>
          <input type="text" name="pin" size="50" class="email" placeholder="pin code" />
       <br>
<?php
echo recaptcha_get_html($publickey);

?>
<Br>
     <input type='submit' name='submit' value='submit' class='submit'>
    </form>
                                       </div>

   
<?php
echo '</div>';
echo 
'</div>';
echo 
'</div>';
?>
what is the problem here?
A huge thank you to assistants







guyshitritx is offline  
Thanks
1 User
Old 05/14/2015, 12:53   #2
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,859
Received Thanks: 4,683
You need some other files to include, like the database connection or the sessions...
Devsome is offline  
Old 05/14/2015, 14:01   #3
 
elite*gold: 0
Join Date: Jun 2012
Posts: 23
Received Thanks: 2
Quote:
Originally Posted by Devsome View Post
You need some other files to include, like the database connection or the sessions...
how i can do that?
guyshitritx is offline  
Old 05/14/2015, 14:19   #4
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,859
Received Thanks: 4,683
How do you got the lostpassword.php ? Maybe in the folder are some more, please upload a screenshot if you have more then one *php file.
Devsome is offline  
Old 05/23/2015, 19:02   #5
 
elite*gold: 0
Join Date: Jun 2012
Posts: 23
Received Thanks: 2
Quote:
Originally Posted by Devsome View Post
How do you got the lostpassword.php ? Maybe in the folder are some more, please upload a screenshot if you have more then one *php file.
done, i edited the topic.
guyshitritx is offline  
Reply


Similar Threads Similar Threads
VSRO Site PROBLEM ( LostPassword )
05/14/2015 - SRO PServer Guides & Releases - 2 Replies
Helo All, I have a vsro server and the file "lostpassword.php" does not work properly. the lostpassword working with pin code. here is the code : <?php if (isset($_SESSION)) { $sql->redirect("?page=index"); } if (isset($_POST)) {
VSRO WEBSITE !
06/11/2014 - Silkroad Online - 1 Replies
hi guys . i dont know if this is the right section or not . but i need help . okay so , my vsro server is done and my website design and connection to DB is also done . but now i was wondering how can i publish my website to the internet not only on my pc . i've used no-ip and i;ve registered for a free DNS and i got the client . ( the ip i have put in hosts thing is the one from What Is My IP Address ® | Shows Your IP Address. ) and im using AppServ (the ip i have put in the website...
Selling : Programs , Databases , Website , For vSRO
04/21/2014 - Silkroad Online Trading - 0 Replies
Selling :Programs, Databases, Website , For vSRO (Contact Me Via Skype) Nau016 http://epvpimg.com/fs7bc.jpg
[Reques-Help]Vsro-files-website
09/27/2013 - SRO Private Server - 1 Replies
Hello I have downloaded paradise old website file and I setup Wamp But There is Error App says cannot install apache service And Wamp Stay At yellow And Do Note Change ihave try to change port but still the same problem sorry for Bad English :D Oh P.s My Server Work With hamachi I Hope That Any One could help me :confused:
VSRO Website connection (elitewebsite)
12/10/2012 - SRO Private Server - 4 Replies
hello all i'm using wampserver2.2e-php5.3.13-httpd2.2.22-mysql5.5.24-x 64 and elite web site after configure the Config.php and try in browser show me this errors IMAGE 1 Image 2 and any other web site same problem and idk why ?



All times are GMT +1. The time now is 16:50.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.