border=0 cellspacing=0 cellpadding=5>
>
?mode=order&orderBy=id>¹øÈ£ |
?mode=order&orderBy=category>Á¾·ù |
?mode=order&orderBy=writer>±Û¾´ÀÌ |
?mode=order&orderBy=subject>Á¦¸ñ |
?mode=order&orderBy=wdate>³¯Â¥ |
?mode=order&orderBy=count>Á¶È¸¼ö |
for ($i = 0; $i < $total; $i++) {
$row = mysql_fetch_array($result);
// Ãâ·ÂÇϱâ ÁÁµµ·Ï µ¥ÀÌÅÍ º¯°æ
$no = ($page - 1) * $size + $i + 1;
$indent = '';
for ($j = 0; $j < $row[indent] && $j < $maxIndent; $j++) {
$indent .= ' ';
}
$subjectLength = $subjectMax - strlen($indent);
$writer = stripslashes($row[writer]);
$writer = htmlspecialchars($writer);
$subject = subkostr($row[subject], $subjectLength);
$subject = htmlspecialchars($subject);
// °Ë»ö³»¿ëÀÌ ÀÖÀ¸¸é, ÂðÇÏ°Ô Ãâ·Â...
if (($searchWhere == 'writer' || $searchWhere == 'all') && $searchWhat) {
$writer = eregi_replace("$searchWhat", "$searchWhat", $writer);
}
if (($searchWhere == 'subject' || $searchWhere == 'all') && $searchWhat) {
$subject = eregi_replace("$searchWhat", "$searchWhat", $subject);
}
$wdate = date('Y.m.d', $row[wdate]);
$today = date('Y.m.d');
if ($row[email]) {
$writer = "$writer";
}
if ($row[indent]) {
$indent = str_replace(' ', ' ', $indent);
$indent .= ' ';
}
$newImage = ($wdate == $today) ? ' ' : '';
$hotImage = ($row[count] >= $hot) ? ' ' : '';
$category = $row[category];
// ÈÀÏÀÌ ÀÖ´ÂÁö Á¶»ç
$result2 = $db->execute("select count(*) from $file_table where id = $row[uid]");
$row2 = mysql_fetch_row($result2);
$fileImage = ($row2[0]) ? " " : '';
$bgcolor = (($i + 1)% 2) ? $colorList1 : $colorList2;
if ($row[uid] == $uid) {
$bgcolor = $colorSelect;
}
echo ("
$row[id] |
![$categoryName[$category]]($categoryImage[$category]) |
$writer |
$indent $subject $fileImage $newImage $hotImage |
$wdate |
$row[count] |
");
}
?>
|