리스트 tr_bg 처리 코드 간소화

This commit is contained in:
chicpro
2013-11-07 10:43:46 +09:00
parent 19038f9878
commit 8cc75650ac
20 changed files with 40 additions and 41 deletions

View File

@ -44,9 +44,9 @@ $result = sql_query($sql);
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
$tr_bg = $i%2 ? 'class="tr_bg1"' : 'class="tr_bg0"';
$tr_bg = 'tr_bg'.($i%2);
?>
<tr<?php echo ' '.$tr_bg; ?>>
<tr class="<?php echo $tr_bg; ?>">
<td class="td_id"><?php echo $row['co_id']; ?></td>
<td><?php echo htmlspecialchars2($row['co_subject']); ?></td>
<td class="td_mng">