Exemple #1
0
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: forum_modcp.php 10853 2010-05-17 08:37:06Z monkey $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
define('IN_MODCP', true);
if (!empty($_G['forum']) && $_G['forum']['status'] == 3) {
    showmessage('group_admin_enter_panel', 'forum.php?mod=group&action=manage&fid=' . $_G['fid']);
}
require_once DISCUZ_ROOT . './source/admincp/admincp_cpanel.php';
$_G['gp_action'] = empty($_G['gp_action']) && $_G['fid'] ? 'thread' : $_G['gp_action'];
$op = getgpc('op');
$cpscript = basename($_G['PHP_SELF']);
$modsession = new AdminSession($_G['uid'], $_G['groupid'], $_G['adminid'], $_G['clientip']);
if ($modsession->cpaccess == 1) {
    if ($_G['gp_action'] == 'login' && $_G['gp_cppwd'] && submitcheck('submit')) {
        loaducenter();
        $ucresult = uc_user_login($_G['uid'], $_G['gp_cppwd'], 1);
        if ($ucresult[0] > 0) {
            $modsession->errorcount = '-1';
            $url_forward = $modsession->get('url_forward');
            $modsession->clear(true);
            $url_forward && dheader("Location: {$cpscript}?mod=modcp&{$url_forward}");
            $_G['gp_action'] = 'home';
        } else {
            $modsession->errorcount++;
            $modsession->update();
        }
    } else {
Exemple #2
0
	[Discuz!] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: admincp.php 16688 2008-11-14 06:41:07Z cnteacher $
*/
define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
require_once './include/common.inc.php';
require_once DISCUZ_ROOT . './admin/global.func.php';
require_once DISCUZ_ROOT . './admin/cpanel.share.php';
require_once DISCUZ_ROOT . './include/cache.func.php';
require_once DISCUZ_ROOT . './plugins/openid/common.php';
include language('admincp');
$discuz_action = 211;
$admincp['checkip'] && ($onlineip = empty($_SERVER['REMOTE_ADDR']) ? getenv('REMOTE_ADDR') : $_SERVER['REMOTE_ADDR']);
$adminsession = new AdminSession($discuz_uid, $groupid, $adminid, $onlineip);
$dactionarray = $adminsession->get('dactionarray');
if ($dactionarray === null) {
    $dactionarray = array();
    if ($radminid != $groupid) {
        $tmp = unserialize($db->result_first("SELECT disabledactions FROM {$tablepre}adminactions WHERE admingid='{$groupid}'"));
        $dactionarray = $tmp ? $tmp : array();
    }
    $adminsession->set('dactionarray', $dactionarray, true);
}
$cpaccess = $adminsession->cpaccess;
if ($cpaccess == 0 || !$discuz_secques && $admincp['forcesecques']) {
    require_once DISCUZ_ROOT . './admin/login.inc.php';
} elseif ($cpaccess == 1) {
    if ($admin_password != '') {
        require_once DISCUZ_ROOT . './uc_client/client.php';