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

PHP uni_groups函数代码示例

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

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



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

示例1: getUserGroupAccount

function getUserGroupAccount()
{
    global $_W;
    $user = pdo_fetch('SELECT groupid, endtime FROM ' . tablename('users') . ' WHERE `uid` = :uid LIMIT 1', array(':uid' => $_W['uid']));
    $groupid = $user['groupid'];
    $group = kim_get_uni_group($groupid);
    $_W['user']['level'] = $group["name"];
    return uni_groups(array($_W['account']['groupid']));
}
开发者ID:aspnmy,项目名称:weizan,代码行数:9,代码来源:common.inc.php


示例2: 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


示例3: message

         message($r['message'], url('cloud/profile'), 'error');
     }
     $info = cloud_t_info($id);
     if (!is_error($info)) {
         if (empty($_GPC['flag'])) {
             header('location: ' . url('cloud/process', array('t' => $id)));
             exit;
         } else {
             $packet = cloud_t_build($id);
             $manifest = ext_template_manifest_parse($packet['manifest']);
             $manifest['version'] = $packet['version'];
         }
     }
 }
 unset($manifest['settings']);
 $groups = uni_groups();
 if (!$_W['ispost'] || empty($_GPC['flag'])) {
     template('extension/select-groups');
     exit;
 }
 $post_groups = $_GPC['group'];
 $tid = intval($_GPC['tid']);
 $id = $_GPC['templateid'];
 if (empty($manifest)) {
     message('模板安装配置文件不存在或是格式不正确!', '', 'error');
 }
 if ($manifest['name'] != $id) {
     message('安装模板与文件标识不符,请重新安装', '', 'error');
 }
 if (pdo_fetchcolumn("SELECT id FROM " . tablename('site_templates') . " WHERE name = '{$manifest['name']}'")) {
     message('模板已经安装或是唯一标识已存在!', '', 'error');
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:theme.ctrl.php


示例4: file_upload

             $upload = file_upload($_FILES['qrcode'], 'image', "qrcode_{$acid}");
         }
         if (!empty($_FILES['headimg']['tmp_name'])) {
             $_W['uploadsetting'] = array();
             $_W['uploadsetting']['image']['folder'] = '';
             $_W['uploadsetting']['image']['extentions'] = array('jpg');
             $_W['uploadsetting']['image']['limit'] = $_W['config']['upload']['image']['limit'];
             $upload = file_upload($_FILES['headimg'], 'image', "headimg_{$acid}");
         }
     }
 }
 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();
     $group['package'][-1] = array('id' => -1, 'name' => '所有服务');
 }
 $allow_group = array_keys($group['package']);
 $allow_group[] = 0;
 if (!$acid) {
     message('未填写公众号信息', '', url('account/post-step/', array('uniacid' => intval($_GPC['uniacid']), 'step' => 3), 'error'));
 }
 if (checksubmit('submit') && $flag == 2) {
     $groupid = intval($_GPC['groupid']);
     if (!in_array($groupid, $allow_group)) {
         message('您所在的用户组没有使用该服务套餐的权限');
     }
     pdo_update('uni_account', array('groupid' => $groupid), array('uniacid' => $uniacid));
     if ($_GPC['isexpire'] == '1') {
         strtotime($_GPC['endtime']) > TIMESTAMP ? '' : message('服务套餐过期时间必须大于当前时间', '', 'error');
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:post-step.ctrl.php


示例5: pdo_fetch

<?php

/**
 * [Weizan System] Copyright (c) 2014 wdlcms.com
 * Weizan isNOT a free software, it under the license terms, visited http://www.wdlcms.com/ for more details.
 */
if (empty($_W['isfounder'])) {
    $group = pdo_fetch("SELECT * FROM " . tablename('users_group') . " WHERE id = '{$_W['user']['groupid']}'");
    $group_account = uni_groups((array) iunserializer($group['package']));
} else {
    $group_account = uni_groups();
    $group_account[-1] = array('id' => -1, 'name' => '所有服务');
}
$allow_group = array_keys($group_account);
$allow_group[] = 0;
if ($_W['ispost']) {
    $uniacid = intval($_GPC['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 {
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:display.ctrl.php


示例6: defined

<?php

/**
 * 会员财务中心
 *
 * 作者:Kim
 * 模块定制QQ: 800083075
 * 后台体验地址: http://www.012wz.com
 */
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
checklogin();
if ($_W['ispost'] && $_W['isajax']) {
    $user = pdo_fetch("SELECT U.* FROM " . tablename("uni_account_users") . " AS A LEFT JOIN " . tablename("users") . " AS U ON A.uid=U.uid WHERE A.uniacid=:uniacid AND A.role='manager'", array(":uniacid" => $_W['uniacid']));
    if (empty($user)) {
        die(json_encode(array("code" => 1, "message" => "扣费帐号不存在.")));
    }
    $res = buy_package($user, $_GPC['pid'], $_GPC['total']);
    if (!is_error($res)) {
        die(json_encode(array("code" => 1, "message" => "购买成功.")));
    }
    die(json_encode(array("code" => 0, "message" => $res["message"])));
}
$idList = pdo_fetchall("SELECT id FROM " . tablename("uni_group"));
$_items = array();
foreach ($idList as $item) {
    $_items[] = $item["id"];
}
$list = uni_groups($_items);
$curr_count = count($list[$_W["user"]["account"]["groupid"]]['modules']);
include $this->template('financial_buypackage');
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:buypackage.inc.php


示例7: cache_delete

     cache_delete("unimodules:{$uniacid}:1");
     cache_delete("unimodules:{$uniacid}:");
     cache_delete("uniaccount:{$uniacid}");
     cache_delete("accesstoken:{$acid}");
     cache_delete("jsticket:{$acid}");
     cache_delete("cardticket:{$acid}");
     load()->model('module');
     module_build_privileges();
     if (!empty($_GPC['from'])) {
         message('公众号权限修改成功', url('account/post-step/', array('uniacid' => $uniacid, 'step' => 3, 'from' => 'list')), 'success');
     } else {
         header("Location: " . url('account/post-step/', array('uniacid' => $uniacid, 'acid' => $acid, 'step' => 4)));
         exit;
     }
 }
 $unigroups = uni_groups();
 $settings = uni_setting($uniacid, array('notify'));
 $notify = $settings['notify'] ? $settings['notify'] : array();
 $ownerid = pdo_fetchcolumn("SELECT uid FROM " . tablename('uni_account_users') . " WHERE uniacid = :uniacid AND role = 'owner'", array(':uniacid' => $uniacid));
 if (!empty($ownerid)) {
     $owner = user_single(array('uid' => $ownerid));
     $owner['group'] = pdo_fetch("SELECT id, name, package FROM " . tablename('users_group') . " WHERE id = :id", array(':id' => $owner['groupid']));
     $owner['group']['package'] = iunserializer($owner['group']['package']);
 }
 $extend = pdo_fetch("SELECT * FROM " . tablename('uni_group') . " WHERE uniacid = :uniacid", array(':uniacid' => $uniacid));
 $extend['modules'] = iunserializer($extend['modules']);
 $extend['templates'] = iunserializer($extend['templates']);
 if (!empty($extend['modules'])) {
     $owner['extend']['modules'] = pdo_getall('modules', array('name' => $extend['modules']));
 }
 if (!empty($extend['templates'])) {
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:post-step.ctrl.php


示例8: pdo_fetchcolumn

        $oldgroupid = pdo_fetchcolumn('SELECT groupid FROM ' . tablename('uni_account') . ' WHERE uniacid = :uniacid', array(':uniacid' => $uniacid));
        pdo_update('uni_account', array('groupid' => $groupid), array('uniacid' => $uniacid));
        $updatedata = $isexpire ? iserializer(array('isexpire' => 1, 'endtime' => $endtime, 'oldgroupid' => $oldgroupid)) : iserializer(array('isexpire' => 0, 'endtime' => TIMESTAMP, 'oldgroupid' => $oldgroupid));
        pdo_update('uni_settings', array('groupdata' => $updatedata), array('uniacid' => $uniacid));
    }
    load()->model('module');
    module_build_privileges();
    message('更改公众号套餐成功', url('account/batch'), 'success');
} elseif ($do == 'modal') {
    if ($_W['isajax']) {
        load()->func('tpl');
        if ($_W['isfounder']) {
            $groups = pdo_fetchall("SELECT * FROM " . tablename('uni_group'), array(), 'id');
        } else {
            $groups = pdo_fetch("SELECT package FROM " . tablename('users_group') . ' WHERE id = :id', array(':id' => $_W['user']['groupid']), 'id');
            $groups = uni_groups((array) iunserializer($groups['package']));
        }
        $arr = $_GPC['arr'];
        template('account/modal');
        exit;
    }
} elseif ($do == 'operator') {
    if (!$_W['isfounder']) {
        exit('您没有操作权限,请联系系统管理员');
    }
    if ($_W['ispost']) {
        if (empty($_GPC['uid'])) {
            exit('没有选择要添加的操作员');
        }
        $uniacidarr = explode(',', trim($_GPC['uniacidstr']));
        if (empty($uniacidarr)) {
开发者ID:legeng,项目名称:project-2,代码行数:31,代码来源:batch.ctrl.php


示例9: pdo_query

    if (checksubmit('submit')) {
        if (!empty($_GPC['delete'])) {
            pdo_query("DELETE FROM " . tablename('users_group') . " WHERE id IN ('" . implode("','", $_GPC['delete']) . "')");
        }
        message('用户组更新成功!', referer(), 'success');
    }
    $list = pdo_fetchall("SELECT * FROM " . tablename('users_group'));
}
if ($do == 'post') {
    $id = intval($_GPC['id']);
    $_W['page']['title'] = $id ? '编辑用户组 - 用户组 - 用户管理' : '添加用户组 - 用户组 - 用户管理';
    if (!empty($id)) {
        $group = pdo_fetch("SELECT * FROM " . tablename('users_group') . " WHERE id = :id", array(':id' => $id));
        $group['package'] = iunserializer($group['package']);
    }
    $packages = uni_groups();
    if (checksubmit('submit')) {
        if (empty($_GPC['name'])) {
            message('请输入用户组名称!');
        }
        if (!empty($_GPC['package'])) {
            foreach ($_GPC['package'] as $value) {
                $package[] = intval($value);
            }
        }
        $data = array('name' => $_GPC['name'], 'package' => iserializer($package), 'maxaccount' => intval($_GPC['maxaccount']), 'maxsubaccount' => intval($_GPC['maxsubaccount']));
        if (empty($id)) {
            pdo_insert('users_group', $data);
        } else {
            pdo_update('users_group', $data, array('id' => $id));
        }
开发者ID:ruige123456,项目名称:dataMining,代码行数:31,代码来源:group.ctrl.php


示例10: message

    message('访问错误, 未找到指定操作用户.');
}
$founders = explode(',', $_W['config']['setting']['founder']);
$isfounder = in_array($user['uid'], $founders);
if ($isfounder) {
    message('访问错误, 无法编辑站长.');
}
$do = $_GPC['do'];
$dos = array('deny', 'delete', 'auth', 'revo', 'revos', 'select', 'role', 'menu', 'edit');
$do = in_array($do, $dos) ? $do : 'edit';
if ($do == 'edit') {
    if (!empty($user['groupid'])) {
        $group = pdo_fetch("SELECT * FROM " . tablename('users_group') . " WHERE id = '{$user['groupid']}'");
        if (!empty($group)) {
            $package = iunserializer($group['package']);
            $group['package'] = uni_groups($package);
        }
    }
    $weids = pdo_fetchall("SELECT uniacid, role FROM " . tablename('uni_account_users') . " WHERE uid = '{$uid}'", array(), 'uniacid');
    if (!empty($weids)) {
        $wechats = pdo_fetchall("SELECT * FROM " . tablename('uni_account') . " WHERE uniacid IN (" . implode(',', array_keys($weids)) . ")");
    }
    template('user/permission');
}
if ($do == 'deny') {
    if ($_W['ispost'] && $_W['isajax']) {
        $founders = explode(',', $_W['config']['setting']['founder']);
        if (in_array($uid, $founders)) {
            exit('管理员用户不能禁用.');
        }
        $somebody = array();
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:permission.ctrl.php


示例11: intval

$uniacid = intval($_GPC['uniacid']);
if (!empty($uniacid)) {
    $uniaccount = pdo_fetch("SELECT * FROM " . tablename('uni_account') . " WHERE uniacid = :uniacid", array(':uniacid' => $uniacid));
    if (empty($uniaccount)) {
        message('楼盘项目不存在或已被删除!');
    }
    $state = uni_permission($uid, $uniacid);
    if ($state != 'founder' && $state != 'manager') {
        message('没有该楼盘项目操作权限!');
    }
}
$settings = uni_setting($uniacid, array('notify', 'groupdata', 'bootstrap'));
$groupdata = $settings['groupdata'] ? $settings['groupdata'] : array('isexpire' => 0, 'oldgroupid' => '', 'endtime' => TIMESTAMP);
$notify = $settings['notify'] ? $settings['notify'] : array();
$bootstrap = $settings['bootstrap'];
$data = uni_groups();
$groups = array();
foreach ($data as $da) {
    $groups[$da['id']] = $da;
}
$groups[0] = array('id' => 0, 'name' => '基础服务');
$groups[-1] = array('id' => -1, 'name' => '所有服务');
if ($do == 'post') {
    $_W['page']['title'] = '编辑子楼盘项目 - 编辑主楼盘项目';
    if (empty($acid)) {
        $_W['page']['title'] = '添加子楼盘项目 - 编辑主楼盘项目';
        if (empty($_W['isfounder']) && is_error($error = uni_create_permission($_W['uid'], 2))) {
            message($error['message'], '', 'error');
        }
    }
    load()->func('tpl');
开发者ID:ruige123456,项目名称:dataMining,代码行数:31,代码来源:bind.ctrl.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP uni_modules函数代码示例发布时间:2022-05-23
下一篇:
PHP uni_fetch函数代码示例发布时间: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