|
 |
 |
 |
 | ";
if($file_print == "yes") echo" | ";
echo"
 |
|
|
";
################################################################################################
########################################## °øÁö»çÇ× ############################################
$n_sql = "select * from $board_table where db='$board_db' && notice='Y' $addboard order by num desc ";
$n_res = mysql_query($n_sql);
while($n_row = @mysql_fetch_array($n_res)){
########################################## ÄÚ¸àÆ® °¹¼ö ############################################
$c_sql = "select count(num) from $comment_table where usernum = '$n_row[num]'";
$c_row = mysql_fetch_array(mysql_query($c_sql));
if($c_row[0]) $comment_cnt = " [$c_row[0]]";
else $comment_cnt = "";
########################################## ÄÚ¸àÆ® °¹¼ö ############################################
$n_subject = b_string_cut($n_row[subject], 30, "...");
$n_subject = "$n_subject $comment_cnt";
if(date("Y-m-d") == substr($n_row[wdate], 0, 10)){
$n_date = "".substr($n_row[wdate], 0, 10)."";
$newIco = " ";
} else {
$n_date = substr($n_row[wdate], 0, 10);
$newIco = "";
}
echo"
[°øÁö] |
$n_subject $commant_cnt |
".b_string_cut($n_row[name], $name_length, "..")." |
$n_date | ";
if($file_print == "yes") echo"$file | ";
echo"
$n_row[hit] |
|
";
}
########################################## °øÁö»çÇ× ############################################
################################################################################################
#################################### °Ô½Ã¹° ¸®½ºÆ® S ###########################################
$item = $page_skip;
if(!$item) $item = 10;
$pageitem = $pagenumber;
if(!$pageitem) $pageitem = 10;
if(!$page) $page = 1;
$start = ($page - 1) * $item;
$totalpage = ceil($total / $item);
$pnum = $total - (($page-1) * $item);
$sql = "select * from $board_table where db='$board_db' && notice!='Y' $addwhere order by idx desc, sort asc limit $start, $item";
$res = mysql_query($sql);
while($row = mysql_fetch_array($res)){
########################################## ÄÚ¸àÆ® °¹¼ö ############################################
$c_sql = "select count(num) from $comment_table where usernum='$row[num]'";
$c_row = mysql_fetch_array(mysql_query($c_sql));
if($c_row[0]) $comment_cnt = " [$c_row[0]]";
else $comment_cnt = "";
########################################## ÄÚ¸àÆ® °¹¼ö ############################################
if($open_print == "yes" && $row[secret] == "Y"){
if(($login_id == $row[id] && $row[id]) || $login_level>=$secret_level){
$close_icon = " ";
$write_name = $row[name];
$subject = "$row[subject]";
$close_icon = " ";
$write_name = $row[name];
$subject = b_string_cut(html_entity_decode($row[subject]), $subject_length, "...");
$t_subject = strip_tags(html_entity_decode($row[subject]));
$cut_subject = b_string_cut($t_subject, $subject_length, "...");
$subject = ereg_replace($t_subject, $cut_subject, html_entity_decode($row[subject]));
$subject = "$subject";
} else {
$close_icon = " ";
$write_name = $row[name];
$t_subject = strip_tags(html_entity_decode($row[subject]));
$cut_subject = b_string_cut($t_subject, $subject_length, "...");
$subject = ereg_replace($t_subject, $cut_subject, html_entity_decode($row[subject]));
$subject = "$subject";
}
} else {
$close_icon = "";
$write_name = $row[name];
$subject = b_string_cut(html_entity_decode($row[subject]), $subject_length, "...");
$t_subject = strip_tags(html_entity_decode($row[subject]));
$cut_subject = b_string_cut($t_subject, $subject_length, "...");
//$subject = ereg_replace("$t_subject", "$cut_subject", html_entity_decode($row[subject]));
$subject = "$subject";
}
//$subject = b_string_cut($subject, $subject_length, "...");
//$subject = "$subject";
if($row[sort]){
$subject = " ".$subject;
for($i=0; $i".substr($row[wdate], 0, 10)."";
$newIco = " ";
} else {
$wdate = substr($row[wdate],0,10);
$newIco = "";
}
$file = explode("||", $row[exname]);
$file_name = explode("||", $row[file_name]);
if($file_name[0]) $ficon1 = " ";
else $ficon1 = "";
if($file_name[1]) $ficon2 = " ";
else $ficon2 = "";
if($file_name[2]) $ficon3 = " ";
else $ficon3 = "";
if($pnum%2) $bgcolor = "#F8F8F8";
else $bgcolor = "#FFFFFF";
echo"
".$pnum--." |
$subject $newIco $close_icon |
".b_string_cut($write_name, $name_length, "..")." |
$wdate | ";
if($file_print == "yes") echo"$file1 $file2 $file3 | ";
echo"
$row[hit] |
|
";
}
if(!$total){
echo"
µî·Ï(°Ë»ö)µÈ ±ÛÀÌ ¾ø½À´Ï´Ù. |
|
";
}
echo"
|
|
";
$fquery = "board_db=$board_db&column=$column&keyword=$keyword";
psk_pagelinkB($totalpage, $pageitem, $page, "$board_img/btn_prev.gif", "$board_img/btn_next.gif", $fquery);
echo"
|
|
|
|
|