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


PHP Template::show方法代码示例

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


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

示例1: hookAccessDenied

 /**
  * Show access denied page
  */
 public function hookAccessDenied()
 {
     flash('event.404', FALSE);
     $this->request();
     $tpl = new Template('Access/templates/denied');
     $tpl->show();
 }
开发者ID:brussens,项目名称:cogear2,代码行数:10,代码来源:Gear.php

示例2: index

 /**
  * Default dispatcher
  *
  * @param string $action
  * @param string $subaction
  */
 public function index($type = NULL)
 {
     $q = $this->input->get('q');
     page_header($q ? t('Search results for «%s»', $q) : t('Search'));
     $tpl = new Template('Search/templates/form');
     $tpl->action = l('/search/') . $type;
     $q && ($tpl->value = $q);
     $tpl->show('info');
     new Menu_Tabs(array('name' => 'search', 'elements' => array('posts' => array('label' => t('Посты'), 'link' => l('/search' . ($q ? '?q=' . $q : '')), 'active' => check_route('search$')), 'blogs' => array('label' => t('Блоги'), 'link' => l('/search/blogs' . ($q ? '?q=' . $q : '')), 'active' => check_route('search/blogs')), 'users' => array('label' => t('Пользователи'), 'link' => l('/search/users' . ($q ? '?q=' . $q : '')), 'active' => check_route('search/users')), 'comments' => array('label' => t('Комментарии'), 'link' => l('/search/comments' . ($q ? '?q=' . $q : '')), 'active' => check_route('search/comments')))));
     if (!$q) {
         return event('empty');
     }
     switch ($type) {
         case 'blogs':
             new Blog_List(array('name' => 'search.blogs', 'like' => array(array('name', $q, 'both'), array('login', $q, 'both'), array('body', $q, 'both'))));
             break;
         case 'users':
             new User_List(array('name' => 'search.users', 'where' => array('login !=' => ''), 'like' => array(array('name', $q, 'both'), array('login', $q, 'both'))));
             break;
         case 'comments':
             new Comments_List(array('name' => 'search.comments', 'where' => array('published' => 1), 'like' => array(array('body', $q, 'both')), 'per_page' => config('User.comments.per_page', 10), 'flat' => TRUE));
             break;
         default:
             new Post_List(array('name' => 'search.posts', 'where' => array('published' => 1), 'like' => array(array('name', $q, 'both'), array('body', $q, 'both'))));
     }
 }
开发者ID:brussens,项目名称:cogear2,代码行数:32,代码来源:Gear.php

示例3: hookPostComments

 /**
  * Hook post comments
  */
 public function hookPostComments($after)
 {
     if ($after->object()->allow_comments) {
         if (access('images.upload')) {
             $tpl = new Template('Image/templates/upload');
             $tpl->show('after');
             js($this->folder . '/js/markitup.js');
         }
     }
 }
开发者ID:brussens,项目名称:cogear2,代码行数:13,代码来源:Gear.php

示例4: getFile

 public function getFile($nameFile, $vars)
 {
     //echo ": ",$nameFile, ': ',var_dump($vars);
     require_once 'include/Template.php';
     $FileTemplate = new Template();
     $FileTemplate->setTemplate($nameFile);
     if (count($vars) > 0) {
         $FileTemplate->setvars($vars);
     }
     return $FileTemplate->show();
 }
开发者ID:oswaldo9211,项目名称:Proyecto-Web,代码行数:11,代码来源:InvCtrl.php

示例5: index

 /**
  * Default dispatcher
  * 
  * @param string $action
  * @param string $subaction 
  */
 public function index($action = '')
 {
     $this->router->getSegments(0) != 'install' && redirect('/install/');
     switch ($action) {
         case 'requirements':
             $tpl = new Template('install.requirements');
             $tpl->show();
             break;
         default:
         case 'welcome':
             $tpl = new Template('install.welcome');
             $tpl->show();
     }
 }
开发者ID:romartyn,项目名称:cogear,代码行数:20,代码来源:Gear.php

示例6: get

 public static function get($value_DGFSrtfg5, $data_kGdfgdf = null)
 {
     $name_fgdfgdf = str_replace('.', '/', $value_DGFSrtfg5);
     if (!is_null($data_kGdfgdf)) {
         foreach ($data_kGdfgdf as $key => $value2) {
             ${$key} = $value2;
         }
     }
     //
     ob_start();
     // start output buffering
     //get File
     //
     $name_fgdfgdf = str_replace('.', '/', $value_DGFSrtfg5);
     //
     $link1 = '../app/views/' . $name_fgdfgdf . '.php';
     $link2 = '../app/views/' . $name_fgdfgdf . '.tpl.php';
     $link3 = '';
     //
     $tpl = false;
     //
     if (file_exists($link1)) {
         $link3 = $link1;
         $tpl = false;
     } else {
         if (file_exists($link2)) {
             $link3 = $link2;
             $tpl = true;
         } else {
             $link3 = $name_fgdfgdf;
             $tpl = false;
         }
     }
     //
     //Show the output
     if ($tpl) {
         self::$showed = "tpl";
         Template::show($link3, $data_kGdfgdf);
     } else {
         self::$showed = "smpl";
         include $link3;
     }
     //
     $returned_value = ob_get_contents();
     // get contents from the buffer
     ob_end_clean();
     //
     return $returned_value;
 }
开发者ID:amineabri,项目名称:Fiesta,代码行数:49,代码来源:Views.php

示例7: UnidadeConsumidora

            //$tpl->UCID		= $res;
            $uc = new UnidadeConsumidora($res);
            $tpl->UCRGI = $uc->get('rgi');
            $tpl->UCCHAVE = sha1($uc->get('id'));
            $tpl->UCNOME = $uc->getNome();
            $tpl->UCEND = $uc->getEndereco();
            $tpl->UCCID = $uc->getCidadeNome();
            $tpl->UCSIGLA = $uc->get('uo')->getSigla();
            $tpl->EMPRESA = $uc->get('empresa')->getNome();
            $tpl->STATUS = $uc->getAtivoText();
            $totalAno = $uc->somaValorNotas($anoAtual);
            $tpl->CONSANO = tratarValor($totalAno['SUM(consumo)'], false);
            $tpl->VALANO = tratarValor($totalAno['SUM(valor)'], true);
            $consAnoTotal[$x] += $totalAno['SUM(consumo)'];
            $pagoAnoTotal[$x] += $totalAno['SUM(valor)'];
            $ucqtd++;
            $tpl->block("EACH_UC");
        }
        $tpl->UCQTD = $ucqtd;
        //$tpl->TIPO_NOME .= " " . $ucqtd;
        $tpl->SOMACONSANO = tratarValor($consAnoTotal[$x]);
        $tpl->SOMAPAGOANO = tratarValor($pagoAnoTotal[$x], true);
        $x++;
        $tpl->block("EACH_TIPO");
    }
}
$fim = execucao();
$tempo = number_format($fim - $inicio, 6);
$tpl->EXECTIME = "Tempo de Execução: <b>" . $tempo . "</b> segundos";
$tpl->show();
开发者ID:gtoshinakano,项目名称:sigup_daee,代码行数:30,代码来源:udd_relatorioUC.php

示例8: Template

    $tpl->block("BLOCK_CAMPOOCULTO");
    //Resposta
    $tpl->CAMPOOCULTO_NOME = "r";
    $tpl->CAMPOOCULTO_VALOR = "{$resposta}";
    $tpl->block("BLOCK_CAMPOOCULTO");
    //E-mail md5
    $tpl->CAMPOOCULTO_NOME = "e";
    $tpl->CAMPOOCULTO_VALOR = "{$emailmd5}";
    $tpl->block("BLOCK_CAMPOOCULTO");
    $tpl->show();
    //BOTÕES DO FINAL DO FORMULÁRIO
    $tpl2 = new Template("templates/botoes1.html");
    $tpl2->block("BLOCK_LINHAHORIZONTAL_EMCIMA");
    //Salvar
    $tpl2->block("BLOCK_BOTAOPADRAO_SUBMIT");
    $tpl2->block("BLOCK_BOTAOPADRAO_CONTINUAR");
    $tpl2->block("BLOCK_BOTAOPADRAO");
    $tpl->block("BLOCK_CONTEUDO");
    $tpl2->block("BLOCK_COLUNA");
    $tpl2->block("BLOCK_LINHA");
    $tpl2->block("BLOCK_BOTOES");
    $tpl2->show();
} else {
    echo 'Por favor, não tente recuperar a senha através métodos não padrões!';
}
?>
        </div>        

    </div>
</body>
开发者ID:mauriciowitzgall,项目名称:SGAF,代码行数:30,代码来源:novasenha.php

示例9: admin_action

 /**
  * Панель управления меню
  *
  * @param type $action
  */
 public function admin_action($action = NULL, $subaction = NULL, $param = NULL)
 {
     $this->theme->hookAdminMenu();
     $this->hookAdminMenu();
     if (!$action) {
         $menus = menu();
         $menus->order('position', 'ASC');
         if ($result = $menus->findAll()) {
             jqueryui();
             $tpl = new Template('Menu/Db/templates/list');
             $tpl->menus = $result;
             $tpl->show();
         } else {
             return event('empty');
         }
     } else {
         Menu_Db::template('Menu/templates/simple', t('Простой список'));
         Menu_Db::template('Bootstrap/templates/tabs', t('Табы Bootstrap'));
         Menu_Db::template('Bootstrap/templates/pills', t('Пилюли Bootstrap'));
         $form = new Form('Menu/forms/menu');
         $form->template->setValues(Menu_Db::$templates);
         $menu = new Menu_Db();
         if ($action == 'create') {
             $menu->object()->options = new Core_ArrayObject(array('template' => 'Bootstrap/templates/navbar', 'multiple' => 0, 'title' => 0));
             $form->remove('delete');
         } else {
             $menu->id = $action;
             if ($menu->find()) {
                 $form->object($menu);
                 $form->template->setValue($menu->object()->options->template);
                 $form->multiple->setValue($menu->object()->options->multiple);
                 $form->title->setValue($menu->object()->options->title);
             } else {
                 return event('empty');
             }
         }
         if ($result = $form->result()) {
             if ($result->delete && $menu->delete()) {
                 flash_success(t('Меню «%s» удалено!', $menu->name));
                 redirect(l('/admin/theme/menu'));
             }
             $menu->object()->options->template = $result->template;
             $menu->object()->options->multiple = $result->multiple;
             $menu->object()->options->title = $result->title;
             $menu->object()->name = $result->name;
             $menu->object()->machine_name = $result->machine_name;
             if ($menu->save()) {
                 flash_success($action == 'create' ? t('Меню «%s» создано успешно!', $menu->name) : t('Меню «%s» было успешно отредактировано!', $menu->name), '', 'growl');
                 redirect(l('/admin/theme/menu'));
             }
         }
         $form->show();
     }
 }
开发者ID:brussens,项目名称:cogear2,代码行数:59,代码来源:Gear.php

示例10: die

    $tpl8->USUARIO_GRUPO = $permissao_nome;
}
//Caixa Abrir Encerrar e Vendas
if ($usuario_grupo == 4) {
    if ($usuario_caixa_operacao == "") {
        $tpl8->block("BLOCK_CAIXA_ABRIR");
    } else {
        $tpl8->ENCERRARCAIXA = "{$usuario_caixa_operacao}";
        $tpl8->block("BLOCK_CAIXA_ENCERRAR");
        $tpl8->block("BLOCK_VENDAS");
        $tpl8->NUMEROOPERACAO = "{$usuario_caixa_operacao}";
        $tpl8->block("BLOCK_CAIXA_FLUXO");
    }
}
//Troca Unidade
//Pega todos os quisoque que o usuario é supervisor ou caixa
$sql = "select distinct qui_codigo\nfrom quiosques \njoin quiosques_supervisores on quisup_quiosque=qui_codigo\nwhere quisup_supervisor={$usuario_codigo}\nUNION\nselect distinct cai_quiosque\nfrom caixas_operadores\njoin caixas on cai_codigo=caiope_caixa\nwhere caiope_operador={$usuario_codigo}";
$query = mysql_query($sql);
if (!$query) {
    die("Erro: " . mysql_error());
}
$qtdquiosques = mysql_num_rows($query);
if ($usuario_grupo == 1 || $usuario_grupo == 2 || $usuario_grupo == 3 && $qtdquiosques > 1 || $usuario_grupo == 4 && $qtdquiosques > 1) {
    $tpl8->QUIOSQUE_COD = "";
    $tpl8->COOPERATIVA_COD = "";
    $tpl8->block("BLOCK_TROCA_QUIOSQUE");
}
//Contato
$tpl8->block("BLOCK_SUPORTE");
$tpl8->show();
开发者ID:mauriciowitzgall,项目名称:SGAF,代码行数:30,代码来源:cabecalho.php

示例11: VALUES

while ($dados = mysql_fetch_assoc($query)) {
    $taxa = $dados["quitax_taxa"];
    $taxaref = $dados["quitax_valor"];
    $taxavalor = $valorbruto * $taxaref / 100;
    $sql5 = "\n    INSERT INTO\n        acertos_taxas (\n            acetax_acerto,\n            acetax_taxa,\n            acetax_referencia,\n            acetax_valor\n        )\n    VALUES (\n        '{$ultimo}',\n        '{$taxa}',\n        '{$taxaref}',\n        '{$taxavalor}'\n    )";
    $query5 = mysql_query($sql5);
    if (!$query5) {
        die("Erro5:" . mysql_error());
    }
}
//Atribuir como acertado os produtos vendidos
$sql8 = "\nUPDATE\n    saidas_produtos \n    join produtos on (saipro_produto=pro_codigo)\n    join produtos_tipo on (pro_tipocontagem=protip_codigo) \n    join entradas on (saipro_lote=ent_codigo)\n    join saidas on (sai_codigo=saipro_saida)\nSET \n    saipro_acertado='{$ultimo}'\nWHERE \n    saipro_acertado=0 and\n    ent_fornecedor={$fornecedor} and\n    sai_datacadastro BETWEEN '{$datade}' AND '{$dataate}' and\n    ent_quiosque={$usuario_quiosque} and\n    ent_tiponegociacao=1 and\n    sai_tipo=1 and\n    sai_status=1\n";
$query8 = mysql_query($sql8);
if (!$query8) {
    die("Erro8:" . mysql_error());
}
$tpl6 = new Template("templates/notificacao.html");
$tpl6->ICONES = $icones;
$tpl6->block("BLOCK_CONFIRMAR");
//$tpl6->block("BLOCK_CADASTRADO");
$tpl6->MOTIVO = "O acerto foi registrado com sucesso!";
$tpl6->LINK = "acertos_cadastrar3.php?codigo={$ultimo}&operacao=imprimir";
$tpl6->block("BLOCK_MOTIVO");
$tpl6->PERGUNTA = "Deseja imprimir o relatórios do acerto?";
$tpl6->block("BLOCK_PERGUNTA");
$tpl6->NAO_LINK = "acertos.php";
$tpl6->LINK_TARGET = "_blank";
$tpl6->block("BLOCK_BOTAO_NAO_LINK");
$tpl6->block("BLOCK_BOTAO_SIMNAO");
$tpl6->show();
include "rodape.php";
开发者ID:mauriciowitzgall,项目名称:SGAF,代码行数:31,代码来源:acertos_cadastrar2.php

示例12: Template

    $tpl4->block("BLOCK_BOTOES");
    $tpl4->show();
}
if ($botaofechar == 1) {
    $tpl4 = new Template("templates/botoes1.html");
    //Botão Fechar
    $tpl4->block("BLOCK_LINHAHORIZONTAL_EMCIMA");
    $tpl4->block("BLOCK_COLUNA_LINK_FECHAR");
    $tpl4->COLUNA_LINK_ARQUIVO = "";
    $tpl4->block("BLOCK_COLUNA_LINK");
    $tpl4->block("BLOCK_BOTAOPADRAO_SIMPLES");
    $tpl4->block("BLOCK_BOTAOPADRAO_FECHAR");
    $tpl4->block("BLOCK_BOTAOPADRAO_AUTOFOCO");
    $tpl4->block("BLOCK_BOTAOPADRAO");
    $tpl->block("BLOCK_CONTEUDO");
    $tpl4->block("BLOCK_COLUNA");
    $tpl4->block("BLOCK_LINHA");
    $tpl4->block("BLOCK_BOTOES");
    $tpl4->show();
}
?>
<!--sai_totalbruto, 
sai_descontopercentual, 
sai_descontovalor, 
sai_totalcomdesconto, 
sai_valorecebido, 
sai_troco, 
sai_trocodevolvido, 
sai_descontoforcado, 
sai_acrescimoforcado, 
sai_totalliquido,-->
开发者ID:mauriciowitzgall,项目名称:SGAF,代码行数:31,代码来源:saidas_ver.php

示例13: _display_results

function _display_results(SearchResult $result, $result_header = '')
{
    $proj_count = $result->project_count();
    $proj_plural = $proj_count == 1 ? '' : 's';
    $task_count = $result->task_count();
    $task_plural = $task_count == 1 ? '' : 's';
    $project_results = new Template('results');
    $result_header = $result_header == '' ? $result->name() : $result_header;
    $project_results->set('result_header', $result_header, 'project_header', $proj_count . ' Project' . $proj_plural, 'project_results', $result->projects(), 'task_header', $task_count . ' Task' . $task_plural, 'task_results', $result->tasks());
    $project_results->show();
}
开发者ID:richardneish,项目名称:richardneish.github.com,代码行数:11,代码来源:ajax_response.php

示例14: Config

{
    if (!isset($_SESSION['RDLACore']['credential'])) {
        $_SESSION['RDLACore']['credential'] = "visitor";
    }
    return $_SESSION['RDLACore']['credential'];
}
//Load Configuration Environnement
if ($_SERVER["SERVER_NAME"] == 'localhost') {
    $env = "dev";
} else {
    $env = "prod";
}
$config = new Config($env);
//Detect loading module
if (!empty($_GET['p'])) {
    $module = htmlspecialchars($_GET['p']);
} else {
    $module = 'index';
}
// Start session for user credential
session_start();
// Show Module
try {
    $page = new Template($module);
    if ($env == "dev") {
        $page->appendBody(DevToolBar::show($module));
    }
    echo $page->show();
} catch (Exception $e) {
    echo "<span style='color:#900;font-weight:bold;'>Error:</span> " . $e->getMessage();
}
开发者ID:RDLA,项目名称:RDLA-Core,代码行数:31,代码来源:index.php

示例15:

        $tpl_lista->TEXTO = "R\$ " . number_format($faltadetroco_total, 2, ',', '.');
        $tpl_lista->COLUNA_ALINHAMENTO = "right";
        $tpl_lista->block("BLOCK_TEXTO_CLASSE_EXTRA");
        $tpl_lista->block("BLOCK_COLUNA_PADRAO");
        $tpl_lista->block("BLOCK_TEXTO");
        $tpl_lista->block("BLOCK_CONTEUDO");
        $tpl_lista->block("BLOCK_COLUNA");
        //Liquido
        $tpl_lista->COLUNA_COLSPAN = "";
        $tpl_lista->TEXTO = "R\$ " . number_format($liquido_total, 2, ',', '.');
        $tpl_lista->COLUNA_ALINHAMENTO = "right";
        $tpl_lista->block("BLOCK_COLUNA_PADRAO");
        $tpl_lista->block("BLOCK_TEXTO");
        $tpl_lista->block("BLOCK_CONTEUDO");
        $tpl_lista->block("BLOCK_COLUNA");
        $tpl_lista->COLUNA_COLSPAN = "3";
        $tpl_lista->TEXTO = "";
        $tpl_lista->COLUNA_ALINHAMENTO = "";
        $tpl_lista->block("BLOCK_COLUNA_PADRAO");
        $tpl_lista->block("BLOCK_TEXTO");
        $tpl_lista->block("BLOCK_CONTEUDO");
        $tpl_lista->block("BLOCK_COLUNA");
    }
    $tpl_lista->LINHA_CLASSE = "tab_cabecalho";
    $tpl_lista->block("BLOCK_LINHA_DINAMICA");
    $tpl_lista->block("BLOCK_LINHA");
}
$tpl_lista->block("BLOCK_CORPO");
$tpl_lista->block("BLOCK_LISTAGEM");
$tpl_lista->show();
include "rel_baixo.php";
开发者ID:mauriciowitzgall,项目名称:SGAF,代码行数:31,代码来源:13php.php


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