📄 naboard_list.php
字号:
<br>
<?
//////////////////////////////////When there is search words
if($search_word){
if($search_and){$and="and";}else{$and="or";}
$search_word=str_replace(" ",",",$search_word);
$search_word_arry=explode(",",$search_word);
$search_word_length=sizeof($search_word_arry);
$query_where.=" and";
for($x=0;$x<$search_word_length;$x++){
if($x){$query_where.=" $and";}
$query_where.=" (";
if($search_title){$query_where.="title like '%$search_word_arry[$x]%'";$x_1[$x]=1;}
if($search_memo){if($x_1[$x]){$or_2[$x]="or";}$query_where.="$or_2[$x] memo like '%$search_word_arry[$x]%'";$x_2[$x]=1;}
if($search_name){if($x_2[$x] || $x_1[$x]){$or_3[$x]="or";}$query_where.="$or_3[$x] name like '%$search_word_arry[$x]%'";}
$query_where.=")";
}
}
//////////////////////////////////When there is categories
if($cat_no){
$query_where.=" and cat='$cat_no'";
}
//////////////////////////////////total num
$total=total("$board_table$bd","$query_where");
//////////////////////////////////value establishment
$page=$set[page];
$pagesu=ceil($total/$page);
$start=($page*$pagenum);
$num=$total-$start;
$pageviewsu=$set[pagenum];
$pagegroup=ceil(($pagenum+1)/$pageviewsu);
$pagestart=($pageviewsu*($pagegroup-1))+1;
$pageend=$pagestart+$pageviewsu-1;
$nowpage=$pagenum+1;
//////////////////////////////////Variable that will be passed
$send="bd=$bd&no=$no&pagenum=$pagenum&cat_no=$cat_no&search_word=$search_word&search_title=$search_title&search_memo=$search_memo&search_name=$search_name&search_and=$search_and&";
//////////////////////////////////width
if(!$set[width_kind]){$width_kind="%";}
echo"
<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;}
}
</script>
<table border=0 width='100%' cellpadding=0 cellspacing=0 align=center><tr><td width=100% valign=top>";
//////////////////////////////////today
$check_today=date('Y-m-d');
//////////////////////////////////skin top
include"$skin/list_top.php";
//////////////////////////////////to take out
$query="select * from $board_table$bd where 1 $query_where order by abs,step,level limit $start,$page";
$result=mysql_query($query,$connect);
while($data=mysql_fetch_array($result))
{
//////////////////////////////////reply block
$block="";
for($i=0;$i>=$data[level];$i--){$block.=" ";}
//////////////////////////////////Length control
if($set[title_length]){$data[title]=cut($data[title],$set[title_length]);}
if($set[name_length]){$data[name]=cut($data[name],$set[name_length]);}
//////////////////////////////////slah chopping
$data[name]=stripslashes($data[name]);
$data[title]=stripslashes($data[title]);
//////////////////////////////////emphasis searching word
for($i=0;$i<$search_word_length;$i++){
if($search_title)
{$data[title]=str_replace("$search_word_arry[$i]","#≮$search_word_arry[$i]≠#",$data[title]);}
if($search_memo)
{$data[memo]=str_replace("$search_word_arry[$i]","#≮$search_word_arry[$i]≠#",$data[memo]);}
if($search_name)
{$data[name]=str_replace("$search_word_arry[$i]","#≮$search_word_arry[$i]≠#",$data[name]);}
}
if($search_title){
$data[title]=str_replace("#≮","<font color=red>",$data[title]);
$data[title]=str_replace("≠#","</font>",$data[title]);
}
if($search_memo){
$data[memo]=str_replace("#≮","<font color=red>",$data[memo]);
$data[memo]=str_replace("≠#","</font>",$data[memo]);
}
if($search_name){
$data[name]=str_replace("#≮","<font color=red>",$data[name]);
$data[name]=str_replace("≠#","</font>",$data[name]);
}
//////////////////////////////////mark estaglishment
$check_regday=date('Y-m-d',$data[date]);
$data[mark]="<img src=$skin/mark_old.gif align=absmiddle>";
if($check_regday==$check_today){$data[mark]="<img src=$skin/mark_new.gif align=absmiddle>";}
if($data[abs]==-2147483648){$data[mark]="<img src=$skin/mark_notice.gif align=absmiddle>";}
if($data[no]==$no){$data[mark]="<img src=$skin/mark_this.gif align=absmiddle>";}
if($data[step]){$data[re_mark]="<img src=$skin/mark_re.gif align=absmiddle>";}else{$data[re_mark]="";}
if($data[secret]){$data[sec_mark]="<img src=$skin/mark_secret.gif align=absmiddle>";}else{$data[sec_mark]="";}
//////////////////////////////////category name
if($set[cat]){$category_name=selects("$cat_table$bd","and no='$data[cat]'");$data[cat_name]=$category_name[name];}
//////////////////////////////////cool
if($set[best]<=$data[hit] && $set[best]){$data[cool]=1;}else{$data[cool]=0;}
//////////////////////////////////comment num
$data[com_num]=total("$com_table$bd","and no=$data[no]");
//////////////////////////////////set member icon
if($data[id]){
$image_exist=file_exists("member_icon/$data[id].gif");
if($image_exist){$data[name]="<img src='member_icon/$data[id].gif' border=0 align=absmiddle>";}
}
//////////////////////////////////skin middle
include"$skin/list_engine.php";
//////////////////////////////////-0-
$num--;
}
//////////////////////////////////skin bottom
$PHP_SELF="naboard.php";
include"$skin/list_bottom.php";
echo"</td></tr></table>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -