"; $time_limit = 60*60*24*$new_article_time; //ÇöÀçÆäÀÌÁöÀÇ ¹üÀ§³»¿¡ Ãâ·ÂÇÒ °á°ú·¹Äڵ弼Ʈ¸¦ ¾ò´Â´Ù. $query = "SELECT uid,fid,name,email,subject,comment,signdate,ref,thread FROM $photoqa ORDER BY fid DESC, thread ASC"; $result= mysql_query($query,$dbconn); if (!$result) { error("QUERY_ERROR"); exit; } //°Ô½Ã¹°ÀÇ °¡»ó¹øÈ£(°Ô½Ã¹°ÀÇ °³¼ö¿¡ µû¸¥ ÀϷùøÈ£) $article_num = $total_record - $page_per_num*($page-1); for($i = $first; $i <= $last; $i++) { $my_uid = mysql_result($result,$i,0); $my_fid = mysql_result($result,$i,1); $my_name = mysql_result($result,$i,2); $my_email = mysql_result($result,$i,3); $my_subject = mysql_result($result,$i,4); $my_comment = mysql_result($result,$i,5); $my_signdate = mysql_result($result,$i,6); $my_ref = mysql_result($result,$i,7); $my_thread = mysql_result($result,$i,8); $my_subject = stripslashes($my_subject); echo""; $article_num--; } echo "
 
function checkUserSelect() { var check_nums = document.form.elements.length; for(var i = 0; i < check_nums; i++) { var checkbox_obj = eval('document.form.elements[' + i + ']'); if(checkbox_obj.checked == true) { break; } } if(i == check_nums) { alert('¸ÕÀú ÀаíÀÚ ÇÏ´Â °Ô½Ã¹°À» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ'); return; } else { document.form.submit(); } } //--> "; //Àüü°Ô½Ã¹°ÀÇ ÃÑ °³¼ö¸¦ °¢°¢ ±¸ÇÑ´Ù. if(!eregi("[^[:space:]]+",$key)) { $query = "SELECT count(uid) FROM $photoqa"; } else { $encoded_key = urlencode($key); $query = "SELECT count(uid) FROM $photoqa WHERE $keyfield LIKE '%$key%'"; } $result = mysql_query($query,$dbconn); if (!$result) { error("QUERY_ERROR"); exit; } $total_record = mysql_result($result,0,0); //ÇöÀçÀÇ ÆäÀÌÁö¿¡¼­ Ãâ·ÂÇÒ °Ô½Ã¹°ÀÇ ¹üÀ§¸¦ °áÁ¤ÇÑ´Ù. if(!$total_record) { $first = 1; $last = 0; } else { $first = $page_per_num*($page-1); $last = $page_per_num*$page; $IsNext = $total_record - $last; if($IsNext > 0) { $last -= 1; } else { $last = $total_record - 1; } } //Àüü ÆäÀÌÁö¼ö¸¦ °è»êÇÑ´Ù. $total_page = ceil($total_record/$page_per_num); $total_block = ceil($total_page/ $num_per_block); $block = ceil($page/ $num_per_block); $first_page = ($block-1)* $num_per_block; $last_page = $block* $num_per_block; if($total_block <= $block) { $last_page = $total_page; } ?>
"; if(!eregi("[^[:space:]]+",$key)) { echo" ÃÑ °Ô½Ã¹° : $total_record   ( (Total $total_record Articles) ( $page / $total_page )"; } else { echo" °Ë»öµÈ °Ô½Ã¹° : $total_record   ( (Total $total_record Articles) ( $page / $total_page )"; } echo"
"; if($block > 1) { $my_page = $first_page; echo""; } else { echo""; } echo "
"; for($direct_page = $first_page+1; $direct_page <= $last_page; $direct_page++) { if($page == $direct_page) { echo("[$direct_page]"); } else { echo("[[$direct_page]]"); } } echo "
"; if($block < $total_block) { $yboard_page = $last_page+1; echo(""); } else { echo ""; } echo "
¹ø È£
Á¦ ¸ñ
ÀÌ ¸§
±Û¾´ ³¯
ÀÐÀº ¼ö
¼± ÅÃ
\n"; echo""; $my_signdate = date("Y-m-d",$my_signdate); echo""; echo" "; echo" "; echo"
$article_num
"; $spacer = strlen($my_thread)-1; if($spacer > $reply_space) $spacer = $reply_space; for($j = 0; $j < $spacer; $j++) { echo"   "; } $my_subject = htmlspecialchars($my_subject); if(!strcmp($keyfield,"subject") && $key) { $str_subject = eregi_replace("$key", "$key", $my_subject); } else { //Á¦¸ñÀÚ¸£±â $strings="$my_subject"; $str02=strlen($strings); //$string ÀÇ ¹®ÀÚ¿­ÀÇ ±æÀ̸¦ ±¸ÇÔ $lenstr=29; // ¾îµðºÎÅÍ ÀÚ¸¦ Áö ¼³Á¤ for($k=0; $k<$lenstr-1; $k++) { if(ord(substr($strings, $k, 1))>127) $k++; // ord ÇÔ¼ö´Â ¹®ÀÚÀÇ ASCII °ªÀ» ±¸ÇÏ´Â ÇÔ¼ö·Î½á 127 º¸´Ù Å©¸é ÇÑ±Û Äڵ尪À¸·Î Á¤ÇÔ(ASCIIÄڵ尪ÀÌ 127 º¸´Ù Å©´Ù°í ÀüºÎ ÇѱÛÀº ¾Æ´Ô.. } if ($str02 > $lenstr) //stringsÀÇ ¹®ÀÚ¿­ÀÌ $lenstrº¸´Ù Å©¸é.... { $str_subject=substr($strings, 0, $k)."....."; //À߸°¹®ÀÚ¿­ µÚ¿¡ ...À» ºÙÀÓ } else { //±×·¸Áö ¾ÊÀ¸¸é... $str_subject=$strings; // ¹®ÀÚ¿­À» ±×´ë·Î º¯¼ö·Î ¹Þ¾ÆµéÀÓ } } $line = explode("\n",$my_comment); $line_of_comment = sizeof($line); echo" $str_subject"; $date_diff = time() - $my_signdate; if ($date_diff < $time_limit) { echo" "; } echo"
$my_name
$my_signdate
$my_ref  
"; //°Ô½Ã¹°ÀÌ ´ÙÀ½ÆäÀÌÁö¿¡µµ Á¸ÀçÇÒ °æ¿ì ´ÙÀ½ÆäÀÌÁö·Î °¡´Â ¸µÅ© echo"
"; //ÀÌÀüÆäÀÌÁö°¡ Á¸ÀçÇÒ °æ¿ì ÀÌÀüÆäÀÌÁö·Î °¡´Â ¸µÅ© if ($page > 1) { $page_num = $page - 1; echo" "; } else { echo""; } echo " "; if ($IsNext > 0) { $page_num = $page + 1; echo""; } else { echo""; } echo "
"; ?>