$numresults=mysql_query("select id from $storyboard where bunryu='$boardname'");
$numrows=mysql_num_rows($numresults);
$nsresult=mysql_query("select * from news where bunryu='$boardname' order by id desc limit 2");
$urigga=0;
while ($nsrow=mysql_fetch_array($nsresult))
{
$nsstorytitle=htmlspecialchars($nsrow[title]);
$nsstorycomment=htmlspecialchars($nsrow[comment]);
$nsstorynocomment=htmlspecialchars($nsrow[comment]);
$nsstorycomment = ereg_replace("<img","",$nsstorycomment);
$nsstorynocomment = ereg_replace("<img","",$nsstorynocomment);
// 제목 글자수 자르기
$str0=$nsstorytitle;
$length0=30; ///////////////////////////////////////////////////////////////////////// 필요할 경우 수정
$str0 = chop(substr($str0, 0, $length0));
preg_match('/^([\x00-\x7e]|.{2})*/', $str0, $nsstorytitle);
// 그림 있는 내용 글자수 자르기
$str1=$nsstorycomment;
$length1=150; ///////////////////////////////////////////////////////////////////////// 필요할 경우 수정
$str1 = chop(substr($str1, 0, $length1));
preg_match('/^([\x00-\x7e]|.{2})*/', $str1, $nsstorycomment);
// 그림 없는 내용 글자수 자르기
$str2=$nsstorynocomment;
$length2=300; ///////////////////////////////////////////////////////////////////////// 필요할 경우 수정
$str2 = chop(substr($str2, 0, $length2));
preg_match('/^([\x00-\x7e]|.{2})*/', $str2, $nsstorynocomment);
$nsstoryfilename=$nsrow[filename];
$nsfilepix=$nsrow[filepix];
$uriggano=$urigga%2;
if($uriggano==0)
{
?>