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

📄 member_list.php

📁 php写的论坛,代码精简到极点 请相看说明文件。是从英文翻译过来的:)
💻 PHP
字号:
<?
//////////////////////////////////ready
include "connect.php";
include "lib.php";
include "header.inc";

//////////////////////////////////search word query
if($word){$where="and name like '%$word%' or id like '%$word%' or mail like '%$word%'";}

//////////////////////////////////total member num
$total=total("$member_table","$where");

//////////////////////////////////member num and list num per page
$page=7;
$pageviewsu=10; 

//////////////////////////////////config
$pagesu=ceil($total/$page); 
$start=($page*$pagenum); 
$no=$total-$start;
$pagegroup=ceil(($pagenum+1)/$pageviewsu); 
$pagestart=($pageviewsu*($pagegroup-1))+1; 
$pageend=$pagestart+$pageviewsu-1;
$nowpage=$pagenum+1; 
?>
<body>

<script language=javascript>
function mailing(to){
if(to){window.open('mailing.php?to='+to,'','scrollbars=yes,width=400,height=400,top=200,left=200')}
else{window.open('mailing.php','root_mailing','scrollbars=yes,width=400,height=400,top=200,left=200')}
}
function use_mail(address){
if(!confirm('<?=$message?>你是否想使用本站的在线邮件功能? 如果取消将使用你系统默认的Email程序!')){return true;}
else{mailing(address);return false;}
}
function memo(to){
window.open('memo_write.php?to='+to,'na3_memo','scrollbars=yes,width=400,height=400,top=200,left=200')
}
</script>

<link rel=StyleSheet HREF=style.css type=text/css title=style>
<table width=100% height=100%>
<tr><td height=5></td></tr>
<tr><td valign=top>

<table align=center width=95% cellpadding=2 cellspacing=0 border=0 bgcolor=#F1F9FD>
<tr><td colspan=2 bgcolor=white><img src=image/logo.gif><br><br></td></tr>
<tr><td colspan=2 bgcolor=white>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td><font color=#008CD6 size=2><b>&nbsp;<a href=memo_write.php>书写私人短信</a>><a href=memo_list.php>查看私人短信</a>><a href=member_list.php>查看会员列表</a></b></font></td>
<td align=right><?=$help?></td>
</tr></table>
</td></tr>

<tr><td colspan=2 height=3 bgcolor=#2CBBFF></td></tr>
<tr><td colspan=2 bgcolor=#F1F9FD>

<table width=100% cellpadding=2 cellspacing=2>
<form method=post action=member_list.php>
<tr>
<td>&nbsp;&nbsp;总计<b><?=$total?></b> 位会员, 共:<b><?=$nowpage?></b>/<b><?=$pagesu?></b>页</td>
<td align=right><input type=text size=10 class=input name=word> <input type=submit class=button value=搜索>&nbsp;&nbsp;</td>
</tr>
</form>
<form method=post action=memo_delete.php onsubmit="return chk_del()" name=chk>
<tr>
<td colspan=2>


<table align=center width=98% cellpadding=2 cellspacing=0 border=1 bordercolor=white>
<tr bgcolor=#C9F0FF>
<td width=1% nowrap align=center>No</td>
<td width=1% nowrap align=center><font size=1>ID</font></td>
<td width=1% nowrap align=center>会员姓名</td>
<td width=96% nowrap align=center>电子邮件</td>
<td width=1% nowrap align=center>注册日期</td>
</tr>
<?
//////////////////////////////////Variable that will be passed
$send="&page=$page&word=$word&";

////////////////////////////////// :)
$i=0;

//////////////////////////////////To take out
$query="select * from $member_table where 1 $where order by date desc limit $start,$page";
$result=mysql_query($query,$connect);
while($data=mysql_fetch_array($result))
{
////////////////////////////////// Time alteration
$data[time]=date('Y-m-d H:i:s',$data[date]);
$data[date]=date('y-m-d',$data[date]);

//////////////////////////////////Mark establishment
$mark="<a href=# onclick=memo('$data[id]')><img src=image/memo_old.gif border=0 alt=书写私人短信></a>";

//////////////////////////////////Information open existence and nonexistence
if(!$data[open]){
$data[mail]="";
$data[name]="";
}

//////////////////////////////////Mail address chopping
$mail=cut($data[mail],8);

//////////////////////////////////Output
echo"
<tr bgcolor=white>
<td width=1% nowrap align=center>$no</td>
<td width=1% nowrap><a href=member_view.php?id=$data[id]&pagenum=$pagenum title=查看个人信息>$data[id]</a></td>
<td width=1% nowrap>$data[name]</td>
<td width=96%>$mark <a href='mailto:$data[mail]' title=发送电子邮件给此人 onclick=\"return use_mail('$data[mail]')\">$mail</a></td>
<td width=1% nowrap align=center><div title='$data[time]'>$data[date]</div></td>
</tr>
";

//////////////////////////////////value modify
$no--;$i++;
}

//////////////////////////////////That is passed all number
echo"<input type=hidden name=count value=$i>";
?>
</table>

</td></tr>
<tr><td colspan=2 align=center>
<?
//////////////////////////////////index
index();
?>
</td></tr>

</form>
</table>

</td></tr>
<tr><td colspan=2 height=3 bgcolor=#2CBBFF></td></tr>
<tr><td bgcolor=white><a href=# onclick=window.close()>关闭</a></td><td bgcolor=white><?=$copyright?></td></tr>
</table>
</td></tr></table>

<?mysql_close($connect);?>

⌨️ 快捷键说明

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