리스트 tr_bg 클래스 처리 코드 간소화

This commit is contained in:
chicpro
2013-11-07 10:30:48 +09:00
parent 9e4b6c635a
commit fee3813b50
19 changed files with 39 additions and 39 deletions

View File

@ -103,9 +103,9 @@ $colspan = 5;
continue;
}
$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_chk">
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">

View File

@ -119,10 +119,10 @@ $colspan = 16;
$one_update = '<a href="./board_form.php?w=u&amp;bo_table='.$row['bo_table'].'&amp;'.$qstr.'">수정</a>';
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy" target="win_board_copy">복사</a>';
$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_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">

View File

@ -125,10 +125,10 @@ $colspan = 11;
$s_upd = '<a href="./boardgroup_form.php?'.$qstr.'&amp;w=u&amp;gr_id='.$row['gr_id'].'">수정</a>';
$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_chk">
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>

View File

@ -110,9 +110,9 @@ $colspan = 7;
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
$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_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">

View File

@ -57,10 +57,10 @@ $colspan = 7;
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $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_chk">
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>" title="메일선택">
</td>

View File

@ -96,9 +96,9 @@ include_once('./admin.head.php');
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
$cr = "\n";
$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_num"><?php echo $i ?></td>
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>

View File

@ -187,7 +187,7 @@ $colspan = 15;
$address = $row['mb_zip1'] ? $row['mb_addr1'].' '.$row['mb_addr2'] : '';
$tr_bg = $i%2 ? 'class="tr_bg1"' : 'class="tr_bg0"';
$tr_bg = 'tr_bg'.($i%2);
switch($row['mb_certify']) {
case 'hp':
@ -209,7 +209,7 @@ $colspan = 15;
}
?>
<tr <?php echo $tr_bg; ?>>
<tr class="<?php echo $tr_bg; ?>">
<td headers="mb_list_chk" class="td_chk" rowspan="2">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_name']; ?> <?php echo $row['mb_nick']; ?>님</label>

View File

@ -151,10 +151,10 @@ function point_clear()
if($row['po_expired'] == 1)
$expr = ' txt_expired';
$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_chk">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>" id="po_id_<?php echo $i ?>">

View File

@ -105,10 +105,10 @@ $colspan = 7;
$s_mod = '<a href="./poll_form.php?'.$qstr.'&amp;w=u&amp;po_id='.$row['po_id'].'">수정</a>';
//$s_del = '<a href="javascript:post_delete(\'poll_form_update.php\', \''.$row['po_id'].'\');">삭제</a>';
$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_chk">
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>" title="투표선택">
</td>

View File

@ -112,10 +112,10 @@ var list_delete_php = 'popular_list.php';
for ($i=0; $row=sql_fetch_array($result); $i++) {
$word = get_text($row['pp_word']);
$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_chk">
<input type="checkbox" name="chk[]" value="<?php echo $row['pp_id'] ?>" id="chk_<?php echo $i ?>" title="<?php echo $word ?> 선택">
</td>

View File

@ -65,10 +65,10 @@ while ($row=sql_fetch_array($result)) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_num"><?php echo $no ?></td>
<td class="td_category"><?php echo $key ?></td>
<td>

View File

@ -56,10 +56,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_category"><a href="./visit_list.php?fr_date=<?php echo $key ?>&amp;to_date=<?php echo $key ?>"><?php echo $key ?></a></td>
<td>
<div class="visit_bar">

View File

@ -76,9 +76,9 @@ while ($row=sql_fetch_array($result)) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_num"><?php echo $no ?></td>
<td class="td_category"><?php echo $link ?><?php echo $key ?><?php echo $link2 ?></td>
<td>

View File

@ -55,9 +55,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_category"><?php echo $hour ?></td>
<td>
<div class="visit_bar">

View File

@ -78,9 +78,9 @@ $result = sql_query($sql);
if ($brow == '기타') { $brow = '<span title="'.$row['vi_agent'].'">'.$brow.'</span>'; }
if ($os == '기타') { $os = '<span title="'.$row['vi_agent'].'">'.$os.'</span>'; }
$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_category"><?php echo $ip ?></td>
<td><?php echo $link ?><?php echo $title ?><?php echo $link2 ?></td>
<td class="td_category"><?php echo $brow ?></td>
@ -98,7 +98,7 @@ $result = sql_query($sql);
</div>
<?php
if (isset($domain))
if (isset($domain))
$qstr .= "&amp;domain=$domain";
$qstr .= "&amp;page=";

View File

@ -57,10 +57,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_category"><a href="./visit_date.php?fr_date=<?php echo $key ?>-01&amp;to_date=<?php echo $key ?>-31"><?php echo $key ?></a></td>
<td>
<div class="visit_bar">

View File

@ -69,10 +69,10 @@ while ($row=sql_fetch_array($result)) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_num"><?php echo $no ?></td>
<td class="td_category"><?php echo $key ?></td>
<td>

View File

@ -52,10 +52,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_category"><?php echo $weekday[$i] ?></td>
<td>
<div class="visit_bar">

View File

@ -57,10 +57,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$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_category"><a href="./visit_month.php?fr_date=<?php echo $key ?>-01-01&amp;to_date=<?php echo $key ?>-12-31"><?php echo $key ?></a></td>
<td>
<div class="visit_bar">