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_DPhotos
{
function showPhotoCate($plans,$planscount,$errval)
{
$plans_id = $errval['txtcate'];
for($i=0;$i<count($plans);$i++)
{
$selected = ($plans_id == $plans[$i]['categorey_id'])?"selected":"";
$selplans = $planscount==$plans[$i]['categorey_id'] ? 'selected' : '';
$output.='<option value='.$plans[$i]['categorey_id'].' '.$selplans.' '.$selected.'>'.$plans[$i]['categorey_name'].'</option>';
}
return $output;
}
function showPhotos($test)
{//echo 'hi';
for($i=0;$i<count($test);$i++)
{
if($test[$i]['photos_image']=='')
{
$image='uploads/photoG/no_image1.gif';
}
else
{
$image=$test[$i]['photos_thumb'];
}
$output.='
<tr class="odd gradeX">
<td><input name="'.$test[$i]['photos_id'].'" type="checkbox" value="'.$test[$i]['photos_id'].'" /></td>
<td><img src="../'.$image.'" alt="image" width="50" height="50" border="0" /></td>
<td>'.substr($test[$i]['photos_message'],0,200).'</td>
<td>'.substr($test[$i]['photos_year'],0,200).'</td>
<td class="center"><button type="button" class="btn btn-primary btn-xs" onclick="location.href=\'?do=photos&action=edit&id='.$test[$i]['photos_id'].'\'" >Edit</button></td>
</tr>';
}
return $output;
}
}
?>