⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modipwdid.php

📁 php做的一个同学录网站,功能齐全. 后台管理非常方便,有需要的同学可以下载测试.
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
include("pwdtx.php");
include("connect.inc.php");
include("char.inc.php");
if (isset($flag)){
switch ($flag){
case "modipwd":
    $infoquery=@mysql_query("select * from password where NUMBER=".$userid,$conn)or die(mysql_error());
    $infoarray=mysql_fetch_array($infoquery);
    $pwdold=$infoarray["PWD"];
    if($pwdold!=$oldpwd){
?>
<script language="javascript">
<!--
alert("旧密码输入错误!!")
history.back()
//-->
</script>
<?php
    exit();
    }
    $query="UPDATE password SET PWD='$newpwd' WHERE NUMBER=".$userid." LIMIT 1";
    if(mysql_query($query))
        echo "<center>已成功完成password的修改!</center><br>";
    else
        echo "<center>".mysql_error()."</center><br>";
        break;
case "modiuname":
    $infoquery=@mysql_query("select * from password where USERID='".$olduname."' and NUMBER='".$userid."'",$conn)or die(mysql_error());
    $recordcount = mysql_num_rows($infoquery);
    if($recordcount!=0) {
    echo "<center>ok</center><br>";
    }else {
?>
<script language="javascript">
<!--
alert("旧用户名错误!!")
history.back()
//-->
</script>
<?php
    exit();
    }
    $info1query=mysql_query("select * from password where USERID='".$newuname."'",$conn);
    $recordcount = mysql_num_rows($info1query);
    if($recordcount!=0) {
?>
<script language="javascript">
<!--
alert("对不起!有人已经使用了此用户名,请更换一个!")
history.back()
//-->
</script>
<?php
    exit();
    }else {
    echo "<center>ok#2</center><br>";
    }
    $query="UPDATE password SET USERID='".$newuname."' WHERE NUMBER=".$userid." LIMIT 1";
    if(mysql_query($query))
        echo "<center>已成功完成username的修改!</center><br>";
    else
        echo "<center>".mysql_error()."</center><br>";
        break;
default:
    break;
}
}
?>
<html>
<head>
<script language="javascript">
  <!--
  function pwd_onclick(){
  var text=""
  if(form1.oldpwd.value!="" && form1.newpwd.value!="" && form1.renewpwd.value!="" && form1.newpwd.value==form1.renewpwd.value) form1.submit()
  else text="你没有填写"
      if (form1.oldpwd.value=="") text=text+" 旧密码"
      if (form1.newpwd.value=="") text=text+" 新密码"
      if (form1.renewpwd.value=="") text=text+" 确认密码"
  if(form1.oldpwd.value=="" || form1.newpwd.value=="" || form1.renewpwd.value=="") alert(text)
  if(form1.newpwd.value!=form1.renewpwd.value)alert("[新密码]和[确认密码]不相等!")
  }
  function uname_onclick(){
  var text=""
  if(form2.olduname.value!="" && form2.newuname.value!="" && form2.renewname.value!="" && form2.newuname.value==form2.renewname.value) form2.submit()
  else text="你没有填写"
      if (form2.olduname.value=="") text=text+" 旧用户名"
      if (form2.newuname.value=="") text=text+" 新用户名"
      if (form2.renewname.value=="") text=text+" 确认用户名"
  if(form2.olduname.value=="" || form2.newuname.value=="" || form2.renewname.value=="") alert(text)
  if(form2.newuname.value!=form2.renewname.value)alert("[新用户名]和[确认用户名]不相等!")
  }
  //-->
 </script>
<style type="text/css">
<!--
td{font-size:12px;line-height:17px;}
a:active {text-decoration: none;}
a:link {text-decoration: none;}
a:hover{text-decoration: underline;}
a:visited {text-decoration: none;}
BODY{font-size:12px;line-height:17px;SCROLLBAR-FACE-COLOR: #83d160; SCROLLBAR-HIGHLIGHT-COLOR: #CCFF00; SCROLLBAR-SHADOW-COLOR: #CCFF00; SCROLLBAR-3DLIGHT-COLOR: #009900; SCROLLBAR-ARROW-COLOR:  #006600; SCROLLBAR-TRACK-COLOR: ##99FF00; SCROLLBAR-DARKSHADOW-COLOR: #009900; }
-->
</style>
<title>::::密码、帐号修改::::</title>
<meta http-equiv="Content-Type" content="text/html;">
<!-- Fireworks 4.0  Dreamweaver 4.0 target.  Created Wed Mar 20 14:48:27 GMT+0800 (?D1ú±ê×?ê±??) 2002-->
</head>
<body bgcolor="#dcf6ce" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#666600" link="#009900" alink="#00FF00" vlink="#006600">
<table border="0" cellpadding="0" cellspacing="0" width="621">
<!-- fwtable fwsrc="无标题" fwbase="right.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
  <tr>
   <td><img src="images/spacer.gif" width="5" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="15" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="5" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="2" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="38" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="55" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="82" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="96" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="87" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="115" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="65" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="30" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="5" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="15" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="6" height="1" border="0"></td>
   <td><img src="images/spacer.gif" width="1" height="1" border="0"></td>
  </tr>

  <tr>
   <td colspan="15" bgcolor="#dcf6ce"><img src="images/spacer.gif" width="621" height="5" border="0"></td>
   <td><img src="images/spacer.gif" width="1" height="5" border="0"></td>
  </tr>
  <tr>
   <td colspan="4" bgcolor="#dcf6ce"><img src="images/spacer.gif" width="27" height="19" border="0"></td>
   <td colspan="3"><img name="right_r2_c5" src="images/right_r2_c5.gif" width="175" height="19" border="0"></td>
   <td colspan="8" bgcolor="#dcf6ce"><div align="right">::::密码、帐号修改::::&nbsp;&nbsp;</div></td>
   <td><img src="images/spacer.gif" width="1" height="19" border="0"></td>
  </tr>
  <tr>
   <td rowspan="9" bgcolor="#dcf6ce"><img src="images/spacer.gif" width="5" height="425" border="0"></td>
   <td colspan="3"><img name="right_r3_c2" src="images/right_r3_c2.gif" width="22" height="16" border="0"></td>
    <td colspan="2" bgcolor="#83d160"><img src="images/spacer.gif" width="93" height="16" border="0"></td>
   <td><img name="right_r3_c7" src="images/right_r3_c7.gif" width="82" height="16" border="0"></td>
   <td><img name="right_r3_c8" src="images/right_r3_c8.gif" width="96" height="16" border="0"></td>
   <td><img name="right_r3_c9" src="images/right_r3_c9.gif" width="87" height="16" border="0"></td>
   <td><img name="right_r3_c10" src="images/right_r3_c10.gif" width="115" height="16" border="0"></td>
   <td colspan="3"><img name="right_r3_c11" src="images/right_r3_c11.gif" width="100" height="16" border="0"></td>
   <td><img name="right_r3_c14" src="images/right_r3_c14.gif" width="15" height="16" border="0"></td>
   <td rowspan="9" bgcolor="#dcf6ce"><img src="images/spacer.gif" width="6" height="425" border="0"></td>
   <td><img src="images/spacer.gif" width="1" height="16" border="0"></td>
  </tr>
  <tr>
   <td colspan="3"><img name="right_r4_c2" src="images/right_r4_c2.gif" width="22" height="60" border="0"></td>
   <td><img name="right_r4_c5" src="images/right_r4_c5.gif" width="38" height="60" border="0"></td>
   <td colspan="6" bgcolor="#dcf6ce"><img src="images/ad.gif" width="500" height="60" border="0"></td>
   <td colspan="2"><img name="right_r4_c12" src="images/right_r4_c12.gif" width="35" height="60" border="0"></td>
   <td><img name="right_r4_c14" src="images/right_r4_c14.gif" width="15" height="60" border="0"></td>
   <td><img src="images/spacer.gif" width="1" height="60" border="0"></td>
  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -