관리자 경로 수정 작업 중

This commit is contained in:
chicpro
2013-03-15 17:57:34 +09:00
parent 79cbd300f9
commit 276a4b9231
6 changed files with 110 additions and 110 deletions

View File

@ -1,18 +1,18 @@
<?
$sub_menu = "400620";
include_once("./_common.php");
$sub_menu = '400620';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], "w");
// 재고 일괄수정
for ($i=0; $i<count($_POST[it_id]); $i++)
for ($i=0; $i<count($_POST['it_id']); $i++)
{
$sql = "update $g4[yc4_item_table]
set it_stock_qty = '{$_POST[it_stock_qty][$i]}',
it_use = '{$_POST[it_use][$i]}'
where it_id = '{$_POST[it_id][$i]}' ";
$sql = "update {$g4['yc4_item_table']}
set it_stock_qty = '{$_POST['it_stock_qty'][$i]}',
it_use = '{$_POST['it_use'][$i]}'
where it_id = '{$_POST['it_id'][$i]}' ";
sql_query($sql);
}

View File

@ -1,11 +1,11 @@
<?
$sub_menu = "400610";
include_once("./_common.php");
$sub_menu = '400610';
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');
/*
$sql_search = " where 1 ";
@ -45,20 +45,20 @@ if (!$sst) {
}
$sql_order = "order by $sst $sod";
$sql_common = " from $g4[yc4_item_table] ";
$sql_common = " from {$g4['yc4_item_table']} ";
$sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row[cnt];
$total_count = $row['cnt'];
$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; // 시작 열을 구함
$sql = " select it_id,
$sql = " select it_id,
it_name,
it_type1,
it_type2,
@ -82,18 +82,18 @@ $qstr = "$qstr&sca=$sca&page=$page&save_stx=$stx";
<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="sca">
<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=sql_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 .= "&nbsp;&nbsp;&nbsp;";
echo "<option value='$row1[ca_id]'>$nbsp$row1[ca_name]\n";
echo "<option value='{$row1['ca_id']}'>$nbsp{$row1['ca_name']}\n";
}
?>
</select>
@ -106,7 +106,7 @@ $qstr = "$qstr&sca=$sca&page=$page&save_stx=$stx";
<? if ($slf) echo "<script> document.flist.slf.value = '$sfl';</script>"; ?>
<input type=text name=stx value='<? echo $stx ?>'>
<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 ?>&nbsp;</td>
</tr>
@ -143,25 +143,25 @@ $qstr = "$qstr&sca=$sca&page=$page&save_stx=$stx";
<td>수정</td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<?
for ($i=0; $row=sql_fetch_array($result); $i++)
<?
for ($i=0; $row=sql_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']}";
$s_mod = icon("수정", "./itemform.php?w=u&it_id=$row[it_id]&ca_id=$row[ca_id]&$qstr");
$s_mod = icon("수정", "./itemform.php?w=u&it_id={$row['it_id']}&ca_id={$row['ca_id']}&$qstr");
$list = $i%2;
echo "
<input type='hidden' name='it_id[$i]' value='$row[it_id]'>
<input type='hidden' name='it_id[$i]' value='{$row['it_id']}'>
<tr class='list$list center'>
<td>$row[it_id]</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, "&#133")."</a></td>
<td><input type=checkbox name='it_type1[$i]' value='1' ".($row[it_type1] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type2[$i]' value='1' ".($row[it_type2] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type3[$i]' value='1' ".($row[it_type3] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type4[$i]' value='1' ".($row[it_type4] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type5[$i]' value='1' ".($row[it_type5] ? 'checked' : '')."></td>
<td>{$row['it_id']}</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, "&#133")."</a></td>
<td><input type=checkbox name='it_type1[$i]' value='1' ".($row['it_type1'] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type2[$i]' value='1' ".($row['it_type2'] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type3[$i]' value='1' ".($row['it_type3'] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type4[$i]' value='1' ".($row['it_type4'] ? 'checked' : '')."></td>
<td><input type=checkbox name='it_type5[$i]' value='1' ".($row['it_type5'] ? 'checked' : '')."></td>
<td>$s_mod</td>
</tr>";
}
@ -175,7 +175,7 @@ if (!$i)
<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>
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
</tr>
</form>
</table><br>
@ -183,5 +183,5 @@ if (!$i)
* 상품의 유형을 일괄 처리합니다.
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,20 +1,20 @@
<?
$sub_menu = "400610";
include_once("./_common.php");
$sub_menu = '400610';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], "w");
for ($i=0; $i<count($_POST[it_id]); $i++)
for ($i=0; $i<count($_POST['it_id']); $i++)
{
$sql = "update $g4[yc4_item_table]
set it_type1 = '{$_POST[it_type1][$i]}',
it_type2 = '{$_POST[it_type2][$i]}',
it_type3 = '{$_POST[it_type3][$i]}',
it_type4 = '{$_POST[it_type4][$i]}',
it_type5 = '{$_POST[it_type5][$i]}'
where it_id = '{$_POST[it_id][$i]}' ";
$sql = "update {$g4['yc4_item_table']}
set it_type1 = '{$_POST['it_type1'][$i]}',
it_type2 = '{$_POST['it_type2'][$i]}',
it_type3 = '{$_POST['it_type3'][$i]}',
it_type4 = '{$_POST['it_type4'][$i]}',
it_type5 = '{$_POST['it_type5'][$i]}'
where it_id = '{$_POST['it_id'][$i]}' ";
sql_query($sql);
}

View File

@ -1,31 +1,31 @@
<?
$sub_menu = "400720";
include_once("./_common.php");
$sub_menu = '400720';
include_once('./_common.php');
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w");
$html_title = "새창";
if ($w == "u")
if ($w == "u")
{
$html_title .= " 수정";
$sql = " select * from $g4[yc4_new_win_table] where nw_id = '$nw_id' ";
$sql = " select * from {$g4['yc4_new_win_table']} where nw_id = '$nw_id' ";
$nw = sql_fetch($sql);
if (!$nw[nw_id]) alert("등록된 자료가 없습니다.");
}
else
if (!$nw['nw_id']) alert("등록된 자료가 없습니다.");
}
else
{
$html_title .= " 입력";
$nw[nw_disable_hours] = 24;
$nw[nw_left] = 10;
$nw[nw_top] = 10;
$nw[nw_width] = 450;
$nw[nw_height] = 500;
$nw[nw_content_html] = 2;
$nw['nw_disable_hours'] = 24;
$nw['nw_left'] = 10;
$nw['nw_top'] = 10;
$nw['nw_width'] = 450;
$nw['nw_height'] = 500;
$nw['nw_content_html'] = 2;
}
$g4[title] = $html_title;
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = $html_title;
include_once (G4_ADMIN_PATH.'/admin.head.php');
?>
<?=subtitle($html_title)?>
@ -44,33 +44,33 @@ include_once ("$g4[admin_path]/admin.head.php");
<tr><td colspan=4 height=2 bgcolor=#0E87F9></td></tr>
<tr class=ht>
<td>시간</td>
<td colspan=3><input type=text class=ed name=nw_disable_hours size=5 value='<? echo $nw[nw_disable_hours] ?>' required itemname="시간"> 시간 동안 다시 띄우지 않음</td>
<td colspan=3><input type=text class=ed name=nw_disable_hours size=5 value='<? echo $nw['nw_disable_hours'] ?>' required itemname="시간"> 시간 동안 다시 띄우지 않음</td>
</tr>
<tr class=ht>
<td>시작일시</td>
<td>
<input type=text class=ed name=nw_begin_time size=21 maxlength=19 value='<? echo $nw[nw_begin_time] ?>' required itemname="시작일시">
<input type=checkbox name=nw_begin_chk value="<? echo date("Y-m-d 00:00:00", $g4[server_time]); ?>" onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">오늘
<input type=text class=ed name=nw_begin_time size=21 maxlength=19 value='<? echo $nw['nw_begin_time'] ?>' required itemname="시작일시">
<input type=checkbox name=nw_begin_chk value="<? echo date("Y-m-d 00:00:00", G4_SERVER_TIME); ?>" onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">오늘
<td>종료일시</td>
<td>
<input type=text class=ed name=nw_end_time size=21 maxlength=19 value='<? echo $nw[nw_end_time] ?>' required itemname="종료일시">
<input type=checkbox name=nw_end_chk value="<? echo date("Y-m-d 23:59:59", $g4[server_time]+(60*60*24*7)); ?>" onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">오늘+7일
<input type=text class=ed name=nw_end_time size=21 maxlength=19 value='<? echo $nw['nw_end_time'] ?>' required itemname="종료일시">
<input type=checkbox name=nw_end_chk value="<? echo date("Y-m-d 23:59:59", G4_SERVER_TIME+(60*60*24*7)); ?>" onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">오늘+7일
</tr>
<tr class=ht>
<td>창위치 왼쪽</td>
<td><input type=text class=ed name=nw_left size=5 value='<? echo $nw[nw_left] ?>' required itemname="창위치 왼쪽"></td>
<td><input type=text class=ed name=nw_left size=5 value='<? echo $nw['nw_left'] ?>' required itemname="창위치 왼쪽"></td>
<td>창위치 위</td>
<td><input type=text class=ed name=nw_top size=5 value='<? echo $nw[nw_top] ?>' required itemname="창위치 위"></td>
<td><input type=text class=ed name=nw_top size=5 value='<? echo $nw['nw_top'] ?>' required itemname="창위치 위"></td>
</tr>
<tr class=ht>
<td>창크기 폭</td>
<td><input type=text class=ed name=nw_width size=5 value='<? echo $nw[nw_width] ?>' required itemname="창크기폭"></td>
<td><input type=text class=ed name=nw_width size=5 value='<? echo $nw['nw_width'] ?>' required itemname="창크기폭"></td>
<td>창크기 높이</td>
<td><input type=text class=ed name=nw_height size=5 value='<? echo $nw[nw_height] ?>' required itemname="창크기높이"></td>
<td><input type=text class=ed name=nw_height size=5 value='<? echo $nw['nw_height'] ?>' required itemname="창크기높이"></td>
</tr>
<tr class=ht>
<td>창제목</td>
<td colspan=3><input type=text class=ed name=nw_subject size=80 value='<? echo stripslashes($nw[nw_subject]) ?>' required itemname="제목"></td>
<td colspan=3><input type=text class=ed name=nw_subject size=80 value='<? echo stripslashes($nw['nw_subject']) ?>' required itemname="제목"></td>
</tr>
<input type=hidden name=nw_content_html value=1>
<tr>
@ -86,11 +86,11 @@ include_once ("$g4[admin_path]/admin.head.php");
</form>
<script language="javascript">
function frmnewwin_check(f)
function frmnewwin_check(f)
{
errmsg = "";
errfld = "";
<?=cheditor3('nw_content');?>
check_field(f.nw_subject, "제목을 입력하세요.");
@ -99,7 +99,7 @@ function frmnewwin_check(f)
alert(errmsg);
errfld.focus();
return false;
}
}
return true;
}
@ -107,5 +107,5 @@ document.frmnewwin.nw_subject.focus();
</script>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,8 +1,8 @@
<?
$sub_menu = "400720";
include_once("./_common.php");
$sub_menu = '400720';
include_once('./_common.php');
if ($w == "u" || $w == "d")
if ($w == "u" || $w == "d")
check_demo();
if ($W == 'd')
@ -21,32 +21,32 @@ $sql_common = " nw_begin_time = '$nw_begin_time',
nw_content = '$nw_content',
nw_content_html = '$nw_content_html' ";
if($w == "")
if($w == "")
{
$sql = " alter table $g4[yc4_new_win_table] auto_increment=1 ";
$sql = " alter table {$g4['yc4_new_win_table']} auto_increment=1 ";
sql_query($sql);
$sql = " insert $g4[yc4_new_win_table] set $sql_common ";
$sql = " insert {$g4['yc4_new_win_table']} set $sql_common ";
sql_query($sql);
$nw_id = mysql_insert_id();
}
else if ($w == "u")
}
else if ($w == "u")
{
$sql = " update $g4[yc4_new_win_table] set $sql_common where nw_id = '$nw_id' ";
$sql = " update {$g4['yc4_new_win_table']} set $sql_common where nw_id = '$nw_id' ";
sql_query($sql);
}
else if ($w == "d")
}
else if ($w == "d")
{
$sql = " delete from $g4[yc4_new_win_table] where nw_id = '$nw_id' ";
$sql = " delete from {$g4['yc4_new_win_table']} where nw_id = '$nw_id' ";
sql_query($sql);
}
if ($w == "d")
if ($w == "d")
{
goto_url("./newwinlist.php");
}
else
goto_url('./newwinlist.php');
}
else
{
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
}

View File

@ -1,18 +1,18 @@
<?
$sub_menu = "400720";
include_once("./_common.php");
$sub_menu = '400720';
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');
$sql_common = " from $g4[yc4_new_win_table] ";
$sql_common = " from {$g4['yc4_new_win_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row[cnt];
$total_count = $row['cnt'];
$sql = "select * $sql_common order by nw_id desc ";
$result = sql_query($sql);
@ -49,28 +49,28 @@ $result = sql_query($sql);
<td>Height</td>
<td>Width</td>
<td>제목</td>
<td><a href='./newwinform.php'><img src='<?=$g4[admin_path]?>/img/icon_insert.gif' border=0></a></td>
<td><a href='./newwinform.php'><img src='<?=G4_ADMIN_URL?>/img/icon_insert.gif' border=0></a></td>
</tr>
<tr><td colspan=10 height=1 bgcolor=#CCCCCC></td></tr>
<?
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$s_mod = icon("수정", "./newwinform.php?w=u&nw_id=$row[nw_id]");
$s_del = icon("삭제", "javascript:del('./newwinformupdate.php?w=d&nw_id=$row[nw_id]');");
$s_mod = icon("수정", "./newwinform.php?w=u&nw_id={$row['nw_id']}");
$s_del = icon("삭제", "javascript:del('./newwinformupdate.php?w=d&nw_id={$row['nw_id']}');");
$list = $i%2;
echo "
<tr class='list$list center ht'>
<td>$row[nw_id]</td>
<td>".substr($row[nw_begin_time],2,14)."</td>
<td>".substr($row[nw_end_time],2,14)."</td>
<td>$row[nw_disable_hours]</td>
<td>$row[nw_left]</td>
<td>$row[nw_top]</td>
<td>$row[nw_height]</td>
<td>$row[nw_width]</td>
<td align=left>$row[nw_subject]</td>
<td>".$row['nw_id']."</td>
<td>".substr($row['nw_begin_time'],2,14)."</td>
<td>".substr($row['nw_end_time'],2,14)."</td>
<td>".$row['nw_disable_hours']."</td>
<td>".$row['nw_left']."</td>
<td>".$row['nw_top']."</td>
<td>".$row['nw_height']."</td>
<td>".$row['nw_width']."</td>
<td align=left>".$row['nw_subject']."</td>
<td>$s_mod $s_del</td>
</tr>";
}
@ -84,5 +84,5 @@ if ($i == 0) {
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>