示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->data = array();
     $this->error = array();
     // Load theme and template
     $this->load->helper('themes');
     load_layout('default');
     $CI = get_instance();
     $CI->load->library('Asset');
     // Work out module, controller and method and make them accessable throught the CI instance
     $CI->module = $this->module = $this->router->fetch_module();
     $CI->controller = $this->controller = $this->router->fetch_class();
     $CI->method = $this->method = $this->router->fetch_method();
     // Get meta data for the module
     $this->template->module_details = $CI->module_details = $this->module_details = $CI->module;
     Asset::add_path('module', APPPATH . 'modules/' . $CI->module . '/views/');
     // Theme directory path
     Asset::add_path('theme', APPPATH . 'themes/default/');
     Asset::set_path('theme');
     // Load language
     //Get language that was set in db
     $lang_cd = 'en';
     $lang_name = 'english';
     $CI->load->model('setting/setting_model');
     $row = $CI->setting_model->getSetting('config', 'config_language');
     if (isset($row)) {
         $lang_cd = isset($row['config_language']) ? $row['config_language'] : 'en';
         if ($lang_cd === 'vi') {
             $lang_name = 'vietnamese';
         }
     }
     $CI->session->set_userdata('config_language', $lang_cd);
     // Get language id from language table and set to session
     $where = array();
     $where['status'] = 1;
     $where['code'] = $lang_cd;
     $CI->db->select('language_id');
     $query = $CI->db->get_where('language', $where);
     $result = $query->row_array();
     if (isset($result['language_id'])) {
         $CI->session->set_userdata('config_language_id', $result['language_id']);
     }
     // Load config
     $this->load->helper('setting');
     get_setting_to_session();
     // Load information for header
     $this->data['logo_img'] = base_url() . 'uploads/' . $this->session->userdata('config_logo');
     // Load menu
     $this->load->helper('menu_page');
     menu_page($this->data);
     // Load footer
     $this->data['shop_name'] = $this->session->userdata('config_name');
     $this->data['shop_address'] = $this->session->userdata('config_address');
     $this->data['shop_telephone'] = $this->session->userdata('config_telephone');
     $this->data['shop_email'] = $this->session->userdata('config_email');
 }
示例#2
0
文件: dbs.php 项目: jackpf/ossim-arc
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck('analysis-menu', 'EventsForensics');
if (!Session::is_pro()) {
    Session::unallowed_section(NULL, 'noback');
}
// load column layout
require_once '../conf/layout.php';
$category = "policy";
$name_layout = "databases_layout";
$layout = load_layout($name_layout, $category);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title> <?php 
echo gettext("OSSIM Framework");
?>
 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
	<meta http-equiv="Pragma" content="no-cache"/>
	<meta http-equiv="X-UA-Compatible" content="IE=7" />
	<link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
示例#3
0
,
        			onDblClick: function(rowid) {
        				document.location.href = 'newpolicyform.php?ctx=<?php 
    echo $group->get_ctx();
    ?>
&id='+urlencode(rowid);
        			},
        			onSuccess: function() {
        				$('.tiptip').tipTip();
        			}
        		});   
        		
        		<?php 
    // load state from user_config
    $group_layout = "group_layout_" . $group->get_group_id() . "_" . $group->get_ctx();
    $state = load_layout($group_layout, 'policy');
    if ($state != "" && !is_array($state)) {
        if ($state == "close") {
            echo "\$('#flextable_eng_{$i}').viewTableToggle();\n";
        }
    } elseif ($i > 0) {
        echo "\t\$('#flextable_eng_{$i}').viewTableToggle();\n";
    }
    $i++;
}
?>
        });
        
        function refresh_all() 
        {
        	<?php 
示例#4
0
Session::logcheck('environment-menu', 'EventsHidsConfig');
//Current sensor
$sensor_id = $_SESSION['ossec_sensor'];
$db = new ossim_db();
$conn = $db->connect();
$s_data = Ossec_utilities::get_sensors($conn, $sensor_id);
$sensor_opt = $s_data['sensor_opt'];
$db->close();
//Check available sensors
if (!is_array($s_data['sensors']) || empty($s_data['sensors'])) {
    $styles = 'width: 90%; text-align:left; margin: 50px auto;';
    echo ossim_error(_('There is no sensor available'), AV_INFO, $styles);
    exit;
}
/* Layout Load */
$layout = load_layout('agentless_layout', 'agentless');
$default = array('hostname' => array(_('Hostname'), 220, 'true', 'left', FALSE), 'ip' => array(_('IP'), 140, 'true', 'center', FALSE), 'user' => array(_('User'), 180, 'true', 'center', FALSE), 'status' => array(_('Status'), 50, 'true', 'center', FALSE), 'descr' => array(_('Description'), 570, 'true', 'left', FALSE));
list($colmodel, $sortname, $sortorder, $height) = print_layout($layout, $default, 'hostname', 'asc', 300);
$db->close();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title> <?php 
echo _('OSSIM Framework');
?>
 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    
示例#5
0
		<?php 
    }
    ?>
		onColumnChange: save_layout_<?php 
    echo $group->get_group_id();
    ?>
,
		onDblClick: linked_to,
		onEndResize: save_layout_<?php 
    echo $group->get_group_id();
    ?>
	});   
	
<?php 
    // load state from user_config
    $state = load_layout("group" . $group->get_group_id(), $category);
    if ($state != "" && !is_array($state)) {
        if ($state == "close") {
            echo "\t\$(\"#flextable" . $i . "\").viewTableToggle();\n";
        }
    } elseif ($i > 0) {
        echo "\t\$(\"#flextable" . $i . "\").viewTableToggle();\n";
    }
    $i++;
}
$db->close($conn);
?>
	});
	function refresh_all() {
		<?php 
echo $refresh;