rhymix/modules/adminlogging/adminlogging.controller.php
ngleader dbc18a4f99 change author
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13180 201d5d3c-b55e-5fd7-737f-ddc643e51545
2013-11-07 02:42:42 +00:00

52 lines
1 KiB
PHP

<?php
/**
* adminloggingController class
* controller class of adminlogging module
*
* @author NAVER (developers@xpressengine.com)
* @package /modules/adminlogging
* @version 0.1
*/
class adminloggingController extends adminlogging
{
/**
* Initialization
* @return void
*/
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");
}
}
/**
* Insert log
* @return void
*/
function insertLog($module, $act)
{
if(!$module || !$act)
{
return;
}
$args = new stdClass();
$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);
}
}
/* End of file adminlogging.controller.php */
/* Location: ./modules/adminlogging/adminlogging.controller.php */