echo 'title="editar categoria ' . $cat['nome'] . '"><img src="ico/edit.png" alt="editar categoria ' . $cat['nome'] . '" ';
     echo 'title="editar categoria ' . $cat['nome'] . '" /></a></td>';
     echo '<td align="center"><a href="index2.php?exe=posts/categorias-subcreate&idpai=' . $cat['id'] . '&uri=' . $cat['url'] . '" ';
     echo 'title="Criar sub categoria"><img src="ico/new.png" alt="Criar sub categoria" ';
     echo 'title="Criar sub categoria" /></a></td>';
     echo '<td align="center"><a href="index2.php?exe=posts/categorias&delcat=' . $cat['id'] . '" ';
     echo 'title="deletar categoria ' . $cat['nome'] . '"><img src="ico/no.png" alt="deletar categoria ' . $cat['nome'] . '" ';
     echo 'title="deletar categoria ' . $cat['nome'] . '" /></a></td>';
     echo '</tr>';
     $readSubCat = read('up_cat', "WHERE id_pai = '{$cat['id']}'");
     if ($readSubCat) {
         foreach ($readSubCat as $catSub) {
             $catSubTags = $catSub['tags'] != '' ? 'ok.png' : 'no.png';
             echo '<tr class="subcat">';
             echo '<td>&raquo;&raquo; ' . $catSub['nome'] . '</td>';
             echo '<td>' . lmWord($catSub['content'], '35') . '</td>';
             echo '<td align="center"><img src="ico/' . $catSubTags . '" alt="Tags da categoria" title="' . $catSub['tags'] . '" /></td>';
             echo '<td align="center">' . date('d/m/Y H:i', strtotime($catSub['data'])) . '</td>';
             echo '<td align="center" colspan="2"><a href="index2.php?exe=posts/categorias-edit&edit=' . $catSub['id'] . '&uri=' . $cat['url'] . '" ';
             echo 'title="editar categoria ' . $catSub['nome'] . '"><img src="ico/edit.png" alt="editar categoria ' . $catSub['nome'] . '" ';
             echo 'title="editar categoria ' . $catSub['nome'] . '" /></a></td>';
             echo '<td align="center"><a href="index2.php?exe=posts/categorias&delsub=' . $catSub['id'] . '" ';
             echo 'title="deletar categoria ' . $catSub['nome'] . '"><img src="ico/no.png" alt="deletar categoria ' . $catSub['nome'] . '" ';
             echo 'title="deletar categoria ' . $catSub['nome'] . '" /></a></td>';
             echo '</tr>';
         }
     }
 }
 echo '</table>';
 $link = 'index2.php?exe=posts/categorias&pag=';
 readPaginator('up_cat', "WHERE id_pai IS null", $maximo, $link, $pag);
Example #2
0
         echo '<span class="ms in">Não existem registros de artigos ainda!</span>';
     } else {
         echo '<table width="560" border="0" class="tbdados" style="float:left;" cellspacing="0" cellpadding="0">
     <tr class="ses">
         <td>titulo:</td>
         <td align="center">data:</td>
         <td align="center">categoria:</td>
         <td align="center">visitas:</td>
         <td align="center" colspan="4">ações:</td>
     </tr>';
         foreach ($readArt as $art) {
             $views = $art['visitas'] != '' ? $art['visitas'] : '0';
             $stIco = $art['status'] == '0' ? 'alert.png' : 'ok.png';
             $stSta = $art['status'] == '0' ? 'ativar' : 'inativar';
             echo '<tr>';
             echo '<td><a href="' . BASE . '/artigo/' . $art['url'] . '" title="' . $art['titulo'] . '" target="_blank">' . lmWord($art['titulo'], 30) . '</a></td>';
             echo '<td align="center">' . date('d/m/y H:i', strtotime($art['titulo'])) . '</td>';
             echo '<td align="center"><a target="_blank" href="' . BASE . '/categoria/' . getCat($art['categoria'], 'url') . '" title="' . getCat($art['categoria'], 'url') . '">' . getCat($art['categoria'], 'nome') . '</a></td>';
             echo '<td align="center">' . $views . '</td>';
             echo '<td align="center"><a href="index2.php?exe=posts/posts-edit&editid=' . $art['id'] . '" title="editar"><img src="ico/edit.png" alt="editar" title="editar" /></a></td>';
             echo '<td align="center"><a href="index2.php?exe=posts/gallery&postid=' . $art['id'] . '" title="postar galeria"><img src= "ico/gb.png" alt="postar galeria" title="postar galeria" /></a></td>';
             echo '<td align="center"><a href="index2.php?exe=posts/posts&pag=' . $pag . '&sts=' . $art['status'] . '&id=' . $art['id'] . '" title="' . $stSta . '"><img src="ico/' . $stIco . '" alt="' . $stSta . '" title="' . $stSta . '" /></a></td>';
             echo '<td align="center"><a href="index2.php?exe=posts/posts&pag=' . $pag . '&delid=' . $art['id'] . '&thumb=' . $art['thumb'] . '" title="excluir"><img src="ico/no.png" alt="excluir" title="excluir" /></a></td>';
             echo '</tr>';
         }
         echo '</table>';
         $link = 'index2.php?exe=posts/posts&pag=';
         readPaginator('up_posts', "WHERE tipo = 'post'{$_SESSION[where]} ORDER BY data DESC", $maximo, $link, $pag);
     }
     ?>
 <!--<div class="paginator">
Example #3
0
    foreach ($readArtigo as $art) {
    }
}
setViews($art['id']);
?>

<title><?php 
echo $art['titulo'] . '|' . SITENAME;
?>
</title>
<meta name="title" content="<?php 
echo $art['titulo'] . '|' . SITENAME;
?>
" />
<meta name="description" content="<?php 
echo lmWord($art['content'], 100);
?>
" />
<meta name="keywords" content="<?php 
echo $art['tags'];
?>
" />
<meta name="author" content="Studio UpInside" />
<meta name="url" content="<?php 
echo BASE . '/artigo/' . $art['url'];
?>
" />
<meta name="language" content="pt-br" /> 
<meta name="robots" content="INDEX,FOLLOW" /> 
</head>
<body>
Example #4
0
setArq('tpl/header');
?>

<div id="content">
<div class="home">

	<div class="slide">
    	<ul>
			<?php 
$readSlide = read('(SELECT * FROM up_posts ORDER BY data DESC) up_posts', "WHERE tipo = 'post' AND status = '1' GROUP BY cat_pai ORDER BY data DESC LIMIT 4");
foreach ($readSlide as $slide) {
    echo '<li>';
    getThumb($slide['thumb'], $slide['tags'], $slide['titulo'], '866', '254', '', '', '#', 't');
    echo '<div class="info">';
    echo '<p class="titulo"><a href="' . BASE . '/artigo/' . $slide['url'] . '" title="ver mais de ' . $slide['titulo'] . '">' . getCat($slide['cat_pai'], 'nome') . ' - ' . $slide['titulo'] . '</a></p>';
    echo '<p class="resumo"><a href="' . BASE . '/artigo/' . $slide['url'] . '" title="ver mais de ' . $slide['titulo'] . '">' . lmWord($slide['content'], 300) . '</a></p>';
    echo '</div><!-- /info -->';
    echo '</li>';
}
?>
        </ul>
        <div class="slidenav"></div><!-- /slide nav-->
    </div><!-- /slide -->
    
    <ul class="entretenimeto">
    	<?php 
$readBloco = read('up_posts', "WHERE tipo = 'post' AND status = '1' AND cat_pai = '18' ORDER BY data DESC LIMIT 1,5");
foreach ($readBloco as $bl) {
    $i++;
    echo '<li';
    if ($i == 4) {
Example #5
0
        if (!$readArt) {
            echo '<span class="ms in">Não existem registros de páginas ainda!</span>';
        } else {
            echo '<table width="560" border="0" class="tbdados" style="float:left;" cellspacing="0" cellpadding="0">
                <tr class="ses">
                    <td>nome:</td>
                    <td align="center">resumo:</td>
                    <td align="center">tags:</td>
                    <td align="center">criadas:</td>
                    <td align="center" colspan="3">ações:</td>
                </tr>';
            foreach ($readArt as $art) {
                $stIco = $art['tags'] == '' ? 'alert.png' : 'ok.png';
                echo '<tr>';
                echo '<td><a href="' . BASE . '/sessao/' . $art['url'] . '" title="' . $art['titulo'] . '" target="_blank">' . lmWord($art['titulo'], 20) . '</a></td>';
                echo '<td>' . lmWord($art['content'], 30) . '</td>';
                echo '<td><img src="ico/' . $stIco . '" alt="' . $art['tags'] . '" title="' . $art['tags'] . '" /></a></td>';
                echo '<td align="center">' . date('d/m/y H:i', strtotime($art['titulo'])) . '</td>';
                echo '<td align="center"><a href="index2.php?exe=paginas/paginas-edit&editid=' . $art['id'] . '" title="editar"><img src="ico/edit.png" alt="editar" title="editar" /></a></td>';
                echo '<td align="center"><a href="index2.php?exe=paginas/gallery&postid=' . $art['id'] . '" title="postar galeria"><img src= "ico/gb.png" alt="postar galeria" title="postar galeria" /></a></td>';
                echo '<td align="center"><a href="index2.php?exe=paginas/paginas&pag=' . $pag . '&delid=' . $art['id'] . '" title="excluir"><img src="ico/no.png" alt="excluir" title="excluir" /></a></td>';
                echo '</tr>';
            }
            echo '</table>';
            $link = 'index2.php?exe=paginas/paginas&pag=';
            readPaginator('up_posts', "WHERE tipo = 'pagina'{$_SESSION[where]} ORDER BY data DESC", $maximo, $link, $pag);
        }
        ?>

</div><!-- /bloco list -->
<?php 
Example #6
0
           <div class="span4">                     
            <table class="table table-bordered table-hover table-condensed">
                <caption>Artigos:</caption>
                    <thead>
                        <tr>
                            <th>artigos + vistos</th>
                            <th>visitas</th>
                        </tr>
                    </thead>
                        <tbody>   
						<?php 
$readArtUtm = read('posts', "WHERE tipo = 'post' ORDER BY visitas DESC, data DESC LIMIT 5");
if (!$readArtUtm) {
    echo '<td>Não existe artigos registrados!</td>';
} else {
    foreach ($readArtUtm as $utm) {
        $views = $utm['visitas'] != '' ? $utm['visitas'] : '0';
        echo '<tr>';
        echo '<td><a href="' . BASE . '/artigo/' . $utm['url'] . '" target="_blank" title="ver">' . lmWord($utm['titulo'], 22) . '</a></td>';
        echo '<td align="center">' . $views . '</td>';
        echo '</tr>';
    }
}
?>
                        </tbody>
            </table>
             </div><!--span4--> 
</div><!--//row-->                             
</section><!--span8-->

Example #7
0
$pag = empty($url[3]) ? '1' : $url[3];
$maximo = 8;
$inicio = $pag * $maximo - $maximo;
if ($cat['id_pai'] != '') {
    $readProdutos = read('posts', "WHERE cat_id = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
} else {
    $readProdutos = read('posts', "WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
}
foreach ($readProdutos as $art) {
    echo '<li';
    echo ' class="span4" ';
    echo '>';
    echo '<div class="thumbnail">';
    getThumb($art['thumb'], $cat['nome'] . '--' . $art['titulo'], $art['titulo'], '250', '200', '', '', '#', 'r');
    echo '<h3>' . lmWord($art['titulo'], 50) . '</h3>';
    echo '<p>' . lmWord($art['content'], 50) . '</p>';
    echo '<a title="Ver mais de ' . $art['titulo'] . '" href="' . BASE . '/produto/' . $art['url'] . '" class="btn btn-large btn-block btn-primary">saiba mais ... </a>';
    echo '</div>';
    echo '</li>';
}
echo '</ul>';
echo '</div>';
echo '</div>';
echo '</section>';
$link = BASE . '/categoria/' . $cat['url'] . '/page/';
if ($cat['id_pai'] != '') {
    readPaginator('posts', " WHERE cat_id = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
} else {
    readPaginator('posts', " WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<?php 
$stringAll = 'Conteúdo completo para você que está <a href="#">começando e para você que quer se aperfeiçoar</a> em desenvolvimento de sites nos padrões web. Neste curso vamos aprender <strong>HTML, XHTML, CSS,</strong> Interações com <a href="#">Java Script, Url Amigável</a> e <em>praticas de SEO e muito mais</em>!';
function lmWord($string, $words = '100')
{
    $string = strip_tags($string);
    $count = strlen($string);
    if ($count <= $words) {
        return $string;
    } else {
        $strpos = strrpos(substr($string, 0, $words), ' ');
        return substr($string, 0, $strpos) . '...';
    }
}
echo lmWord($stringAll, 100) . '<hr />';
function validDate($data)
{
    $data = explode('/', $data);
    $dia = $data[0];
    $mes = $data[1];
    $ano = $data[2];
    $diav = true;
    $mesv = true;
    $anov = true;
    if ($ano <= date('Y') && $ano >= 1800) {
        $arrum = array('1', '3', '5', '7', '8', '10', '12');
        $arrdois = array('4', '6', '9', '11');
        if (in_array($mes, $arrum)) {
            if ($dia < 1 || $dia > 31) {
                $diav = false;
$pag = empty($url[3]) ? '1' : $url[3];
$maximo = 8;
$inicio = $pag * $maximo - $maximo;
if ($cat['id_pai'] != '') {
    $readArtigos = read('up_posts', "WHERE categoria = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
} else {
    $readArtigos = read('up_posts', "WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT {$inicio}, {$maximo}");
}
foreach ($readArtigos as $art) {
    $catcon++;
    echo '<li';
    if ($catcon % 4 == 0) {
        echo ' class="last"';
    }
    echo '>';
    getThumb($art['thumb'], $art['tags'], $art['titulo'], '200', '150', '', '', BASE . '/artigo/' . $art['url'], 't');
    echo '<p class="data">' . date('d/m/Y H:i', strtotime($art['data'])) . '</p>';
    echo '<p class="titulo"><a title="Ver mais de ' . $art['titulo'] . '" href="' . BASE . '/artigo/' . $art['url'] . '" class="link">' . lmWord($art['titulo'], 50) . '</a></p>';
    echo '</li>';
}
echo '</ul>';
$link = BASE . '/categoria/' . $cat['url'] . '/page/';
if ($cat['id_pai'] != '') {
    readPaginator('up_posts', "WHERE categoria = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
} else {
    readPaginator('up_posts', "WHERE cat_pai = '{$cat['id']}' AND tipo = 'post' AND status = '1' ORDER BY data DESC", $maximo, $link, $pag, '870px');
}
?>
          
</div><!-- /categoria -->
</div><!-- //content -->
Example #10
0
    echo '<p class="titulo">' . lmWord($bl['titulo'], 50) . '</p>';
    echo '</li>';
}
?>
        </ul>
    </div>
    
    <div class="bloco">
    	<h2>internet</h2>
        <ul class="inter">
        	<?php 
$readBloco = read('up_posts', "WHERE tipo = 'post' AND status = '1' AND cat_pai = '7' ORDER BY data DESC LIMIT 4");
foreach ($readBloco as $bl) {
    $i++;
    echo '<li class="bsshadow radius';
    if ($i == 3) {
        echo ' last';
    }
    echo '">';
    getThumb($bl['thumb'], $bl['tags'], $bl['titulo'], '200', '150', '', '', BASE . '/artigo/' . $bl['url'], 't');
    echo '<p class="data">' . date('d/m/Y H:i', strtotime($bl['data'])) . '</p>';
    echo '<p class="titulo">' . lmWord($bl['titulo'], 50) . '</p>';
    echo '</li>';
}
?>
        </ul>
    </div>
    
    </div><!-- //notfound -->

</div><!-- //content -->