AJUDA ERROS XAMPP

+3
ηikηicius
Example
Strik3
7 participantes

Strik3 Strik3  • 17.01.13 23:32

AJUDA ERROS XAMPP Empty AJUDA ERROS XAMPP 17.01.13 23:32

BOM TEM ALGUNS LOCAIS DA MINHA CMS QUE APARECE OS SEGUINTES ERROS ~~>
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\articles.php on line 115


QUERIA QUE ALGUÉM ME AJUDASSE !

Example Example  • 17.01.13 23:33

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:33

Ola Convidado

Pode por um print para nois ver o erro?



#Partil

ηikηicius ηikηicius  • 17.01.13 23:33

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:33

Qual cms vc usa ?

Strik3 Strik3  • 17.01.13 23:36

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:36

Olha os prints ai dos erros, o de cima é a barrinha que não aparece.

https://2img.net/h/oi49.tinypic.com/dlix3k.png



ηikηicius escreveu:Qual cms vc usa ?

Eu uso a Galaxy Cms !


Última edição por -Cѳɳɳɛʀ em 17.01.13 23:41, editado 2 vez(es)

ϟFisher ϟFisher  • 17.01.13 23:39

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:39

Olá Convidado,
O erro da "Barrinha" eu não faço a minima ideia,
Mais o outro,
Eu tenho a solução [eu acho],
Vá até a pasta HTDOCS do seu xampp,
Abra o arquivo articles.php com um editor html,
Adicione o seguinte codigo:
Código:
<?php error_reporting (0); ?>
Coloque-o em qualquer area da pagina,
Depois de um F5 e veja se o erro continua,
Espero ter ajudado,

Até.

Gabrieldlm Gabrieldlm  • 17.01.13 23:42

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:42

Me passe o arquivo articles.php para que eu possa fazer as alterações no código PHP do mesmo.
Provavelmente a $query está falhando e retornando falso, o que causa esse erro.

Obs: O código acima só esconde erros inocentes ,não soluciona erros graves.


Última edição por Gabrieldlm em 17.01.13 23:46, editado 1 vez(es)

Strik3 Strik3  • 17.01.13 23:45

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:45

Olha ai o arquivo Gabriel.

Spoiler:


Espero que me ajude estou precisando !

Gabrieldlm Gabrieldlm  • 17.01.13 23:53

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:53

Reputação da mensagem: 100% (1 votos)
Talvez esse resulte:

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);
$pagename = "".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 = "".HoloText($news['title'])."";
}


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 orange">
<h2 class="title">Noticias</h2>
<div id="article-archive">

<?php
$sql = mysql_query("SELECT * FROM cms_news ORDER BY id DESC");
if(mysql_num_rows($sql) > 0){
or die(mysql_error());
?>
<h2>Últimas Noticias</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 } ?>

<h2>¿Más noticias?</h2>
<ul>
<li>
<a href="<?php echo $path; ?>/articles" class="article">Más noticias</a> »
</li>
</ul>
</div>

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

<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">Publicado el <?php echo date('d-m-Y', $news['published']); ?>
<a href="news.php?category=<?php echo $news['category']; ?>"><?php echo $news['category']; ?></a></div>
<p class="summary"><?php echo (HoloText($news['longstory'])); ?></p>
<div class="article-body">
<p><?php echo (HoloText($news['shortstory'], true)); ?></p>
<div class="article-body"><img src="../web-gallery/album1/users_online.PNG"> <b><?php echo $news['author']; ?></b><br><br></div>
<div class="article-body"><iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FComunidadBebboxes&amp;width=292&amp;height=62&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=false&amp;header=false&amp;appId=289108061205307" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>
</iframe>


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

</div>

<?php
if(isset($_POST['post_comment'])):
$error = array();

$comentario = strip_tags ($_POST['comment']);

if(empty($comentario))
$error[] = "<font color='#ff0000'>Es necesario Escribir Tu Comentario antes de Enviarlo</font>";
if(empty($error)):
$sucess = "<font color='#009900'>Tu Comentario a Sido Agregado, Gracias por Comentar.</font>";
mysql_query("INSERT INTO `cms_comments`(`story`, `comment`, `date`, `author`) VALUES ('".$news_id."', '".$comentario."', '".time()."', '".$my_id."')") or die(mysql_error());
endif;
foreach($error as $errors)
$errorz = $errors;
endif;
$comment_id = $_POST['comment_id'];
$borrar = $_POST['eliminar'];

if($borrar == 1){
mysql_query("DELETE FROM cms_comments WHERE id = '$comment_id'") or die(mysql_error());
}

?>


<?php
$commentid = mysql_fetch_array(mysql_query("SELECT * FROM `cms_comments` ORDER BY id DESC LIMIT 1")) or die(mysql_error());
$mas = 1;
$comid = $commentid['id']+$mas;
?>


<div class="habblet-container ">

<div class="cbb clearfix notitle ">

<div id="article-wrapper"><h2>Escribe un comentario</h2>

<div class="article-meta">

<div class="article-body">

<form action="/articles/<?php echo $news_id; ?>?articleid=<?php echo $news_id; ?>&commentid=<?php echo $comid; ?><?php echo $row12['id']; ?>&userid=<?php echo $my_id; ?>" method="post">

<textarea name="comment" maxlength="500"></textarea><br /><br />

<input type="submit" name="post_comment" value="Enviar" />

</form>

</div>

</div>

</div>

</div><style type="text/css">

input[type="text"], input[type="password"] {

background-color: #F1F1F1;

border: 1px solid #999999;

width: 175px;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

input[type="submit"] {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

textarea {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

width: 517px;

height: 70px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

select {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

</style>

<?php
$sql1 = mysql_query("SELECT * FROM cms_comments WHERE story = '".$news_id."'");
$total = mysql_num_rows($sql1) or die(mysql_error());
?>


<div class="habblet-container ">

<div class="cbb clearfix notitle ">

<div id="article-wrapper"><h2>Comentarios (<?php echo $total; ?>)</h2>

<div class="article-meta"></div>

<div class="article-body">

<?php
$sql1 = mysql_query("SELECT * FROM cms_comments WHERE story = '".$news_id."' ORDER BY id DESC") or die(mysql_error());
if(mysql_num_rows($sql1) > 0){
?>

<?php while($row1 = mysql_fetch_assoc($sql1)){

$userdata = mysql_fetch_assoc($userdata = mysql_query("SELECT * FROM users WHERE id = '".$row1['author']."'")) or die(mysql_error());
?>




<table width="528px">

<tr>

<td width="90px" valign="top">

<div style="float:left"><img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $userdata['look']; ?>&size=b&direction=2&head_direction=3&gesture=sml&size=m"></div>



</td>

<td width="427px" valign="top">

<strong>RE: <?php echo $news['title']; ?></strong><br /><br /><?php echo $row1['comment']; ?>

</td>

</tr>

<tr>

<td width="90px" valign="top">

</td>

<td width="427px" align="right">

<i><form method="post" action=""><?php if($user_rank > 3 && $logged_in == true){ ?><input type="hidden" name="comment_id" value="<?php echo $row1['id'] ?>"> Eliminar Comentario: <input type="radio" name="eliminar" value="0" checked> No |<input type="radio" name="eliminar" value="1" onchange="this.form.submit()"> Si, Eliminar. <?php } ?></form>Por: <strong><a href="/home/<?php echo $userdata['username']; ?>"><?php echo $userdata['username']; ?></a></strong>
Enviado el <?php echo date('M j, Y g:i A', $row1['date']); ?></i><br /><br />

</td>

</tr>
<?php } } ?>


</table>

</div>

</div>

</div>

</div>
</div>

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

</div>

<div id="column3" class="column">
</div>

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

Strik3 Strik3  • 17.01.13 23:55

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 17.01.13 23:55

Continua o mesmo erro , eu não sei mais o que fazer gabriel ! :/

Gabrieldlm Gabrieldlm  • 18.01.13 0:01

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 18.01.13 0:01

-Cѳɳɳɛʀ escreveu:Continua o mesmo erro , eu não sei mais o que fazer gabriel ! :/

Você deve por:
Código:
or die(mysql_error());
no final de todos os códigos SQLs
Ex: $main_sql = mysql_query("SELECT * FROM cms_news WHERE id = '".$news_id."'") or die(mysql_error());

A parte em vermelho é a que você deve adicionar nas outras e a parte verde é o código SQL.

Strik3 Strik3  • 18.01.13 0:05

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 18.01.13 0:05

Gabrieldlm escreveu:
-Cѳɳɳɛʀ escreveu:Continua o mesmo erro , eu não sei mais o que fazer gabriel ! :/

Você deve por:
Código:
or die(mysql_error());
no final de todos os códigos SQLs
Ex: $main_sql = mysql_query("SELECT * FROM cms_news WHERE id = '".$news_id."'") or die(mysql_error());

A parte em vermelho é a que você deve adicionar nas outras e a parte verde é o código SQL.


Ainda continua a mesma coisa, gabriel você não quer me ajudar por team não rápidinho?

WictorP WictorP  • 18.01.13 0:08

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 18.01.13 0:08

Tente essa:

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);
$pagename = "".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 = "".HoloText($news['title'])."";
}


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 orange">
<h2 class="title">Noticias</h2>
<div id="article-archive">

<?php
$sql = mysql_query("SELECT * FROM cms_news ORDER BY id DESC"); or die(mysql_error());
if(mysql_num_rows($sql) > 0){
?>
<h2>Últimas Noticias</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 } ?>

<h2>¿Más noticias?</h2>
<ul>
<li>
<a href="<?php echo $path; ?>/articles" class="article">Más noticias</a> »
</li>
</ul>
</div>

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

<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">Publicado el <?php echo date('d-m-Y', $news['published']); ?>
<a href="news.php?category=<?php echo $news['category']; ?>"><?php echo $news['category']; ?></a></div>
<p class="summary"><?php echo (HoloText($news['longstory'])); ?></p>
<div class="article-body">
<p><?php echo (HoloText($news['shortstory'], true)); ?></p>
<div class="article-body"><img src="../web-gallery/album1/users_online.PNG"> <b><?php echo $news['author']; ?></b><br><br></div>
<div class="article-body"><iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FComunidadBebboxes&amp;width=292&amp;height=62&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=false&amp;header=false&amp;appId=289108061205307" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>
</iframe>


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

</div>

<?php
if(isset($_POST['post_comment'])):
$error = array();

$comentario = strip_tags ($_POST['comment']);

if(empty($comentario))
$error[] = "<font color='#ff0000'>Es necesario Escribir Tu Comentario antes de Enviarlo</font>";
if(empty($error)):
$sucess = "<font color='#009900'>Tu Comentario a Sido Agregado, Gracias por Comentar.</font>";
mysql_query("INSERT INTO `cms_comments`(`story`, `comment`, `date`, `author`) VALUES ('".$news_id."', '".$comentario."', '".time()."', '".$my_id."')");
endif;
foreach($error as $errors)
$errorz = $errors;
endif;
$comment_id = $_POST['comment_id'];
$borrar = $_POST['eliminar'];

if($borrar == 1){
mysql_query("DELETE FROM cms_comments WHERE id = '$comment_id'");
}

?>


<?php
$commentid = mysql_fetch_array(mysql_query("SELECT * FROM `cms_comments` ORDER BY id DESC LIMIT 1"));
$mas = 1;
$comid = $commentid['id']+$mas;
?>


<div class="habblet-container ">

<div class="cbb clearfix notitle ">

<div id="article-wrapper"><h2>Escribe un comentario</h2>

<div class="article-meta">

<div class="article-body">

<form action="/articles/<?php echo $news_id; ?>?articleid=<?php echo $news_id; ?>&commentid=<?php echo $comid; ?><?php echo $row12['id']; ?>&userid=<?php echo $my_id; ?>" method="post">

<textarea name="comment" maxlength="500"></textarea><br /><br />

<input type="submit" name="post_comment" value="Enviar" />

</form>

</div>

</div>

</div>

</div><style type="text/css">

input[type="text"], input[type="password"] {

background-color: #F1F1F1;

border: 1px solid #999999;

width: 175px;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

input[type="submit"] {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

textarea {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

width: 517px;

height: 70px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

select {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

</style>

<?php
$sql1 = mysql_query("SELECT * FROM cms_comments WHERE story = '".$news_id."'");  or die(mysql_error());
$total = mysql_num_rows($sql1);
?>


<div class="habblet-container ">

<div class="cbb clearfix notitle ">

<div id="article-wrapper"><h2>Comentarios (<?php echo $total; ?>)</h2>

<div class="article-meta"></div>

<div class="article-body">

<?php
$sql1 = mysql_query("SELECT * FROM cms_comments WHERE story = '".$news_id."' ORDER BY id DESC");  or die(mysql_error());
if(mysql_num_rows($sql1) > 0){
?>

<?php while($row1 = mysql_fetch_assoc($sql1)){

$userdata = mysql_fetch_assoc($userdata = mysql_query("SELECT * FROM users WHERE id = '".$row1['author']."'")); or die(mysql_error());
?>




<table width="528px">

<tr>

<td width="90px" valign="top">

<div style="float:left"><img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $userdata['look']; ?>&size=b&direction=2&head_direction=3&gesture=sml&size=m"></div>



</td>

<td width="427px" valign="top">

<strong>RE: <?php echo $news['title']; ?></strong><br /><br /><?php echo $row1['comment']; ?>

</td>

</tr>

<tr>

<td width="90px" valign="top">

</td>

<td width="427px" align="right">

<i><form method="post" action=""><?php if($user_rank > 3 && $logged_in == true){ ?><input type="hidden" name="comment_id" value="<?php echo $row1['id'] ?>"> Eliminar Comentario: <input type="radio" name="eliminar" value="0" checked> No |<input type="radio" name="eliminar" value="1" onchange="this.form.submit()"> Si, Eliminar. <?php } ?></form>Por: <strong><a href="/home/<?php echo $userdata['username']; ?>"><?php echo $userdata['username']; ?></a></strong>
Enviado el <?php echo date('M j, Y g:i A', $row1['date']); ?></i><br /><br />

</td>

</tr>
<?php } } ?>


</table>

</div>

</div>

</div>

</div>
</div>

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

</div>

<div id="column3" class="column">
</div>

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


Até mais!

Strik3 Strik3  • 18.01.13 0:21

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 18.01.13 0:21

Isso não serviu Wictor, alguém me ajuda a tirar esses erros? Estão me incomodando ! '-'

TrY! TrY!  • 18.01.13 10:23

AJUDA ERROS XAMPP Empty Re: AJUDA ERROS XAMPP 18.01.13 10:23

Olá,

Utilize esse código:
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);
$pagename = "".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);
while($news != false)
{
$news_id = $news['id'];
}
$pagename = "".HoloText($news['title'])."";
}


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 orange">
<h2 class="title">Noticias</h2>
<div id="article-archive">

<?php
$sql = mysql_query("SELECT * FROM cms_news ORDER BY id DESC");
if(mysql_num_rows($sql) > 0){
?>
<h2>Últimas Noticias</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 } ?>

<h2>¿Más noticias?</h2>
<ul>
<li>
<a href="<?php echo $path; ?>/articles" class="article">Más noticias</a> »
</li>
</ul>
</div>

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

<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">Publicado el <?php echo date('d-m-Y', $news['published']); ?>
<a href="news.php?category=<?php echo $news['category']; ?>"><?php echo $news['category']; ?></a></div>
<p class="summary"><?php echo (HoloText($news['longstory'])); ?></p>
<div class="article-body">
<p><?php echo (HoloText($news['shortstory'], true)); ?></p>
<div class="article-body"><img src="../web-gallery/album1/users_online.PNG"> <b><?php echo $news['author']; ?></b><br><br></div>
<div class="article-body"><iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FComunidadBebboxes&amp;width=292&amp;height=62&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=false&amp;header=false&amp;appId=289108061205307" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;" allowTransparency="true"></iframe>
</iframe>


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

</div>

<?php
if(isset($_POST['post_comment'])):
$error = array();

$comentario = strip_tags ($_POST['comment']);

if(empty($comentario))
$error[] = "<font color='#ff0000'>Es necesario Escribir Tu Comentario antes de Enviarlo</font>";
if(empty($error)):
$sucess = "<font color='#009900'>Tu Comentario a Sido Agregado, Gracias por Comentar.</font>";
mysql_query("INSERT INTO `cms_comments`(`story`, `comment`, `date`, `author`) VALUES ('".$news_id."', '".$comentario."', '".time()."', '".$my_id."')");
endif;
foreach($error as $errors)
$errorz = $errors;
endif;
$comment_id = $_POST['comment_id'];
$borrar = $_POST['eliminar'];

if($borrar == 1){
mysql_query("DELETE FROM cms_comments WHERE id = '$comment_id'");
}

?>


<?php
$commentid = mysql_fetch_array(mysql_query("SELECT * FROM `cms_comments` ORDER BY id DESC LIMIT 1"));
$mas = 1;
while($commentid != false)
{
$comid = $commentid['id']+$mas;
}

?>


<div class="habblet-container ">

<div class="cbb clearfix notitle ">

<div id="article-wrapper"><h2>Escribe un comentario</h2>

<div class="article-meta">

<div class="article-body">

<form action="/articles/<?php echo $news_id; ?>?articleid=<?php echo $news_id; ?>&commentid=<?php echo $comid; ?><?php echo $row12['id']; ?>&userid=<?php echo $my_id; ?>" method="post">

<textarea name="comment" maxlength="500"></textarea><br /><br />

<input type="submit" name="post_comment" value="Enviar" />

</form>

</div>

</div>

</div>

</div><style type="text/css">

input[type="text"], input[type="password"] {

background-color: #F1F1F1;

border: 1px solid #999999;

width: 175px;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

input[type="submit"] {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

textarea {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

width: 517px;

height: 70px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

select {

background-color: #F1F1F1;

border: 1px solid #999999;

padding: 5px;

font-family: verdana;

font-size: 10px;

color: #666666;

}

</style>

<?php
$sql1 = mysql_query("SELECT * FROM cms_comments WHERE story = '".$news_id."'");
$total = mysql_num_rows($sql1);
?>


<div class="habblet-container ">

<div class="cbb clearfix notitle ">

<div id="article-wrapper"><h2>Comentarios (<?php echo $total; ?>)</h2>

<div class="article-meta"></div>

<div class="article-body">

<?php
$sql1 = mysql_query("SELECT * FROM cms_comments WHERE story = '".$news_id."' ORDER BY id DESC");
if(mysql_num_rows($sql1) > 0){
?>

<?php while($row1 = mysql_fetch_assoc($sql1)){

$userdata = mysql_fetch_assoc($userdata = mysql_query("SELECT * FROM users WHERE id = '".$row1['author']."'"));
?>




<table width="528px">

<tr>

<td width="90px" valign="top">

<div style="float:left"><img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $userdata['look']; ?>&size=b&direction=2&head_direction=3&gesture=sml&size=m"></div>



</td>

<td width="427px" valign="top">

<strong>RE: <?php echo $news['title']; ?></strong><br /><br /><?php echo $row1['comment']; ?>

</td>

</tr>

<tr>

<td width="90px" valign="top">

</td>

<td width="427px" align="right">

<i><form method="post" action=""><?php if($user_rank > 3 && $logged_in == true){ ?><input type="hidden" name="comment_id" value="<?php echo $row1['id'] ?>"> Eliminar Comentario: <input type="radio" name="eliminar" value="0" checked> No |<input type="radio" name="eliminar" value="1" onchange="this.form.submit()"> Si, Eliminar. <?php } ?></form>Por: <strong><a href="/home/<?php echo $userdata['username']; ?>"><?php echo $userdata['username']; ?></a></strong>
Enviado el <?php echo date('M j, Y g:i A', $row1['date']); ?></i><br /><br />

</td>

</tr>
<?php } } ?>


</table>

</div>

</div>

</div>

</div>
</div>

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

</div>

<div id="column3" class="column">
</div>

<?php require_once('./templates/community_footer.php'); ?>
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.