<?php
if(isset($_COOKIE["id"]))
;
else{
echo "<script language='javascript'>window.location.replace('volunteer.php');</script>";
return;
}
$id=$_COOKIE["id"];
$mysql_host = SAE_MYSQL_HOST_M;
$mysql_host_s = SAE_MYSQL_HOST_S;
$mysql_port = SAE_MYSQL_PORT;
$mysql_user = SAE_MYSQL_USER;
$mysql_password = SAE_MYSQL_PASS;
$mysql_database = SAE_MYSQL_DB;
$mysql_table = "volunteer";
$con = mysql_connect($mysql_host.':'.$mysql_port, $mysql_user, $mysql_password, true);
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_query("SET NAMES 'UTF8'");
mysql_select_db($mysql_database, $con);
$Result = mysql_query("SELECT * FROM ".$mysql_table." WHERE id='".$id."'");
$row = mysql_fetch_array($Result);
$msg = '<div class="div_none_decoration font_note_details_dark" style="text-align:center;">学号:'.$id.' 姓名:'.$row[name].'</div><br/>';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/index_upload.css">
<link rel="stylesheet" href="css/lightbox.css" media="screen"/>
<script src="http://libs.useso.com/js/jquery/1.9.0/jquery.min.js"></script>
<script src="js/lightbox-2.6.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" />
<title>志愿者查询</title>
<script>
function Check(){
if (form1.Password.value == ""){
alert("原始密码不能为空");
return false;
}
else if (form1.Password1.value == ""){
alert("新密码不能为空");
return false;
}
else if (form1.Password1.value != form1.Password2.value){
alert("确认密码错误");
return false;
}
else return true;
}
</script>
</head>
<body>
<center>
<DIV class="font_head">东华大学</DIV>
<DIV class="font_subhead">管院志管工时查询系统</DIV>
</center>
<center><?php echo $msg;?>
<form action="dochange.php" method="POST" class="form" name="form" id="form1">
<div><lable class="font_note">原始密码</lable><input type="password" id="input" class="input" name="Password" /></div><br/>
<div><lable class="font_note"> 新 密 码 </lable><input type="password" id="input1" class="input" name="Password1" /></div><br/>
<div><lable class="font_note">确认密码</lable><input type="password" id="input2" class="input" name="Password2" /></div>
<p> </p>
<button class="div_button_middle2" οnclick="return Check()">更改</button>
</form>
<a href="index.php"><button class="div_button_middle3">返回</button></a>
</center>
</body>
</html>