欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

杏林同學(xué)錄(五)

 更新時(shí)間:2006年10月09日 00:00:00   作者:  
密碼查詢:class/querypsw.php
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>詢問(wèn)密碼</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php
  include "config.php";
//詢問(wèn)班級(jí)注冊(cè)問(wèn)題密碼
  if ($class){
   $headers .= "Content-Type: text/html; charset=gb2312n"; // Mime type
   $subject="詢問(wèn)班級(jí)注冊(cè)問(wèn)題密碼 ";                        //主題
   $message=nl2br($message);
   $message="查詢?nèi)耍?quot;.$name."<BR>留言:<BR>".$message;     //內(nèi)容
   mail($superemail,$subject,$message,$headers);
   echo "恭喜您,您的請(qǐng)求已經(jīng)向管理員發(fā)出,近期內(nèi)請(qǐng)注意查收email。";
   exit;
  }
  //詢問(wèn)個(gè)人注冊(cè)密碼
  if ($member){  
  $result = mysql_query("SELECT * FROM user where user='$username'",$db);
  if (mysql_num_rows($result)==0){  //若返回列的數(shù)目為0,說(shuō)明無(wú)此資料
echo "我們的數(shù)據(jù)庫(kù)中無(wú)此用戶,請(qǐng)確認(rèn)。注意大小寫。<a href='javascript:history.back()'>返回</a>";
exit;}
   $myemail=mysql_result($result,0,"email");//讀取user數(shù)據(jù)庫(kù)中的email
    if (!$myemail){                         //如果還沒(méi)有email,則返回
     echo "我們的數(shù)據(jù)庫(kù)中沒(méi)有您的email,請(qǐng)?jiān)俅翁顚憽?lt;a href='javascript:history.back()'>返回</a>";
     exit;
    }
$psw=mysql_result($result,0,"psw");      //密碼
$name=mysql_result($result,0,"name");    //姓名
$subject="詢問(wèn)個(gè)人注冊(cè)密碼";
$message=$name.",您好。您的用戶名是".$username.",密碼是".$psw."。<BR>-----------------------<BR><a href='".$url."'>".$sitename."</a>";      //信件內(nèi)容
$headers .= "Content-Type: text/html; charset=gb2312n"; // Mime type
mail($myemail,$subject,$message,$headers);
   echo "恭喜您,系統(tǒng)已經(jīng)向您的信箱中發(fā)出了答復(fù)信件,請(qǐng)注意查收email。";
   exit;
  }
?>  
<table width="93%" border="0" cellspacing="0" cellpadding="0" align="center" height="286">
  <tr>  
        <td height="75" colspan="2">  
          <div align="center">詢問(wèn)密碼<br>
          </div>
        </td>
      </tr>
      <tr>  
        <td height="75" width="47%">
          <form name="form1" method="post" action="<? echo $PHP_SELF;?>"><div align="center">詢問(wèn)班級(jí)注冊(cè)問(wèn)題答案<br>
            您的姓名  
            <input type="text" name="name">
            <br>您的留言(寫上能證實(shí)您身份的簡(jiǎn)短留言及email地址)
<textarea name="message" rows="3" cols="50"></textarea>
            <br>
            系統(tǒng)將向班級(jí)管理員發(fā)送您的請(qǐng)求,是否確認(rèn)?<br>

          <input type="submit" name="class" value="確認(rèn)">
            <input type="reset" name="cancel" value="重填">
            <br>
          </div></form>
        </td>
        <td height="75" width="53%">
          <div align="center">
        <form name="form2" method="post" action="<? echo $PHP_SELF;?>">
          詢問(wèn)個(gè)人注冊(cè)密碼<br>
          <br>
          您的用戶名(不是姓名)<br>
          <br>

          <input type="text" name="username">
          <br>
          <br>
          <br>
            系統(tǒng)將會(huì)向您注冊(cè)的信箱中發(fā)發(fā)送密碼,是否確認(rèn)?<br>
          <input type="submit" name="member" value="確認(rèn)">
          <input type="reset" name="cancel2" value="重填">
        </form>
        </div>
        </td>
      </tr>
    </table>    

</BODY>
</HTML>
悄悄話:privatenote.php
<?
session_start(); // 開(kāi)始session
if(!session_is_registered("userregister")||($userregister==""))//檢查是否注冊(cè),如userregister未注冊(cè)或session為空值,重新注冊(cè).
{
echo "<a href='../index.php'>請(qǐng)重新注冊(cè)<BR>";
exit;
}
//刪除留言
include "config.php";
if ($del=="1"){
mysql_query("delete from privatenote where id='$id'",$db); //以id為刪除標(biāo)志
echo "刪除成功!";
}
//添加留言
if ($Submit){
$id=time();                     //以時(shí)間戳為記錄號(hào)
$time=date("Y年m月d日 h:i:s A");//留言時(shí)間
$result = mysql_query("SELECT * FROM user where user='$userregister'",$db);
$fromuser=mysql_result($result,0,'name');                       //發(fā)消息人姓名
$result = mysql_query("SELECT * FROM user where name='$yname'",$db);
$touser=mysql_result($result,0,'user'); ;          //接受人用戶名
$message=nl2br(strip_tags($ynote));//留言內(nèi)容
mysql_query("INSERT INTO privatenote (id,fromuser,touser,time,message) values ('$id','$fromuser','$touser','$time','$message')",$db); //寫入數(shù)據(jù)庫(kù)
echo "留言成功!";
}
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>悄悄話</TITLE>
<style type="text/css">
<!--
.blue9 {  font-size: 10pt; color: #9999FF; text-decoration: none}
.black10 {  font-size: 10pt}
-->
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<table width="64%" border="1" cellspacing="1" cellpadding="1" align="center" ">
  <tr>  
    <td colspan="2" height="63">  
      <div align="center"><img src="image/classlogo.gif" width="224" height="60">  
      </div>
    </td>
  </tr>
  <tr>
    <td class="blue9" colspan="2">  
      <div align="center">
      <?
      $result = mysql_query("SELECT * FROM user where user='$userregister'",$db);
      $name=mysql_result($result,0,"name");//姓名
      echo $name;
      ?>
      的悄悄話</div>
    </td>
  </tr>
  <tr>  
    <td class="blue9" colspan="2">  
      <?php
$result = mysql_query("SELECT * FROM privatenote where touser='$userregister' ORDER BY time DESC",$db);
$row=mysql_num_rows($result);        //悄悄話總數(shù)
            $unlook=0;   
              if (!$row==0){
              for ($i=0;$i<$row;$i++){
               $id=mysql_result($result,$i,'id');//留言id
               $fromuser=mysql_result($result,$i,'fromuser');//留言人姓名
               $time=mysql_result($result,$i,'time');        //留言時(shí)間
               $message=mysql_result($result,$i,'message');  //留言內(nèi)容
               $look_s="已看過(guò)";                             //注釋
               $look=mysql_result($result,$i,'look');        //是否看過(guò)
               if ($look=="0"){$unlook++;$look_s="尚未看過(guò)";} //計(jì)算未看過(guò)的悄悄話數(shù)目,并改變注釋
               mysql_query("UPDATE privatenote SET look='1' where id='$id'",$db);       //將悄悄話看過(guò)狀態(tài)改為1
               echo "第",$i+1,"條 發(fā)出人:",$fromuser," 留言時(shí)間:",$time,"<BR>";
               echo " 留言內(nèi)容:",$message,"<BR>------",$look_s;
               echo "<a href='$PHP_SELF?del=1&id=$id'>刪除</a><HR>";
              }
              }
              echo "悄悄話總數(shù):",$row,".",$unlook,"條新悄悄話.";
         ?>
</td>
  </tr>
  <tr>  
    <td class="black10" colspan="2">  
      <form method="post" action="<?php echo $PHP_SELF;?>">
        <p align="center">您要給誰(shuí)發(fā)悄悄話?  

          <select name="yname">
            <?
            $result = mysql_query("SELECT * FROM user",$db);
            $row=mysql_num_rows($result);            //成員人數(shù)
            for ($i=0;$i<=($row-1);$i++){
             $name=mysql_result($result,$i,'name');  //姓名
             echo "<option>",$name,"</option>";
            }
            mysql_close($db);
            ?>
          </select>
          <br>
          留言內(nèi)容:<br>
          <textarea name="ynote" cols="60" rows="6"></textarea>
          <br>
          <b>  
          <input type="submit" name="Submit" value="確認(rèn)">
          </b>  
          <input type="reset" name="cancel" value="重寫">
        </p>
      </form>
    </td>
  </tr>
</table>
</BODY>
</HTML>

相關(guān)文章

最新評(píng)論