관리자 경로 수정 작업중
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
<?
|
||||
$sub_menu = "500100";
|
||||
include_once("./_common.php");
|
||||
$sub_menu = '500100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g4[title] = "상품판매순위";
|
||||
include_once ("$g4[admin_path]/admin.head.php");
|
||||
$g4['title'] = '상품판매순위';
|
||||
include_once (G4_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
if (!$to_date) $to_date = date("Ymd", time());
|
||||
|
||||
@ -23,9 +23,9 @@ $sql = " select a.it_id,
|
||||
SUM(IF(ct_status = '반품',ct_qty, 0)) as ct_status_7,
|
||||
SUM(IF(ct_status = '품절',ct_qty, 0)) as ct_status_8,
|
||||
SUM(ct_qty) as ct_status_sum
|
||||
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b ";
|
||||
from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b ";
|
||||
$sql .= " where a.it_id = b.it_id ";
|
||||
if ($fr_date && $to_date)
|
||||
if ($fr_date && $to_date)
|
||||
{
|
||||
$fr = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $fr_date);
|
||||
$to = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $to_date);
|
||||
@ -40,7 +40,7 @@ $sql .= " group by a.it_id
|
||||
$result = sql_query($sql);
|
||||
$total_count = mysql_num_rows($result);
|
||||
|
||||
$rows = $config[cf_page_rows];
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
@ -61,25 +61,25 @@ $qstr1 = "$qstr&sort1=$sort1&sort2=$sort2&fr_date=$fr_date&to_date=$to_date&sel_
|
||||
<input type=hidden name=sort2 value="<? echo $sort2 ?>">
|
||||
<input type=hidden name=page value="<? echo $page ?>">
|
||||
<tr>
|
||||
<td width=10%><a href='<?=$_SERVER[PHP_SELF]?>'>처음</a></td>
|
||||
<td width=10%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
|
||||
<td width=80% align=center>
|
||||
<select name="sel_ca_id">
|
||||
<option value=''>전체분류
|
||||
<?
|
||||
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
|
||||
$sql1 = " select ca_id, ca_name from {$g4['yc4_category_table']} order by ca_id ";
|
||||
$result1 = sql_query($sql1);
|
||||
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
|
||||
$len = strlen($row1[ca_id]) / 2 - 1;
|
||||
$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']}'>$nbsp{$row1['ca_name']}\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<script> document.flist.sel_ca_id.value = '<?=$sel_ca_id?>';</script>
|
||||
|
||||
기간 : <input type=text name=fr_date size=8 maxlength=8 itemname='기간' value='<?=$fr_date?>'> ~ <input type=text name=to_date size=8 maxlength=8 itemname='기간' value='<?=$to_date?>'>
|
||||
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle>
|
||||
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
|
||||
</td>
|
||||
<td width=10% align=right>건수 : <? echo $total_count ?> </td>
|
||||
</tr>
|
||||
@ -103,9 +103,9 @@ $qstr1 = "$qstr&sort1=$sort1&sort2=$sort2&fr_date=$fr_date&to_date=$to_date&sel_
|
||||
</tr>
|
||||
<tr><td colspan=20 height=1 bgcolor=#CCCCCC></td></tr>
|
||||
<?
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$href = "$g4[shop_path]/item.php?it_id=$row[it_id]";
|
||||
$href = G4_SHOP_URL."/item.php?it_id={$row['it_id']}";
|
||||
|
||||
$num = $rank + $i + 1;
|
||||
|
||||
@ -113,19 +113,19 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
echo "
|
||||
<tr class='list$list center'>
|
||||
<td>$num</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($row[it_name],30)."</a></td>
|
||||
<td>$row[ct_status_1]</td>
|
||||
<td>$row[ct_status_2]</td>
|
||||
<td>$row[ct_status_3]</td>
|
||||
<td>$row[ct_status_4]</td>
|
||||
<td>$row[ct_status_5]</td>
|
||||
<td>$row[ct_status_6]</td>
|
||||
<td>$row[ct_status_7]</td>
|
||||
<td>$row[ct_status_8]</td>
|
||||
<td>$row[ct_status_sum]</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($row['it_name'],30)."</a></td>
|
||||
<td>".$row['ct_status_1']."</td>
|
||||
<td>".$row['ct_status_2']."</td>
|
||||
<td>".$row['ct_status_3']."</td>
|
||||
<td>".$row['ct_status_4']."</td>
|
||||
<td>".$row['ct_status_5']."</td>
|
||||
<td>".$row['ct_status_6']."</td>
|
||||
<td>".$row['ct_status_7']."</td>
|
||||
<td>".$row['ct_status_8']."</td>
|
||||
<td>".$row['ct_status_sum']."</td>
|
||||
</tr><tr><td colspan=20 height=1 bgcolor=F5F5F5></td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo "<tr><td colspan=20 align=center height=100 bgcolor=#ffffff><span class=point>자료가 한건도 없습니다.</span></td></tr>\n";
|
||||
@ -138,12 +138,12 @@ if ($i == 0) {
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<td width=50%> </td>
|
||||
<td width=50% align=right><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr1&page=");?></td>
|
||||
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr1&page=");?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
* 수량을 합산하여 순위를 출력합니다.
|
||||
|
||||
<?
|
||||
include_once ("$g4[admin_path]/admin.tail.php");
|
||||
include_once (G4_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user