system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
<?php
class Display_DNews
{
function showNews($records,$flag,$paging,$prev,$next,$start,$total,$query_string)
{
if(count($records)!=0)
{
for($i=0; $i<count($records); $i++)
{
$date =$records[$i]['news_datetime'];
$header = substr($records[$i]['news_header'],0,50);
$status = ucfirst($records[$i]['news_status']);
$output['content'].='<tr class="'.$color.'">
<td align="center"><input type="checkbox" name="'.$records[$i]['news_id'].'" id="ch'.$i.'" value="'.$records[$i]['news_id'].'"></td>
<td align="left">'.$header.'</td>
<td align="center" >'.$date.'</td>
<td align="center" >'.$status.'</td>
<td class="center"><button type="button" class="btn btn-primary btn-xs" onclick="location.href=\'?do=news&action=edit&newsid='.$records[$i]['news_id'].'\'" >Edit</button></td>
</tr>';
}
}
return $output;
}
}
?>