File size: 4.02Kb
<?php
session_start();
if(!$_SESSION['pid'] || !$_SESSION['username'])
{ header('Location: ./login.php'); exit(); }
include'config.php';
$sql='select email from pid where pid='.$_SESSION['pid'];
if($result=$mysqli->query($sql)){
if($result->num_rows>0){
while($row=$result->fetch_array()){
$email=$row[0];
}
}
}
if(!$_POST['submit']){
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="mobile advertising, mobile ads, mobile advertising company, advertising campaign, free traffic, free advertising">
<meta name="description" content=", provides you to advertise your wapsite for free.. Site owners can advertise their sites at affordable costs. And that cost is nothing. You just share your users with other site owners who in return provide you their visitors. .">
<link rel="stylesheet" href="style.css" type="text/css" media="handheld,screen"/>
<title>Ad4fun.com - Free Mobile Advertisments | Site hit exchange | Free </title>
</head><body>
<div class=main>
<div class='head'>Free Mobile Advertisments</div>
<div class='random'>hello,
<font color=blue><b><?php echo $_SESSION['username'];?></b></font> | <a href='logout.php'>Logout</a></div>
<div class="dashtitle">Account setting</div>
<div class="bookmark">Your session will expire in 30 min</div>
<div class="links">username:- <?php echo $_SESSION['username']?></div>
<div class="links">email:- <?php echo $email;?></div>
<div class="dashtitle"><b><u>Change password</u></b></div>
<form method="POST">
New password:<br /><input type=password name=pwd /> <br />
Repeat New password:<br /><input type=password name=pwd_c />
<br /><input type="submit" name=submit value="Save changes" />
</form>
<div class='impa'><a href='.'>[ Home ]</a> | <a href='cpanel.php'>[ cpanel/dashboard ]</a> -| Contact us |- E-mail: ad4fun.com@gmail.com </div>
<div class='copy'>
© Ad4fun.com
</div></div><!--div end for main class-->
</body></html>
<?php
} else
{
function change(){
extract($_POST);
global $mysqli;
if($pwd!=$pwd_c){
return 'Password Doesn\'t match';
}
$sql="update pid set pwd='".md5($pwd)."', pwd_o='$pwd' where pid='".$_SESSION['pid']."'";
if ($mysqli->query($sql)===true){
return 'Successfully updated your password';
} else{
return 'Please contact administrator '.$mysqli->error;
}
}?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="mobile advertising, mobile ads, mobile advertising company, advertising campaign, free traffic, free advertising">
<meta name="description" content=", provides you to advertise your wapsite for free.. Site owners can advertise their sites at affordable costs. And that cost is nothing. You just share your users with other site owners who in return provide you their visitors. .">
<link rel="stylesheet" href="style.css" type="text/css" media="handheld,screen"/>
<title>Ad4fun.com - Free Mobile Advertisments | Site hit exchange | Free </title>
</head><body>
<div class=main>
<div class='head'>Free Mobile Advertisments</div>
<div class='random'>hello,
<font color=blue><b><?php echo $_SESSION['username'];?></b></font> | <a href='logout.php'>Logout</a></div>
<div class="dashtitle">Account setting</div>
<div class="bookmark">Your session will expire in 30 min</div>
<div class="links">username:- <?php echo $_SESSION['username']?></div>
<div class="links">email:- <?php echo $email;?></div>
<div class="impa">Status:- <b><?php $x=change();
echo $x;
?></b></div>
<div class='impa'><a href='.'>[ Home ]</a> | <a href='cpanel.php'>[ cpanel/dashboard ]</a> -| Contact us |- E-mail: ad4fun.com@gmail.com </div>
<div class='copy'>
© Ad4fun.com
</div></div><!--div end for main class-->
</body></html>
<?php
}
?>