function text_cut($str, $len) { if(strlen($str) > $len) { if(ord($str[$len - 1]) <= 127) $pos = $len; else { for($pos = $len - 1; $pos >= 0; $pos--) if(ord($str[$pos]) > 127) $h++; else break; if($h%2==0) $pos += $h + 1; else $pos += $h; } $str = substr($str, 0, $pos); $str .=""; } return $str; } include "../Include/blog_oci.php"; $oci->connect(); $today=date('Y-m-d') ; $i=1 ; $qry .= " SELECT rownum, POST_UID as n, owner_uid as ou, POST_SUBJECT as s, to_char(cdate,'YYYY-mm-dd') as gdate, POST_KEY as k, MYIMAGE_FILENAME as m, COMMENT_COUNT as cc from ( SELECT a.POST_UID, c.owner_uid , a.POST_SUBJECT , a.cdate, b.POST_KEY , c.MYIMAGE_FILENAME , a.COMMENT_COUNT FROM POST_LIST a, post_search b, blog_config c where a.POST_UID = b.POST_UID and b.owner_uid = c.owner_uid and b.POST_KEY='ºñ¿ò' and a.is_public = 0 order by a.CDATE DESC ) WHERE rownum <= 5 "; $oci->parseExec($qry); while ($oci->fetchInto(&$col)) { $mUid=$col[N] ; $mOuid=$col[OU] ; $mCC=$col[CC] ; $mCdate=$col[GDATE] ; $mSubject=text_cut($col[S],40) ; $mKey=$col[K] ; $mImages=$col[M] ; $b_image = "
"; $link = "
"; if($today == $mCdate) $new_icon = "
" ; else $new_icon = "" ; ?>
=$link?>=$b_image?>
=$link?>=$mSubject?> =$bCc?> =$new_icon?>
} $oci->parseFree(); $oci->disconnect(); ?>