XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
adminlogging.controller.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
13 {
14 
19  function init()
20  {
21  // forbit access if the user is not an administrator
22  $oMemberModel = getModel('member');
23  $logged_info = $oMemberModel->getLoggedInfo();
24  if($logged_info->is_admin != 'Y')
25  {
26  return $this->stop("msg_is_not_administrator");
27  }
28  }
29 
34  function insertLog($module, $act)
35  {
36  if(!$module || !$act)
37  {
38  return;
39  }
40 
41  $args = new stdClass();
42  $args->module = $module;
43  $args->act = $act;
44  $args->ipaddress = $_SERVER['REMOTE_ADDR'];
45  $args->regdate = date('YmdHis');
46  $args->requestVars = print_r(Context::getRequestVars(), TRUE);
47 
48  $output = executeQuery('adminlogging.insertLog', $args);
49  }
50 
51 }
52 /* End of file adminlogging.controller.php */
53 /* Location: ./modules/adminlogging/adminlogging.controller.php */
$output
Definition: ko.install.php:193
$act
a string value to contain the action name
$args
Definition: ko.install.php:185
getModel($module_name)
Definition: func.inc.php:145
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
Definition: func.inc.php:203
$module
Class name of Xe Module that is identified by mid.