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

📄 msbook.php

📁 LOVESTUdio多校园网络店铺 VER 3.0基于2.0开发
💻 PHP
字号:
<?php
require_once('libs/session.inc');
require_once('libs/config.inc');
require_once('libs/dbmanager.inc');
require_once('libs/function.inc');
$conn = DBManager::getConnection(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>网站留言</title>
<link rel="stylesheet" type="text/css" href="skin/style.css" />
</head>
<script language="javascript" type="text/javascript" src="js/menu.js"></script>
<script language="javascript" type="text/javascript">
function DrawImage(ImgD,iwidth)
{
 var image=new Image();
 image.src=ImgD.src;
 if(image.width>0 && image.height>0)
 {
  if(image.width>iwidth)
  {  
   ImgD.width=iwidth;
   ImgD.height=(image.height*iwidth)/image.width;
  }
 }
 ImgD.style.display = "block";
} 
</script>
<body>
<?php require_once('pagetag/page_top.html'); ?>
<table align="center" width="964" cellpadding="0" cellspacing="0">
<tr><td height="10"></td></tr>
<tr>
<td width="203" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
	   <tr>
	   <td align="center" colspan="3" height="9" background="skin/line_top.gif"></td>
	   </tr>
	   <tr>
	   <td width="1" class="line1"></td>
	   <td valign="top" width="201" align="center">
	   <table width="100%" cellpadding="0" cellspacing="0">
	   <tr>
	   <td><img src="skin/search.gif" /></td>
	   </tr>
	   <tr>
	   <td height="10" align="center"><img src="skin/m_m.gif" width="180" height="1" /></td>
	   </tr>
	   </table>
	   <?php require_once('pagetag/search_page.php'); ?>
	   </td>
	   <td width="1" class="line1"></td>
	   </tr>
	   <tr>
	   <td colspan="3" height="11" background="skin/sch_bot.gif"></td>
	   </tr>
	   <tr>
	   <td height="5"></td>
	   </tr>
	 </table>

<table height="149" width="100%" cellpadding="0" cellspacing="0" background="skin/star_shopbak.gif">
<tr>
<td height="8"></td>
</tr>
<tr>
<td height="24" align="center"><img src="skin/s_b.gif" /></td>
</tr>
<tr>
<td align="center" valign="top"><?php require_once('pagetag/showtextstar.php'); ?></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
	   <tr>
	   <td height="10"></td>
	   </tr>
	   <tr>
	   <td align="center" colspan="3" height="9" background="skin/line_top.gif"></td>
	   </tr>
	   <tr>
	   <td width="1" class="line1"></td>
	   <td valign="top" width="201" align="center">
	   <table width="100%" cellpadding="0" cellspacing="0">
	   <tr>
	   <td><img src="skin/new.gif" /></td>
	   </tr>
	   <tr>
	   <td height="10" align="center"><img src="skin/m_m.gif" width="180" height="1" /></td>
	   </tr>
	   </table>
	   <table width="100%" cellpadding="0" cellspacing="0">
	   <tr>
	   <td>
	 <?php require_once('pagetag/new_user.html'); ?>
	   </td><td width="15"></td>
	   </tr>
	   </table>
	   </td>
	   <td width="1" class="line1"></td>
	   </tr>
	   <tr>
	   <td colspan="3" height="11" background="skin/sch_bot.gif"></td>
	   </tr>
	 </table>
</td>
<td width="10"></td>
<td valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="40" background="skin/m_l.gif" width="8"></td>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" background="skin/m_m.gif" height="1"></td>
</tr>
<tr height="38">
<td width="40"><img src="skin/m_pic.gif" /></td><td>
  网站留言
</td>
</tr>
<tr>
<td colspan="2" background="skin/m_m.gif" height="1"></td>
</tr>
</table>
</td>
<td background="skin/m_r.gif" width="8"></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="">
<tr>
<td>
<table class="tableline" width="100%" cellpadding="4" cellspacing="0">
<tr>
<td width="200">留言</td>
<td width="706" align="right">发表留言</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0">
<tr><td height="5">
</td></tr>
</table>
<?php
$rest = $conn->query("SELECT * FROM ".$tablepre."message ORDER BY mid ASC");
$total=0;
while($akr = $rest->fetch_assoc()){
$total++;
}
               $page = new ShowPage;   
               $page->PageSize = 10;   
               $page->Total = $total;   
               $page->LinkAry = array();                    
               $showpage = $page->ShowLink();

$rest = $conn->query("SELECT * FROM ".$tablepre."message ORDER BY mid ASC LIMIT ".$page->OffSet());
$k = $_GET[page];
if($k == "") $k=1;
$i = 10*($k-1)+1;  
				  

while($aor = $rest->fetch_assoc()){
?>
<table class="tableline" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="200">
<table height="100%" style='table-layout:fixed' bgcolor="#F5EFEA" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="20"></td>
</tr>
<tr>
<td align="center" valign="top">
<?php
if($aor[mperson] == vistor){
   echo "<table width='80' height='80' cellpadding='0' cellspacing='0'>
         <tr><td align='center'>
		 <img src='skin/mashead/".$aor[mhead]."' border='0' onload='DrawImage(this,80)' style='display:none' />
		</td></tr></table>
         <font color='red'>游客</font><br>";  		 
                           }
else {     echo "<img src='skin/heads/".$aor[mhead]."' /><br><font color='red'>注册用户</font><br>";
}
   echo $aor[mname];
   echo "<br>";
   echo "性别:";
   echo selectsex($aor[msex]);
?>

</td>
</tr>
</table>
</td>
<td width="706" valign="top">
<table width="100%" cellpadding="4" cellspacing="0">
<tr height="25">
<td width="6%" background="skin/hrs.gif">
<img src="skin/face/<?php echo $aor[mface]; ?>.gif" /></td>
<td width="83%" background="skin/hrs.gif">
发表时间: <?php echo $aor[mtime]; ?></td>
<td width="3%" background="skin/hrs.gif">
<?php
if($aor[mperson] == vistor){
    echo "<img src='skin/yk.gif' />";
}
else{  echo "<img src='skin/hy.gif' />"; }
?></td>
<td width="8%" align="right" background="skin/hrs.gif"><?php echo $i; ?>楼</td>
</tr>
<tr>
<td colspan="4"><br><?php echo $aor[mnr]; ?></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0">
<tr><td height="5">
</td></tr>
</table>
<?php
$i++;
}
?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="right"><?php echo $showpage; ?>&nbsp;&nbsp;</td>
</tr>
</table>
<form name="myform" action="chk_ms.php" method="post">
<table border="1" style="border-collapse:collapse" bordercolor="#CCCCCC" width="100%" cellpadding="4" cellspacing="0">
<tr>
<td colspan="3" align="center">签写留言</td>
</tr>
<?php
if(empty($_SESSION['username'])){
?>
<tr>
<td width="14%" align="right">你的呢称:</td>
<td colspan="2"><input name="petname" size="15" maxlength="30" class="input0"></td>
</tr>
<tr>
<td align="right">性别:</td>
<td colspan="2">
<select name="sex">
       <option value="">请选择</option>
	   <option value="0">男</option>
	   <option value="1">女</option>
 </select>
</td>
</tr>
<?php
}
?>
<tr>
<td align="right">头像&amp;表情:</td>
<td width="10%" align="center">
<?php
if(!empty($_SESSION['username'])){
                $userhead = checklei($_SESSION['username'],$tablepre.user,username,userhead);                echo "<img src='skin/heads/".$userhead."' /><input type='hidden' name='myhead' value='".$userhead."'>"; 
								 }
else{								 
?>
<div id="imgBox"><!--这里是图片下拉选择器的位置--></div>
<input name="myhead" type="hidden" id="myface" size="10" value="">
<script language="JavaScript">
<!--
var imgWidth=64; 
var imgHeight=64; 
var imgSrc="skin/mashead/数字序号.gif"; 
var selectedNo=1; 
var selecteSize=5; 



var myHTML='<SPAN onmouseover="isin=true" onmouseout="isin=false">';
myHTML+='<table width="1" onclick="showlist(this)" title="选择提示框" border="0" cellspacing="0" cellpadding="0"><tr><td><img name="imgselected" border=1 src="'+imgSrc.replace("数字序号",selectedNo)+'" WIDTH='+(imgWidth)+' HEIGHT='+imgHeight+'></td><td valign=top><img src="skin/smallpic/33.gif" /></td></tr></table>';
myHTML+='<DIV onscroll="scrollud()" id="imgBox" \n';
myHTML+='style="position:absolute;left=-800;top=0;background-color:#FFFFFF;border: 1px solid #000000;overflow-x:hidden;overflow-y:scroll; width:'+(imgWidth+20)+'px; height: '+imgHeight*selecteSize+'px">';
for(i=1;i<13;i++){
myHTML+="<img listID="+i+" src='"+imgSrc.replace("数字序号",i)+"' alt='"+imgSrc.replace("数字序号",i)+"' width="+imgWidth+" height="+imgHeight+" onclick='selectme(this)' onload='if(init)init()'><BR>";
}
myHTML+= "</DIV></SPAN>";
imgBox.outerHTML=myHTML;


function showlist(obj){

if(imgBox.style.pixelLeft!=-800){imgBox.style.pixelLeft=-800; return;}



var mytop=obj.offsetTop; 
var myleft=obj.offsetLeft;
 
while(obj=obj.offsetParent){
myleft+=obj.offsetLeft; 
mytop+=obj.offsetTop; 
}

imgBox.style.left=myleft;
imgBox.style.top=mytop+imgHeight+2;

}

var isin=false;
function selectme(obj){ 
if(!isin||obj){imgBox.style.pixelLeft=-800;} 
if(obj){

myform.myhead.value=imgSrc.replace("数字序号",obj.listID);
document.images["imgselected"].src=imgSrc.replace("数字序号",obj.listID);
}
}

var mytime=setTimeout("",0);
var pre_X=0; 
function scrollud(){ 
var current_X=imgBox.scrollTop; 

if(current_X>pre_X && imgBox.scrollTop< Math.ceil(imgBox.scrollTop/imgHeight)*imgHeight){
clearTimeout(mytime);
mytime=setTimeout("imgBox.scrollTop=Math.round(imgBox.scrollTop+1);",1);
}
else if(current_X<pre_X && imgBox.scrollTop> Math.floor(imgBox.scrollTop/imgHeight)*imgHeight){
clearTimeout(mytime);
mytime=setTimeout("imgBox.scrollTop=Math.round(imgBox.scrollTop-1);",1);
}
pre_X=current_X;
}
function init(){ 
imgBox.scrollTop=selectedNo*imgHeight;
myform.myhead.value=imgSrc.replace("数字序号",selectedNo);
}
myActivation="selectme(null)";
if(document.body.onclick)
{
eval(document.body.onclick.toString().replace('anonymous()','bodyclick()'));
document.body.onclick=new Function("bodyclick();"+myActivation);
}
else document.body.onclick=new Function(myActivation);
-->
</script>
<?php
}
?>
</td>
<td width="76%" valign="bottom">
<input type="radio" name="face" value="1" checked="checked">
<img src="skin/face/1.gif" />
<?php
for($i=2;$i<21;$i++){
echo "<input type='radio' name='face' value='".$i."'><img src='skin/face/".$i.".gif' />";
if($i==10) echo "<br>";
 }
?></td>
</tr>
<tr>
<td align="right">留言内容:</td><td colspan="2"><iframe id="eWebEditor1" src="edit/wordeditor.htm?id=msnr&fullscreen=" frameborder="0" scrolling="no" width="600" height="200"></iframe> 
<textarea cols="60" rows="10" style="display:none" name="msnr" id="msnr" ></textarea></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="hidden" name="message" value="mword">
<input type="submit" name="submit" class="input1" value="发表"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td height="20"></td>
</tr>
</table>
<?php
require_once('pagetag/bottommation.php'); 
$conn->close();
?>

</body>
</html>

⌨️ 快捷键说明

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