当前位置: 首页>>代码示例>>PHP>>正文


PHP load_layout函数代码示例

本文整理汇总了PHP中load_layout函数的典型用法代码示例。如果您正苦于以下问题:PHP load_layout函数的具体用法?PHP load_layout怎么用?PHP load_layout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了load_layout函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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');
 }
开发者ID:nvmanh,项目名称:codeigniter-shop,代码行数:57,代码来源:MY_Controller.php

示例2: load_layout

* 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();
?>
"/>
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:dbs.php

示例3: function

,
        			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 
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:policy.php

示例4: ossim_db

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"/>
    
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:30,代码来源:agentless.php

示例5: load_layout

		<?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;
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:policy.php


注:本文中的load_layout函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。