|
| ";
#------- °¢ ¼½¼ÇÀÇ Çìµå¶óÀÎ ºÒ·¯¿À±â
$query="select board_name,board_id from board_admin where skin='0' and category='$ct_sel' order by sort DESC";
$news_db=mysql_query($query);
query_chk($news_db,"news_db select error");
while($news_list=mysql_fetch_array($news_db)){
$public_where="and reg_date>$public_now and reg_date<$paper_info[public_html]";
$board_name="zboard".$news_list[board_id];
$query="select subject,id,body,up_filename,pic_location,type, reg_date, name, r_num,email from $board_name where n_type='headline' and subject!='' order by id DESC limit 0,3";
$news_db1=mysql_query($query);
query_chk($news_db,"index headline select error");
while($headline_news=mysql_fetch_array($news_db1)){
if($headline_news[email]){
$name="[$headline_news[name] : $headline_news[email]]";
}
else{
$name="[$headline_news[name]]";
}
if($headline_news[up_filename]){
switch($headline_news[pic_location]){
case("left") :
$pic=" ";
break;
case("right") :
$pic=" ";
break;
case("center") :
$pic=" ";
break;
}#switch
}#if
else{
$pic="";
}#else
#------- Çìµå¶óÀÎ ±â»ç ÀÚ¸£±â
$str_location=500;
if(strlen($headline_news[body])>$str_location){#if...1
$headline_news[body]=substr($headline_news[body],0,$str_location+1);
$aa=ord(substr($headline_news[body],15,-1));
while(ord(substr($headline_news[body],$str_location-1,-1))>126){
$str_location=$str_location-1;
}#if...1
$headline_news[body]=substr($headline_news[body],0,$str_location);
$headline_news[body]=$headline_news[body].".....";
}
if($headline_news[type]=="text"){
$headline_news[body]=htmlspecialchars($headline_news[body]);
$headline_news[body]=trim($headline_news[body]);
$headline_news[body]=nl2br($headline_news[body]);
}
$headline_news[body]=$headline_news[body]."[°è¼Ó]";
echo"
$headline_news[subject]
$pic$headline_news[body]
";
}#while
}#while
print " | ";
?>
|