g4를 g5로 변경

This commit is contained in:
chicpro
2013-09-13 14:32:06 +09:00
parent 9a18a049d5
commit 0f78b67eb7
563 changed files with 4097 additions and 4097 deletions

View File

@ -10,11 +10,11 @@ if ($w == 'd')
else
auth_check($auth[$sub_menu], "w");
@mkdir(G4_DATA_PATH."/content", G4_DIR_PERMISSION);
@chmod(G4_DATA_PATH."/content", G4_DIR_PERMISSION);
@mkdir(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
if ($co_himg_del) @unlink(G4_DATA_PATH."/content/{$co_id}_h");
if ($co_timg_del) @unlink(G4_DATA_PATH."/content/{$co_id}_t");
if ($co_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
$sql_common = " co_include_head = '$co_include_head',
co_include_tail = '$co_include_tail',
@ -27,36 +27,36 @@ if ($w == "")
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
$sql = " select co_id from {$g4['shop_content_table']} where co_id = '$co_id' ";
$sql = " select co_id from {$g5['shop_content_table']} where co_id = '$co_id' ";
$row = sql_fetch($sql);
if ($row['co_id'])
alert("이미 같은 ID로 등록된 내용이 있습니다.");
$sql = " insert {$g4['shop_content_table']}
$sql = " insert {$g5['shop_content_table']}
set co_id = '$co_id',
$sql_common ";
sql_query($sql);
}
else if ($w == "u")
{
$sql = " update {$g4['shop_content_table']}
$sql = " update {$g5['shop_content_table']}
set $sql_common
where co_id = '$co_id' ";
sql_query($sql);
}
else if ($w == "d")
{
@unlink(G4_DATA_PATH."/content/{$co_id}_h");
@unlink(G4_DATA_PATH."/content/{$co_id}_t");
@unlink(G5_DATA_PATH."/content/{$co_id}_h");
@unlink(G5_DATA_PATH."/content/{$co_id}_t");
$sql = " delete from {$g4['shop_content_table']} where co_id = '$co_id' ";
$sql = " delete from {$g5['shop_content_table']} where co_id = '$co_id' ";
sql_query($sql);
}
if ($w == "" || $w == "u")
{
if ($_FILES['co_himg']['name']) upload_file($_FILES['co_himg']['tmp_name'], $co_id."_h", G4_DATA_PATH."/content");
if ($_FILES['co_timg']['name']) upload_file($_FILES['co_timg']['tmp_name'], $co_id."_t", G4_DATA_PATH."/content");
if ($_FILES['co_himg']['name']) upload_file($_FILES['co_himg']['tmp_name'], $co_id."_h", G5_DATA_PATH."/content");
if ($_FILES['co_timg']['name']) upload_file($_FILES['co_timg']['tmp_name'], $co_id."_t", G5_DATA_PATH."/content");
goto_url("./contentform.php?w=u&co_id=$co_id");
}