Casper Casper  • 27.12.15 20:01

Articles sem a imagem do autor [AVATAR] Empty Articles sem a imagem do autor [AVATAR] 27.12.15 20:01

Print de meu erro: prntscr.com/9j76kl

Qual é meu erro: Articles sem a imagem do autor [AVATAR]

CMS Que estou utilizando: Oyaht [PORÉM A ARTICLES NÃO É DELA]

SWF que estou utilizando: Não importa.

Versão de meu hotel: NewCrypto

Se escolheu outros, especifique: Texto aqui

Comentários adicionais: O print explica o erro... Queria saber se alguém sabe como arrumar, aqui esta minha articles.php "pastebin.com/raw/WQfh2pse"

Blackv Blackv  • 27.12.15 20:10

Articles sem a imagem do autor [AVATAR] Empty Re: Articles sem a imagem do autor [AVATAR] 27.12.15 20:10

Substitua por isso aqui

Código:
<?php


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


$body_id = "news";
$pageid = "11";

$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);
} 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";

}

//SISTEMA DE VOTAÇÃO INICIA AQUI
if(isset($_GET['vote']) || FilterText($_GET['vote']) == "like" || FilterText($_GET['vote']) == "unlike"){
 $vote = FilterText($_GET['vote']);

 $usercheck = mysql_query("SELECT id_user FROM cms_news_vote WHERE id_user = '".$my_id."' AND id_news = '".$news_id."'") or die(mysql_error());
 if(mysql_num_rows($usercheck) < 1){

 if($vote == "like"){
 mysql_query("INSERT INTO `cms_news_vote` (id_user,id_news,vote_like,vote_unlike) VALUES ('".$my_id."','".$news_id."','1','0')") or die(mysql_error());
 } else {
 mysql_query("INSERT INTO `cms_news_vote` (id_user,id_news,vote_like,vote_unlike) VALUES ('".$my_id."','".$news_id."','0','1')") or die(mysql_error());
 }

 header("location: $path/articles/".$news_id."");
 } else {
 $msg = "<script>alert("Obrigado por votar nesta notícia, assim poderemos saber se realmente você gostou :-) ");</script>";
 }
}

$images = explode(",",$news['images']);

if(isset($_GET['vote']) || FilterText($_GET['vote']) == "like" || FilterText($_GET['vote']) == "unlike"){
 $vote = FilterText($_GET['vote']);

 $usercheck = mysql_query("SELECT id_user FROM cms_news_vote WHERE id_user = '".$my_id."' AND id_news = '".$news_id."'") or die(mysql_error());
 if(mysql_num_rows($usercheck) < 1){

 if($vote == "like"){
 mysql_query("INSERT INTO `cms_news_vote` (id_user,id_news,vote_like,vote_unlike) VALUES ('".$my_id."','".$news_id."','1','0')") or die(mysql_error());
 } else {
 mysql_query("INSERT INTO `cms_news_vote` (id_user,id_news,vote_like,vote_unlike) VALUES ('".$my_id."','".$news_id."','0','1')") or die(mysql_error());
 }

 header("location: $path/articles/".$news_id."");
 } else {
 $msg = "<script>alert("Você já votou nesta notícia!");</script>";
 }
}

 // TERMINA AQUI //

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

?>

<div id="container">
<div id="content">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix blue">
 <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 = "Outros Meses";
 $sectionCutoffMax = time() - 3592000;
 $sectionCutoffMin = time() - 5684000;
 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."/articles/".$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; ?>/articles/" 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>

<?php
 $votecheck = mysql_query("SELECT * FROM cms_news_vote WHERE id_news = '".$news_id."'");
 $votecount = mysql_num_rows($votecheck);
 if($votecount < 1){
 $percentlike = "50";
 $percentunlike = "50";
 $like = "0";
 $unlike = "0";
 } else {
 $percentlike = 100 / $votecount * mysql_evaluate("SELECT COUNT(*) FROM cms_news_vote WHERE id_news = '".$news_id."' AND vote_like = '1'");
 $percentunlike = 100 / $votecount * mysql_evaluate("SELECT COUNT(*) FROM cms_news_vote WHERE id_news = '".$news_id."' AND vote_unlike = '1'");
 $like = mysql_evaluate("SELECT COUNT(*) FROM cms_news_vote WHERE id_news = '".$news_id."' AND vote_like = '1'");
 $unlike = mysql_evaluate("SELECT COUNT(*) FROM cms_news_vote WHERE id_news = '".$news_id."' AND vote_unlike = '1'");
 }
 ?>

<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"><a href="articles/category/<?php echo $shortname; ?>"></a> </div>

 <script type="text/javascript" language="Javascript">
 document.observe("dom:loaded", function() {
 $$('.article-images a').each(function(a) {
 Event.observe(a, 'click', function(e) {
 Event.stop(e);
 Overlay.lightbox(a.href, "Carregando imagem...");
 });
 });
 
 $$('<?php echo $row['id']; ?>').each(function(a) {
 a.replace(a.innerHTML);
 });
 });
 </script>

 <p class="summary"><?php echo (HoloText($news['longstory'])); ?></p>
 <div class="article-body">
 <p><?php echo (HoloText($news['shortstory'], true)); ?></p>
 
 </div>
 </script>

 
<div style="width:125px; height:60px; float:right; margin-right:4px; margin-top:6px;">
<a href="<?php echo $path; ?>/articles/<?php echo $news_id; ?>&vote=like"><div style="width:56px; height:56px; float:left; border-radius: 2px; border:1px solid #666; cursor:pointer; background: url(<?php echo $path; ?>/seth0r/gostei.png) center no-repeat;"></div></a>
 <a href="<?php echo $path; ?>/articles/<?php echo $news_id; ?>&vote=unlike"><div style="width:56px; height:56px; float:left; border-radius: 2px; border:1px solid #666; margin-left:5px; cursor:pointer; background: url(<?php echo $path; ?>/seth0r/ngostei.png) center no-repeat;"></div></a>
</div>
<style>#infos{background-color:#EEE;border:1px solid #CCC;border-radius:5px;padding:5px;width:530px;}#positivo{width:auto;text-decoration:none;height:15px;padding-top:5px;padding-bottom:4px;padding-left:5px;padding-right:25px;border:1px solid #007900;float:left;color:#FFFFFF;font-weight:bold;font-size:11px;margin:2px;background:url() right no-repeat #00AA00;border-radius:2px;}#negativo{width:auto;height:15px;padding-top:5px;padding-bottom:4px;padding-left:5px;padding-right:25px;border:1px solid #C81E15;float:left;color:#FFFFFF;font-weight:bold;font-size:11px;margin:2px;background:url() right no-repeat #E8372E;border-radius:2px;}</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
var $a = jQuery.noConflict()
function avaliar_noticias(id, avaliar, eleitor, autor){
 $a("#avaliar_noticias").html('<img style="margin-right:30px" src="<?Php echo $path; ?>/seth0r/carregando.gif" />');
 $a("#avaliar_noticias").load("/noticias_avaliacao.php?id="+id+"&nota="+avaliar+"&eleitor="+eleitor+"&autor="+autor);
}
</script>

<?php
$autor = mysql_query("SELECT * FROM users WHERE username = '".$news['author']."'");
$autor2 = mysql_fetch_assoc($autor);

?>
<div id="infos" style="margin-left:-6px">
<div style="width:40px; height:60px; background: url(http://i.imgur.com/6eIXCaW.png); margin-top:6px; margin-left:6px; float:left;"><div style="background: url(http://www.habbo.com.br/habbo-imaging/avatarimage/figure=<?php echo $autor2['look'];?>&img_format=gif&action=std&direction=2&head_direction=2&gesture=std&size=b) -12px -20px; width:40px; height:60px;"></div></div>
<div style="width:205px; height:56px; margin-top:5px; float:left; margin-left:10px; font-size:10px; color:#666666;">
<div style="margin-top:2px;">Autor: <b><a href="/hall/inicio"><?php echo $news['author']; ?></a>
</body>
</html> </b><br></div>
<div style="margin-top:2px;">Vizualizações: <b>1</b><br></div>
<div style="margin-top:2px;">Link: <b><a href="/articles/<?php echo $news['id']; ?>">Clique aqui</a></b></div>
<div style="margin-top:2px;">Postado em <b><?php echo date('d/m/Y ', $news['published']); ?></b></div>
</div>
<div style="width:1px; height:45px; background:#CCCCCC; float:left; margin-top:12px;"></div>
<div style="width:129px; height:10px; margin-top:5px; float:left; margin-left:10px; font-size:10px; color:#666666;">
<br>
<b><span style="color: #008000; font-size:10px;"><?php echo $like; ?><span style="color: #000000;"></b> gostaram disso<br>
<b><span style="color: #ff0000; font-size:10px;"><?php echo $unlike; ?></b> não gostaram disso<br>
<b>Jà deu seu voto?!</b>
<div style="width:125px; height:55px; float:right; margin-right:4px; margin-top:6px;">
</a>
</div>
</div>
<div style="width:530px; height:5px;"></div>
<div style="width:530px; height:auto; overflow:hidden; padding:5px 0px 5px 7px" id="avaliar_noticias">
 
 
</div>
</div>
</div>
</div>
</div>


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

The Flash The Flash  • 29.12.15 10:35

Articles sem a imagem do autor [AVATAR] Empty Re: Articles sem a imagem do autor [AVATAR] 29.12.15 10:35

[aviso=Articles sem a imagem do autor [AVATAR] H5W0zbq] O autor do tópico possui 24 horas para informar se a questão foi resolvida! [/aviso]

The Flash The Flash  • 30.12.15 11:54

Articles sem a imagem do autor [AVATAR] Empty Re: Articles sem a imagem do autor [AVATAR] 30.12.15 11:54

[alerta=Articles sem a imagem do autor [AVATAR] SsYaM5b]
Motivo: Prazo Encerrado! [/alerta]
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.