📄 store_edit.php
字号:
<?php
/*
+-------------------------------------------
|
| Technology of Wane netware
| ========================================
| Powered by wan-e.net inc
| (c) 2004 wane.net Power Services
| http://www.wan-e.net
| ========================================
| Web: http://www.wan-e.net
|
+-------------------------------------------
| Autohr : wsfuyibing
+-------------------------------------------
*/
if (!$RIGHT['STORE'])
{
$function->showmsg('javascript:history.go(-1)',$LANG_CP_INFO['ACCESS_DENIED'],'10');
}
elseif (!$RIGHT['EDITSP'])
{
$function->clickback($default_url.'index.php?action=memcp&type=managestore',$LANG_CP_SP[ACCESS_DENIED],'10');
}
else
{
if ($spsubmit && $type=='editstoresubmit')
{
if (empty($spname)) {$function->clickback($LANG_CP_SP[CP_SP_INFO_NONAME]);}
elseif (empty($cid) || !is_numeric($cid) || $cid<1) {$function->clickback($LANG_CP_SP[CP_SP_INFO_NOCLASS]);}
elseif (empty($price_member) || empty($price_market) || empty($price_vip)) {$function->clickback($LANG_CP_SP[CP_SP_PRICE_M_V]);}
elseif (!is_numeric($price_member) || $price_member<0 || !is_numeric($price_market) || $price_market<0 || !is_numeric($price_vip) || $price_vip<0) {$function->clickback($LANG_CP_SP[CP_SP_PRICE_M_V]);}
elseif (empty($context)) {$function->clickback($LANG_CP_SP[CP_SP_INFO_NOCONTEXT]);}
else
{
if ($imgway && is_uploaded_file($userfile))
{
require $wane_root.'globals/class_upload.php';
$upload = new waneupload;
$spimg = $upload->upload_image($userfile_name,$userfile);
}
else
{
$spimg = "$spimg";
}
if (!empty($deleteimg) && $spimg!=$deleteimg)
{
$function->delete_file($deleteimg);
}
$sql="update {$tablepre}spinfo
set
cid='$cid',
mid='$mid',
bid='$bid',
spname='$spname',
keyword='$keyword',
spuser='$spuser',
spcount='$spcount',
spsize='$spsize',
price_market='$price_market',
price_member='$price_member',
price_vip='$price_vip',
spcontext='$context',
spimg='$spimg',
isdiscuss='$isdiscuss'
where sid='$spid' and uid='$wane_uid'";
$db->query($sql);
require $wane_root.'globals/class_cache.php';
$cache = new wanecache;
$spcache = $bid=='1' ? 'spper' : 'spnew' ;
$cache -> update_cache($spcache);
if ($html_onoff && $html_spinfo)
{
echo "<script src='{$default_url}view.php?action=spinfo&info={$spid}&newsubmit=1'></script>";
}
$function->showmsg($default_url.'index.php?action=memcp&type=managestore&page='.$page,$LANG_CP_SP[CP_SP_SUBMIT_EDIT_SUCCESS]);
}
}
else
{
$query=$db->query("SELECT * FROM {$tablepre}spinfo WHERE sid='$info' and uid='$wane_uid' limit 1");
if (!$db->num($query))
{
$function->clickback($LANG_CP_SP['CP_SP_EDIT_DENIED']);
}
else
{
$row=$db->row($query);
eval($function->load_cache(array('selectc','selectm')));
eval($tpl->set_var(array(
'CP_SP_SELECTC' => str_replace("value='$row[cid]'","value='$row[cid]' selected",$cache_selectc),
'CP_SP_SELECTM' => str_replace("value='$row[mid]'","value='$row[mid]' selected",$cache_selectm),
'CP_SP_MADE_SELECT'.$row['bid'] => 'selected',
)));
}
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -