本文整理汇总了PHP中view::loadHeadElems方法的典型用法代码示例。如果您正苦于以下问题:PHP view::loadHeadElems方法的具体用法?PHP view::loadHeadElems怎么用?PHP view::loadHeadElems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类view
的用法示例。
在下文中一共展示了view::loadHeadElems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
<?php
session_start();
include_once "includes/class.view.php";
$vista = new view();
$headParam = array('JQUERY', 'JQUERYUI', 'BOOTSTRAP', 'DATATABLES', 'EDWSDK', 'js/init.js', array('tipo' => 'title', 'content' => 'Prueba de sdk'));
$vista->loadHeadElems($headParam);
$body = $vista->loadInclude('partes/header.php', 'return', $permisos);
$seccion = "administracion";
$modulo = "servicios";
$perm = $permisos->auth($modulo);
if ($perm === true) {
$sub = @$_GET["sub"] != "" ? $_GET["sub"] : "index";
$body .= $vista->loadInclude("partes/{$seccion}/{$sub}.php", 'return', $permisos);
} else {
$body .= $perm;
}
//*/
# escribe todo
$vista->loadBody($body);
$vista->writeHTML();
unset($vista);
示例2: header
<?php
session_start();
//en esta sección se configuran las variables de conexión para las clases
if (@$_SESSION["logged"] == true) {
header("location: {$_GET["redir"]}");
}
include_once "includes/class.view.php";
$vista = new view();
$vista->loadHeadElems('JQUERY');
$vista->loadHeadElems('EDWSDK');
$vista->loadHeadElems('BOOTSTRAP');
$headParam[] = array('tipo' => 'script', 'attr' => array('type' => 'text/javascript', 'src' => 'js/init.js'));
$vista->loadHeadElems($headParam);
//$vista->loadBody("aquí se usará el codigo para login");
$params["redir"] = $_GET["redir"];
$vista->loadInclude("partes/login/login.php", 'add', $params);
$vista->writeHTML();