<html>
<head>
<title>回復論題:<? echo $zt;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE " /> 日本不卡视频在线播放,亚洲aaa视频,亚洲欧美成人综合

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

我的論壇源代碼(六)

repal.php回復用的頁面,因為回復可以不必要是用戶,所以沒加用戶身份校驗

<html>
<head>
<title>回復論題:<? echo $zt;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
</STYLE>
<LINK href="js/cpcw.css" rel=stylesheet /LINK>
<?php
include "linkfox.inc.php";               //包含進文件
include "info.inc.php";

function yy($f)
{
  $oldmess=@file($f);                                    //引用原文處理
  for ($i=0;$i<count($oldmess);$i++)
  {
   if (ord(substr($oldmess[$i],0,1))==161)   //第一位是否全角空格
   $mess=$mess.$oldmess[$i];
   else $mess=$mess."  ".trim($oldmess[$i]);
  }
  return $mess;
}

function mesput($query,$use,$id)       
{
      $req=mysql_query($query);
      if ($req)
        {
          echo "<script language='JavaScript'> alert('謝謝你的回復!系統將返回論題!'); </script>";
          echo "<script language='JavaScript'> Javascript:location.href='dispbbs.php?id=".$id."&use=".$use."'; </script>;";
          echo "<div align='center'><a href='dispbbs.php?id=".$id."&use=".$use."'>如果系統沒有反應,請點擊</a></a>";
        }
      else
      echo  "<script language='JavaScript'> alert('寫入失敗!'); </script>";
}
function usehf($message,$useinfo,$id,$use,$ft,$mess,$c)         //用戶回復就直接從表里調出用戶信息
{
   $query="select * from useinfo where usename='".$useinfo[0]."'";
   $req=mysql_query($query);
      if ($req)
         {
             $useinfo=mysql_fetch_array($req);
             $fo=fopen($ft,"a");
             $message=str_replace("<","<",str_replace(">",">",$message));
             $message=nl2br($message);
             $gip=getenv("REMOTE_ADDR");
             $messages=$message."ㄞㄚㄓ".$useinfo[2]."ㄞㄚㄓ".$useinfo[3]."ㄞㄚㄓ".$useinfo[9]."ㄞㄚㄓ".$useinfo[8]."ㄞㄚㄓ".$useinfo[14]."ㄞㄚㄓ".$useinfo[11]."ㄞㄚㄓ".$time."ㄞㄚㄓ".$gip."δεζ";
            if($c==dd)       //如果是引用回復,加上原文內容
               {
          $messages="<font color='999999'>".$mess."<div align='center'>★原文……★……引用★</div></font><br>".$messages;
               }
             $fp=fputs($fo,$messages);
             $time=date(Y年n月j日G時i分);   //主題回復數加一,覆蓋上一回復人與時間
             $query="update foxbbs set hfnum=hfnum+1,hfname='".$ft."',hfusename='".$useinfo[2]."',hfdate='".$time."' where id='".$id."'";
             mesput($query,$use,$id);
          }
      else
         {
      echo "<script language='JavaScript'> alert('數據庫錯誤:104號'); </script>";
         }
}

function gr($ft,$message,$youname,$youmail,$youoicq,$youweb,$youaddr,$youbq,$id,$use,$mess,$c)        //非注冊用戶
{
if (!uinfo($youmail,mail)||strlen($youmail)<12)  //校驗MAIL
{
     echo "<script language='JavaScript'> alert('請輸入正確的MAIL地址!'); </script>";
}
else if (!uinfo($youoicq,oicq)||strlen($youoicq)>12) //校驗OICQ,只能判斷是否數字和位數,如果有更好的方法就好。
{

     echo "<script language='JavaScript'> alert('請輸入正確的OICQ號!'); </script>";
}

else
{
      if (uinfo($youweb,web)==OK&&substr($youweb,0,3)!=htt) $youweb="http://".$youweb;
      else if (uinfo($youweb,web)==OK&&substr($youweb,0,3)==htt) $youweb=$youweb;
      else $youweb="不告訴你";
      $time=date(Y年n月j日G時i分);          //取當前時間
      $message=str_replace("<","<",str_replace(">",">",$message));
      $message=nl2br($message);
      $gip=getenv("REMOTE_ADDR");
      $messages=$message."ㄞㄚㄓ".$youname."ㄞㄚㄓ".$youoicq."ㄞㄚㄓ".$youweb."ㄞㄚㄓ".$youmail."ㄞㄚㄓ".$youbq."ㄞㄚㄓ".$youaddr."ㄞㄚㄓ".$time."ㄞㄚㄓ".$gip."δεζ";
       if($c==dd)       //如果是引用回復
         {
        $messages="<font color='999999'>".$mess."<div align='center'>★原文……★……引用★</div></font><br>".$messages;
         }
      $fo=fopen($ft,"a");
      $fp=fputs($fo,$messages);
      $query="update foxbbs set hfnum=hfnum+1,hfname='".$ft."',hfusename='".$youname."',hfdate='".$time."' where id='".$id."'";
      mesput($query,$use,$id);
}
}
?>
</head>

<body bgcolor="#FFFFFF">
<?
$tem=$HTTP_COOKIE_VARS[FlyFoxNET];
$temp=explode("|",$tem);
$cookiem=$temp[0];
$useinfo=cuser($cookiem,$action);

if (!$useinfo[0]){  $useinfo[2]="游客"; $usename=1;}

$query="select mesname from foxbbs where id='".$id."'";
$req=mysql_query($query);
  if ($req)
  {
  $f=mysql_fetch_array($req);
  $mess=yy($f[0]);
      if ($message&&$action=add)
        {
          $ft="foxbbs/".$f[0].".bbs";
          if (ord(substr($message,0,1))!=161) $message="  ".$message;
          for ($i=0;$i<10;$i++)
          {
            if ($bq[$i]) $youbq=$bq[$i];
          }
          if ($usename)  gr($ft,$message,$youname,$youmail,$youoicq,$youweb,$youaddr,$youbq,$id,$use,$mess,$c);
          else usehf($message,$useinfo,$id,$use,$ft,$mess,$c);
        }
   }
   else echo "<script language='JavaScript'> alert('打開文件錯誤!可能服務器忙,請稍候再試!'); </script>";


?>
<table width="100%" cellpadding="4" cellspacing="0" border="0">
  <tr>
    <td height="20">
      <div align="right"></div>
    </td>
    <td height="20" width="75"> </td>
    <td height="20" width="75"> </td>
    <td height="20" width="75"> </td>
    <td height="20" width="75"> </td>
  </tr>
  <tr>
    <td height="20">
      <div align="right"></div>
    </td>
   <td height="20" width="10%">
     <div align="center"><a href="reguse.php?action=xy"><img src="images/top_register.gif" width="74" height="21" border="0"></a></div>
    </td>
    <td height="20" width="10%">
      <div align="center"><a href="useinfo.php?action=find"><img src="images/top_members.gif" width="74" height="21" border="0"></a></div>
    </td>
    <td height="20" width="10%"><a href="useinfo.php?action=edit"><img src="images/top_profile.gif" width="74" height="21" border="0"></a></td>
    <td height="20" width="10%"><a href="okey.php?d=q"><img src="images/top_logout.gif" width="74" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td height="20">
      <div align="left">當前位置:<font color="#0000FF">狐網─>狐網論壇─>回復主題:<?echo "<font color='ff0000'>".$zt."</font>";?></font></div>
    </td>
    <td>    <div align="center"><a href="foxbbs.php"><img src="images/index.gif" width="70" height="20" border="0" align="middle"></a></div>
    </td>
    <td height="20" width="10%">
      <div align="center"><a href="superuse.php"><img src="images/super.gif" width="70" height="20" border="0" align="middle"></a></div>
    </td>
    <td height="20" width="10%">
      <div align="center"><a href="reguse.php?action=xy"><img src="images/dl.gif" width="70" height="20" border="0" align="middle"></a></div>
    </td>
    <td height="20" width="10%">
      <div align="center"><a href="../index.php"><img src="images/fox.gif" width="70" height="20" border="0" align="middle"></a></div>
     </td>  </tr>
</table>

<script language="JavaScript">
<!--
var submitcount=0;

function checkSubmit() {
    if (submitcount == 0) {
      submitcount++;
      return true;
    } else {
            if (submitcount>0){
            alert("帖子已成功提交了,別急,等等!");
            return false;
      }
    }
}

function check_com(){
   if(document.form.youname.value.length ==0){
      submitcount--;
      alert("名字不能為空!快填上吧!");
      return false;
   }
      if(document.form.youmail.value.length ==0){
      submitcount--;
      alert("EMAIL不能為空!快填上吧!");
      return false;
   }
   if(document.form.youoicq.value.length ==0){
      submitcount--;
      alert("OICQ不能為空!快填上吧!");
      return false;
   }


   if(document.form.message.value.length == 0){
      submitcount--;
      alert("內容不能為空!");
      return false;
   }
   return true;
}
//-->
</script>

<table width='70%' border='0' cellspacing='0' cellpadding='0' bgcolor='#000000' align='center'>
  <tr>
    <td>
      <table width='100%' border='0' cellspacing='0' cellpadding='0'>
        <tr bgcolor='#006699'>
          <td><div align="center"><font color="ffffff"><? echo "<font color='00ff00'>".$useinfo[2]."</font>"; ?> 你正在回復的主題是:[<? echo $zt; ?>]</font></div></td>
        </tr>
        <tr bgcolor='#eeeeee'>
          <td>
    <form name="form" onSubmit="return check_com()" method="post"><div align="center">
<?
      if ($usename)  //不是注冊用戶就顯示輸入框輸入游客信息。
      {
      echo "你的大名:<input onFocus='this.select()' style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;' type='text' name='youname' size='30' maxlength='30' value='".$youname."'>";
      echo "OICQ:<input onFocus='this.select()' style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;' type='text' name='youoicq' size='16' maxlength='16' value='".$youoicq."'><br>";
      echo "來自何方:<input onFocus='this.select()' style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;' type='text' name='youaddr' size='55' value='".$youaddr."'><br>";
      echo "電子信箱:<input onFocus='this.select()' style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;' type='text' name='youmail' size='55' value='".$youmail."'><br>";
      echo "個人主頁:<input onFocus='this.select()' style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;' type='text' name='youweb' size='55' value='".$youweb."'><br>";
      echo "表情<br><input type='radio' name='bq[0]' value='a'><img src='images/a.gif'><input type='radio' name='bq[1]' value='1'><img src='images/1.gif'>";
      echo "<input type='radio' name='bq[2]' value='2'><img src='images/2.gif'><input type='radio' name='bq[3]' value='3'><img src='images/3.gif'>";
      echo "<input type='radio' name='bq[4]' value='4'><img src='images/4.gif'><input type='radio' name='bq[5]' value='5'><img src='images/5.gif'>";
      echo "<input type='radio' name='bq[6]' value='6'><img src='images/6.gif'><input type='radio' name='bq[7]' value='7'><img src='images/7.gif'>";
      echo "<input type='radio' name='bq[8]' value='8'><img src='images/8.gif'><input type='radio' name='bq[9]' value='9'><img src='images/9.gif'><br>";
      }
      echo "<div align='center'>回復內容<br>";
      echo "<textarea onFocus='this.select()' style='BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;' name='message' cols='64' rows='5' wrap='VIRTUAL'>".$message."</textarea><br>";
            ?>
         <input type="submit" name="Submit" value="確定" onClick="return checkSubmit()">                          
         <input type="reset" name="Submit2" value="重寫"></div></div></form>
          </td>
        </tr>
        <tr bgcolor='#eeeeee'>//如果是引用原文就顯示
          <td><div align="center"><? if ($c==dd) echo "原文如下<br><div align='left'>".$mess;?></div></td>
        </tr>
      </table>
    </td>
  </tr>
</table>

</body>
</html> 

php技術我的論壇源代碼(六),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 久久夜色精品国产噜噜小说 | 久久久噜噜噜久久网 | 亚洲欧美成人网 | 国产成人综合亚洲欧洲色就色 | 亚洲一区二区三区视频 | 久久综合久综合久久鬼色 | 国产视频一区在线播放 | 特别黄的免费视频大片 | 97菊爱网| 婷婷色在线播放 | 尤物yw午夜国产精品视频 | 婷婷伊人五月天 | 日本一区二区三区在线 视频观看免费 | 一级特黄欧美 | 2020国产精品视频免费 | 欧美精品人爱a欧美精品 | 天天爱综合网 | 在线国产福利 | 亚洲一二三四区 | 优优色影院 | 亚洲激情视频在线 | 国产网站视频 | 国产区91 | 国产精品欧美一区二区三区不卡 | 国产剧情自拍 | 五月婷婷婷 | 日本一区二区三区四区五区 | 国产特黄一级毛片特黄 | 精品国产免费久久久久久婷婷 | 国产91色在线 | 91久久精品一区二区 | 日本激情网 | 手机国产乱子伦精品视频 | wwwxxxx免费 | 九九99久久精品国产 | 意大利高清xxxxx | chinese国产一区二区 | 依人成人综合网 | 亚洲天堂成人在线观看 | 国语自产精品视频在线区 | 高清视频一区二区三区 |