mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-17 09:24:17 +09:00
issue 160 admin logging module init
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9408 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ac866a7a31
commit
793f301d5e
7 changed files with 561 additions and 0 deletions
33
modules/adminlogging/adminlogging.controller.php
Normal file
33
modules/adminlogging/adminlogging.controller.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* @class adminAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief admin controller class of admin module
|
||||
**/
|
||||
|
||||
class adminloggingController extends admin {
|
||||
/**
|
||||
* @brief initialization
|
||||
* @return none
|
||||
**/
|
||||
function init() {
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
|
||||
}
|
||||
|
||||
function insertLog($module, $act)
|
||||
{
|
||||
if(!$module || !$act) return;
|
||||
|
||||
$args->module = $module;
|
||||
$args->act = $act;
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
$args->regdate = date('YmdHis');
|
||||
$args->requestVars = print_r(Context::getRequestVars(), true);
|
||||
|
||||
$output = executeQuery('adminlogging.insertLog', $args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue