Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[RevCMS] White News Page
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Detox" data-source="post: 419764" data-attributes="member: 596"><p>[PHP]<!DOCTYPE html></p><p><?php include('includes/checktheban.php'); ?></p><p><html lang="en"></p><p> <head></p><p> <meta http-equiv="content-type" content="text/html; charset=utf-8"></p><p> <title>{hotelName} - News Articles</title></p><p> </p><p> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css"></p><p> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script></p><p> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script></p><p> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script></p><p> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script></p><p> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script></p><p></p><p> <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></p><p> </p><p> <script type="text/javascript"></p><p> document.habboLoggedIn = true;</p><p> var habboName = "{username}";</p><p> var habboId = {userid};</p><p> var habboReqPath = "";</p><p> var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";</p><p> var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";</p><p> var habboPartner = "";</p><p> var habboDefaultClientPopupUrl = "{url}/client";</p><p> window.name = "habboMain";</p><p> if (typeof HabboClient != "undefined") {</p><p> HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";</p><p> HabboClient.maximizeWindow = true;</p><p> }</p><p> </script></p><p> </p><p> <!--[if IE 8]></p><p> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css"></p><p> <![endif]--></p><p> <!--[if lt IE 8]></p><p> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" /></p><p> <![endif]--></p><p> <!--[if lt IE 7]></p><p> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" /></p><p> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script></p><p> <script type="text/javascript"></p><p> try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}</p><p> </script></p><p> <style type="text/css"></p><p> body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }</p><p> </style></p><p> <![endif]--></p><p> </head></p><p> </p><p> <body id="news"></p><p> </p><p> <div id="overlay"></div></p><p> <?php</p><p></p><p>$navigatorID = 2;</p><p>require_once ('includes/header.php');</p><p></p><p>?></p><p> </div></p><p> </div></p><p> </div></p><p> <div id="content-container"></p><p> <div id="navi2-container" class="pngbg"></p><p> <div id="navi2" class="pngbg clearfix"></p><p> <ul></p><p> <?php</p><p></p><p>$subNavigatorID = 2;</p><p>require_once ('includes/subnavi.php');</p><p></p><p>?></p><p> </ul></p><p> </div></p><p> </div></p><p> <div id="container"></p><p> <div id="content" style="position: relative" class="clearfix"></p><p> <div id="column1" class="column"></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix default "></p><p> <h2 class="title">News</h2></p><p> <div id="article-archive"></p><p> </ul> </p><p></p><p><?php</p><p> {</p><p> for ($i = 0; $i < 6; $i++)</p><p> {</p><p> $sectionName = "";</p><p> $sectionCutoffMax = 0;</p><p> $sectionCutoffMin = 0;</p><p> </p><p> switch ($i)</p><p> {</p><p> case 0:</p><p> </p><p> $sectionName = 'Today';</p><p> $sectionCutoffMax = time();</p><p> $sectionCutoffMin = time() - 86400;</p><p> break;</p><p> </p><p> case 1:</p><p> </p><p> $sectionName = 'Yesterday';</p><p> $sectionCutoffMax = time() - 86400;</p><p> $sectionCutoffMin = time() - 172800;</p><p> break;</p><p> </p><p> case 2:</p><p> </p><p> $sectionName = 'This week';</p><p> $sectionCutoffMax = time() - 172800;</p><p> $sectionCutoffMin = time() - 604800;</p><p> break;</p><p> </p><p> case 3:</p><p> </p><p> $sectionName = 'Last week';</p><p> $sectionCutoffMax = time() - 604800;</p><p> $sectionCutoffMin = time() - 1209600;</p><p> break;</p><p> </p><p> case 4:</p><p> </p><p> $sectionName = 'This month';</p><p> $sectionCutoffMax = time() - 1209600;</p><p> $sectionCutoffMin = time() - 2592000;</p><p> break;</p><p> </p><p> case 5:</p><p> </p><p> $sectionName = 'Last month';</p><p> $sectionCutoffMax = time() - 2592000;</p><p> $sectionCutoffMin = time() - 5184000;</p><p> break;</p><p> }</p><p> </p><p> $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC";</p><p> $getArticles = mysql_query($q);</p><p> if (mysql_num_rows($getArticles) > 0)</p><p> {</p><p> echo '<h2>' . $sectionName . '</h2>';</p><p> echo'<ul><li>';</p><p> </p><p> while ($a = mysql_fetch_assoc($getArticles))</p><p> {</p><p> if($a['id'] == $_GET['id'])</p><p> {</p><p> echo '' . $a['title'] . '';</p><p> }</p><p> else</p><p> {</p><p> echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . '&nbsp;&raquo;</a></li>';</p><p> }</p><p> </p><p> }</p><p> }</p><p> }</p><p> }</p><p>?></p><p> </div></p><p> </div></p><p> </div></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p> </div></p><p></p><p><div id="column2" class="column"></p><p><div class="habblet-container "></p><p><div class="cbb clearfix notitle "></p><p><div id="article-wrapper"></p><p> <h2>{newsTitle}</h2></p><p> <div class="article-meta">Posted {newsDate}</div></p><p> <p class="summary">{newsTitle}</p></p><p> <div class="article-body"></p><p> {newsContent}</p><p> <br><br></p><p> <p><font face="Verdana" size="1"><b>- {newsAuthor}</b></p></p><p> <script type="text/javascript" language="Javascript"></p><p> document.observe("dom:loaded", function() {</p><p> $$('.article-images a').each(function(a) {</p><p> Event.observe(a, 'click', function(e) {</p><p> Event.stop(e);</p><p> Overlay.lightbox(a.href, "Image is loading");</p><p> });</p><p> });</p><p> </p><p> $$('a.article-2729').each(function(a) {</p><p> a.replace(a.innerHTML);</p><p> });</p><p> });</p><p> </script></p><p> </div></p><p> </div></p><p> </div></p><p></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p> </p><p> <?php</p><p> $checkBan = mysql_query("SELECT `cms_comment_banned` FROM `users` WHERE `cms_comment_banned` = '1' AND `id` = '".$_SESSION['user']['id']."'");</p><p> if (mysql_num_rows($checkBan) == 1)</p><p> { ?></p><p> <div class="habblet-container "> </p><p> <div class="cbb clearfix default "></p><p> <h2 class="title">Banned from posting or seeing news comments!</h2></p><p> <div style="padding: 5px;"></p><p> <p align="center">You're banned from posting news comments, due to this you cannot post or see comments.</p></p><p> </div></p><p> </div></p><p> </div></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p> <?php</p><p> }</p><p> else {</p><p> $getArticle = mysql_query("SELECT * FROM `cms_news` WHERE `id` = '".filter($_GET['id'])."'") or die(mysql_error());</p><p> if (mysql_num_rows($getArticle) > 0)</p><p> {</p><p> $articleInfo = mysql_fetch_array($getArticle) or die(mysql_error());</p><p> if(isset($_POST['post_comment']) && $_SESSION['user']['id'] != null)</p><p> {</p><p> $checkBan = mysql_query("SELECT `cms_comment_banned` FROM `users` WHERE `cms_comment_banned` = '1' AND `id` = '".$_SESSION['user']['id']."'");</p><p> if (mysql_num_rows($checkBan) == 0)</p><p> {</p><p> if($_POST['comment'] == NULL)</p><p> $errorMessage = 'You have left a field empty.';</p><p> else</p><p> {</p><p> $checkInfo = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['id'])."' ORDER BY `id` DESC LIMIT 1") or die(mysql_error());</p><p> $newsInfo = mysql_fetch_array($checkInfo);</p><p> if($newsInfo['userid'] == $_SESSION['user']['id'])</p><p> $errorMessage = 'Hey! The last comment was from you, let somebody else comment first!';</p><p> else</p><p> {</p><p> 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());</p><p> $successMessage = 'You have successfully left a comment.';</p><p> }</p><p> }</p><p> }</p><p> }</p><p> ?></p><p> <div class="habblet-container "></p><p><div class="cbb clearfix notitle "></p><p><div id="article-wrapper" align="center"></p><p></div></p><p></div></p><p></div></p><p> <div class="habblet-container "> </p><p> <div class="cbb clearfix notitle "></p><p> <div id="article-wrapper"></p><p> <h2>Post Comment</h2></p><p> <div class="article-meta"></div></p><p> <div style="padding:5px"></p><p> <?php if (isset($errorMessage)) { ?></p><p> <div class="action-error flash-message"></p><p> <div class="rounded"></p><p> <div class="rounded-done"><?php echo $errorMessage; ?></div></p><p> </div></p><p> </div></p><p> <?php } else if (isset($successMessage)) { ?></p><p> <div class="action-confirmation flash-message"></p><p> <div class="rounded"></p><p> <div class="rounded-done"><?php echo $successMessage; ?></div></p><p> </div></p><p> </div></p><p> <?php } ?></p><p></p><p> <form action="" method="post"></p><p> <textarea name="comment" maxlength="500"></textarea><br /><br /></p><p> <input type="submit" name="post_comment" value="Post Comment" /></p><p> </form></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p></p><p> <div class="habblet-container "> </p><p> <div class="cbb clearfix notitle "></p><p> <div id="article-wrapper"></p><p> <?php $getComments = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['id'])."' ORDER BY `id` DESC"); ?></p><p> <h2>Comments (<?php echo mysql_num_rows($getComments); ?>)</h2></p><p> <div class="article-meta"></div></p><p> <div style="padding:5px"></p><p> <?php</p><p> if(mysql_num_rows($getComments) == 0)</p><p> echo 'Sorry, but no one has posted a comment yet.'; </p><p> else</p><p> {</p><p> echo '<table width="528px">';</p><p> while($commentInfo = mysql_fetch_array($getComments))</p><p> {</p><p> $userInfo = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".$commentInfo['userid']."'"));</p><p></p><p> echo '</p><p> <tr></p><p> <td width="90px" valign="top"></p><p> <div style="height: 80px; width: 50px; float: left; overflow: hidden;"><img src="http://www.habbo.fr/habbo-imaging/avatarimage?figure='.$userInfo['look'].'"></div>';</p><p> if($userInfo['rank'] > 7)</p><p> echo '<div style="position: absolute; z-index:1"><img src="{url}/images/OWNER.gif"></div>';</p><p></p><p> else if($userInfo['rank'] > 5)</p><p> echo '<div style="position: absolute; z-index:1"><img src="{url}/images/ADM.gif"></div>';</p><p></p><p> else if($userInfo['vip'] == 2 || $userInfo['rank'] == 3)</p><p> echo '<div style="position: absolute; z-index:1"><img src="{url}/images/VIP.gif"></div>';</p><p></p><p> if ($_SESSION['user']['rank'] >= 7)</p><p> 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>';</p><p> echo '</td></p><p></p><p> <td width="427px" valign="top"></p><p> <strong>RE: {newsTitle}</strong><br /><br />'.$commentInfo['comment'].'</p><p> </td></p><p> </tr></p><p> <tr></p><p> <td width="90px" valign="top"></p><p> </td></p><p> <td width="427px" align="right">';</p><p> if ($_SESSION['user']['rank'] >= 5)</p><p> echo '<div align="right" style="margin-top: -16px;"><i>Posted by <strong><a href="#">'.$userInfo['username'].'</a></strong> on '.$commentInfo['posted_on'].'</i></div>';</p><p> else</p><p> echo '<div align="right"><i>Posted by <strong><a href="#">'.$userInfo['username'].'</a></strong> on '.$commentInfo['posted_on'].'</i></div>';</p><p> echo '<br /><br /><div style="width:125%; height:1px; background-color:#ccc; margin-top:-17px;"></div></p><p></p><p> </td></p><p></p><p> </tr>';</p><p> }</p><p> echo '</table>';</p><p> }</p><p> ?></p><p> </div></p><p> </div></p><p> </div></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p> </p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p> </p><p> <script type="text/javascript"></p><p> HabboView.run();</p><p> </script></p><p><? }} ?></p><p> <!--[if lt IE 7]></p><p> <script type="text/javascript"></p><p> Pngfix.doPngImageFix();</p><p> </script></p><p> <![endif]--></p><p> </font></p><p> </p></p><p> </p><p> <div id="footer" style="margin-top:-20px;"></p><p><p class="footer-links"><a href="https://cheerhotel.com/client">Launch Client</a> l <a href="#" target="_blank">Terms of Service</a> l <a href="http://cheerboards.com/">Forums</a> l <a href="https://cheerhotel.com/store">Store</a></p></p><p><p class="copyright">Copyright &copy; {hotelName} Hotel 2016. All rights reserved to their respective owner(s). Credits to <strong>Kryptos</strong> for <strong>RevCMS</strong.</p></p><p></p><p> </body></p><p></html>[/PHP]</p><p></p><p>[MEDIA=youtube]eY-CRZadjEQ[/MEDIA]</p></blockquote><p></p>
[QUOTE="Detox, post: 419764, member: 596"] [PHP]<!DOCTYPE html> <?php include('includes/checktheban.php'); ?> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>{hotelName} - News Articles</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> <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> <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 ('includes/header.php'); ?> </div> </div> </div> <div id="content-container"> <div id="navi2-container" class="pngbg"> <div id="navi2" class="pngbg clearfix"> <ul> <?php $subNavigatorID = 2; require_once ('includes/subnavi.php'); ?> </ul> </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 default "> <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>'; echo'<ul><li>'; while ($a = mysql_fetch_assoc($getArticles)) { if($a['id'] == $_GET['id']) { echo '' . $a['title'] . ''; } else { echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . ' »</a></li>'; } } } } } ?> </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}</div> <p class="summary">{newsTitle}</p> <div class="article-body"> {newsContent} <br><br> <p><font face="Verdana" size="1"><b>- {newsAuthor}</b></p> <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, "Image is loading"); }); }); $$('a.article-2729').each(function(a) { a.replace(a.innerHTML); }); }); </script> </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"> </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'] > 7) echo '<div style="position: absolute; z-index:1"><img src="{url}/images/OWNER.gif"></div>'; else if($userInfo['rank'] > 5) echo '<div style="position: absolute; z-index:1"><img src="{url}/images/ADM.gif"></div>'; else if($userInfo['vip'] == 2 || $userInfo['rank'] == 3) echo '<div style="position: absolute; z-index:1"><img src="{url}/images/VIP.gif"></div>'; if ($_SESSION['user']['rank'] >= 7) 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> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script> </div> </div> </div> </div> <script type="text/javascript"> HabboView.run(); </script> <? }} ?> <!--[if lt IE 7]> <script type="text/javascript"> Pngfix.doPngImageFix(); </script> <![endif]--> </font> </p> <div id="footer" style="margin-top:-20px;"> <p class="footer-links"><a href="https://cheerhotel.com/client">Launch Client</a> l <a href="#" target="_blank">Terms of Service</a> l <a href="http://cheerboards.com/">Forums</a> l <a href="https://cheerhotel.com/store">Store</a></p> <p class="copyright">Copyright © {hotelName} Hotel 2016. All rights reserved to their respective owner(s). Credits to <strong>Kryptos</strong> for <strong>RevCMS</strong.</p> </body> </html>[/PHP] [MEDIA=youtube]eY-CRZadjEQ[/MEDIA] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[RevCMS] White News Page
Top