|
include ("./include/menu.php"); ?>
|
|
 |
|
|
@require_once("lib/mysql.php");
$db = new Fasdab("localhost", "boards", "boards", "pipeline");
?>
////////////////
function substring($string,$position,$length=0) {
$a=0;$b=0;$c=0;$startposition=0;$chk=true;$chkposition=false;$length_count=0;
$cnt=strlen($string);
$i=0;
for($i=0;$i<$cnt;$i++) {//0,1
if(!$chkposition) {
if(($a+$c)==$position) {
if($chk)$startposition=$i;
else $startposition=$i-1;
$chkposition=true;
$a=0;$b=0;$c=0;
}
}
else {
if(($a+$c)<$length) $length_count++;
else break;
}
$ascii=ord($string[$i]);
if($ascii<=127) $a++;//1,
else {
$b++;//1,
$chk=false;
if($b%2==0) {
$c++;
$chk=true;
}
}
}
return substr($string,$startposition,$length_count+1);
}
$db->query("select * from notice where c_title != '' order by c_idx DESC limit 4");
while($row = $db->row()) {
?>
 |
=$db_title=substring($row->c_title,0,15)."..";?> |
=$row->c_date?> |
}
?>
|
|
 |
|
|
 |
|
|
|
 |
|
|