本文整理汇总了PHP中uni_user_permission_check函数的典型用法代码示例。如果您正苦于以下问题:PHP uni_user_permission_check函数的具体用法?PHP uni_user_permission_check怎么用?PHP uni_user_permission_check使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uni_user_permission_check函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/**
* [Weizan System] Copyright (c) 2014 012WZ.COM
* Weizan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('wechat_manage');
$dos = array('display', 'location_post', 'logo', 'location_list', 'location_view', 'location_del', 'whitelist', 'location_edit', 'export', 'location_sync');
$do = in_array($do, $dos) ? $do : 'logo';
$acid = $_W['acid'];
if ($do == 'logo') {
$coupon_setting = pdo_fetch('SELECT * FROM ' . tablename('coupon_setting') . ' WHERE uniacid = :aid AND acid = :acid', array(':aid' => $_W['uniacid'], ':acid' => $acid));
if (checksubmit('submit')) {
$_GPC['logo'] = trim($_GPC['logo']);
empty($_GPC['logo']) && message('请上传商户logo', referer(), 'info');
$data = array('uniacid' => $_W['uniacid'], 'acid' => $acid, 'logourl' => $_GPC['logo']);
if (empty($coupon_setting)) {
pdo_insert('coupon_setting', $data);
} else {
pdo_update('coupon_setting', $data, array('uniacid' => $_W['uniacid']));
}
message('上传商户LOGO成功', referer(), 'success');
}
}
if ($do == 'location_post') {
if (checksubmit('submit')) {
$data['business_name'] = trim($_GPC['business_name']) ? urlencode(trim($_GPC['business_name'])) : message('门店名称不能为空');
$data['branch_name'] = urlencode(trim($_GPC['branch_name']));
$cate = array();
$in_cate = array();
示例2: defined
<?php
/**
* [Weizan System] Copyright (c) 2014 012WZ.COM
* Weizan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('mc_member');
$dos = array('display', 'post', 'del', 'add', 'group');
$do = in_array($do, $dos) ? $do : 'display';
load()->model('mc');
if ($do == 'display') {
$_W['page']['title'] = '会员列表 - 会员 - 会员中心';
$groups = mc_groups();
$pindex = max(1, intval($_GPC['page']));
$psize = 50;
$condition = '';
$starttime = empty($_GPC['createtime']['start']) ? strtotime('-90 days') : strtotime($_GPC['createtime']['start']);
$endtime = empty($_GPC['createtime']['end']) ? TIMESTAMP + 86399 : strtotime($_GPC['createtime']['end']) + 86399;
$condition .= " AND createtime >= {$starttime} AND createtime <= {$endtime}";
$condition .= empty($_GPC['username']) ? '' : " AND (( `realname` LIKE '%" . trim($_GPC['username']) . "%' ) OR ( `nickname` LIKE '%" . trim($_GPC['username']) . "%' ) OR ( `mobile` LIKE '%" . trim($_GPC['username']) . "%' )) ";
$condition .= intval($_GPC['groupid']) > 0 ? " AND `groupid` = '" . intval($_GPC['groupid']) . "'" : '';
if (checksubmit('export_submit', true)) {
$sql = "SELECT uid, uniacid, groupid, realname, nickname, email, mobile, credit1, credit2, credit6, createtime FROM " . tablename('mc_members') . " WHERE uniacid = '{$_W['uniacid']}' " . $condition . " ORDER BY createtime";
$list = pdo_fetchall($sql);
$header = array('uid' => 'UID', 'realname' => '姓名', 'groupid' => '会员组', 'mobile' => '手机', 'email' => '邮箱', 'credit1' => '积分', 'credit2' => '余额', 'createtime' => '注册时间');
$keys = array_keys($header);
$html = "";
foreach ($header as $li) {
$html .= $li . "\t ,";
}
示例3: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('platform_special');
$dos = array('display', 'set', 'cancel', 'message', 'search_key');
$do = !empty($_GPC['do']) && in_array($do, $dos) ? $do : 'display';
load()->model('reply');
load()->model('account');
$_W['account']['modules'] = uni_modules();
if ($_W['isajax']) {
if ($do == 'search_key') {
$condition = '';
$key_word = trim($_GPC['key_word']);
if (!empty($key_word)) {
$condition = " AND content LIKE '%{$key_word}%' ";
}
$data = pdo_fetchall('SELECT content FROM ' . tablename('rule_keyword') . " WHERE (uniacid = 0 OR uniacid = :uniacid) AND status != 0 " . $condition . ' ORDER BY uniacid DESC,displayorder DESC LIMIT 100', array(':uniacid' => $_W['uniacid']));
$exit_da = array();
if (!empty($data)) {
foreach ($data as $da) {
$exit_da[] = $da['content'];
}
}
exit(json_encode($exit_da));
}
exit('error');
}
示例4: defined
<?php
/**
* [WEIZAN System] Copyright (c) 2015 012WZ.COM
* WeiZan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$_W['page']['title'] = '常用接入服务 - 常用接入服务 - 高级功能';
uni_user_permission_check('platform_service');
load()->model('module');
load()->model('reply');
$m = module_fetch('userapi');
$cfg = $m['config'];
$ds = reply_search("`uniacid` = 0 AND module = 'userapi' AND `status`=1");
$apis = array();
foreach ($ds as $row) {
$apis[$row['id']] = $row;
}
if ($_W['ispost'] && $_W['isajax']) {
$rids = explode(',', $_GPC['rids']);
if (is_array($rids)) {
$cfg = array();
foreach ($rids as $rid) {
if (!empty($apis[$rid])) {
$cfg[intval($rid)] = true;
}
}
$module = WeUtility::createModule('userapi');
$module->saveSettings($cfg);
}
exit;
示例5: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$dos = array('display', 'setting', 'shortcut', 'enable', 'form');
$do = !empty($_GPC['do']) ? $_GPC['do'] : 'display';
if ($do != 'setting') {
uni_user_permission_check('profile_module');
}
$modulelist = uni_modules(false);
if (empty($modulelist)) {
message('没有可用功能.');
}
if ($do == 'display') {
$_W['page']['title'] = '模块列表 - 公众号选项';
$setting = uni_setting($_W['uniacid'], array('shortcuts'));
$shortcuts = $setting['shortcuts'];
if (!empty($modulelist)) {
foreach ($modulelist as $i => &$module) {
if (!empty($_W['setting']['permurls']['modules']) && !in_array($module['name'], $_W['setting']['permurls']['modules'])) {
unset($modulelist[$i]);
continue;
}
$module['shortcut'] = !empty($shortcuts[$module['name']]);
$module['official'] = empty($module['issystem']) && (strexists($module['author'], 'WeEngine Team') || strexists($module['author'], '微擎团队'));
if ($module['issystem']) {
$path = '../framework/builtin/' . $module['name'];
} else {
示例6: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('mc_material_display');
$_W['page']['title'] = '永久素材-微信素材';
$dos = array('image', 'del', 'export', 'news', 'down', 'list', 'purview', 'modal', 'send');
$do = in_array($do, $dos) ? $do : 'list';
if ($do == 'down') {
load()->func('file');
set_time_limit(0);
$acc = WeAccount::create();
if (is_error($acc)) {
message($acc, '', 'ajax');
}
$post = $_GPC['__input'];
$type = $types = $post['type'];
$pindex = max(1, intval($post['page']));
$psize = 15;
$offset = ($pindex - 1) * $psize;
$result = $acc->batchGetMaterial($type, $offset, $psize);
if (is_error($result)) {
message($result, '', 'ajax');
}
if ($result['item_count'] == 0 || count($result['data']) == 0) {
message(error(-2, $result['total_count']), '', 'ajax');
}
$fail = array();
示例7: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('mc_tplnotice');
$_W['page']['title'] = '会员微信通知-会员中心';
$dos = array('set');
$do = in_array($do, $dos) ? $do : 'set';
if ($do == 'set') {
if (checksubmit()) {
$data = array('type' => trim($_GPC['type']), 'recharge' => trim($_GPC['recharge']), 'credit1' => trim($_GPC['credit1']), 'credit2' => trim($_GPC['credit2']), 'group' => trim($_GPC['group']), 'nums_plus' => trim($_GPC['nums_plus']), 'nums_times' => trim($_GPC['nums_times']), 'times_plus' => trim($_GPC['times_plus']), 'times_times' => trim($_GPC['times_times']));
$data = iserializer($data);
pdo_update('uni_settings', array('tplnotice' => $data), array('uniacid' => $_W['uniacid']));
message('设置通知模板成功', referer(), 'success');
}
$setting = uni_setting($_W['uniacid'], '*', true);
$tpl = $setting['tplnotice'];
if (!is_array($tpl)) {
$tpl = array();
}
template('mc/tplnotice');
}
示例8: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('mc_trade');
$_W['page']['title'] = '会员交易-会员管理';
$dos = array('consume', 'user', 'modal', 'clerk', 'credit', 'card', 'cardsn', 'tpl');
$do = in_array($do, $dos) ? $do : 'tpl';
load()->model('mc');
if ($do == 'clerk') {
$clerk = pdo_get('activity_coupon_password', array('uniacid' => $_W['uniacid'], 'password' => trim($_GPC['password'])));
if (empty($clerk)) {
exit(json_encode(array('valid' => false)));
} else {
exit(json_encode(array('valid' => true)));
}
}
if ($do == 'user') {
$type = trim($_GPC['type']);
if (!in_array($type, array('uid', 'mobile'))) {
$type = 'mobile';
}
$username = trim($_GPC['username']);
$data = pdo_getall('mc_members', array('uniacid' => $_W['uniacid'], $type => $username));
if (empty($data)) {
exit(json_encode(array('error' => 'empty', 'message' => '没有找到对应用户')));
} elseif (count($data) > 1) {
exit(json_encode(array('error' => 'not-unique', 'message' => '用户不唯一,请重新输入用户信息')));
示例9: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$type = $do;
$do = $_GPC['foo'];
$m = $_GPC['m'];
uni_user_permission_check('platform_nav_' . $do, true, 'nav');
$dos = array('post', 'delete', 'saves', 'display');
$do = in_array($do, $dos) ? $do : 'display';
$types = array('home' => array('name' => 'home', 'title' => '首页', 'visiable' => true, 'position' => 1), 'profile' => array('name' => 'profile', 'title' => '个人中心', 'visiable' => true, 'position' => 2));
$type = array_key_exists($type, $types) ? $types[$type] : $types['home'];
$titles = array('home' => '微站首页导航图标', 'profile' => '个人中心功能条目');
$_W['page']['title'] = $titles[$type['name']];
$setting = uni_setting($_W['uniacid'], 'default_site');
$default_site = intval($setting['default_site']);
load()->model('module');
$modules = uni_modules();
if (!empty($m)) {
$module = module_fetch($m);
if (empty($module)) {
message('访问错误.');
}
}
if ($do != 'display') {
define('FRAME', 'site');
$frames = buildframes(array(FRAME));
$frames = $frames[FRAME];
示例10: defined
<?php
/**
* [WEIZAN System] Copyright (c) 2015 012WZ.COM
* WeiZan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('profile_payment');
$_W['page']['title'] = '支付参数 - 公众号选项';
$setting = uni_setting($_W['uniacid'], array('payment', 'recharge'));
$pay = $setting['payment'];
$recharge = $setting['recharge'];
if (!is_array($pay)) {
$pay = array();
}
if ($_W['ispost']) {
$credit = array_elements(array('switch'), $_GPC['credit']);
$credit['switch'] = $credit['switch'] == 'true';
$card = array_elements(array('switch'), $_GPC['card']);
$card['switch'] = intval($card['switch']);
$alipay = array_elements(array('switch', 'account', 'partner', 'secret'), $_GPC['alipay']);
$alipay['switch'] = $alipay['switch'] == 'true';
$alipay['account'] = trim($alipay['account']);
$alipay['partner'] = trim($alipay['partner']);
$alipay['secret'] = trim($alipay['secret']);
$delivery = array_elements(array('switch'), $_GPC['delivery']);
$delivery['switch'] = $delivery['switch'] == 'true';
$line = array_elements(array('switch'), $_GPC['line']);
$line['switch'] = $line['switch'] == 'true';
if ($alipay['switch'] && (empty($alipay['account']) || empty($alipay['partner']) || empty($alipay['secret']))) {
message('请输入完整的支付宝接口信息.');
示例11: load
<?php
/**
* [WEIZAN System] Copyright (c) 2015 012WZ.COM
* WeiZan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
load()->model('reply');
load()->model('module');
$dos = array('display', 'post', 'delete');
$do = in_array($do, $dos) ? $do : 'display';
$m = $_GPC['m'];
if (empty($m)) {
message('错误访问.');
}
uni_user_permission_check('platform_reply_' . $m, true, 'reply');
$module = module_fetch($m);
if (empty($module) || empty($module['isrulefields'])) {
message('访问无权限.');
}
if (!in_array($m, $sysmods)) {
define('FRAME', 'ext');
$types = module_types();
define('ACTIVE_FRAME_URL', url('home/welcome/ext', array('m' => $m)));
$frames = buildframes(array(FRAME), $m);
$frames = $frames[FRAME];
}
$_W['page']['title'] = $module['title'];
load()->model('extension');
if (ext_module_checkupdate($module['name'])) {
message('系统检测到该模块有更新,请点击“<a href="' . url('extension/module/upgrade', array('m' => $m)) . '">更新模块</a>”后继续使用!', '', 'error');
}
示例12: defined
<?php
/**
* [Weizan System] Copyright (c) 2014 012WZ.COM
* Weizan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('activity_offline');
$dos = array('introduce', 'clerk', 'post', 'del', 'edit', 'verify');
$do = in_array($do, $dos) ? $do : 'introduce';
$_W['page']['title'] = '功能说明 - 门店营销参数 - 会员营销';
if ($do == 'introduce') {
template('activity/offline');
exit;
}
if ($do == 'clerk') {
$pindex = max(1, intval($_GPC['page']));
$psize = 30;
$limit = 'ORDER BY id DESC LIMIT ' . ($pindex - 1) * $psize . ", {$psize}";
$total = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('activity_coupon_password') . " WHERE uniacid = :uniacid ", array(':uniacid' => $_W['uniacid']));
$list = pdo_fetchall("SELECT * FROM " . tablename('activity_coupon_password') . " WHERE uniacid = :uniacid {$limit}", array(':uniacid' => $_W['uniacid']));
$pager = pagination($total, $pindex, $psize);
$stores = pdo_getall('activity_stores', array('uniacid' => $_W['uniacid']), array('id', 'business_name', 'branch_name'), 'id');
}
if ($do == 'edit') {
$id = intval($_GPC['id']);
if ($id > 0) {
$sql = 'SELECT * FROM ' . tablename('activity_coupon_password') . " WHERE id = :id AND uniacid = :uniacid";
$clerk = pdo_fetch($sql, array(':id' => $id, ':uniacid' => $_W['uniacid']));
if (empty($clerk)) {
message('店员不存在', referer(), 'error');
示例13: pdo_fetchcolumn
$accounts[$account['acid']] = $account['name'];
}
}
}
}
}
$oauth = pdo_fetchcolumn('SELECT `oauth` FROM ' . tablename('uni_settings') . ' WHERE `uniacid` = :uniacid LIMIT 1', array(':uniacid' => $_W['uniacid']));
$oauth = iunserializer($oauth) ? iunserializer($oauth) : array();
if (checksubmit('submit')) {
$host = rtrim($_GPC['host'], '/');
if (!empty($host) && !preg_match('/^http(s)?:\\/\\//', $host)) {
$host = 'http://' . $host;
}
$data = array('host' => $host, 'account' => intval($_GPC['oauth']));
pdo_update('uni_settings', array('oauth' => iserializer($data)), array('uniacid' => $_W['uniacid']));
cache_delete("unisetting:{$_W['uniacid']}");
message('设置公众平台oAuth成功', referer(), 'success');
}
}
if ($do == 'sync') {
uni_user_permission_check('mc_passport_sync');
$_W['page']['title'] = '更新粉丝信息 - 公众号选项';
$setting = uni_setting($_W['uniacid'], array('sync'));
$sync = $setting['sync'];
if (checksubmit('submit')) {
pdo_update('uni_settings', array('sync' => intval($_GPC['sync'])), array('uniacid' => $_W['uniacid']));
cache_delete("unisetting:{$_W['uniacid']}");
message('更新设置成功', referer(), 'success');
}
}
template('mc/passport');
示例14: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
uni_user_permission_check('profile_notify');
$row = pdo_fetchcolumn("SELECT `notify` FROM " . tablename('uni_settings') . " WHERE uniacid = :uniacid", array(':uniacid' => $_W['uniacid']));
$notify = iunserializer($row);
if (!is_array($notify)) {
$notify['sms'] = array();
$notify['sms']['balance'] = 0;
$notify['sms']['signature'] = '系统默认';
$notify['mail'] = array();
}
$dos = array('mail', 'sms', 'wechat');
$do = in_array($do, $dos) ? $do : 'mail';
$_W['page']['title'] = 'APP通知 - 通知参数 - 通知中心';
if ($do == 'mail') {
$_W['page']['title'] = '邮件通知 - 通知参数 - 通知中心';
if (checksubmit('submit')) {
$notify['mail'] = array('username' => $_GPC['username'], 'password' => $_GPC['password'], 'smtp' => $_GPC['smtp'], 'sender' => $_GPC['sender'], 'signature' => $_GPC['signature']);
$row = array();
$row['notify'] = iserializer($notify);
pdo_update('uni_settings', $row, array('uniacid' => $_W['uniacid']));
if (!empty($_GPC['testsend']) && !empty($_GPC['receiver'])) {
load()->func('communication');
$result = ihttp_email($_GPC['receiver'], $_W['account']['name'] . '验证邮件' . date('Y-m-d H:i:s'), '如果您收到这封邮件则表示您系统的发送邮件配置成功!');
if (is_error($result)) {
message($result['message']);
示例15: uni_user_permission_check
uni_user_permission_check('site_editor_page');
$page = max(1, intval($_GPC['page']));
$pagesize = 20;
$list = pdo_fetchall("SELECT * FROM " . tablename('site_page') . " WHERE type = '1' AND uniacid = :uniacid LIMIT " . ($page - 1) * $pagesize . ',' . $pagesize, array(':uniacid' => $_W['uniacid']));
if (!empty($list)) {
foreach ($list as &$row) {
$row['params'] = json_decode($row['params'], true);
}
unset($row);
}
$total = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('site_page') . " WHERE type = '1'");
$pager = pagination($total, $page, $pagesize);
template('site/editor');
} elseif ($do == 'uc') {
$_W['page']['title'] = '会员中心 - 微站功能';
uni_user_permission_check('site_editor_uc');
if (!empty($_GPC['wapeditor'])) {
$params = $_GPC['wapeditor']['params'];
if (empty($params)) {
message('请您先设计手机端页面.', '', 'error');
}
$params = json_decode(html_entity_decode(urldecode($params)), true);
if (empty($params)) {
message('请您先设计手机端页面.', '', 'error');
}
$page = $params[0];
$html = htmlspecialchars_decode($_GPC['wapeditor']['html'], ENT_QUOTES);
$data = array('uniacid' => $_W['uniacid'], 'multiid' => '0', 'title' => $page['params']['title'], 'description' => $page['params']['description'], 'type' => 3, 'status' => 1, 'params' => json_encode($params), 'html' => $html, 'createtime' => TIMESTAMP);
$id = pdo_fetchcolumn("SELECT id FROM " . tablename('site_page') . " WHERE uniacid = :uniacid AND type = '3'", array(':uniacid' => $_W['uniacid']));
if (empty($id)) {
pdo_insert('site_page', $data);