• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uni_permission函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中uni_permission函数的典型用法代码示例。如果您正苦于以下问题:PHP uni_permission函数的具体用法?PHP uni_permission怎么用?PHP uni_permission使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了uni_permission函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: doWebChangePackage

 public function doWebChangePackage()
 {
     global $_W, $_GPC;
     $_W["user"]["packages"] = getUserGroupAccount();
     if (empty($_W['isfounder'])) {
         $group = pdo_fetch("SELECT * FROM " . tablename('users_group') . " WHERE id = '{$_W['user']['groupid']}'");
         $group_packages = (array) @iunserializer($group['package']);
         $user_packages = (array) @iunserializer($_W['user']['package']);
         $group_account = uni_groups(array_merge($user_packages, $group_packages));
     } else {
         $group_account = uni_groups();
     }
     $allow_group = array_keys($group_account);
     $allow_group[] = 0;
     if (!empty($_W['isfounder'])) {
         $allow_group[] = -1;
     }
     if ($_W['ispost']) {
         $uniacid = intval($_W['uniacid']);
         $groupid = intval($_GPC['groupid']);
         $state = uni_permission($_W['uid'], $uniacid);
         if ($state != 'founder' && $state != 'manager') {
             exit('illegal-uniacid');
         }
         if (!in_array($groupid, $allow_group)) {
             exit('illegal-group');
         } else {
             pdo_update('uni_account', array('groupid' => $groupid), array('uniacid' => $uniacid));
             if ($groupid == 0) {
                 exit('基础服务');
             } elseif ($groupid == -1) {
                 exit('所有服务');
             } else {
                 exit($group_account[$groupid]['name']);
             }
         }
         exit;
     }
 }
开发者ID:aspnmy,项目名称:weizan,代码行数:39,代码来源:site.php


示例2: 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');
load()->func('tpl');
$id = $uniacid = intval($_GPC['uniacid']);
if (!empty($id)) {
    $state = uni_permission($uid, $id);
    if ($state != 'founder' && $state != 'manager') {
        message('没有该公众号操作权限!');
    }
} else {
    if (empty($_W['isfounder']) && is_error($permission = uni_create_permission($_W['uid'], 1))) {
        message($permission['message'], '', 'error');
        if (is_error($permission = uni_create_permission($_W['uid'], 2))) {
            message($permission['message'], '', 'error');
        }
    }
}
$step = intval($_GPC['step']) ? intval($_GPC['step']) : 1;
if ($step == 1) {
} elseif ($step == 2) {
    if (!empty($uniacid)) {
        $unidata = pdo_fetch('SELECT * FROM ' . tablename('uni_account') . ' WHERE uniacid = :uniacid', array(':uniacid' => $uniacid));
        $name = $unidata['name'];
        $description = $unidata['description'];
    } else {
        $name = trim($_GPC['uni_name']);
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:post-step.ctrl.php


示例3: IN

    $condition = " AND `uniacid` = :uniacid";
    $pars[':uniacid'] = $s_uniacid;
}
if (empty($_W['isfounder'])) {
    $condition .= " AND `uniacid` IN (SELECT `uniacid` FROM " . tablename('uni_account_users') . " WHERE `uid`=:uid)";
    $pars[':uid'] = $_W['uid'];
}
$tsql = "SELECT COUNT(*) FROM " . tablename('uni_account') . " WHERE 1 = 1{$condition}";
$total = pdo_fetchcolumn($tsql, $pars);
$sql = "SELECT * FROM " . tablename('uni_account') . " WHERE 1 = 1{$condition} ORDER BY `uniacid` DESC LIMIT {$start}, {$psize}";
$pager = pagination($total, $pindex, $psize);
$list = pdo_fetchall($sql, $pars);
if (!empty($list)) {
    foreach ($list as &$account) {
        $account['details'] = uni_accounts($account['uniacid']);
        if ($account['default_acid'] == $_W['account']['acid']) {
            $isconnect = $account['details'][$account['default_acid']]['isconnect'];
        }
        $account['role'] = uni_permission($_W['uid'], $account['uniacid']);
        $account['setmeal'] = uni_setmeal($account['uniacid']);
    }
}
if (!$_W['isfounder']) {
    $stat = user_account_permission();
}
if (!empty($_W['setting']['platform']['authstate'])) {
    load()->classs('weixin.platform');
    $account_platform = new WeiXinPlatform();
    $authurl = $account_platform->getAuthLoginUrl();
}
template('account/display');
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:display.ctrl.php


示例4: 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');
load()->func('tpl');
$dos = array('basic', 'list', 'high');
$do = in_array($do, $dos) ? $do : 'basic';
$id = $uniacid = intval($_GPC['uniacid']);
if (!empty($id)) {
    $state = uni_permission($_W['uid'], $id);
    if ($state != 'founder' && $state != 'manager') {
        message('没有该公众号操作权限!');
    }
} else {
    if (empty($_W['isfounder']) && is_error($permission = uni_create_permission($_W['uid'], 1))) {
        message($permission['message'], '', 'error');
    }
}
if (empty($_W['isfounder'])) {
    $group = pdo_fetch("SELECT * FROM " . tablename('users_group') . " WHERE id = '{$_W['user']['groupid']}'");
    $group['package'] = uni_groups((array) iunserializer($group['package']));
} else {
    $group['package'] = uni_groups();
}
$allow_group = array_keys($group['package']);
$allow_group[] = 0;
if (!empty($_W['isfounder'])) {
    $allow_group[] = -1;
开发者ID:randyli,项目名称:redstar,代码行数:31,代码来源:post.ctrl.php


示例5: defined

<?php

/**
 * [Weizan System] Copyright (c) 2014 012WZ.COM
 * Weizan is NOT a free software, it under the license terms, visited http://www.qdaygroup.com/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$uniacid = intval($_GPC['uniacid']);
$role = uni_permission($_W['uid'], $uniacid);
if (empty($role)) {
    message('操作失败, 非法访问.');
}
isetcookie('__uniacid', $uniacid, 7 * 86400);
isetcookie('__uid', $_W['uid'], 7 * 86400);
header('location: ' . url('home/welcome'));
开发者ID:6662680,项目名称:qday_wx,代码行数:15,代码来源:switch.ctrl.php


示例6: 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');
$uniacid = intval($_GPC['uniacid']);
$_W['page']['title'] = '添加/编辑公众号';
$step = intval($_GPC['step']) ? intval($_GPC['step']) : 1;
if ($step == 1) {
    if (!empty($uniacid)) {
        $state = uni_permission($uid, $uniacid);
        if ($state != 'founder' && $state != 'manager') {
            message('没有该公众号操作权限!');
        }
        if (is_error($permission = uni_create_permission($_W['uid'], 2))) {
            message($permission['message'], '', 'error');
        }
    } else {
        if (empty($_W['isfounder']) && is_error($permission = uni_create_permission($_W['uid'], 1))) {
            message($permission['message'], '', 'error');
            if (is_error($permission = uni_create_permission($_W['uid'], 2))) {
                message($permission['message'], '', 'error');
            }
        }
    }
} elseif ($step == 2) {
    if (checksubmit('getinfo')) {
        load()->func('file');
        $username = trim($_GPC['wxusername']);
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:post-step.ctrl.php



注:本文中的uni_permission函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uni_setting函数代码示例发布时间:2022-05-23
下一篇:
PHP uni_modules函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap