리스트 tr_bg 처리 코드 간소화
This commit is contained in:
@ -74,10 +74,10 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
$bn_begin_time = substr($row['bn_begin_time'], 2, 14);
|
||||
$bn_end_time = substr($row['bn_end_time'], 2, 14);
|
||||
|
||||
$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 headers="th_id" rowspan="2" class="td_num"><?php echo $row['bn_id']; ?></td>
|
||||
<td headers="th_loc"><?php echo $row['bn_position']; ?></td>
|
||||
<td headers="th_st" class="td_datetime"><?php echo $bn_begin_time; ?></td>
|
||||
|
||||
@ -144,9 +144,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
or ca_id3 = '{$row['ca_id']}' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
|
||||
$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_idsmall" rowspan="2">
|
||||
<input type="hidden" name="ca_id[<?php echo $i; ?>]" value="<?php echo $row['ca_id']; ?>">
|
||||
<a href="<?php echo G5_SHOP_URL; ?>/list.php?ca_id=<?php echo $row['ca_id']; ?>"><?php echo $row['ca_id']; ?></a>
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -127,10 +127,10 @@ $colspan = 8;
|
||||
$tmp = sql_fetch($sql);
|
||||
$used_count = $tmp['cnt'];
|
||||
|
||||
$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" id="cp_id_<?php echo $i; ?>" name="cp_id[<?php echo $i; ?>]" value="<?php echo $row['cp_id']; ?>">
|
||||
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="<?php echo $i; ?>" title="내역선택">
|
||||
|
||||
@ -157,9 +157,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
else
|
||||
$hope_date = "사용안함";
|
||||
|
||||
$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>
|
||||
<input type="hidden" name="od_id[<?php echo $i ?>]" value="<?php echo $row['od_id'] ?>" id="od_id_<?php echo $i ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only">주문번호 <?php echo $row['od_id']; ?></label>
|
||||
|
||||
@ -60,10 +60,10 @@ $result = sql_query($sql);
|
||||
|
||||
$num = $i + 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 $num; ?></td>
|
||||
<td><?php echo stripslashes($row['fa_subject']); ?></td>
|
||||
<td class="td_num"><?php echo $row['fa_order']; ?></td>
|
||||
|
||||
@ -56,9 +56,9 @@ $result = sql_query($sql);
|
||||
$sql1 = " select COUNT(*) as cnt from {$g5['g5_shop_faq_table']} where fm_id = '{$row['fm_id']}' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
$cnt = $row1['cnt'];
|
||||
$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 $row['fm_id']; ?></td>
|
||||
<td><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
|
||||
<td class="td_num"><?php echo $cnt; ?></td>
|
||||
|
||||
@ -153,10 +153,10 @@ if (isset($ev_set)) {
|
||||
and ev_id = '$ev_id' ";
|
||||
$ev = sql_fetch($sql);
|
||||
|
||||
$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="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<label for="ev_chk_<?php echo $i; ?>" class="sound_only">이벤트 사용</label>
|
||||
|
||||
@ -164,9 +164,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
$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 rowspan="3" 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; ?>">
|
||||
|
||||
@ -125,9 +125,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], 300);
|
||||
$iq_answer = $row['iq_answer'] ? get_view_thumbnail($row['iq_answer'], 300) : "답변이 등록되지 않았습니다.";
|
||||
|
||||
$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['iq_subject']) ?> 상품문의</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
|
||||
|
||||
@ -126,9 +126,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
|
||||
$num = $rank + $i + 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 $num; ?></td>
|
||||
<td><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo cut_str($row['it_name'],30); ?></a></td>
|
||||
<td class="td_num"><?php echo $row['ct_status_1']; ?></td>
|
||||
|
||||
@ -143,10 +143,10 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
// 가재고 (미래재고)
|
||||
$temporary_qty = $row['it_stock_qty'] - $wait_qty;
|
||||
|
||||
$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">
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<?php echo $row['it_id']; ?>
|
||||
|
||||
@ -142,9 +142,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
$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">
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<?php echo $row['it_id']; ?>
|
||||
|
||||
@ -125,10 +125,10 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
$name = get_sideview($row['mb_id'], get_text($row['is_name']), $row['mb_email'], $row['mb_homepage']);
|
||||
$is_content = get_view_thumbnail($row['is_content'], 300);
|
||||
|
||||
$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['is_subject']) ?> 사용후기</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i; ?>">
|
||||
|
||||
@ -44,9 +44,9 @@ $result = sql_query($sql);
|
||||
<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_num"><?php echo $row['nw_id']; ?></td>
|
||||
<td><?php echo $row['nw_subject']; ?></td>
|
||||
<td class="td_datetime"><?php echo substr($row['nw_begin_time'],2,14); ?></td>
|
||||
|
||||
@ -168,10 +168,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
$io_stock_qty = ''.$io_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
|
||||
}
|
||||
|
||||
$tr_bg = '';
|
||||
$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>
|
||||
<input type="hidden" name="it_id[<?php echo $i; ?>]" value="<?php echo $row['it_id']; ?>">
|
||||
<input type="hidden" name="io_id[<?php echo $i; ?>]" value="<?php echo $row['io_id']; ?>">
|
||||
|
||||
@ -141,9 +141,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
if($row['od_mobile'])
|
||||
$od_mobile = '(M)';
|
||||
|
||||
$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_odrnum2">
|
||||
<?php echo $od_mobile; ?>
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?sort1=<?php echo $sort1; ?>&sort2=<?php echo $sort2; ?>&sel_field=a.od_id&search=<?php echo $row['od_id']; ?>"><?php echo $row['od_id']; ?></a>
|
||||
|
||||
@ -111,10 +111,10 @@ $colspan = 8;
|
||||
else
|
||||
$od_id = ' ';
|
||||
|
||||
$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" id="pp_id_<?php echo $i; ?>" name="pp_id[<?php echo $i; ?>]" value="<?php echo $row['pp_id']; ?>">
|
||||
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="<?php echo $i; ?>" title="내역선택">
|
||||
|
||||
@ -58,9 +58,9 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $row=sql_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_chk">
|
||||
<input type="hidden" id="sc_id_<?php echo $i; ?>" name="sc_id[<?php echo $i; ?>]" value="<?php echo $row['sc_id']; ?>">
|
||||
<input type="checkbox" id="chk_<?php echo $i; ?>" name="chk[]" value="1" title="내역선택">
|
||||
|
||||
@ -103,9 +103,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
$num = $rank + $i + 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 $num; ?></td>
|
||||
<td>
|
||||
<a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo cut_str($row['it_name'],30); ?></a>
|
||||
|
||||
Reference in New Issue
Block a user