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; } }
<?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']);
$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');
<?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;
<?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'));
<?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']);