RealJeff RealJeff  • 24.10.13 15:55

Como mudar a página /articles? Trocar de lado. Empty Como mudar a página /articles? Trocar de lado. 24.10.13 15:55

O que deseja: Como mudar a página /articles?

Nome do que deseja: Como mudar a página /articles? Trocar de lado.

Print do que deseja (Se possível): http://prntscr.com/1zfmsh

Onde viu O que deseja: Viu em algum hotel? Ponha o link!

Deve ser compativel com: Outros

Se escolheu outros, especifique: Phoenix

Comentários adicionais: Como mudar a página /articles?
Queria que ela ficasse assim, as notícias no meio e o menu do lado direito mesmo! Igual está na imagem. Como que eu faço?

Anonymous Convidado  • 10.11.13 2:45

Je4n Je4n  • 10.11.13 2:54

Como mudar a página /articles? Trocar de lado. Empty Re: Como mudar a página /articles? Trocar de lado. 10.11.13 2:54

Olá, aqui está o código da página PHP:
Código:

<?php

require_once('./data_classes/server-data.php_data_classes-core.php.php');

$body_id = "news";
$pageid = "16";

$news_id = FilterText($_GET['web-articles-id']);
$main_sql = mysql_query("SELECT * FROM cms_news WHERE id = '".$news_id."'") or die(mysql_error());
$article_exists = mysql_num_rows($main_sql);

if($article_exists == "1"){
   $news = mysql_fetch_assoc($main_sql);
   $pagename = "Notícias - ".HoloText($news['title'])."";
} else {
   $main_sql = mysql_query("SELECT * FROM cms_news ORDER BY ID DESC") or die(mysql_error());
   $news = mysql_fetch_assoc($main_sql);
   $news_id = $news['id'];
   $pagename = "Notícias - ".HoloText($news['title'])."";
}


require_once('./templates/community_subheader.php');
require_once('./templates/community_header.php');

?>

<div id="container">
<div id="content">

<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix notitle ">

<div id="article-wrapper">
   <h2><?php echo HoloText($news['title']); ?></h2>
   <div class="article-meta" style="margin-top:-4px;">Publicado em: <b><?php echo date('d/m/Y', $news['published']); ?></b> por <b><?php echo $news['author']; ?></b>.   </div>
   <p class="summary"><?php echo $news['longstory']; ?></p>
   <div class="article-body">
   <p><?php echo (HoloText($news['shortstory'], true)); ?></p>

</div>
</div>
</div>
</div>
</div>

<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix orange">
   <h2 class="title">Índice de notícias</h2>
<div id="article-archive">
<?php

if ($news_id > 0)
{
   for ($i = 0; $i < 7; $i++)
   {
      $sectionName = "";
      $sectionCutoffMax = 0;
      $sectionCutoffMin = 0;
      
      switch ($i)
      {
         case 0:
         
            $sectionName = "Hoje";
            $sectionCutoffMax = time();
            $sectionCutoffMin = time() - 86400;
            break;
            
         case 1:
         
            $sectionName = "Ontem";
            $sectionCutoffMax = time() - 86400;
            $sectionCutoffMin = time() - 172800;
            break;
            
         case 2: 
         
            $sectionName = "Essa semana";
            $sectionCutoffMax = time() - 172800;
            $sectionCutoffMin = time() - 604800;
            break;
            
         case 3:
         
            $sectionName = "Semana passada";
            $sectionCutoffMax = time() - 604800;
            $sectionCutoffMin = time() - 1209600;
            break;
            
         case 4:
         
            $sectionName = "Esse mês";
            $sectionCutoffMax = time() - 1209600;
            $sectionCutoffMin = time() - 2592000;
            break;
            
         case 5:
         
            $sectionName = "Mês passado";
            $sectionCutoffMax = time() - 2592000;
            $sectionCutoffMin = time() - 5184000;
            break;
                   

                         /*case 6:
         
            $sectionName = "Meses anteriores";
            $sectionCutoffMax = time();
            $sectionCutoffMin = time();
            break;*/

      }

   $sql = mysql_query("SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax .  " ORDER BY published DESC"); 
   if(mysql_num_rows($sql) > 0){
?>

   <?php echo "<h2>"; echo $sectionName; echo "</h2><ul>"; ?>
<?php while($row = mysql_fetch_assoc($sql)){ ?>
   <li><?php if($news_id !== $row['id']){ echo"<a href=\"".$path."/noticias/".$row['id']."\">"; } ?>
   <?php echo $row['title']; ?> »</a> 
   <?php if($news_id !== $row['id']){ echo"</a>"; } ?></li>
   
<?php } ?>

</ul>

<?php } } } ?>

<ul>
   <li>
   <a href="<?php echo $path; ?>/noticias" class="article">Mais notícias »</a>
   </li>
</ul>
</div>

</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>





<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

</div>

<?php require_once('./templates/community_footer.php'); ?>

Conteúdo patrocinado  • 

Como mudar a página /articles? Trocar de lado. Empty Re: Como mudar a página /articles? Trocar de lado.

Permissões neste sub-fórum
Não podes responder a tópicos

BH Servers

Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.