本文整理汇总了PHP中View::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP View::Load方法的具体用法?PHP View::Load怎么用?PHP View::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::Load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: View
<?php
$View = new View();
$tpl_g = $View->Load('article_g');
$tpl_m = $View->Load('article_m');
$tpl_p = $View->Load('article_p');
$tpl_empresa = $View->Load('empresa_p');
?>
<!--HOME SLIDER-->
<section class="main-slider">
<h3>Últimas Atualizações:</h3>
<div class="container">
<div class="slidecount">
<?php
$cat = Check::CatByName('noticias');
$post = new Controle();
$post->setTable('ws_posts');
$post->FullRead("SELECT * FROM ws_posts WHERE post_status = 1 AND (post_cat_parent = :cat OR post_category = :cat) ORDER BY post_date DESC LIMIT :limit OFFSET :offset", "cat={$cat}&limit=3&offset=0", true);
if (!$post->getResult()) {
WSErro('Desculpe, ainda não existem notícias cadastradas. Favor volte mais tarde!', WS_INFOR);
} else {
foreach ($post->getResult() as $slide) {
$slide->post_title = Check::Words($slide->post_title, 12);
$slide->post_content = Check::Words($slide->post_content, 38);
$slide->datetime = date('Y-m-d', strtotime($slide->post_date));
$slide->pubdate = date('d/m/Y H:i', strtotime($slide->post_date));
$View->Show((array) $slide, $tpl_g);
}
}
?>
示例2: WsPosts
?>
</a></small></h1>
<div class="well">
<?php
$cat = Check::CatByName($Categoria);
$Offset = !empty($Offset) ? "OFFSET {$Offset}" : "";
$c = 0;
$Read = new WsPosts();
$Read->setPost_category($cat);
$Read->Execute()->Query("post_status = 1 AND (post_category = :cat OR post_cat_parent = :cat) ORDER BY {$Ordem} DESC LIMIT 3 {$Offset}", "cat={$cat}", true);
$Offset = null;
if (!$Read->Execute()->getResult()) {
WSErro("Opps! Não temos artigos em destaques!", WS_INFOR);
} else {
$View = new View();
$new = $View->Load("noticias_m_clean");
foreach ($Read->Execute()->getResult() as $bar) {
$bar->datetime = date('Y-m-d', strtotime($bar->post_date));
$bar->pubdate = date("d/m/Y H:i", strtotime($bar->post_date));
$bar->post_content = Check::Words($bar->post_content, 30);
$bar->class = $c == 0 ? "item active" : "item";
if (!$bar->post_url) {
$bar->post_url = "#HOME#/artigo/{$bar->post_name}";
}
$View->Show((array) $bar, $new);
$c++;
}
?>
<?php
}
?>
示例3: Session
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
require './_app/Config.inc.php';
$sessao = new Session();
// View::Load('_mvc/category');
//
// $read = new Read();
// $read->ExeRead('ws_categories');
//
// foreach ($read->getResult() as $cat):
// View::Show($cat);
// endforeach;
//
// echo '<h1>Request</h1>';
//
// foreach ($read->getResult() as $cat):
// View::Request('_mvc/category', $cat);
// endforeach;
$read = new Read();
$read->ExeRead('ws_siteviews_agent');
View::Load('_mvc/navegador');
foreach ($read->getResult() as $nav) {
View::Show($nav);
}
?>
</body>
</html>
示例4: date
$bar->datetime = date('Y-m-d', strtotime($bar->post_date));
$bar->pubdate = date("d/m/Y H:i", strtotime($bar->post_date));
$bar->post_content = Check::Words($bar->post_content, 6);
if (!$bar->post_url) {
$bar->post_url = "#HOME#/plugin/{$bar->post_name}";
}
$View->Show((array) $bar, $siderbar);
}
}
if (isset($fixo)) {
$Read->Execute()->Query("post_status = 1 AND (post_category = :cat OR post_cat_parent = :cat) ORDER BY post_date LIMIT 3", "cat={$fixo}", true);
if (!$Read->Execute()->getResult()) {
WSErro("Opps! Não temos artigos para a barra lateral", WS_INFOR);
} else {
$View = new View();
$siderbar = $View->Load("article_siderbar_fixo");
foreach ($Read->Execute()->getResult() as $bar) {
$bar->datetime = date('Y-m-d', strtotime($bar->post_date));
$bar->pubdate = date("d/m/Y H:i", strtotime($bar->post_date));
$bar->post_content = Check::Words($bar->post_content, 6);
if (!$bar->post_url) {
$bar->post_url = "#HOME#/plugin/{$bar->post_name}";
}
$View->Show((array) $bar, $siderbar);
}
}
}
?>
</div>
</aside>
示例5: Pager
<?php
$getPage = (int) (!empty($Link->getLocal()[2]) ? $Link->getLocal()[2] : 1);
$Pager = new Pager(HOME . '/pesquisa/' . $search . '/');
$Pager->ExePager($getPage, 4);
$readArt = new WsPosts();
$readArt->Execute()->Query("post_status = 1 AND (post_title LIKE '%' :link '%' OR post_content LIKE '%' :link '%') ORDER BY post_date DESC LIMIT :limit OFFSET :offset", "link={$search}&limit={$Pager->getLimit()}&offset={$Pager->getOffset()}", true);
if (!$readArt->Execute()->getResult()) {
$Pager->ReturnPage();
WSErro("Desculpe, sua pesquisa não retornou resultados. Você pode resulmir sua pesquisa ou tentar outros termos!", WS_INFOR);
} else {
$cc = 0;
foreach ($readArt->Execute()->getResult() as $cat) {
$cc++;
$View = new View();
$tpl_cat = $View->Load('article_m');
$class = $cc % 3 == 0 ? ' class="right"' : null;
echo "<span{$class}>";
$cat->post_title = Check::Words($cat->post_title, 8);
$cat->post_content = Check::Words($cat->post_content, 20);
$cat->datetime = date('Y-m-d', strtotime($cat->post_date));
$cat->pubdate = date('d/m/Y H:i', strtotime($cat->post_date));
$View->Show((array) $cat, $tpl_cat);
echo "</span>";
}
}
$Pager->ExePaginator("ws_posts", "post_status = 1 AND (post_title LIKE '%' :link '%' OR post_content LIKE '%' :link '%')", "link={$search}");
echo '<nav class="paginator">';
echo '<h2>Mais resultados para NOME DA CATEGORIA</h2>';
echo $Pager->getPaginator();
echo '</nav>';
示例6: View
<?php
$View = new View();
$carousel = $View->Load("carousel_m");
$cartilha = $View->Load("cartilhas_m");
$youtube = $View->Load("youtube_m");
$tpl_p = $View->Load("article_p");
$tpl_m = $View->Load("article_m");
$Read = new WsPosts();
$result = $Read->Execute()->FullRead("SELECT COUNT(post_name) as 'cont' FROM ws_posts WHERE post_type = 'post'")[0]->cont;
$All = !empty($Read->Execute()->findAll()) ? (int) $result : 0;
?>
<section class="section">
<div class="well">
<!-- carrousel -->
<section class="section">
<div id="fullcarousel-example" data-interval="4000" class="carousel slide"
data-ride="carousel">
<?php
$cat = Check::CatByName('destaque');
$Read->Execute()->Query("post_status = 1 AND post_type = 'post' AND (post_cat_parent = :cat OR post_category = :cat) ORDER BY post_date DESC LIMIT :limit OFFSET :offset", "cat={$cat}&limit=3&offset=0", true);
if (!$Read->Execute()->getResult()) {
WSErro("Desculpe não temos posts no momento, favor volte mais tarde!", WS_INFOR);
} else {
?>
<!-- Indicators -->
<?php
示例7: Controle
</ul>
<div class="clear"></div>
</section>
<?php
}
?>
</div>
<!--RELACIONADOS-->
<?php
$readMode = new Controle();
$readMode->setTable("ws_posts");
$readMode->Query("post_status = 1 AND post_id != :post_id AND #post_category# ORDER BY rand() LIMIT 4", "post_id={$post_id}&post_category={$post_category}");
if ($readMode->getResult()) {
$View = new View();
$tpl_m = $View->Load('article_relacionados');
?>
<footer class="relacionados row">
<section>
<h3>Veja também:</h3>
<?php
foreach ($readMode->getResult() as $more) {
$more->datetime = date('Y-m-d', strtotime($more->post_date));
$more->pubdate = date('d/m/Y H:i', strtotime($more->post_date));
$more->post_content = Check::Words($more->post_content, 20);
$View->Show((array) $more, $tpl_m);
}
?>
</section>
示例8: Controle
<!--<iframe width="578" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com.br/maps?q=ENDERECO&ie=UTF8&hq=&hnear=ENDERECO&t=m&z=16&ll=&hl=pt-BR&iwloc=A&output=embed" style="text-align:left; margin-top: 20px;"></iframe>-->
<div class="clear"></div>
</div>
<!--RELACIONADOS-->
<footer>
<nav>
<h3>Veja também:</h3>
<?php
$readMais = new Controle('app_empresas');
$readMais->Query("empresa_status = 1 ORDER BY rand() LIMIT 4");
if ($readMais->getResult()) {
$View = new View();
$tpl = $View->Load('empresa_p');
foreach ($readMais->getResult() as $mais) {
$View->Show((array) $mais, $tpl);
}
}
?>
</nav>
<div class="clear"></div>
</footer>
<!--Comentários aqui-->
</article>
<!--SIDEBAR-->
<?php
require REQUIRE_PATH . '/inc/sidebar.inc.php';
示例9: View
<?php
$View = new View();
$tpl = $View->Load('aniversariantes');
?>
<section class="section print table">
<div class="container">
<div class="row">
<div class="col-md-12">
<?php
$AppNiver = new AppNiver();
$AppNiver->Execute()->findAll();
if (!$AppNiver->Execute()->getResult()) {
WSErro("<b>Oppss!</b> Não temos Aniversários este mês!", INFO);
} else {
?>
<table class="table table-bordered table-condensed table-hover table-striped text-center">
<thead>
<tr>
<th colspan="4" class="info text-center">
<h1>Aniversáriantes do mês</h1>
</th>
</tr>
<tr>
<th>#</th>
<th>Nome</th>
<th>Setor</th>
<th>Data</th>
</tr>
</thead>
<tbody>
示例10: View
<?php
$search = $Link->getLocal()[1];
$count = $Link->getData()['count'] ? $Link->getData()['count'] : '0';
$View = new View();
$tpl_cat = $View->Load('article_m');
$tpl_age = $View->Load('agenda_m');
$tpl_ani = $View->Load('niver_m');
$tpl_inco = $View->Load('inco_list');
$tpl_part = $View->Load('part_list');
$tpl_glos = $View->Load('glos_list');
?>
<section class="section">
<div class="container">
<section class="section">
<header>
<h2>Pesquisa por: "<?php
echo $search;
?>
"</h2>
<p>Sua pesquisa por <?php
echo $search;
?>
retornou <?php
echo $count;
?>
resultados:</p>
</header>
</section>
示例11: WsPosts
<?php
$Limit = !empty($Limit) ? $Limit : 3;
$c = 0;
$Read = new WsPosts();
$Read->setPost_category($carrousel);
$Read->Execute()->Query("post_status = 1 AND (post_category = :cat OR post_cat_parent = :cat) ORDER BY post_date DESC LIMIT {$Limit}", "cat={$carrousel}", true);
if (!$Read->Execute()->getResult()) {
WSErro("Opps! Não temos artigos em destaques!", WS_INFOR);
} else {
?>
<div id = "carousel" data-interval="3000" class="carousel slide well" data-ride="carousel">
<div class = "carousel-inner" >
<?php
$View = new View();
$siderbar = $View->Load("carousel_m");
foreach ($Read->Execute()->getResult() as $bar) {
$bar->datetime = date('Y-m-d', strtotime($bar->post_date));
$bar->pubdate = date("d/m/Y H:i", strtotime($bar->post_date));
$bar->post_content = Check::Words($bar->post_content, 30);
$bar->class = $c == 0 ? "item active" : "item";
if (!$bar->post_url) {
$bar->post_url = "#HOME#/artigo/{$bar->post_name}";
}
$View->Show((array) $bar, $siderbar);
$c++;
}
?>
</div>
<?php
if ($c != 1) {
示例12: Pager
<hr>
<?php
$getPage = (int) (!empty($Link->getLocal()[2]) ? $Link->getLocal()[2] : 1);
$Pager = new Pager(HOME . '/grupo/' . $category_name . '/');
$Pager->ExePager($getPage, 12);
$Read = new WsPosts();
$Read->Execute()->Query("post_status = 1 AND (post_category = :cat OR post_cat_parent = :cat) ORDER BY post_views DESC LIMIT :limit OFFSET :offset", "cat={$category_id}&limit={$Pager->getLimit()}&offset={$Pager->getOffset()}", true);
if (!$Read->Execute()->getResult()) {
$Pager->ReturnPage();
WSErro("Desculpe, ainda não temos artigos cadastrado nesta categoria!", WS_INFOR);
} else {
?>
<div class="row">
<?php
$View = new View();
$grupo_p = $View->Load('grupo_p');
$i = 0;
foreach ($Read->Execute()->getResult() as $item) {
$item->post_title = Check::Words($item->post_title, 4);
$item->datetime = date('Y-m-d', strtotime($item->post_date));
$item->pubdate = date("d/m/Y H:i", strtotime($item->post_date));
$View->Show((array) $item, $grupo_p);
$i++;
}
}
?>
</div>
</div>
<?php
$Pager->ExePaginator("ws_posts", "post_status = 1 AND (post_category = :cat OR post_cat_parent = :cat) ORDER BY post_views", "cat={$category_id}");
示例13: Pager
</p>
</header>
<?php
$getPage = (int) (!empty($Link->getLocal()[2]) ? $Link->getLocal()[2] : 1);
$Pager = new Pager(HOME . '/membros/' . $category_name . '/');
$Pager->ExePager($getPage, 6);
$Pager->ExePaginator("ws_posts", "post_status = 1 AND post_type = 'membros' AND (post_category = :cat OR post_cat_parent = :cat)", "cat={$category_id}", true);
$Read = new WsPosts();
$Read->Execute()->Query("post_status = 1 AND post_type = 'membros' AND (post_category = :cat OR post_cat_parent = :cat) ORDER BY post_date DESC LIMIT :limit OFFSET :offset", "cat={$category_id}&limit={$Pager->getLimit()}&offset={$Pager->getOffset()}", true);
if (!$Read->Execute()->getResult()) {
$Pager->ReturnPage();
WSErro("Desculpe, a categoria <b>{$category_title}</b> ainda não tem artigos publicados, favor volte mais tarde!", WS_INFOR);
} else {
$View = new View();
$membro = $View->Load("article_membro");
$i = 0;
echo "\n<!--membros-->\n";
echo "\n<div class='row'>\n";
foreach ($Read->Execute()->getResult() as $item) {
if ($i % 2 == 0 && $i != 0) {
echo "</div>\n";
echo "<div class='row'>\n";
}
$item->post_title = Check::Words($item->post_title, 4);
$item->post_content = Check::Words($item->post_content, 10);
$item->datetime = date('Y-m-d', strtotime($item->post_date));
$item->pubdate = date("d/m/Y H:i", strtotime($item->post_date));
$View->Show((array) $item, $membro);
$i++;
}
示例14: Pager
</p>
</header>
<?php
$getPage = !empty($Link->getLocal()[2]) ? $Link->getLocal()[2] : 1;
$Pager = new Pager(HOME . '/empresas/' . $EmpLink . '/');
$Pager->ExePager($getPage, 5);
$readEmp = new Controle();
$readEmp->setTable('app_empresas');
$readEmp->Query("empresa_status = 1 AND empresa_categoria = :cat ORDER BY empresa_date DESC LIMIT :limit OFFSET :offset", "cat={$EmpLink}&limit={$Pager->getLimit()}&offset={$Pager->getOffset()}", true);
if (!$readEmp->getResult()) {
$Pager->ReturnPage();
WSErro("Desculpe, ainda não existem empresas cadastradas {$Cat}, favor volte depois", WS_INFOR);
} else {
$View = new View();
$tpl = $View->Load('empresa_list');
foreach ($readEmp->getResult() as $emp) {
//encontra cidade
$readEmp->setTable('app_cidades');
$readEmp->find("cidade_id={$emp->empresa_cidade}");
$cidade = $readEmp->getResult()->cidade_nome;
$emp->empresa_cidade = $cidade;
//encontra estado
$readEmp->setTable('app_estados');
$readEmp->find("estado_id={$emp->empresa_uf}");
$estado = $readEmp->getResult()->estado_uf;
$emp->empresa_uf = $estado;
$View->Show((array) $emp, $tpl);
}
//barra de navegação
echo '<footer>';
示例15: Controle
</ul>
<div class="clear"></div>
</section>
<?php
}
?>
</div>
<!--RELACIONADOS-->
<?php
$readMode = new Controle();
$readMode->setTable("ws_posts");
$readMode->Query("post_status = 1 AND post_id != :post_id AND #post_category# ORDER BY rand() LIMIT 2", "post_id={$post_id}&post_category={$post_category}");
if ($readMode->getResult()) {
$View = new View();
$tpl_m = $View->Load('article_m');
?>
<footer>
<nav>
<h3>Veja também:</h3>
<?php
foreach ($readMode->getResult() as $more) {
$more->datetime = date('Y-m-d', strtotime($more->post_date));
$more->pubdate = date('d/m/Y H:i', strtotime($more->post_date));
$more->post_content = Check::Words($more->post_content, 20);
$View->Show((array) $more, $tpl_m);
}
?>
</nav>
<div class="clear"></div>
</footer>