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

📄 index.php

📁 我不介意你怎么用这个程序
💻 PHP
字号:
<?php
include("includes/inc_header.php");
echo "<p>";
$db->execute("SELECT * FROM `".$g_db_prefix."words` WHERE u_ID='".$u_id."'");
if($db->count()==0)
{
?> 
<table width="640" border="0" align="center" cellpadding="0" cellspacing="0" class="tableborder">
  <tr> 
    <th width="90" height="20"><a href="#" onclick="javascript:document.all.post.style.visibility='visible'">我要留言</a></th>
    <th width="507" align="left">&nbsp;</th>
  </tr>
  <tr> 
    <td height="20" colspan="2" align="center">感谢访问 <?php echo $u_title?> 留言板,欢迎留言。</td>
  </tr>
</table>
<?php 
}
else
{
?>
<table width="640" border="0" align="center" cellpadding="0" cellspacing="0" class="tableborder" style="word-break:break-all">
  <tr> 
    <th width="80" height="20"><a href="#" onclick="javascript:document.all.post.style.visibility='visible'">我要留言</a></th>
    <td width="558" align="right"> 
      <?php
	if(isset($_GET["page"]))
		$page = (int)$_GET["page"];
	else
		$page = 1;
	$getpage = new Page($page, $db->count(), $u_pagesize); 
	echo "共 <font class=\"pagefont\">".$getpage->count()."</font> 页 ";
	echo "<a href=\"index.php?id=".$u_id."&page=".$getpage->begin()."\">|&lt;</a> <a href=\"index.php?id=".$u_id."&page=".$getpage->pre()."\">&lt;&lt;</a> ";
	if($getpage->getpage() < 10)
	{
		$k = 1;
		$j = $getpage->count();
	}
	else
	{
		$k = $getpage->getpage() - 9;
		$j = $getpage->getpage() + 9;
	}
	for($i = $k; $i <= $j; $i++)
		if($i==$page)
			echo " <a href=\"index.php?id=".$u_id."&page=$i\"><font class=\"pagefont\">$i</font></a> ";
		else
   			echo " <a href=\"index.php?id=".$u_id."&page=$i\">$i</a> ";
	echo " <a href=\"index.php?id=".$u_id."&page=".$getpage->next()."\">&gt;&gt;</a> <a href=\"index.php?id=".$u_id."&page=".$getpage->end()."\">&gt;|</a>";
	$db->execute("SELECT * FROM ".$g_db_prefix."words WHERE u_ID='".$u_id."' ORDER BY w_ID DESC LIMIT ".$getpage->start().", ".$u_pagesize);
?>
    </td>
  </tr>
  <?php
while($dbrow = $db->reader())
{
?>
<tr><td colspan="2"><hr class="tableborder"></td></tr>
  <tr> 
    <td height="40" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="word-break:break-all">
        <tr>
          <th align="center"><?php echo $dbrow["w_name"]?></th>
        </tr>
      </table></td>
    <td> 
      <?php
if(!empty($dbrow["w_mail"]))
	echo "<a href=\"mailto:".$dbrow["w_mail"]."\" target=\"_BLANK\"><img src=\"".$s_path."mail.gif\" width=\"32\" height=\"32\" alt=\"".$dbrow["w_mail"]."\" border=\"0\"></a>&nbsp;&nbsp;&nbsp;&nbsp;";
else
	echo "<img src=\"".$s_path."mail.gif\" alt=\"无\">&nbsp;&nbsp;&nbsp;&nbsp;";

if(!empty($dbrow["w_QQ"]))
	echo "<a href=\"http://friend.qq.com/cgi-bin/friend/user_show_info?ln=".$dbrow["w_QQ"]."\" target=\"_BLANK\"><img src=\"".$s_path."qq.gif\" width=\"32\" height=\"32\" alt=\"".$dbrow["w_QQ"]."\" border=\"0\"></a>&nbsp;&nbsp;&nbsp;&nbsp;";
else
	echo "<img src=\"".$s_path."qq.gif\" alt=\"无\">&nbsp;&nbsp;&nbsp;&nbsp;";

if(!empty($dbrow["w_web"]))
	echo "<a href=\"".$dbrow["w_web"]."\" target=\"_BLANK\"><img src=\"".$s_path."url.gif\" width=\"32\" height=\"32\" alt=\"".$dbrow["w_web"]."\" border=\"0\"></a>&nbsp;&nbsp;&nbsp;&nbsp;";
else
	echo "<img src=\"".$s_path."url.gif\" alt=\"无\">&nbsp;&nbsp;&nbsp;&nbsp;";
if($u_IP == "S")
	$ip = $dbrow["w_IP"];
else
	$ip = "已记录";
echo "<img src=\"".$s_path."ip.gif\" width=\"32\" height=\"32\" alt=\"".$ip."\" >";
?>
    </td>
  </tr>
  <tr> 
    <td height="80" align="center" valign="middle">
    <?php
   	$imgfile = $h_path.$dbrow["w_head"].".gif";
    if(!file_exists($imgfile))
    	$imgfile = "head/none.gif";
    ?>
    <img src="<?php echo $imgfile?>" width="72" height="72">
    </td>
    <td rowspan="2" valign="top"> 
      <?php
echo $dbrow["w_title"]."<hr class=\"tableborder\" width=\"98%\">".$dbrow["w_content"];
if(!empty($dbrow["w_re"]))
	echo "<hr class=\"tableborder\" width=\"98%\">站长回复:".$dbrow["w_re"];
?>
    </td>
  </tr>
  <tr> 
    <td height="40" align="center">
<?php
$datetime = explode(" ",$dbrow["w_date"]);
echo $datetime[0]."<br>".$datetime[1];
?></td>
  </tr>
  <?php }?>
</table>
<?php }?>
<p>
 
<div id="post" style="position:absolute; top:45px; width:325px; height:270px; z-index:1; visibility: hidden; left: 327px;" align="center"> 
  <script language="JavaScript">
<!--
function verifyAddress(obj)  
{  
	var email = obj;  
	var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;  
	flag = pattern.test(email);  
	if(flag)  
		return true;  
	else  
		return false;  
}
function regcheck() {
	if (this.document.words.name.value==""){
		window.alert("请输入用户名!");
		this.document.words.name.focus();
		return;		
	}
	if (this.document.words.mail.value!="")
		if(!verifyAddress(document.words.mail.value))
		{
			window.alert("请输入正确的电子邮件!");
			document.words.mail.select();
			document.words.mail.focus();
			return;
		}
	if(this.document.words.title.value==""){
		window.alert("请输入主题!");
		this.document.words.title.focus();
		return;
	}
	if(this.document.words.content.value==""){
		window.alert("请输入留言内容!");
		this.document.words.content.focus();
		return;
	}
	this.document.words.submit();
	return;
}
function changepic(value)
{
	this.document.words.pic.src="<?php echo $h_path?>"+value+".gif";
}
function selectpic(value)
{
	this.document.words.head.selectedIndex = value - 1;
	changepic(value);
	document.all.post.style.visibility="visible";
	document.all.headpic.style.visibility="hidden";
}
//-->
</script>

  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
    <form name="words" method="post" action="post.php">
      <tr align="right"> 
        <td height="20" colspan="2"><a href="#" onclick="javascript:document.all.post.style.visibility='hidden'">关闭-<strong>X</strong></a></td>
      </tr>
      <tr> 
        <td width="23%" height="20" align="right">名字:</td>
        <td> <input name="name" type="text" class="textbox" id="name" maxlength="32"> 
          <input name="id" type="hidden" id="id" value="<?php echo $u_id;?>"> 
        </td>
      </tr>
      <tr> 
        <td height="20" align="right">电子邮件:</td>
        <td><input name="mail" type="text" class="textbox" id="mail" maxlength="64"></td>
      </tr>
      <tr> 
        <td height="20" align="right">QQ:</td>
        <td><input name="QQ" type="text" class="textbox" id="QQ" maxlength="32"></td>
      </tr>
      <tr> 
        <td height="20" align="right">个人主页:</td>
        <td><input name="web" type="text" class="textbox" id="web" value="http://" maxlength="255"></td>
      </tr>
      <tr> 
        <td height="20" align="right">头像:</td>
        <td> <select name="head" class="button" id="head" onChange="changepic(this.document.words.head.value)">
            <?php
for($i=1;$i<=$h_count;$i++)
{
    echo "<option value=\"$i\">头像$i</option>";
}
?>
          </select> <img src="<?php echo $h_path;?>1.gif" name="pic" width="72" height="72" align="absmiddle" id="pic"><a href="#" onclick="javascript:document.all.headpic.style.visibility='visible';document.all.post.style.visibility='hidden';">查看全部头像</a></td>
      </tr>
      <tr> 
        <td height="20" align="right">标题:</td>
        <td><input name="title" type="text" class="textbox" id="title" maxlength="64"></td>
      </tr>
      <tr> 
        <td height="20" align="right">内容:</td>
        <td><textarea name="content" cols="25" rows="8" class="textbox" id="content" co="25"></textarea>
        </td>
      </tr>
      <tr>
        <td height="20" align="right">帮助:</td>
        <td><a href="#" onclick="javascript:document.all.ubbcode.style.visibility='visible';document.all.post.style.visibility='hidden';">如何使用UBB代码</a></td>
      </tr>
      <tr align="center"> 
        <td height="20" colspan="2"><input type="button" name="Submit" value="确定" class="button" onClick="javascript:regcheck();"> 
          <input type="reset" name="Submit2" value="重置" class="button"> </td>
      </tr>
    </form>
  </table>
</div>
<div id="headpic" style="position:absolute; left:212px; top:61px; width:235px; height:99px; z-index:2; overflow: visible; visibility: hidden;"> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
    <tr> 
      <td align="right"><a href="#" onclick="javascript:document.all.headpic.style.visibility='hidden';document.all.post.style.visibility='visible';">关闭-<strong>X</strong></a> 
      </td>
    </tr>
    <tr>
      <td><?php
for($i=1;$i<=$h_count;$i++)
{
    if(($i % 8)==1)
		echo "<br>";
	echo "<a href=\"#\" onClick=\"selectpic(".$i.")\"><img src=\"".$h_path.$i.".gif\" border=\"0\" width=\"72\" height=\"72\">";
}
?></td>
    </tr>
  </table>
</div>
<div id="ubbcode" style="position:absolute; left:299px; top:45px; width:414px; height:84px; z-index:3; visibility: hidden;"> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableborder">
    <tr> 
      <td align="right"><a href="#" onclick="javascript:document.all.ubbcode.style.visibility='hidden';document.all.post.style.visibility='visible';">关闭-<strong>X</strong></a> 
      </td>
    </tr>
    <TR> 
      <TD height=20>使用参数:[i]需要斜体的文字[/i]</TD>
    </TR>
    <TR> 
      <TD height=20>效果范例: [i]斜体[/i]<EM>斜体</EM></TD>
    </TR>
    <TR> 
      <TD height=20><hr></TD>
    </TR>
    <TR> 
      <TD height=20>使用参数:[b]需要粗体的文字[/b]</TD>
    </TR>
    <TR> 
      <TD height=20>效果范例: [b]粗体[/b]<B>粗体</B></TD>
    </TR>
    <TR> 
      <TD height=20><hr></TD>
    </TR>
    <TR> 
      <TD height=20>使用参数:[u]需要粗体的文字[/u]</TD>
    </TR>
    <TR> 
      <TD height=20>效果范例: [u]下划线[/u]<U>下划线</U></TD>
    </TR>
    <TR> 
      <TD height=20><hr></TD>
    </TR>
    <TR> 
      <TD height=20>使用参数:[align=对齐方式]需要下划线的文字[/align],其中对齐方式可填:center, left, right</TD>
    </TR>
    <TR> 
      <TD height=20>效果范例:[align=center]文字居中[/align]</TD>
    </TR>
    <TR> 
      <TD height=20><hr></TD>
    </TR>
    <TR> 
      <TD height=20>使用参数:[url]连结地址[/url] 或 [url=连结地址]连结文字[/url]</TD>
    </TR>
    <TR> 
      <TD height=20>效果范例:</TD>
    </TR>
    <TR> 
      <TD height=20>[url]http://www.xxiyy.com[/url]<a href="http://www.xxiyy.com" target="_blank">http://www.xxiyy.com</a></TD>
    </TR>
    <TR> 
      <TD height=20>[url=http://www.xxiyy.com]网站地址[/url]<a href="http://www.xxiyy.com" target="_blank">网站地址</a></TD>
    </TR>
    <TR>
      <TD height=20><hr></TD>
    </TR>
    <TR> 
      <TD height=20>使用参数:[email]邮箱地址[/email] 或 [email=邮箱地址]连结文字[/email]</TD>
    </TR>
    <TR> 
      <TD height=10>效果范例:</TD>
    </TR>
    <TR> 
      <TD height=10>[email]mikespook@163.com[/email]<a href="mailto:mikespook@163.com">mikespook@163.com</a></TD>
    </TR>
    <TR> 
      <TD height=20>[email=mikespook@163.com]联系站长[/email]<a href="mailto:mikespook@163.com">联系站长</a></TD>
    </TR>
  </table>
</div>
<?php
include("includes/inc_footer.php");
?>

⌨️ 快捷键说明

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