예제 #1
0
 function remotelogin_action() {
     cookie::del('passinfo');
     $this->view->loginfalse=cookie::get('loginfalse'.md5($_SERVER['REQUEST_URI']));
     if (front::$args) {
         $user=new user();
         $args = xxtea_decrypt(base64_decode(front::$args), config::get('cookie_password'));
         $user=$user->getrow(unserialize($args));
         if (is_array($user)) {
             if ($user['groupid'] == '888')
                 front::$isadmin=true;
             cookie::set('login_username',$user['username']);
             cookie::set('login_password',front::cookie_encode($user['password']));
             session::set('username',$user['username']);
             require_once ROOT.'/celive/include/config.inc.php';
             require_once ROOT.'/celive/include/celive.class.php';
             $login=new celive();
             $login->auth();
             $GLOBALS['auth']->remotelogin($user['username'],$user['password']);
             $GLOBALS['auth']->check_login1();
             front::$user=$user;
         }elseif (!is_array(front::$user) ||!isset(front::$isadmin)) {
             cookie::set('loginfalse'.md5($_SERVER['REQUEST_URI']),(int) cookie::get('loginfalse'.md5($_SERVER['REQUEST_URI'])) +1,time() +3600);
             event::log('loginfalse','失败 user='******'username']);
             front::flash('密码错误或不存在该管理员!');
             front::refresh(url('admin/login',true));
         }
     }
     $this->render();
 }
예제 #2
0
 function logout_action() {
     cookie::del('login_username');
     cookie::del('login_password');
     session::del('username');
     session::del('roles');
     require_once ROOT.'/celive/include/config.inc.php';
     require_once ROOT.'/celive/include/celive.class.php';
     $login=new celive();
     $login->auth();
     $GLOBALS['auth']->logout();
     $GLOBALS['auth']->check_logout1();
     front::redirect(url::create('index'));
 }
예제 #3
0
* Support, News, Updates at: http://www.cmseasy.cn
**
* This program is not free software; you can't may redistribute it and modify it under
**
* This file contains configuration settings that need to altered
* in order for CE Live to work, and other settings that
**/
include '../include/config.inc.php';
include CE_ROOT . '/include/admin/check.inc.php';
include CE_ROOT . '/include/celive.class.php';
include CE_ROOT . '/include/version.inc.php';
$version = $config['version'];
$system = new celive();
$system->template();
$system->file();
$system->auth();
$system->celsysteminfo();
$system->department();
$system->auth();
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->assign('ifadmin', 1);
}
$GLOBALS['template']->assign('username', $_SESSION['cel_username']);
if (!$GLOBALS['auth']->admin()) {
    $GLOBALS['template']->assign('createcode', true);
    $GLOBALS['template']->assign('cel_departments', $GLOBALS['department']->listall('', 'all'));
    if (isset($_POST['departmentid'])) {
        $GLOBALS['template']->assign('departmentid', $_POST['departmentid']);
    } else {
        $GLOBALS['template']->assign('departmentid', '');
    }
예제 #4
0
<?php

/**
* CmsEasy Live http://www.cmseasy.cn 				  			 
* by CmsEasy Live Team 							  						
**
* Software Version: CmsEasy Live v 1.2.0 					  				  		      
* Copyright 2009 by: CmsEasy, (http://www.cmseasy.cn) 	  
* Support, News, Updates at: http://www.cmseasy.cn 			  			  
**
* This program is not free software; you can't may redistribute it and modify it under	  
**
* This file contains configuration settings that need to altered                  
* in order for CE Live to work, and other settings that            
**/
include '../include/config.inc.php';
include CE_ROOT . '/include/admin/check.inc.php';
include CE_ROOT . '/include/celive.class.php';
include CE_ROOT . '/include/version.inc.php';
$version = $config['version'];
$left = new celive();
$left->template();
$left->auth();
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->assign('ifadmin', 1);
}
$GLOBALS['template']->assign('poweredby', 'Powered by CElive');
$GLOBALS['template']->assign('gotocmseasy', '../../index.php?case=guestbook&act=index');
$GLOBALS['template']->assign('version', $version);
$GLOBALS['template']->display('admin/left.htm');
예제 #5
0
* Copyright 2009 by: CmsEasy, (http://www.cmseasy.cn) 	  
* Support, News, Updates at: http://www.cmseasy.cn 			  			  
**
* This program is not free software; you can't may redistribute it and modify it under	  
**
* This file contains configuration settings that need to altered                  
* in order for CE Live to work, and other settings that            
**/
include '../include/config.inc.php';
include CE_ROOT . '/include/admin/check.inc.php';
include CE_ROOT . '/include/celive.class.php';
include CE_ROOT . '/include/version.inc.php';
$version = $config['version'];
$right = new celive();
$right->template();
$right->auth();
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->assign('ifadmin', 1);
}
$phpv = PHP_VERSION;
$zendv = zend_version();
$ifmysql = function_exists(mysql_close) ? "Yes" : "No";
$mysqlallowp = @get_cfg_var("mysql.allow_persistent") ? "Yes" : "No";
$mysqlmaxlink = @get_cfg_var("mysql.max_links") == -1 ? "不限" : @get_cfg_var("mysql.max_links");
$sysos = PHP_OS;
$sysinf = $_SERVER['SERVER_SOFTWARE'];
$sysip = $_SERVER[SERVER_ADDR];
$upmax = get_cfg_var("upload_max_filesize") ? get_cfg_var("upload_max_filesize") : "不允许上传附件";
$maxetime = get_cfg_var("max_execution_time") . "秒";
$GLOBALS['template']->assign('poweredby', '<a href="http://www.cmseasy.cn" target="_blank">Powered by CmsEasy</a>');
$GLOBALS['template']->assign('username', $_SESSION['cel_username']);
예제 #6
0
* Copyright 2009 by: CmsEasy, (http://www.cmseasy.cn) 	  
* Support, News, Updates at: http://www.cmseasy.cn 			  			  
**
* This program is not free software; you can't may redistribute it and modify it under	  
**
* This file contains configuration settings that need to altered                  
* in order for CE Live to work, and other settings that            
**/
include '../include/config.inc.php';
include CE_ROOT . '/include/admin/check.inc.php';
include CE_ROOT . '/include/celive.class.php';
include CE_ROOT . '/include/version.inc.php';
$version = $config['version'];
$chatlist = new celive();
$chatlist->template();
$chatlist->auth();
$cel_operatorid = $_SESSION['cel_operatorid'];
$operatorid = addslashes($_REQUEST['operatorid']);
$action = addslashes($_REQUEST['action']);
if ($action == 'delete') {
    if ($GLOBALS['auth']->admin()) {
        $chatid = addslashes($_REQUEST['chatid']);
        $sql = "DELETE FROM `chat` WHERE `id`='" . $chatid . "'";
        $db->query($sql);
        $sql = "DELETE FROM `detail` WHERE `chatid`='" . $chatid . "'";
        $db->query($sql);
    } else {
        echo "<script>alert('不能删除自己')</script>";
    }
}
$list = '';
예제 #7
0
/**
* CmsEasy Live http://www.cmseasy.cn 				  			 
* by CmsEasy Live Team 							  						
**
* Software Version: CmsEasy Live v 1.2.0 					  				  		      
* Copyright 2009 by: CmsEasy, (http://www.cmseasy.cn) 	  
* Support, News, Updates at: http://www.cmseasy.cn 			  			  
**
* This program is not free software; you can't may redistribute it and modify it under	  
**
* This file contains configuration settings that need to altered                  
* in order for CE Live to work, and other settings that            
**/
session_start();
include '../include/config.inc.php';
include CE_ROOT . '/include/celive.class.php';
$login = new celive();
$login->auth();
$login->template();
if (isset($_POST['username']) && isset($_POST['password'])) {
    $GLOBALS['auth']->login(addslashes($_POST['username']), addslashes($_POST['password']));
}
if ($GLOBALS['auth']->check_login()) {
    header('Location: ' . CE_ROOT . '/admin/index.php');
} else {
    if (isset($_POST['username']) && isset($_POST['password'])) {
        $GLOBALS['template']->assign('login_text', $GLOBALS['lang']['login_failure']);
    }
    $GLOBALS['template']->assign('action', 'login.php');
    $GLOBALS['template']->display('admin/login.htm');
}
예제 #8
0
* by CmsEasy Live Team 							  						
**
* Software Version: CmsEasy Live v 1.2.0 					  				  	      
* Copyright 2009 by: CmsEasy, (http://www.cmseasy.cn) 	  
* Support, News, Updates at: http://www.cmseasy.cn 			  			  
**
* This program is not free software; you can't may redistribute it and modify it under	  
**
* This file contains configuration settings that need to altered                  
* in order for CE Live to work, and other settings that            
**/
include '../include/config.inc.php';
include CE_ROOT . '/include/admin/check.inc.php';
include CE_ROOT . '/include/celive.class.php';
$admin = new celive();
$admin->template();
$admin->auth();
if ($_GET['action'] == 'clearcache') {
    $db->clear_cache();
    $GLOBALS['template']->assign('clear_cache', '<font color=red>更新成功</font>');
}
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->assign('ifadmin', 1);
}
$GLOBALS['template']->assign('username', $_SESSION['cel_username']);
$GLOBALS['template']->assign('header', 'admin/header.htm');
$GLOBALS['template']->assign('gotocmseasy', '../../index.php?case=guestbook&act=index');
$GLOBALS['template']->assign('main', 'admin/main.htm');
$GLOBALS['template']->assign('footer', 'admin/footer.htm');
$GLOBALS['template']->display('admin/index.htm');
$admin->printjs();