- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
function showList($mod, $tab_name, $data)
{
?>
<TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
<TR>
<?
// Заголовки столбцов
foreach ($tab_name as $key=>$value)
{
echo '<TH class="first_row_left_td">'.$value.'</TH>';
}
?>
<TH colspan=2 class="first_row_left_td">Функции</TH>
</TR>
<?
// Строки таблицы
$i = 0;
foreach ($data as $v)
{
?>
<TR>
<?
$i+=1;
$cl = (($i % 2) == 0) ? "row2" : "row1";
foreach ($tab_name as $key=>$value)
{
if ($key == 'destination')
{
switch ($v[$key])
{
case '1': $d = '<FONT COLOR="#009900">Опубликовано</FONT>'; break;
case '-1': $d = '<FONT COLOR="#0000FF">В проверке</FONT>'; break;
case '0': $d = '<FONT COLOR="#FF0000">Отклонено</FONT>'; break;
}
echo '<TD class="'.$cl.'">'.$d.'</TD>';
continue;
}
echo '<TD class="'.$cl.'" >'.$v[$key].'</TD>';
}
?>
<TD align="center" class="<?=$cl?>"><A HREF="admin.php?mod=<?=$mod?>&op=edit&id=<?=$v['id']?>">Редактировать</A></TD>
<TD align=center class="<?=$cl?>"><A HREF="Javascript: if (confirm ('Вы уверены?')) window.location.href='admin.php?mod=<?=$mod?>&op=delete&id=<?=$v['id']?>'" onmouseout=" window.status=''" onmouseover=" window.status='Удалить'; return true;" title="Удалить">Удалить</A></TD>
</TR>
<?
}
?>
</TABLE>
<?
}
Vasiliy 14.05.2013 16:52 # 0
alex_ok 14.05.2013 19:53 # 0
Vasiliy 15.05.2013 12:54 # 0
guest 14.05.2013 19:50 # 0
alex_ok 14.05.2013 19:55 # +1
ISO 06.01.2022 12:11 # 0
guest6 06.01.2022 12:22 # 0
alex_ok 06.01.2022 12:30 # 0
ISO 06.01.2022 18:39 # 0
Serabas 24.05.2013 05:59 # 0