Ejemplo n.º 1
0
<?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);
    }
}
?>
?>
</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 
}
?>
        <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>
Ejemplo n.º 4
0
            $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>
Ejemplo n.º 5
0
        <?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>';
Ejemplo n.º 6
0
<?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 
Ejemplo n.º 7
0
                        </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>
Ejemplo n.º 8
0
<!--<iframe width="578" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com.br/maps?q=ENDERECO&amp;ie=UTF8&amp;hq=&amp;hnear=ENDERECO&amp;t=m&amp;z=16&amp;ll=&amp;hl=pt-BR&amp;iwloc=A&amp;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';
Ejemplo n.º 9
0
<?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>
Ejemplo n.º 10
0
<?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>
Ejemplo n.º 11
0
<?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) {
Ejemplo n.º 12
0
                <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}");
Ejemplo n.º 13
0
</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++;
    }
Ejemplo n.º 14
0
</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>';
Ejemplo n.º 15
0
                        </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>
            <h1 style="margin-top: 0;"><a href="<?php 
    echo HOME . '/grupo/noticias';
    ?>
" title="<?php 
    echo $Titulo;
    ?>
 da intranet" alt="<?php 
    echo $Titulo;
    ?>
"><?php 
    echo $Titulo;
    ?>
</a></h1>
            <?php 
    $View = new View();
    $noticias = $View->Load("noticias_p");
    $cont = 0;
    foreach ($Read->Execute()->getResult() as $not) {
        $not->post_title = Check::Words($not->post_title, 3);
        $not->post_content = Check::Words($not->post_content, 12);
        if ($cont <= 1) {
            $View->Show((array) $not, $noticias);
        }
        $cont++;
    }
    ?>
        </article>
    </div>

<?php 
}
<?php

$View = !empty($View) ? $View : ($View = new View());
$post_id = !empty($post_id) ? $post_id : null;
$side = new Controle();
$tpl_p = $View->Load('article_p');
?>
<aside class="main-sidebar">
    <article class="ads">
        <header>
            <h1>Anúncio Patrocinado:</h1>
            <a href="http://www.upinside.com.br/campus" title="Campus UpInside - Treinamentos em TI 100% em Vídeo aulas">
                <img src="<?php 
echo INCLUDE_PATH;
?>
/_tmp/banner_large.png" alt="UPINSIDE TEINAMENTOS" title="UPINSIDE TEINAMENTOS" />
            </a>
        </header>
    </article>

    <section class="widget art-list last-publish">
        <h2 class="line_title"><span class="oliva">Últimas Atualizações:</span></h2>
        <?php 
$side->setTable('ws_posts');
$side->Query("post_status = 1 AND post_id != :side ORDER BY post_date DESC LIMIT 3", "side={$post_id}");
if ($side->getResult()) {
    foreach ($side->getResult() as $last) {
        $last->datetime = date('Y-m-d', strtotime($last->post_date));
        $last->pubdate = date('d/m/Y H:i', strtotime($last->post_date));
        $View->Show((array) $last, $tpl_p);
    }
Ejemplo n.º 18
0
    header('Location: ' . HOME . DIRECTORY_SEPARATOR . '404');
}
?>
<div class="section">
    <div class="well">
        <div class="row">
            <div class="col-md-12">
                <h1 class="text-center title"><?php 
echo $titulo;
?>
</h1>
            </div>
        </div>
        <?php 
$View = new View();
$membro = $View->Load("noticias_m");
$getPage = (int) (!empty($Link->getLocal()[2]) ? $Link->getLocal()[2] : 1);
$Pager = new Pager(HOME . '/noticias/' . $post_type . '/');
$Pager->ExePager($getPage, 6);
$Read = new WsPosts();
$Read->setPost_type($post_type);
$Read->Execute()->Query("post_status = 1 AND post_type = :type ORDER BY post_date DESC, post_category DESC LIMIT :limit OFFSET :offset", "type={$post_type}&limit={$Pager->getLimit()}&offset={$Pager->getOffset()}", true);
if (!$Read->Execute()->getResult()) {
    $Pager->ReturnPage();
    WSErro("Desculpe não temos noticias no momento, favor volte mais tarde!", WS_INFOR);
} else {
    $i = 0;
    echo "<div class='row'>\n";
    foreach ($Read->Execute()->getResult() as $item) {
        if ($i % 3 == 0 && $i != 0) {
            echo "</div>\n";