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

📄 write.php

📁 转载: 1、留言内容不良词语过滤 2、版主可修改留言内容 3、能把留言删除到回收站 4、可批量删除留言 5、留言前可先预览 6、UBB 标签代码支持 7、随机选择头像和表情
💻 PHP
📖 第 1 页 / 共 2 页
字号:
	  <option value="3" selected>腾讯QQ</option>
  	  <option value="6">朗玛UC</option>
	  <option value="4">雅虎通</option>
	  <option value="7">E话通</option>
	  <option value="5">网易泡泡</option>
	  </select>&nbsp;
	  <input type="text" size="18" name="number" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" class="input" maxLength="14"></td>
    </tr>
    <tr>
      <td width="105" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%" class="shadow" align="center">电子邮件(可选)</td>
        </tr>
      </table>
      </td>
      <td width="299" bgcolor="#DAEFE1">
      <input type="text" size="32" name="mail" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" class="input" maxLength="60" value="<?echo$email;?>"></td>
      <td width="70" rowspan="2" align="center" bgcolor="#EFEFEF" title="已选定的头像">
      <img border="0" src="images/face/face<?echo $face;?>.gif" width="32" height="32" alt="已选定的头像" name="faceshow"></td>
    </tr>
    <tr>
      <td width="105" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%" class="shadow" align="center">主页地址(可选)</td>
        </tr>
      </table>
      </td>
      <td width="299" bgcolor="#DAEFE1">
      <input type="text" size="32" name="url" value="<?echo$url;?>" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" class="input" maxLength="100"></td>
    </tr>
    <tr>
      <td width="105" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%" class="shadow" align="center">选择你的头像</td>
        </tr>
      </table>
      </td>
      <td width="377" colspan="2" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="16%" height="36" align="center"><img border="0" src="images/face/face1.gif" alt="点击将选择此头像" width="32" height="32" onclick="face.value='1';faceshow.src='images/face/face1.gif'"></td>
          <td width="16%" height="36" align="center"><img border="0" src="images/face/face2.gif" alt="点击将选择此头像" width="32" height="32" onclick="face.value='2';faceshow.src='images/face/face2.gif'"></td>
          <td width="17%" height="36" align="center"><img border="0" src="images/face/face3.gif" alt="点击将选择此头像" width="32" height="32" onclick="face.value='3';faceshow.src='images/face/face3.gif'"></td>
          <td width="17%" height="36" align="center"><img border="0" src="images/face/face4.gif" alt="点击将选择此头像" width="32" height="32" onclick="face.value='4';faceshow.src='images/face/face4.gif'"></td>
          <td width="17%" height="36" align="center"><img border="0" src="images/face/face5.gif" alt="点击将选择此头像" width="32" height="32" onclick="face.value='5';faceshow.src='images/face/face5.gif'"></td>
          <td width="17%" height="36" align="center"><img border="0" src="images/face/face6.gif" alt="点击将选择此头像" width="32" height="32" onclick="face.value='6';faceshow.src='images/face/face6.gif'"></td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
      <td width="105" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%" class="shadow" align="center">已选表情:<img border="0" src="images/emot/em<?echo $emot;?>.gif" height="12" name="emshow" alt="已选定的表情"></td>
        </tr>
      </table>
      </td>
      <td width="377" colspan="2" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%" height="36">
        <tr>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em1.gif" width="17" height="12" onclick="emot.value='1';emshow.src='images/emot/em1.gif'"></td>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em2.gif" width="23" height="12" onclick="emot.value='2';emshow.src='images/emot/em2.gif'"></td>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em3.gif" width="13" height="12" onclick="emot.value='3';emshow.src='images/emot/em3.gif'"></td>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em4.gif" width="13" height="12" onclick="emot.value='4';emshow.src='images/emot/em4.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em5.gif" width="13" height="12" onclick="emot.value='5';emshow.src='images/emot/em5.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em6.gif" width="13" height="12" onclick="emot.value='6';emshow.src='images/emot/em6.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em7.gif" width="13" height="12" onclick="emot.value='7';emshow.src='images/emot/em7.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em8.gif" width="23" height="12" onclick="emot.value='8';emshow.src='images/emot/em8.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em9.gif" width="23" height="12" onclick="emot.value='9';emshow.src='images/emot/em9.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em10.gif" width="23" height="12" onclick="emot.value='10';emshow.src='images/emot/em10.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em11.gif" width="13" height="12" onclick="emot.value='11';emshow.src='images/emot/em11.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em12.gif" width="23" height="12" onclick="emot.value='12';emshow.src='images/emot/em12.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em13.gif" width="13" height="12" onclick="emot.value='13';emshow.src='images/emot/em13.gif'"></td>
        </tr>
        <tr>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em14.gif" width="13" height="12" onclick="emot.value='14';emshow.src='images/emot/em14.gif'"></td>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em15.gif" width="13" height="12" onclick="emot.value='15';emshow.src='images/emot/em15.gif'"></td>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em16.gif" width="23" height="12" onclick="emot.value='16';emshow.src='images/emot/em16.gif'"></td>
          <td width="7%" height="18" align="center"><img border="0" src="images/emot/em17.gif" width="23" height="12" onclick="emot.value='17';emshow.src='images/emot/em17.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em18.gif" width="23" height="12" onclick="emot.value='18';emshow.src='images/emot/em18.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em19.gif" width="13" height="12" onclick="emot.value='19';emshow.src='images/emot/em19.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em20.gif" width="13" height="12" onclick="emot.value='20';emshow.src='images/emot/em20.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em21.gif" width="13" height="12" onclick="emot.value='21';emshow.src='images/emot/em21.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em22.gif" width="23" height="12" onclick="emot.value='22';emshow.src='images/emot/em22.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em23.gif" width="13" height="12" onclick="emot.value='23';emshow.src='images/emot/em23.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em24.gif" width="13" height="12" onclick="emot.value='24';emshow.src='images/emot/em24.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em25.gif" width="13" height="12" onclick="emot.value='25';emshow.src='images/emot/em25.gif'"></td>
          <td width="8%" height="18" align="center"><img border="0" src="images/emot/em26.gif" width="13" height="12" onclick="emot.value='26';emshow.src='images/emot/em26.gif'"></td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
      <td width="105" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%" class="shadow" align="center">留言内容(必须)<br><br>UBB代码:
<?
		  if($config[ubb]){
		      echo "可用";
		  }else{
			  echo "关闭";
		  }
?>
</td>
        </tr>
      </table>
      </td>
      <td width="377" colspan="2" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td align="center">
<? if($config[ubb]){ ?>
<img onclick="insertCode('B')" alt="粗体文字" src="images/button/b.gif" align="absBottom" width="23" height="22"><img onclick="insertCode('I')" alt="斜体文字" src="images/button/i.gif" align="absBottom" width="23" height="22"><img onclick="insertCode('U')" alt="下划线文字" src="images/button/u.gif" align="absBottom" width="23" height="22"><img onclick="insertCode('URL')" alt="插入超级链接" src="images/button/url.gif" align="absBottom" width="23" height="22"><img onclick="insertCode('EMAIL')" alt="插入邮件" src="images/button/mail.gif" align="absBottom" width="23" height="22">
<select onchange="insertCode('FONT', this.options[this.selectedIndex].value)">
<option value=false selected>字体</option>
<option value="黑体">黑体</option>
<option value="楷体_GB2312">楷体</option>
<option value="宋体">宋体</option>
<option value="仿宋_GB2312">仿宋</option>
<option value="Arial">Arial</option>
<option value="Times New Roman">Times</option>
<option value="Courier New">Courier</option>
<option value="Century Gothic">Century</option>
</select>
<select onchange="insertCode('COLOR', this.options[this.selectedIndex].value)">
<option value=false selected>&nbsp;颜色</option>
<option style="BackGround-COLOR: #FF0000;COLOR: #FF0000" value="#FF0000">&nbsp;红色&nbsp;</option>
<option style="BackGround-COLOR: #FFFF00;COLOR: #FFFF00" value="#FFFF00">&nbsp;黄色&nbsp;</option>
<option style="BackGround-COLOR: #0000FF;COLOR: #0000FF" value="#0000FF">&nbsp;蓝色&nbsp;</option>
<option style="BackGround-COLOR: #00FF00;COLOR: #00FF00" value="#00FF00">&nbsp;青色&nbsp;</option>
<option style="BackGround-COLOR: #CC0099;COLOR: #CC0099" value="#CC0099">&nbsp;紫色&nbsp;</option>
<option style="BackGround-COLOR: #009933;COLOR: #009933" value="#009933">&nbsp;绿色&nbsp;</option>
<option style="BackGround-COLOR: #FF9900;COLOR: #FF9900" value="#FF9900">&nbsp;橙色&nbsp;</option>
<option style="BackGround-COLOR: #00CC99;COLOR: #00CC99" value="#00CC99">&nbsp;叶绿&nbsp;</option>
<option style="BackGround-COLOR: #FF9999;COLOR: #FF9999" value="#FF9999">&nbsp;粉红&nbsp;</option>
<option style="BackGround-COLOR: #CC0066;COLOR: #CC0066" value="#CC0066">&nbsp;深红&nbsp;</option>
<option style="BackGround-COLOR: #33CCFF;COLOR: #33CCFF" value="#33AAFF">&nbsp;天蓝&nbsp;</option>
<option style="BackGround-COLOR: #330099;COLOR: #330099" value="#330099">&nbsp;深蓝&nbsp;</option>
<option style="BackGround-COLOR: #333333;COLOR: #333333" value="#333333">&nbsp;深灰&nbsp;</option>
</select>
<select onchange="insertCode(this.options[this.selectedIndex].value)">
<option value='' selected>文字特效</option>
<option value="FLY">飞行文字</option>
<option value="MOVE">滚动文字</option>
<option value="SHADOW">阴影文字</option>
</select>
<?}?>
<textarea rows="6" cols="58" name="content" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" style="overflow:auto" class="input" onKeyUp="CountStrByte(this.form.content,this.form.used,this.form.remain);" onKeyDown="ctrl()" title="“Ctrl+回车”可直接发送留言"></textarea>
</td>
	</tr>	<tr>
		<td align="center">
<font color="#808080">允许:<?echo$config[strlen];?>字节&nbsp; &nbsp;已用:<input type=text name="used" size="2" maxlength="3" value="0" style="background-color: #DAEFE1; border:#DAEFE1">字节&nbsp; &nbsp;剩余:<input type=text name="remain" size="2" maxlength="3" value="<?echo$config[strlen];?>" style="background-color: #DAEFE1; border:#DAEFE1">字节</font></td>
	</tr>
</table>
</td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
      <td width="105" bgcolor="#DAEFE1">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#4F4F4F" width="100%">
        <tr>
          <td width="100%" class="shadow" align="center">
      其它选项(可选)</td>
        </tr>
      </table>
      </td>
      <td width="377" colspan="2" bgcolor="#DAEFE1">
      <input type="checkbox" name="hid" value="on" title="只有版主才能看得到的留言">给版主的悄悄话&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
      <input type="checkbox" name="tz" value="on" title="须填写电子邮件地址">有回复邮件通知我
      </td>
    </tr>
    <tr>
      <td width="490" colspan="3" align="center" bgcolor="#DAEFE1">
      <input type="submit" value="发送" name="submits" style="width: 50; height: 18" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" class="input" title="发送写好的留言">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      <input type="button" value="预览" name="view" style="width: 50; height: 18" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" class="input" title="预览这条留言" onclick="javascript:gopreview(this.form)">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      <input type="reset" value="取消" name="reset" style="width: 50; height: 18" onmouseover="this.style.backgroundColor='#FFFFFF'" onmouseout="this.style.backgroundColor=''" class="input" title="清除重新书写">
      </td>
    </tr>
    </form>
  </table>
</td>
  </tr>
</table>
  </center>
</div>
<script>
function gopreview(form){
		  if(vaildForm(form)){
			  document.form.action = "view.php";
			  document.form.target = "preview";
			  window.open('', 'preview', 'scrollbars=yes,width=600,height=300');
			  document.form.submit()
			  document.form.submits.disabled = false;
		  }
	  }
</script>
<Script language="JavaScript">
<!--
var LastCount = 0;
	MaxValue  = <?echo$config[strlen];?>;
function CountStrByte(Message,used,Remain){
 var ByteCount = 0;
 var StrValue  = Message.value;
 var StrLength = Message.value.length;
 if(LastCount != StrLength) { // 在此判断,减少循环次数
	for (i=0;i<StrLength;i++){
		ByteCount  = (StrValue.charCodeAt(i)<=256) ? ByteCount + 1 : ByteCount + 2;
		if (ByteCount>=MaxValue) {
			Message.value = StrValue.substring(0,i);
			alert("留言内容最多不能超过 " +MaxValue+ " 个字节!\n注意:一个汉字为两字节。");
			ByteCount = MaxValue;
			break;
		}
	}
	Remain.value  = MaxValue - ByteCount;
	used.value    = ByteCount;
    LastCount     = StrLength;
 }
}
//-->
</Script>
 <div align="center">
  <center>
<table cellpadding="3" cellspacing="0" bordercolor="#4F4F4F" width="400">
  <tr>
    <td width="100%">&nbsp;</td>         
  </tr>
  <tr>
    <td width="100%" bgcolor="#808080" height="1"></td>         
  </tr>
  <tr>
    <td width="100%" align="center">受权使用:<?echo$config[homename];?> / <a href="http://www.yhai.com" 
title="宇海网络" target="_blank">Yhai.Com</a> <a href="http://lvsoft.126.com" 
title="VerInfo: <?=Verinfo?>" target="_blank">YHPbook v<?=Verion?></a></td>
  </tr>
</table>
  </center>
</div>
</td>
		</tr>
	</table>
</div>
</body>
</html>
<?
}
?>

⌨️ 快捷键说明

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