Example #1
0
/**
 * [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']);
        $description = trim($_GPC['uni_description']);
        isetcookie('uni_name', '', -10000);
Example #2
0
/**
 * [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;
}
if ($do == 'basic') {