<? 
 if($_SESSION['page'] == '7' and $_SESSION['section'] == '') 
 	{ 
		if ($_GET['stat'] == 'change' )
		   {
		   
						$old_pass   = md5($_POST['old_pass']);
						$new_pass	= md5($_POST['new_pass']);
						$user_id    = $_SESSION['LoginGAdminID'];
						$query = mysql_query("SELECT * FROM p1_g_user where password  = '$old_pass' and uid = $user_id"); 		
					
				if (mysql_num_rows($query) <> "0")
					{
					 	  mysql_query("UPDATE p1_g_user SET password = '$new_pass' where uid = $user_id");
						  header("Location: index.php?stat=logout"); 
				 	}else{
					
						  header("Location: index.php?stat=error"); 
					}
				 
			}
		
			
			
	}
?>