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


PHP Template::addFile方法代码示例

本文整理汇总了PHP中Template::addFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::addFile方法的具体用法?PHP Template::addFile怎么用?PHP Template::addFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Template的用法示例。


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

示例1: Template

<?php

$menu = 0;
include "includes/lock.php";
$tpl = new Template("view/templates/default_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/home/home.html");
include "includes/config.php";
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:8,代码来源:home.php

示例2: Template

<?php

$menu = 0;
include "includes/lock.php";
$tpl = new Template("view/templates/default_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/usuario/meusdados.html");
include "includes/config.php";
$tpl->HEADER_TITLE = "Gerenciar Meus Dados";
$tpl->HEADER_BREAD_CRUMB = '<li><a href="home-home"><i class="fa fa-home"> </i> Home</a></li>
                                         <li class="active">Meus Dados</li>';
$usu = new Usuario();
$unidade = new Unidade();
$perfil = new Perfil();
$tpl->LABEL = "Editar Meus Dados";
$tpl->ACAO = "meus";
$tpl->IMG_USER = "<img src='img/users/user.png' class='file-preview-image' alt='imagem do usuário' title='imagem do usuário'>";
$usu->getById($_SESSION['zurc.userId']);
$tpl->nome = $usu->nome;
$tpl->email = $usu->email;
$tpl->senha = "";
$tpl->ID_RASH = $usu->md5_encrypt($usu->id);
$tpl->IMG_USER = "img/users/" . $usu->foto;
if (strlen($usu->foto) > 0) {
    $tpl->IMG_USER = "<img src='img/users/" . $usu->foto . "' class='file-preview-image' alt='imagem do usuário' title='imagem do usuário''>";
}
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:26,代码来源:meusDados.php

示例3: Template

<?php

require "src/scripts/conecta.php";
require "src/scripts/restrito.php";
include "src/scripts/functions.php";
require "src/classes/Template.class.php";
include_once "src/classes/Users.class.php";
include "src/classes/Contratos.class.php";
redirectByPermission(2);
// SETAR PERMISSÃO DA PÁGINA
$tpl = new Template('html_libs/template_ope.html');
$tpl->addFile("MENU", 'html_libs/ope_secondMenu.html');
$tpl->addFile("CONTEUDO", 'html_libs/ope_index.html');
$tpl->block('SHOW_1STBUTTON');
$nivel = $_SESSION['nivel'];
if (isset($_GET['data_ref']) && (strlen($_GET['data_ref']) >= 6 && strlen($_GET['data_ref']) <= 7)) {
    $mes = explode("-", $_GET['data_ref']);
    $mes_ant = $mes[0];
    $ano = $mes[1];
    $tpl->MES_ANT = getMesNome($mes_ant, false);
    $tpl->ANO = $ano;
} else {
    $mes_ant = Date('n') > 1 ? Date('n') - 1 : 12;
    $ano = Date('n') > 1 ? Date('Y') : Date('Y') - 1;
    $tpl->MES_ANT = getMesNome($mes_ant, false);
    $tpl->ANO = $ano;
}
for ($i = 1; $i <= 12; $i++) {
    $tpl->MESREF = $i . "-" . Date('Y');
    $tpl->MESANOREF = getMesNome($i) . "/" . Date('y');
    $tpl->block('EACH_MESMENU');
开发者ID:gtoshinakano,项目名称:sigup_daee,代码行数:31,代码来源:ope_index.php

示例4: Template

<?php

$tpl = new Template("view/templates/blank_page.html");
$tpl->addFile("CONTENT", "view/index/recuperarSenha.html");
$tpl->addFile("INC_LATERAL_DIREITA", "view/includes/lateral_direita.html");
include "includes/montaEmpresa.php";
include "includes/formLogin.php";
include "includes/mensagem.php";
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:9,代码来源:recuperarSenha.php

示例5: Template

<?php

$tpl = new Template("view/templates/login_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/login/ativar.html");
include "includes/mensagem.php";
$user = new Usuario();
if (isset($_REQUEST['id'])) {
    $idUser = $user->md5_decrypt($_REQUEST['id']);
    $user->getById($idUser);
    if ($user->id == null) {
        Message::setMensagem(1);
        header("Location:index-login");
        exit;
    } else {
        if ($user->ativo == "0") {
            $tpl->idrash = $_REQUEST['id'];
            $tpl->email = $user->email;
        } else {
            Message::setMensagem(11);
            header("Location:index-login");
            exit;
        }
    }
} else {
    Message::setMensagem(1);
    header("Location:index-login");
    exit;
}
$tpl->show();
开发者ID:rodharley,项目名称:patrimonio,代码行数:29,代码来源:ativar.php

示例6: Template

<?php

$menu = 7;
include "includes/lock.php";
$tpl = new Template("view/templates/default_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/publicacao/main.html");
include "includes/config.php";
$pub = new Publicacao();
$tpl->GRUPO = $pub->get_pasta_grupo($pub::ID_GRUPO_PARTICIPE);
$tpl->HEADER_TITLE = "Lista de Publicações";
$tpl->HEADER_BREAD_CRUMB = '<li><a href="home-home"><i class="fa fa-home"> </i> Home</a></li>
                                        <li><a href="publicacao-anote-main"><i class="fa fa-home"> </i> Publicações</a></li>
                                         <li class="active">Publicação - Listar</li>';
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:14,代码来源:main.php

示例7: handleError

<?php

session_start();
date_default_timezone_set('America/Sao_Paulo');
setlocale(LC_ALL, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.iso-8859-1', 'portuguese');
header('Content-Type: text/html; charset=iso-8859-1');
//setando a funcao de tratamento de erros geral
function handleError($errno, $errstr, $errfile, $errline, array $errcontext)
{
    // error was suppressed with the @-operator
    if (0 === error_reporting()) {
        return false;
    }
    throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler('handleError', E_ALL);
try {
    require_once "src/config/constants.php";
    require_once "zurc.php";
    $zurc = new Zurc();
    $zurc->loadClass();
    $zurc->start();
    $zurc->controllers();
    $zurc->end();
} catch (Exception $e) {
    $tpl = new Template("view/templates/blank_bootstrap_lteadmin.html");
    $tpl->addFile("CONTENT", "view/padrao/erro.html");
    $tpl->error_code = $e->getCode();
    $tpl->error_message = $e->getMessage();
    $tpl->show();
}
开发者ID:rodharley,项目名称:patrimonio,代码行数:31,代码来源:index.php

示例8: execucao

<?php

require "src/scripts/conecta.php";
require "src/scripts/restrito.php";
include "src/scripts/functions.php";
require "src/classes/Template.class.php";
include_once "src/classes/Users.class.php";
include_once "src/classes/Notas.class.php";
include_once "src/classes/Contratos.class.php";
redirectByPermission(100);
// SETAR PERMISSÃO DA PÁGINA
$inicio = execucao();
$tpl = new Template('html_libs/template_livre.html');
$tpl->addFile("JSCRIPT", 'cssjs_libs/js_parts/js_dof_marcarPago.html');
//$tpl->addFile("MENU", 'html_libs/ope_secondMenu.html');
//$tpl->block('EDITAR_MENU');
$nivel = $_SESSION['nivel'];
$tpl->addFile("CONTEUDO", 'html_libs/dof_marcarPago.html');
$sql_cont = "SELECT id FROM daee_contratos";
$query_cont = mysql_query($sql_cont);
$qtd = 0;
/*********************
	 MOSTRAR AUTOS EM FORM
	**********************/
if (mysql_num_rows($query_cont) > 0) {
    while ($res = mysql_fetch_array($query_cont)) {
        $contrato = new Contrato($res['id']);
        $tpl->AUTOS_ID = $res['id'];
        $tpl->AUTOS_NAME = $contrato->geraNome();
        $tpl->block('EACH_AUTOS');
    }
开发者ID:gtoshinakano,项目名称:sigup_daee,代码行数:31,代码来源:dof_marcarPago.php

示例9: Template

<?php

$menu = 2;
include "includes/lock.php";
$tpl = new Template("view/templates/default_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/perfil/list.html");
include "includes/config.php";
$tpl->HEADER_TITLE = "Lista de Perfis";
$tpl->HEADER_BREAD_CRUMB = '<li><a href="home-home"><i class="fa fa-home"> </i> Home</a></li>
                                        <li><a href="perfil-main"><i class="fa fa-users"> </i> Perfil</a></li>
                                         <li class="active">Listar</li>';
//INSTACIA CLASSES
$perfil = new Perfil();
//CONFIGURA O BREADCRUMB
$alist = $perfil->getRows(0, 9999, array(), array("empresa" => "=" . EMPRESA));
$tpl->QUANTIDADE = count($alist);
foreach ($alist as $key => $perfilario) {
    $tpl->disabled = "";
    $tpl->nome = $perfilario->descricao;
    $tpl->ID_HASH = $perfil->md5_encrypt($perfilario->id);
    $tpl->block("BLOCK_ITEM_LISTA");
}
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:23,代码来源:main.php

示例10: Template

<?php

$tpl = new Template("view/templates/blank_page.html");
$tpl->addFile("CONTENT", "view/index/ativar.html");
$tpl->addFile("INC_LATERAL_DIREITA", "view/includes/lateral_direita.html");
include "includes/montaEmpresa.php";
include "includes/formLogin.php";
include "includes/mensagem.php";
$user = new Usuario();
if (isset($_REQUEST['id'])) {
    $idUser = $user->md5_decrypt($_REQUEST['id']);
    $user->getById($idUser);
    if ($user->id == null) {
        Message::setMensagem(1);
        header("Location:index-home");
        exit;
    } else {
        if ($user->ativo == "0") {
            $tpl->idrash = $_REQUEST['id'];
            $tpl->email = $user->email;
        } else {
            Message::setMensagem(11);
            header("Location:index-home");
            exit;
        }
    }
} else {
    Message::setMensagem(1);
    header("Location:index-home");
    exit;
}
开发者ID:rodharley,项目名称:condominio,代码行数:31,代码来源:ativar.php

示例11: Template

<?php

$menu = 13;
include "includes/lock.php";
$tpl = new Template("view/templates/default_bootstrap_lteadmin.html");
$tpl->addFile("CONTENT", "view/servicos/main.html");
include "includes/config.php";
$pub = new Documento();
$tpl->GRUPO = $pub->get_pasta_grupo($pub::ID_GRUPO_BALANCETES);
$tpl->HEADER_TITLE = "Lista de Documentos";
$tpl->HEADER_BREAD_CRUMB = '<li><a href="home-home"><i class="fa fa-home"> </i> Home</a></li>
                                        <li><a href="servicos-balancetes-main"><i class="fa fa-file"> </i> Documentos</a></li>
                                         <li class="active">Documentos - Listar</li>';
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:14,代码来源:main.php

示例12: Template

<?php

$tpl = new Template("view/templates/blank_page.html");
$tpl->addFile("CONTENT", "view/publicacao/detalhe.html");
$tpl->addFile("INC_LATERAL_DIREITA", "view/includes/lateral_direita.html");
include "includes/montaEmpresa.php";
include "includes/formLogin.php";
include "includes/mensagem.php";
$pub = new Publicacao();
$pub->getById($pub->md5_decrypt($_REQUEST['id']));
$tpl->GRUPO = $pub->get_pasta_grupo($pub->grupo);
$tpl->TITULO = $pub->titulo;
$tpl->CONTEUDO = $pub->conteudo;
$tpl->DATA = $pub->getData($pub->data);
$tpl->LABEL_TITULO = $pub->get_titulo_grupo($pub->grupo);
$tpl->LABEL_ICONE = $pub->get_icone_grupo($pub->grupo);
$tpl->show();
开发者ID:rodharley,项目名称:condominio,代码行数:17,代码来源:detalhe.php

示例13: Mensagem

                }
                $tpl->clear('CLASSMENU');
            }
            //nomes e perfil de usuari9o
            $tpl->USUARIO = $_SESSION['ag_nomeUsuario'];
        }
        //mostrnado os menus
        if (isset($_SESSION['ag_idUsuario'])) {
            $tpl->block("MENU_PADRAO");
            $tpl->block("MENU_DE_NAVEGACAO");
        }
    }
    //fim se o template é padrao
    //montando a navegacao
    if ($arrayController[1] == "php") {
        $tpl->addFile("CONTEUDO", "templates/" . $arrayController[0] . ".html");
    } else {
        $tpl->addFile("CONTEUDO", "templates/" . $arrayController[0] . "." . $arrayController[1] . ".html");
    }
}
//fim do else nao for requisicao ajax
//carregando o módulo de alertas
if (isset($_SESSION['tupi.mensagem'])) {
    $oMensagem = new Mensagem();
    $oMensagem->getMensagem($_SESSION['tupi.mensagem']);
    $tipo = "";
    if ($oMensagem->tipo != "") {
        $tipo = 'alert-' . $oMensagem->tipo;
    }
    $tpl->ALERT = '<div class="alert ' . $tipo . '"><a class="close" data-dismiss="alert">x</a>' . utf8_decode($oMensagem->mensagem) . '</div>';
    unset($_SESSION['tupi.mensagem']);
开发者ID:rodharley,项目名称:obrademaria,代码行数:31,代码来源:tupi.template.inicializar.php

示例14: execucao

require "src/scripts/conecta.php";
require "src/scripts/restrito.php";
include "src/scripts/functions.php";
require "src/classes/Template.class.php";
include "src/classes/Users.class.php";
include "src/classes/UnidadeCons.class.php";
include "src/classes/Notas.class.php";
include_once "src/classes/Relatorio.class.php";
//$tpl->TESTE = $emp->getServicos()[2]->children();
redirectByPermission(0);
// SETAR PERMISSÃO DA PÁGINA
$inicio = execucao();
$tpl = new Template('html_libs/template_livre.html');
$tpl->MENU_NAME = "Relatórios desta UC nos anos de:";
$tpl->addFile('JSCRIPT', 'cssjs_libs/js_parts/js_udd_ucDetalhes.html');
$anoAtual = isset($_GET['ano']) && $_GET['ano'] >= 2012 && $_GET['ano'] <= Date('Y') ? $_GET['ano'] : Date('Y');
$anoAnterior = $anoAtual - 1;
if (isset($_GET['chave'])) {
    $chave = mysql_real_escape_string($_GET['chave']);
    if (strlen($chave) == 40) {
        $queryVerif = mysql_query("SELECT id FROM daee_uddc WHERE SHA1(id) = '" . $_GET['chave'] . "'");
        $tpl->CHAVE = $chave;
        if (mysql_num_rows($queryVerif)) {
            /***********************
            			 MOSTRAR MENU COM ANOS
            			***********************/
            $iMin = 2012;
            $iCalc = $anoAtual - 5;
            $iFor = $iCalc < $iMin ? $iMin : $iCalc;
            for ($i = $iFor; $i <= Date('Y'); $i++) {
开发者ID:gtoshinakano,项目名称:sigup_daee,代码行数:30,代码来源:resumo_uc.php

示例15: execucao

<?php

require "src/scripts/conecta.php";
require "src/scripts/restrito.php";
include "src/scripts/functions.php";
require "src/classes/Template.class.php";
include_once "src/classes/Users.class.php";
include_once "src/classes/Notas.class.php";
include_once "src/classes/Contratos.class.php";
redirectByPermission(2);
// SETAR PERMISSÃO DA PÁGINA
$inicio = execucao();
$tpl = new Template('html_libs/template_ope.html');
$tpl->addFile("MENU", 'html_libs/ope_secondMenu.html');
$tpl->block('EDITAR_MENU');
$nivel = $_SESSION['nivel'];
$periodo = isset($_GET['periodo']) ? $_GET['periodo'] : 2;
if (isset($_GET['chave']) && strlen($_GET['chave']) == 40) {
    //$tpl->addFile("CONTEUDO", 'html_libs/ope_index.html');
    return;
} else {
    $tpl->addFile("CONTEUDO", 'html_libs/ope_apagarNotas.html');
    $sql_cont = $_SESSION['nivel'] != 1 ? "SELECT id FROM daee_contratos WHERE permissao={$nivel}" : "SELECT id FROM daee_contratos";
    $query_cont = mysql_query($sql_cont);
    $qtd = 0;
    if (mysql_num_rows($query_cont) > 0) {
        $i = 1;
        while ($res = mysql_fetch_array($query_cont)) {
            $contrato = new Contrato($res['id']);
            $tpl->AUTOS = $i . " - " . $contrato->geraNome();
            $tpl->PERIODO = $periodo;
开发者ID:gtoshinakano,项目名称:sigup_daee,代码行数:31,代码来源:ope_apagarNotas.php


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