插件代码上传
This commit is contained in:
27
plugin/wxreward/save.php
Normal file
27
plugin/wxreward/save.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
require '../../../../../zb_system/function/c_system_base.php';
|
||||
require '../../../../../zb_system/function/c_system_admin.php';
|
||||
|
||||
$zbp->Load();
|
||||
$action='root';
|
||||
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
|
||||
if (!$zbp->CheckPlugin('zxd_ctrlcenter')) {$zbp->ShowError(48);die();}
|
||||
|
||||
if($_GET['type'] == 'picurl' ){
|
||||
global $zbp;
|
||||
foreach ($_FILES as $key => $value) {
|
||||
if(!strpos($key, "_php")){
|
||||
if (is_uploaded_file($_FILES[$key]['tmp_name'])) {
|
||||
$tmp_name = $_FILES[$key]['tmp_name'];
|
||||
$name = $_FILES[$key]['name'];
|
||||
@move_uploaded_file($_FILES[$key]['tmp_name'], $zbp->usersdir . 'plugin/zxd_ctrlcenter/plugin/wxreward/src/'. $name);
|
||||
$zbp->Config('zxd_ctrlcenter')->plugin_wxreward_picurl = $zbp->host . 'zb_users/plugin/zxd_ctrlcenter/plugin/wxreward/src/'. $name;
|
||||
$zbp->SaveConfig('zxd_ctrlcenter');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$zbp->SetHint('good','二维码上传成功');
|
||||
Redirect($zbp->Config('zxd_ctrlcenter')->urlpath . 'main.php?plugin=wxreward');
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user