change.php

<?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">&nbsp新 密 码&nbsp</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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值