Example #1
0
 /**
  * Constructor
  *
  * @access    public
  * @category  Constructor
  * @package   Open-AudIT
  * @author    Mark Unwin <*****@*****.**>
  * @license   http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
  * @link      http://www.open-audit.org
  * @return    Admin
  */
 public function __construct()
 {
     parent::__construct();
     $this->load->model('m_system');
     // No need for user to be logged in
     // Have to be able to submit systems via the audit script
     $this->data['title'] = 'Open-AudIT';
     $this->load->library('session');
     // log the attempt
     $this->load->helper('log');
     $log_details = new stdClass();
     $log_details->severity = 6;
     stdlog($log_details);
     unset($log_details);
     $this->load->helper('report_helper');
     check_default_reports();
     $this->load->helper('group_helper');
     check_default_groups();
     $this->load->model('m_oa_config');
     $this->m_oa_config->load_config();
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     $this->load->library('session');
     $this->load->helper('url');
     $this->load->helper('form');
     $this->load->helper('log');
     $this->load->model('m_oa_config');
     $this->m_oa_config->load_config();
     $this->load->helper('report_helper');
     check_default_reports();
     $this->load->helper('group_helper');
     if ($this->config->config['internal_version'] >= '20160620') {
         check_default_groups();
     }
     // log the attempt
     $log_details = new stdClass();
     $log_details->severity = 6;
     stdlog($log_details);
     unset($log_details);
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     // must be an admin to access this page
     $this->load->model('m_oa_user');
     $this->m_oa_user->validate_user();
     if ($this->user->admin != 'y') {
         if (isset($_SERVER['HTTP_REFERER']) and $_SERVER['HTTP_REFERER'] > "") {
             redirect($_SERVER['HTTP_REFERER']);
         } else {
             redirect('main/list_groups');
         }
     }
     $this->load->helper('log');
     // log the attempt
     $log_details = new stdClass();
     $log_details->severity = 6;
     stdlog($log_details);
     unset($log_details);
     $this->load->helper('report_helper');
     check_default_reports();
     $this->load->helper('group_helper');
     check_default_groups();
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->data['title'] = 'Open-AudIT';
     $this->load->helper('url');
     $this->load->helper('network');
     $this->load->helper('ssh');
     $this->load->helper('wmi');
     $this->load->library('session');
     $this->load->model('m_system');
     $this->load->model('m_oa_config');
     $this->m_oa_config->load_config();
     $timestamp = $this->config->config['timestamp'];
     // log the attempt
     $this->load->helper('log');
     $log_details = new stdClass();
     $log_details->severity = 6;
     stdlog($log_details);
     unset($log_details);
     $this->load->helper('report_helper');
     check_default_reports();
     $this->load->helper('group_helper');
     check_default_groups();
 }
Example #5
0
 public function get_group_access($group_id = '1', $user_id = '0')
 {
     $sql = "SELECT COUNT(*) as `count` FROM oa_group";
     $query = $this->db->query($sql);
     $row = $query->row();
     if (intval($row->count) == 0) {
         # We have no groups as yet - make them
         $this->load->helper('group_helper');
         check_default_groups();
     }
     if ($group_id == '0') {
         $group_id = '1';
     }
     $sql = "SELECT group_user_access_level FROM oa_group_user WHERE user_id = ? AND group_id = ? LIMIT 1";
     $sql = $this->clean_sql($sql);
     $data = array("$user_id", "$group_id");
     $query = $this->db->query($sql, $data);
     $row = $query->row();
     if (!empty($row->group_user_access_level)) {
         return $row->group_user_access_level;
     } else {
         return 0;
     }
 }
Example #6
0
 public function list_reports()
 {
     $this->load->helper('report_helper');
     check_default_reports();
     $this->load->helper('group_helper');
     check_default_groups();
     $this->load->model("m_oa_report");
     echo json_encode($this->m_oa_report->list_reports_in_menu());
 }