本文整理汇总了PHP中Addons::adminPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Addons::adminPage方法的具体用法?PHP Addons::adminPage怎么用?PHP Addons::adminPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Addons
的用法示例。
在下文中一共展示了Addons::adminPage方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveBeautifyLoginConfig
public function saveBeautifyLoginConfig()
{
$data = array();
$data['template'] = $_POST['template'] ? intval($_POST['template']) : 1;
$data['color'] = $_POST['color'] ? $_POST['color'] : "FFFFFF";
$res = model('AddonData')->lput('beautifyLogin', $data);
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('beautifyLoginConfig'));
} else {
$this->error();
}
}
示例2: saveBeautifyCardConfig
public function saveBeautifyCardConfig()
{
$data = array();
$data['showMedals'] = $_REQUEST['showMedals'] ? 1 : 0;
$data['isSync'] = $_REQUEST['isSync'] ? 1 : 0;
$data['color'] = $_REQUEST['color'] ? $_REQUEST['color'] : 2;
$_POST && ($res = model('AddonData')->lput('beautifyCard', $data));
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('beautifyCardConfig'));
} else {
$this->error();
}
}
示例3: saveBeautifyCenterConfig
public function saveBeautifyCenterConfig()
{
$data = array();
$data['position'] = $_POST['position'] ? $_POST['position'] : 2;
$data['template'] = $_POST['template'] ? $_POST['template'] : 1;
$data['sync_bg'] = $_POST['sync_bg'] ? 1 : 0;
$data['consume_credit'] = $_POST['consume_credit'] == "on" ? 1 : 0;
$data['consume_quantity'] = $_POST['consume_quantity'] ? $_POST['consume_quantity'] : 50;
$_POST && ($res = model('AddonData')->lput('beautifyCenter', $data));
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('beautifyCenterConfig'));
} else {
$this->error();
}
}
示例4: saveAdminConfig
public function saveAdminConfig()
{
$data = array();
foreach ($_POST as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$value[$k] = h($v);
}
$data[$key] = $value;
} else {
$data[$key] = h($value);
}
}
if (!$_POST['open']) {
$data['open'] = array();
}
if ($_POST['bindemail'] == 1) {
$data['bindemail'] = 1;
} else {
$data['bindemail'] = 0;
}
$_POST && ($res = model('AddonData')->lput('login', $data));
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('login_plugin_login'));
} else {
$this->error();
}
}
示例5: login_page_banner_addimage
/**
* 添加banner
*/
public function login_page_banner_addimage()
{
if ($_POST) {
$attachid = intval($_POST['login_banner']);
$attach = model('Attach')->getAttachById($attachid);
if (!$attachid) {
$this->assign('jumpUrl', Addons::adminPage('login_page_banner_addimage'));
$this->error('banner图片不能为空');
}
$data = model('Xdata')->get('hook_login_page:banner');
if ($_POST['banner_key']) {
$bannerkey = intval($_POST['banner_key']);
$attachid && ($data[$bannerkey]['banner'] = $attachid);
$attachid && ($data[$bannerkey]['bannerurl'] = $attach['save_path'] . $attach['save_name']);
$data[$bannerkey]['bannerlink'] = t($_POST['banner_link']);
} else {
$adddata = array('banner' => $attachid, 'bannerurl' => $attach['save_path'] . $attach['save_name'], 'bannerlink' => t($_POST['banner_link']));
$data[$attachid] = $adddata;
}
krsort($data);
model('Xdata')->saveKey('hook_login_page:banner', $data);
return;
} else {
$bannerkey = intval($_GET['banner_key']);
if ($bannerkey) {
$data = model('Xdata')->get('hook_login_page:banner');
$this->assign('banner_key', $bannerkey);
$this->assign('banner', $data[$bannerkey]['banner']);
$this->assign('bannerurl', getImageUrl($data[$bannerkey]['bannerurl']));
$this->assign('bannerlink', $data[$bannerkey]['bannerlink']);
}
}
$this->display('login_page_banner_addimage');
}
示例6: uninstallMedal
public function uninstallMedal()
{
if (($medal_id = intval($_GET['medal_id'])) <= 0) {
return false;
}
$this->assign('jumpUrl', Addons::adminPage('medal'));
if ($this->model('Medal')->deleteMedal($medal_id)) {
$_LOG['uid'] = $this->mid;
$_LOG['type'] = '2';
$data[] = '扩展 - 插件 - 勋章管理 - 卸载勋章';
$data[] = $this->model('Medal')->where('medal_id=' . $_GET['medal_id'])->field('path_name')->find();
$_LOG['data'] = serialize($data);
$_LOG['ctime'] = time();
M('AdminLog')->add($_LOG);
$this->success('卸载成功');
} else {
$this->error('卸载失败');
}
}
示例7: saveAdminConfig
public function saveAdminConfig()
{
$data = array();
foreach ($_POST as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$value[$k] = h($v);
}
$data[$key] = $value;
} else {
$data[$key] = h($value);
}
}
$res = model('AddonData')->lput('login', $data);
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('login_plugin_login'));
$this->success();
} else {
$this->error();
}
}
示例8: saveConfig
public function saveConfig($param)
{
$apps_show_list = array('photo', 'blog', 'group');
foreach ($apps_show_list as $v) {
$post[$v] = intval($_POST[$v]);
}
$res = model('AddonData')->lput('square_app_show', $post);
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('config'));
$this->success();
} else {
$this->error();
}
}
示例9: saveConfig
public function saveConfig()
{
if (empty($_POST)) {
return;
}
if (empty($_POST['open'])) {
$_POST['open'] = array();
}
$data = $_POST;
$res = model('AddonData')->lput('visitor', $data);
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('config'));
$this->success();
} else {
$this->error();
}
exit;
}
示例10: saveConfig
public function saveConfig($param)
{
unset($_POST['__hash__']);
foreach ($_POST as $k => $v) {
$_POST[$k] = h($v);
}
$res = model('AddonData')->lput('short_url', $_POST);
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('config'));
$this->success();
} else {
$this->error();
}
}
示例11: saveConfig
public function saveConfig()
{
if (empty($_POST)) {
return;
}
$data = array();
foreach ($_POST['open'] as $key => $value) {
$data['open'][] = $value;
}
if (empty($data['open'])) {
$data['open'] = array();
}
foreach ($_POST['image'] as $key => $value) {
if ($key == 'size' || $key == 'limit') {
$data['image'][$key] = intval($value);
} else {
$data['image'][$key] = h($value);
}
}
foreach ($_POST['file'] as $key => $value) {
if ($key == 'size') {
$data['file'][$key] = intval($value);
} else {
$data['file'][$key] = h($value);
}
}
$res = model('AddonData')->lput('weibo_type', $data);
if ($res) {
$this->assign('jumpUrl', Addons::adminPage('config'));
$this->success();
} else {
$this->error();
}
exit;
}