= $s_que order by pos " ;
}
else{
$que1="select num, replace(title, '$s_que', '$s_que') as title,
name,email,DATE_FORMAT(w_date,'Y/m/d') ,
(UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(w_date))/3600,
hits, depth from $Board_Code
where $field like '%$s_que%' order by pos " ;
}
}
else{
$que1="select num, title,name,email,DATE_FORMAT(w_date,'Y/m/d'),
(UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(w_date))/3600 ,
hits, depth from $Board_Code order by pos " ;
}
// echo $que1 ;
$result=mysql_query($que1,$connect );
$total = mysql_affected_rows();
$last=floor($total/$scale); // ȸéÇÏ´Ü [1] [2] .. ¸¶Áö¸·¹øÈ£
//============= °Ô½Ã¹° ¸ñ·Ï Å×ÀÌºí ¸Ó¸®±Û Ç¥½Ã ======================
echo("
$Board_Title <- Admin Mode |
");
if($mode=='search'){echo(" °Ë»ö°á°ú : $total °Ç");}
else{ echo("¿À´Ã³¯Â¥ : $todate ¿À´Ã $today_no / Àüü $total"); }
echo(" |
Num |
Á¦ ¸ñ |
ÀÛ¼ºÀÚ |
Á¶È¸ |
ÀÛ¼ºÀÏ |
");
if($start) { $n=$total-$start; }
else { $n=$total; }
for($i=$start ; $i< $start+$scale ; $i++){ // start ¿¡¼ scale ±îÁö ¸¸
if($i< $total ){ // Àüü ÀÚ·á °³¼ö±îÁö¸¸ Ãâ·Â
mysql_data_seek($result,$i);
$row=mysql_fetch_array($result);
$row[title] = stripslashes($row[title]);
$allocate = $i%2;
if($allocate == 0) { echo("
"); }
else{ echo("
"); }
echo("\n $n | ");
echo("\n ");
// --------- ÀÀ´äÀÇ Àε§Æ® -----------------
if($row[depth]>1) {
for($j=1;$j<$row[depth];$j++){ echo(" "); }
//echo("¢º¢¹¢º¢¹");
echo("¢¹");
}
// ------------------------------------------
$title_sta = $row[title];
//$title_sta = ereg_replace( "'", "£§", $title_sta );
$view_title=$row[title];
echo("$view_title");
// ====== NEW, COOL ¸¶Å© ÷°¡ ============
if($row[5] <= $new_time ) { echo(" <-NEW"); }
if($row[hits] >= $cool_cnt) {echo(" <-HITS"); }
echo("\n | ");
if($row[email]){ echo("$row[name] | ");}
else{echo("$row[name]"); }
echo("
$row[hits] |
$row[4] |
");
$n--;
}
}
// °Ë»ö °á°ú°¡ ÆäÀÌÁö ´ç Ãâ·Â¼ö º¸´Ù Å©¸é
if($total > $scale){
echo("
");
if( $start+1 > $scale*$page_scale ) {
$pre_start = $start - $scale ;
echo("ÀÌÀü -");
}
for($page_num = 0; $page_num < $page_scale ; $page_num++){
$page_start_num = ($page * $page_scale + $page_num)*$scale ;
$vk= $page * $page_scale + $page_num+1 ;
if($page_start_num<$total){
if($page_start_num!=$start) echo("[$vk]");
else echo(" $vk ");
}
}
if($total > (($page+1)*$scale*$page_scale) ){
$next_start=($page+1)*$scale*$page_scale ;
echo("- ´ÙÀ½");
}
echo("
|
");
}
// °Ë»ö ÆûÀ» º¸ÀÌ´Â ÆäÀÌÁö
echo("
|
");
$prev_page_start_num = $start - $scale ;
$next_page_start_num = $start + $scale ;
if($prev_page_start_num>=0) { echo("ÀÌÀü ÆäÀÌÁö -"); }
echo("
¸ñ·Ïº¸±â -
»õ±Û ¾²±â
");
if($next_page_start_num<$total){ echo("- ´ÙÀ½ ÆäÀÌÁö"); }
echo("
|
");
include "../theme/$Theme/tail.inc";
?>