NEWS ERROR

K4TRIN4

Posting Freak
Jul 24, 2012
777
39
Hello Everyone,
So I recently opened a hotel couple of days ago and spen all of today fixing error etc however there is one error i cannot seem to work out. The news seems to be completely gone and not sure how to add it this is what it looks like at the moment.
4370-cdd20cddda41b9e298c53e85c160f91c.jpg

If anyone has any ideas of how to fix this please let me know. Thank you so much
 

Attachments

  • Screen Shot 2015-05-28 at 21.36.31.png
    Screen Shot 2015-05-28 at 21.36.31.png
    120.1 KB · Views: 16

K4TRIN4

Posting Freak
Jul 24, 2012
777
39
Can you please provide page code?
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{hotelName} - News</title>

<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>

<script type="text/javascript">
document.habboLoggedIn = true;
var habboName = "{username}";
var habboId = {userid};
var habboReqPath = "";
var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
var habboImagerUrl = " ";
var habboPartner = "";
var habboDefaultClientPopupUrl = "{url}/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
HabboClient.maximizeWindow = true;
}
</script>

<!--[if IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
<style type="text/css">
body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
</style>
<![endif]-->
</head>

<body id="news">
<?php
$navigatorID = 2;
require_once ('app/tpl/skins/Habbo/includes/header.php');
?>

<?php
$subNavigatorID = 2;
require_once ('app/tpl/skins/Habbo/includes/sub_header.php');
?>

<div id="content-container">
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title">News</h2>
<div id="article-archive">
<ul>
{newsList}
</ul>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<div id="column2" class="column">
<?php
$id = addslashes(htmlentities($_GET['id']));
$grabNews = mysql_query("SELECT id,author FROM cms_news WHERE id = '".$id."' LIMIT 1");
while ($newsData = mysql_fetch_assoc($grabNews))

$username = $newsData['author'];
$grabUser = mysql_query("SELECT * FROM users WHERE username = '".$username."' LIMIT 1");
while ($userData = mysql_fetch_assoc($grabUser))
{

$rankId = $userData['rank'];
$getRank = mysql_query("SELECT * FROM ranks WHERE id ='$rankId'");
$rank = mysql_fetch_array($getRank);
?>

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

<div id="article-wrapper">
<h2>{newsTitle}</h2>
<div class="article-meta">Posted {newsDate}</div>
<div class="article-body">
{newsContent}
<hr style="border-top: 1px dashed #999; margin-top: 7px; margin-bottom: -2px;" />

<div style="margin-left: 10px;">
<div id="userAvatar" style="background: url( echo $userData['look']; ?>&direction=3&head_direction=3&size=m&img_format=gif);"></div>
</div>

<div id="slickTitle" class="newsAuthor">
<a style="text-decoration:none;color:#666;">{newsAuthor}</a> -
<small><?php echo $userData['motto']; ?></small>
<span style="float: right; margin-right: 10px;">
<?php echo "".$rank['name'].""; ?>
</span>
</div>

<?php }?>
</div>
</div>
</div>
</div>

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

<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->

<div id="footer" >

</div>

</body>
</html>
 

Wickd

The first member of the Knights of the Pink Table
Jan 15, 2013
1,936
612
Sorry i missread LOL what do you mean by that?
Well i cbb to explain, here use my news.php(just replace entire news.php code with mine)
Code:
<?php/*---------------------------------------------------+
| RevProCMS - Website and Content Management System
+----------------------------------------------------+
| Copyright © 2014 Wicked 'Adam' and Proof 'Dan'
+----------------------------------------------------+
| RevProCMS is provided "as is" and comes without
| warrenty of any kind.
+---------------------------------------------------*/


/*
    Advanced Habbo Template System Help-http://devbest.com/members/wickd.26932/
    Please do not remove or edit the line defined below. If you do, you don't show much respect towards me.
    I have worked on RevPro for countless hours, I did this for free, without any personal gain for me at all.

    Please respect me and my work, and do not edit or remove the line defined below.

    If I do find people editing that line RevPro may go underground or I will simply stop developing, I'm
    prepared to go to the extreme.

    (Also, you're breaking the license if you do, and with that, copyright law)

    If you have any questions regarding this, feel free to e-mail me:
    meth0d at meth0d dot org,habview.co.uk,habview.com

    Thanks in advance.

*/

?><!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName} - News</title>
       
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>
       
        <script type="text/javascript">
            document.habboLoggedIn = true;
            var habboName = "{username}";
            var habboId = {userid};
            var habboReqPath = "";
            var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
            var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
            var habboPartner = "";
            var habboDefaultClientPopupUrl = "{url}/client";
            window.name = "habboMain";
            if (typeof HabboClient != "undefined") {
                HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
                HabboClient.maximizeWindow = true;
            }
        </script>
       
        <!--[if IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
        <![endif]-->
        <!--[if lt IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
        <![endif]-->
        <!--[if lt IE 7]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
            <script type="text/javascript">
                try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
            </script>
            <style type="text/css">
                body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
            </style>
        <![endif]-->
    </head>
   
    <body id="news">
   
        <div id="overlay"></div>

<?php

$navigatorID = 2;
require_once ('app/tpl/skins/Habbo/template/header.php');

?>

       
       
<div id="content-container">

<div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">
        <ul>
        <?php

        $subNavigatorID = 2;
        require_once ('app/tpl/skins/Habbo/template/sub_header.php');

        ?>
                </div>
            </div>
            <div id="container">
                <div id="content" style="position: relative" class="clearfix">
                    <div id="column1" class="column">
                        <div class="habblet-container ">       
                            <div class="cbb clearfix red ">
                                <h2 class="title">News</h2>
                                <div id="article-archive">



<ul>
<?php
    {
    for ($i = 0; $i < 6; $i++)
        {
            $sectionName = "";
            $sectionCutoffMax = 0;
            $sectionCutoffMin = 0;
       
            switch ($i)
            {
                    case 0:
               
                            $sectionName = 'Today';
                            $sectionCutoffMax = time();
                            $sectionCutoffMin = time() - 86400;
                            break;
                       
                    case 1:
               
                            $sectionName = 'Yesterday';
                            $sectionCutoffMax = time() - 86400;
                            $sectionCutoffMin = time() - 172800;
                            break;
                       
                    case 2:
               
                            $sectionName = 'This week';
                            $sectionCutoffMax = time() - 172800;
                            $sectionCutoffMin = time() - 604800;
                            break;
                       
                    case 3:
               
                            $sectionName = 'Last week';
                            $sectionCutoffMax = time() - 604800;
                            $sectionCutoffMin = time() - 1209600;
                            break;
                       
                    case 4:
               
                            $sectionName = 'This month';
                            $sectionCutoffMax = time() - 1209600;
                            $sectionCutoffMin = time() - 2592000;
                            break;
                       
                    case 5:
               
                            $sectionName = 'Last month';
                            $sectionCutoffMax = time() - 2592000;
                            $sectionCutoffMin = time() - 5184000;
                            break;
            }
       
            $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax .  " ORDER BY published DESC";
            $getArticles = mysql_query($q);
            if (mysql_num_rows($getArticles) > 0)
            {
                    echo '<h2>' . $sectionName . '</h2>';
               
                    while ($a = mysql_fetch_assoc($getArticles))
                    {
                        if($a['id'] == $_GET['id'])
                        {
                        echo '' . $a['title'] . '&nbsp;&raquo;';
                        }
                        else
                        {
                        echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . '&nbsp;&raquo;</a></li>';
                        }
                    }
            }
        }
    }
?>
    <li>       
   
    </li>


   


<a href="/articles/archive">More news &raquo;</a>
</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>{newsTitle}</h2>
                        <div class="article-meta">Posted {newsDate} <a href="/news">Administrator News</a></div>
                       
                        <p class="summary">{newsSummary}</p>

                        <div class="article-body">
                            <p>{newsContent}</p>
                             <div class="article-body"><p><font face="Verdana" size="1"><b>- {hotelname} Staff</b></p>
<!-- Staff Image -->
<img alt="" border="0" width="" height="" src="https://habboo-a.akamaihd.net/c_images/article_images_us/staff_com.png" align="left">

                            <div class="article-meta"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com/COREHOTELUS?fref=ts&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px;" allowTransparency="true"></iframe></div>
                           
                           
                        </div>
                    </div>
                </div>
            </div>
            <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
           
            <?php
            $checkBan = mysql_query("SELECT `cms_comment_banned` FROM `users` WHERE `cms_comment_banned` = '1' AND `id` = '".$_SESSION['user']['id']."'");
            if (mysql_num_rows($checkBan) == 1)
            { ?>
            <div class="habblet-container ">       
                <div class="cbb clearfix default ">
                    <h2 class="title">Banned from posting or seeing news comments!</h2>
                    <div style="padding: 5px;">
                        <p align="center">You're banned from posting news comments, due to this you cannot post or see comments.</p>
                    </div>
                </div>
            </div>
            <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
            <?php
            }
            else {
                $getArticle = mysql_query("SELECT * FROM `cms_news` WHERE `id` = '".filter($_GET['id'])."'") or die(mysql_error());
                if (mysql_num_rows($getArticle) > 0)
                {
                    $articleInfo = mysql_fetch_array($getArticle) or die(mysql_error());
                    if(isset($_POST['post_comment']) && $_SESSION['user']['id'] != null)
                    {
                        $checkBan = mysql_query("SELECT `cms_comment_banned` FROM `users` WHERE `cms_comment_banned` = '1' AND `id` = '".$_SESSION['user']['id']."'");
                        if (mysql_num_rows($checkBan) == 0)
                        {
                            if($_POST['comment'] == NULL)
                                $errorMessage = 'You have left a field empty.';
                            else
                            {
                                $checkInfo = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['id'])."' ORDER BY `id` DESC LIMIT 1") or die(mysql_error());
                                $newsInfo = mysql_fetch_array($checkInfo);
                                if($newsInfo['userid'] == $_SESSION['user']['id'])
                                    $errorMessage = 'Hey! The last comment was from you, let somebody else comment first!';
                                else
                                {
                                    mysql_query("INSERT INTO `cms_comments` (`article`, `userid`, `comment`, `posted_on`) VALUES ('".filter($_GET['id'])."', '".$_SESSION['user']['id']."', '".filter($_POST['comment'])."', '".date("M j, Y g:i A")."')") or die(mysql_error());
                                    $successMessage = 'You have successfully left a comment.';
                                }
                            }
                        }
                    }
                ?>
                <div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper" align="center">
<script async data-rocketsrc="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" type="text/rocketscript"></script>
<ins class="adsbygoogle" style="display:inline-block;width:468px;height:60px" data-ad-client="ca-pub-5602546026435487" data-ad-slot="8172713829"></ins>
<script type="text/rocketscript">
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</div>
                <div class="habblet-container ">       
                    <div class="cbb clearfix notitle ">
                        <div id="article-wrapper">
                            <h2>Post Comment</h2>
                            <div class="article-meta"></div>
                            <div style="padding:5px">
                                <?php if (isset($errorMessage)) { ?>
                                <div class="action-error flash-message">
                                    <div class="rounded">
                                        <div class="rounded-done"><?php echo $errorMessage; ?></div>
                                    </div>
                                </div>
                                <?php } else if (isset($successMessage)) { ?>
                                <div class="action-confirmation flash-message">
                                    <div class="rounded">
                                        <div class="rounded-done"><?php echo $successMessage; ?></div>
                                    </div>
                                </div>
                                <?php } ?>

                                <form action="" method="post">
                                    <textarea name="comment" maxlength="500"></textarea><br /><br />
                                    <input type="submit" name="post_comment" value="Post Comment" />
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

                <div class="habblet-container ">       
                <div class="cbb clearfix notitle ">
                <div id="article-wrapper">
                <?php $getComments = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['id'])."' ORDER BY `id` DESC"); ?>
                <h2>Comments (<?php echo mysql_num_rows($getComments); ?>)</h2>
                <div class="article-meta"></div>
                <div style="padding:5px">
                <?php
                if(mysql_num_rows($getComments) == 0)
                    echo 'Sorry, but no one has posted a comment yet.';                                   
                else
                {
                echo '<table width="528px">';
                while($commentInfo = mysql_fetch_array($getComments))
                {
                $userInfo = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".$commentInfo['userid']."'"));

                echo '
                <tr>
                <td width="90px" valign="top">
                <div style="height: 80px; width: 50px; float: left; overflow: hidden;"><img src="http://www.habbo.fr/habbo-imaging/avatarimage?figure='.$userInfo['look'].'"></div>';
                if($userInfo['rank'] > 5)
                    echo '<div style="position: absolute; z-index:1"><img src="{url}/habbo-imaging/ADM.gif"></div>';

                else if($userInfo['vip'] == 1 || $userInfo['rank'] == 2)
                echo '<div style="position: absolute; z-index:1"><img src="{url}/habbo-imaging/VIP.gif"></div>';

                if ($_SESSION['user']['rank'] >= 5)
                    echo '<br/><br/><br/><br/><br/><br/><br/><a href="{url}/news/'.$_GET['id'].'/delete/'.$commentInfo['id'].'">Delete</a> | <a href="{url}/news/'.$_GET['id'].'/ban/'.$commentInfo['id'].'">Ban</a>';
                echo '</td>

                <td width="427px" valign="top">
                <strong>RE: {newsTitle}</strong><br /><br />'.$commentInfo['comment'].'
                </td>
                </tr>
                <tr>
                <td width="90px" valign="top">
                </td>
                <td width="427px" align="right">';
                if ($_SESSION['user']['rank'] >= 5)
                    echo '<div align="right" style="margin-top: -16px;"><i>Posted by <strong><a href="#">'.$userInfo['username'].'</a></strong> on '.$commentInfo['posted_on'].'</i></div>';
                else
                    echo '<div align="right"><i>Posted by <strong><a href="#">'.$userInfo['username'].'</a></strong> on '.$commentInfo['posted_on'].'</i></div>';
                echo '<br /><br /><div style="width:125%; height:1px; background-color:#ccc; margin-top:-17px;"></div>

                </td>

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

<?php require_once ('app/tpl/skins/Habbo/template/footer.php'); ?>
 

K4TRIN4

Posting Freak
Jul 24, 2012
777
39
Well i cbb to explain, here use my news.php(just replace entire news.php code with mine)
Code:
<?php/*---------------------------------------------------+
| RevProCMS - Website and Content Management System
+----------------------------------------------------+
| Copyright © 2014 Wicked 'Adam' and Proof 'Dan'
+----------------------------------------------------+
| RevProCMS is provided "as is" and comes without
| warrenty of any kind.
+---------------------------------------------------*/


/*
    Advanced Habbo Template System Help-http://devbest.com/members/wickd.26932/
    Please do not remove or edit the line defined below. If you do, you don't show much respect towards me.
    I have worked on RevPro for countless hours, I did this for free, without any personal gain for me at all.

    Please respect me and my work, and do not edit or remove the line defined below.

    If I do find people editing that line RevPro may go underground or I will simply stop developing, I'm
    prepared to go to the extreme.

    (Also, you're breaking the license if you do, and with that, copyright law)

    If you have any questions regarding this, feel free to e-mail me:
    meth0d at meth0d dot org,habview.co.uk,habview.com

    Thanks in advance.

*/

?><!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName} - News</title>
      
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>
      
        <script type="text/javascript">
            document.habboLoggedIn = true;
            var habboName = "{username}";
            var habboId = {userid};
            var habboReqPath = "";
            var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
            var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
            var habboPartner = "";
            var habboDefaultClientPopupUrl = "{url}/client";
            window.name = "habboMain";
            if (typeof HabboClient != "undefined") {
                HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
                HabboClient.maximizeWindow = true;
            }
        </script>
      
        <!--[if IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
        <![endif]-->
        <!--[if lt IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
        <![endif]-->
        <!--[if lt IE 7]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
            <script type="text/javascript">
                try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
            </script>
            <style type="text/css">
                body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
            </style>
        <![endif]-->
    </head>
  
    <body id="news">
  
        <div id="overlay"></div>

<?php

$navigatorID = 2;
require_once ('app/tpl/skins/Habbo/template/header.php');

?>

      
      
<div id="content-container">

<div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">
        <ul>
        <?php

        $subNavigatorID = 2;
        require_once ('app/tpl/skins/Habbo/template/sub_header.php');

        ?>
                </div>
            </div>
            <div id="container">
                <div id="content" style="position: relative" class="clearfix">
                    <div id="column1" class="column">
                        <div class="habblet-container ">      
                            <div class="cbb clearfix red ">
                                <h2 class="title">News</h2>
                                <div id="article-archive">



<ul>
<?php
    {
    for ($i = 0; $i < 6; $i++)
        {
            $sectionName = "";
            $sectionCutoffMax = 0;
            $sectionCutoffMin = 0;
      
            switch ($i)
            {
                    case 0:
              
                            $sectionName = 'Today';
                            $sectionCutoffMax = time();
                            $sectionCutoffMin = time() - 86400;
                            break;
                      
                    case 1:
              
                            $sectionName = 'Yesterday';
                            $sectionCutoffMax = time() - 86400;
                            $sectionCutoffMin = time() - 172800;
                            break;
                      
                    case 2:
              
                            $sectionName = 'This week';
                            $sectionCutoffMax = time() - 172800;
                            $sectionCutoffMin = time() - 604800;
                            break;
                      
                    case 3:
              
                            $sectionName = 'Last week';
                            $sectionCutoffMax = time() - 604800;
                            $sectionCutoffMin = time() - 1209600;
                            break;
                      
                    case 4:
              
                            $sectionName = 'This month';
                            $sectionCutoffMax = time() - 1209600;
                            $sectionCutoffMin = time() - 2592000;
                            break;
                      
                    case 5:
              
                            $sectionName = 'Last month';
                            $sectionCutoffMax = time() - 2592000;
                            $sectionCutoffMin = time() - 5184000;
                            break;
            }
      
            $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax .  " ORDER BY published DESC";
            $getArticles = mysql_query($q);
            if (mysql_num_rows($getArticles) > 0)
            {
                    echo '<h2>' . $sectionName . '</h2>';
              
                    while ($a = mysql_fetch_assoc($getArticles))
                    {
                        if($a['id'] == $_GET['id'])
                        {
                        echo '' . $a['title'] . '&nbsp;&raquo;';
                        }
                        else
                        {
                        echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . '&nbsp;&raquo;</a></li>';
                        }
                    }
            }
        }
    }
?>
    <li>      
  
    </li>


  


<a href="/articles/archive">More news &raquo;</a>
</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>{newsTitle}</h2>
                        <div class="article-meta">Posted {newsDate} <a href="/news">Administrator News</a></div>
                      
                        <p class="summary">{newsSummary}</p>

                        <div class="article-body">
                            <p>{newsContent}</p>
                             <div class="article-body"><p><font face="Verdana" size="1"><b>- {hotelname} Staff</b></p>
<!-- Staff Image -->
<img alt="" border="0" width="" height="" src="https://habboo-a.akamaihd.net/c_images/article_images_us/staff_com.png" align="left">

                            <div class="article-meta"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com/COREHOTELUS?fref=ts&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px;" allowTransparency="true"></iframe></div>
                          
                          
                        </div>
                    </div>
                </div>
            </div>
            <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
          
            <?php
            $checkBan = mysql_query("SELECT `cms_comment_banned` FROM `users` WHERE `cms_comment_banned` = '1' AND `id` = '".$_SESSION['user']['id']."'");
            if (mysql_num_rows($checkBan) == 1)
            { ?>
            <div class="habblet-container ">      
                <div class="cbb clearfix default ">
                    <h2 class="title">Banned from posting or seeing news comments!</h2>
                    <div style="padding: 5px;">
                        <p align="center">You're banned from posting news comments, due to this you cannot post or see comments.</p>
                    </div>
                </div>
            </div>
            <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
            <?php
            }
            else {
                $getArticle = mysql_query("SELECT * FROM `cms_news` WHERE `id` = '".filter($_GET['id'])."'") or die(mysql_error());
                if (mysql_num_rows($getArticle) > 0)
                {
                    $articleInfo = mysql_fetch_array($getArticle) or die(mysql_error());
                    if(isset($_POST['post_comment']) && $_SESSION['user']['id'] != null)
                    {
                        $checkBan = mysql_query("SELECT `cms_comment_banned` FROM `users` WHERE `cms_comment_banned` = '1' AND `id` = '".$_SESSION['user']['id']."'");
                        if (mysql_num_rows($checkBan) == 0)
                        {
                            if($_POST['comment'] == NULL)
                                $errorMessage = 'You have left a field empty.';
                            else
                            {
                                $checkInfo = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['id'])."' ORDER BY `id` DESC LIMIT 1") or die(mysql_error());
                                $newsInfo = mysql_fetch_array($checkInfo);
                                if($newsInfo['userid'] == $_SESSION['user']['id'])
                                    $errorMessage = 'Hey! The last comment was from you, let somebody else comment first!';
                                else
                                {
                                    mysql_query("INSERT INTO `cms_comments` (`article`, `userid`, `comment`, `posted_on`) VALUES ('".filter($_GET['id'])."', '".$_SESSION['user']['id']."', '".filter($_POST['comment'])."', '".date("M j, Y g:i A")."')") or die(mysql_error());
                                    $successMessage = 'You have successfully left a comment.';
                                }
                            }
                        }
                    }
                ?>
                <div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper" align="center">
<script async data-rocketsrc="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" type="text/rocketscript"></script>
<ins class="adsbygoogle" style="display:inline-block;width:468px;height:60px" data-ad-client="ca-pub-5602546026435487" data-ad-slot="8172713829"></ins>
<script type="text/rocketscript">
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</div>
                <div class="habblet-container ">      
                    <div class="cbb clearfix notitle ">
                        <div id="article-wrapper">
                            <h2>Post Comment</h2>
                            <div class="article-meta"></div>
                            <div style="padding:5px">
                                <?php if (isset($errorMessage)) { ?>
                                <div class="action-error flash-message">
                                    <div class="rounded">
                                        <div class="rounded-done"><?php echo $errorMessage; ?></div>
                                    </div>
                                </div>
                                <?php } else if (isset($successMessage)) { ?>
                                <div class="action-confirmation flash-message">
                                    <div class="rounded">
                                        <div class="rounded-done"><?php echo $successMessage; ?></div>
                                    </div>
                                </div>
                                <?php } ?>

                                <form action="" method="post">
                                    <textarea name="comment" maxlength="500"></textarea><br /><br />
                                    <input type="submit" name="post_comment" value="Post Comment" />
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

                <div class="habblet-container ">      
                <div class="cbb clearfix notitle ">
                <div id="article-wrapper">
                <?php $getComments = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['id'])."' ORDER BY `id` DESC"); ?>
                <h2>Comments (<?php echo mysql_num_rows($getComments); ?>)</h2>
                <div class="article-meta"></div>
                <div style="padding:5px">
                <?php
                if(mysql_num_rows($getComments) == 0)
                    echo 'Sorry, but no one has posted a comment yet.';                                  
                else
                {
                echo '<table width="528px">';
                while($commentInfo = mysql_fetch_array($getComments))
                {
                $userInfo = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".$commentInfo['userid']."'"));

                echo '
                <tr>
                <td width="90px" valign="top">
                <div style="height: 80px; width: 50px; float: left; overflow: hidden;"><img src="http://www.habbo.fr/habbo-imaging/avatarimage?figure='.$userInfo['look'].'"></div>';
                if($userInfo['rank'] > 5)
                    echo '<div style="position: absolute; z-index:1"><img src="{url}/habbo-imaging/ADM.gif"></div>';

                else if($userInfo['vip'] == 1 || $userInfo['rank'] == 2)
                echo '<div style="position: absolute; z-index:1"><img src="{url}/habbo-imaging/VIP.gif"></div>';

                if ($_SESSION['user']['rank'] >= 5)
                    echo '<br/><br/><br/><br/><br/><br/><br/><a href="{url}/news/'.$_GET['id'].'/delete/'.$commentInfo['id'].'">Delete</a> | <a href="{url}/news/'.$_GET['id'].'/ban/'.$commentInfo['id'].'">Ban</a>';
                echo '</td>

                <td width="427px" valign="top">
                <strong>RE: {newsTitle}</strong><br /><br />'.$commentInfo['comment'].'
                </td>
                </tr>
                <tr>
                <td width="90px" valign="top">
                </td>
                <td width="427px" align="right">';
                if ($_SESSION['user']['rank'] >= 5)
                    echo '<div align="right" style="margin-top: -16px;"><i>Posted by <strong><a href="#">'.$userInfo['username'].'</a></strong> on '.$commentInfo['posted_on'].'</i></div>';
                else
                    echo '<div align="right"><i>Posted by <strong><a href="#">'.$userInfo['username'].'</a></strong> on '.$commentInfo['posted_on'].'</i></div>';
                echo '<br /><br /><div style="width:125%; height:1px; background-color:#ccc; margin-top:-17px;"></div>

                </td>

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

<?php require_once ('app/tpl/skins/Habbo/template/footer.php'); ?>
Thanks well i replaced my code with yours and now the page doesnt work at all i just get a white screen when at labbohotel.org/news
 
Nevermind fixed it thank you
 

Wickd

The first member of the Knights of the Pink Table
Jan 15, 2013
1,936
612
O
Thanks well i replaced my code with yours and now the page doesnt work at all i just get a white screen when at labbohotel.org/news
 
Nevermind fixed it thank you
Hmm i was about to provide class.forms bcos my Rev is a bit modified.
 

Users who are viewing this thread

Top