쇼핑몰관리자: 쇼핑몰관리 이벤트일괄처리 표준화 및 스타일 완료
This commit is contained in:
@ -10,8 +10,8 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
|
||||
$where = " where ";
|
||||
$sql_search = "";
|
||||
if ($search != "") {
|
||||
if ($sel_field != "") {
|
||||
$sql_search .= " $where $sel_field like '%$search%' ";
|
||||
if ($sel_field != "") {
|
||||
$sql_search .= " $where $sel_field like '%$search%' ";
|
||||
$where = " and ";
|
||||
}
|
||||
}
|
||||
@ -52,33 +52,54 @@ $sql = " select a.*, b.ev_id
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
//$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search";
|
||||
$qstr1 = "ev_id=$ev_id&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search";
|
||||
$qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
|
||||
//$qstr1 = 'sel_ca_id='.$sel_ca_id.'&sel_field='.$sel_field.'&search='.$search;
|
||||
$qstr1 = 'ev_id='.$ev_id.'&sel_ca_id='.$sel_ca_id.'&sel_field='.$sel_field.'&search='.$search;
|
||||
$qstr = $qstr1.'&sort1='.$sort1.'&sort2='.$sort2.'&page='.$page;
|
||||
|
||||
$listall = '';
|
||||
if ($stx) // 검색 결과일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
// 이벤트 아이디와 제목을 분리 - 지운아빠 2013-04-15
|
||||
if (isset($ev_set)) {
|
||||
$ev_exp = explode('`',$ev_set);
|
||||
$ev_id = $ev_exp[0];
|
||||
$ev_title = $ev_exp[1];
|
||||
}
|
||||
?>
|
||||
|
||||
<form name=flist autocomplete='off' style="margin:0px;">
|
||||
<table width=100% cellpadding=4 cellspacing=0>
|
||||
<input type=hidden name=page value="<? echo $page ?>">
|
||||
<tr>
|
||||
<td width=10%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
|
||||
<td width=20% align=center>
|
||||
<?
|
||||
<fieldset>
|
||||
<legend>이벤트 선택</legend>
|
||||
|
||||
<form name="flist" autocomplete="off">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
전체 이벤트 <?=$total_count ?>건
|
||||
<select name="ev_set" id="ev_set" action="<?=$_SERVER['PHP_SELF']?>">
|
||||
<?
|
||||
// 이벤트 옵션처리
|
||||
$event_option = "<option value=''>이벤트를 선택하세요";
|
||||
$event_option = "<option value=''>이벤트를 선택하세요</option>";
|
||||
$sql1 = " select ev_id, ev_subject from {$g4['shop_event_table']} order by ev_id desc ";
|
||||
$result1 = sql_query($sql1);
|
||||
while ($row1=mysql_fetch_array($result1))
|
||||
$event_option .= "<option value='{$row1['ev_id']}'>".conv_subject($row1['ev_subject'], 20,"…");
|
||||
|
||||
echo "<select name='ev_id' onchange='this.form.submit();'>$event_option</select>";
|
||||
if ($ev_id)
|
||||
echo "<script> document.flist.ev_id.value = '$ev_id'; </script>";
|
||||
$event_option .= '<option value="'.$row1['ev_id'].'`'.$row1['ev_subject'].'" '.get_selected($ev_set, $row1['ev_id'].'`'.$row1['ev_subject']).' >'.conv_subject($row1['ev_subject'], 20,"…").'</option>';
|
||||
echo $event_option;
|
||||
?>
|
||||
</td>
|
||||
<td width=60% align=center>
|
||||
<select name="sel_ca_id">
|
||||
<option value=''>전체분류
|
||||
</select>
|
||||
<input type="submit" value="이동" class="btn_submit">
|
||||
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>이벤트 검색</legend>
|
||||
|
||||
<form name="flist" autocomplete="off">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<? // ##### // 웹 접근성 취약 지점 시작 - 지운아빠 2013-04-15 ?>
|
||||
<?=$listall?>
|
||||
|
||||
<select name="sel_ca_id">
|
||||
<option value=''>전체분류</option>
|
||||
<?
|
||||
$sql1 = " select ca_id, ca_name from {$g4['shop_category_table']} order by ca_id ";
|
||||
$result1 = sql_query($sql1);
|
||||
@ -87,85 +108,94 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
|
||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||
$nbsp = "";
|
||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||
echo "<option value='{$row1['ca_id']}'>$nbsp{$row1['ca_name']}\n";
|
||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<script> document.flist.sel_ca_id.value = '<?=$sel_ca_id?>';</script>
|
||||
</select>
|
||||
<? // ##### // 웹 접근성 취약 지점 끝 ?>
|
||||
|
||||
<select name=sel_field>
|
||||
<option value='it_name'>상품명
|
||||
<option value='a.it_id'>상품코드
|
||||
</select>
|
||||
<? if ($sel_field) echo "<script> document.flist.sel_field.value = '$sel_field';</script>"; ?>
|
||||
<select name="sel_field">
|
||||
<option value="it_name" <?=get_selected($sel_field, 'it_name')?>>상품명</option>
|
||||
<option value="a.it_id" <?=get_selected($sel_field, 'a.it_id')?>>상품코드</option>
|
||||
</select>
|
||||
|
||||
<input type=text name=search value='<? echo $search ?>' size=10>
|
||||
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
|
||||
</td>
|
||||
<td width=10% align=right>건수 : <? echo $total_count ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<input type="text" name="search" value="<?=$search?>" required class="frm_input required">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
|
||||
</form>
|
||||
|
||||
<form name=fitemeventlistupdate method=post action="./itemeventlistupdate.php" onsubmit="return fitemeventlistupdatecheck(this)" style="margin:0px;">
|
||||
<input type=hidden name=ev_id value="<? echo $ev_id ?>">
|
||||
<input type=hidden name=sel_ca_id value="<? echo $sel_ca_id ?>">
|
||||
<input type=hidden name=sel_field value="<? echo $sel_field ?>">
|
||||
<input type=hidden name=search value="<? echo $search ?>">
|
||||
<input type=hidden name=page value="<? echo $page ?>">
|
||||
<input type=hidden name=sort1 value="<? echo $sort1 ?>">
|
||||
<input type=hidden name=sort2 value="<? echo $sort2 ?>">
|
||||
<table cellpadding=0 cellspacing=0 width=100% border=0>
|
||||
<colgroup width=100>
|
||||
<colgroup width=100>
|
||||
<colgroup width=80>
|
||||
<colgroup width=''>
|
||||
<tr><td colspan=4 height=2 bgcolor=#0E87F9></td></tr>
|
||||
<tr align=center class=ht>
|
||||
<td>이벤트사용</td>
|
||||
<td><a href='<? echo title_sort("a.it_id") . "&$qstr1&ev_id=$ev_id"; ?>'>상품코드</a></td>
|
||||
<td width='' colspan=2><a href='<? echo title_sort("it_name") . "&$qstr1&ev_id=$ev_id"; ?>'>상품명</a></td>
|
||||
</tr>
|
||||
<tr><td colspan=4 height=1 bgcolor=#CCCCCC></td></tr>
|
||||
<?
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$href = G4_SHOP_URL."/item.php?it_id={$row['it_id']}";
|
||||
</fieldset>
|
||||
|
||||
$sql = " select ev_id from {$g4['shop_event_item_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and ev_id = '$ev_id' ";
|
||||
$ev = sql_fetch($sql);
|
||||
<section class="cbox">
|
||||
<h2>상품 목록</h2>
|
||||
<p>상품을 이벤트별로 일괄 처리합니다.</p>
|
||||
|
||||
$list = $i%2;
|
||||
echo "
|
||||
<input type='hidden' name='it_id[$i]' value='{$row['it_id']}'>
|
||||
<tr class='list$list center'>
|
||||
<td><input type=checkbox name='ev_chk[$i]' ".($row['ev_id'] ? "checked" : "")." value='1'></td>
|
||||
<td><a href='$href'>{$row['it_id']}</a></td>
|
||||
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image("{$row['it_id']}_s", 50, 50)."</a></td>
|
||||
<td align=left><a href='$href'>".cut_str(stripslashes($row['it_name']), 60, "…")."</a></td>
|
||||
</tr>";
|
||||
}
|
||||
<form name="fitemeventlistupdate" method="post" action="./itemeventlistupdate.php" onsubmit="return fitemeventlistupdatecheck(this)">
|
||||
<input type="hidden" name="ev_id" value="<?=$ev_id?>">
|
||||
<input type="hidden" name="ev_set" value="<?=$ev_set?>">
|
||||
<input type="hidden" name="sel_ca_id" value="<?=$sel_ca_id?>">
|
||||
<input type="hidden" name="sel_field" value="<?=$sel_field?>">
|
||||
<input type="hidden" name="search" value="<?=$search?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="sort1" value="<?=$sort1?>">
|
||||
<input type="hidden" name="sort2" value="<?=$sort2?>">
|
||||
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=4 align=center height=100 bgcolor=#FFFFFF><span class=point>자료가 한건도 없습니다.</span></td></tr>";
|
||||
?>
|
||||
<tr><td colspan=4 height=1 bgcolor=#CCCCCC></td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">이벤트사용</th>
|
||||
<th scope="col"><a href="<?=title_sort("a.it_id") . '&'.$qstr1.'&ev_id='.$ev_id; ?>">상품코드</a></th>
|
||||
<th scope="col"><a href="<?=title_sort("it_name") . '&&'.$qstr1.'&ev_id='.$ev_id; ?>">상품명</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$href = G4_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<td colspan=50%><input type=submit class=btn1 value='일괄수정' accesskey='s'></td>
|
||||
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
|
||||
</tr>
|
||||
</form>
|
||||
</table><br>
|
||||
$sql = " select ev_id from {$g4['shop_event_item_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and ev_id = '$ev_id' ";
|
||||
$ev = sql_fetch($sql);
|
||||
|
||||
* 상품을 이벤트별로 일괄 처리합니다.
|
||||
?>
|
||||
|
||||
<script language="JavaScript">
|
||||
<tr>
|
||||
<td class="td_mng">
|
||||
<input type="hidden" name="it_id[<?=$i?>]" value="<?=$row['it_id']?>">
|
||||
<input type="checkbox" name="ev_chk[<?=$i?>]" value="1" <?=($row['ev_id'] ? "checked" : "")?>>
|
||||
</td>
|
||||
<td class="td_bignum"><a href="<?=$href?>"><?=$row['it_id']?></a></td>
|
||||
<td><a href="<?=$href?>"><?=get_it_image($row['it_id'].'_s', 50, 50)?> <?=cut_str(stripslashes($row['it_name']), 60, "…")?></a></td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="btn_confirm_msg">
|
||||
<? if ($ev_title) { ?>
|
||||
현재 선택된 이벤트는 <strong><?=$ev_title?></strong>입니다.<br>
|
||||
선택된 이벤트의 상품 수정 내용을 반영하시려면 일괄수정 버튼을 누르십시오.
|
||||
<? } else { ?>
|
||||
이벤트를 선택하지 않으셨습니다. 수정 내용을 반영하기 전에 이벤트를 선택해주십시오.<br>
|
||||
<a href="#ev_set">이벤트 선택</a>
|
||||
<? } ?>
|
||||
</p>
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="일괄수정" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
<?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?>
|
||||
|
||||
<script>
|
||||
function fitemeventlistupdatecheck(f)
|
||||
{
|
||||
if (!f.ev_id.value)
|
||||
@ -181,4 +211,4 @@ function fitemeventlistupdatecheck(f)
|
||||
|
||||
<?
|
||||
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
?>
|
||||
@ -23,5 +23,5 @@ for ($i=0; $i<count($_POST['it_id']); $i++)
|
||||
|
||||
}
|
||||
|
||||
goto_url("./itemeventlist.php?ev_id=$ev_id&sort1=$sort1&sort2=$sort2&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&page=$page");
|
||||
goto_url('./itemeventlist.php?ev_set='.$ev_set.'&ev_id='.$ev_id.'&sort1='.$sort1.'&sort2='.$sort2.'&sel_ca_id='.$sel_ca_id.'&sel_field='.$sel_field.'&search='.$search.'&page='.$page);
|
||||
?>
|
||||
|
||||
@ -152,6 +152,9 @@ fieldset .btn_submit:focus {height:21px;background:#555;line-height:1.7em}
|
||||
/* 필수입력 */
|
||||
.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important}
|
||||
|
||||
/* submit 안내 */
|
||||
.btn_confirm_msg {text-align:center}
|
||||
|
||||
/* 폼 */
|
||||
label {vertical-align:middle}
|
||||
textarea, .frm_input {padding:2px;border:1px solid #ced9de;background:#f6f9fa;vertical-align:middle}
|
||||
|
||||
Reference in New Issue
Block a user