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 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="JoshuaS" data-source="post: 431560" data-attributes="member: 41738"><p style="margin-left: 20px">So where excactly? i've put the code in the spoiler[SPOILER="news.php"]</p> <p style="margin-left: 20px">[CODE]<!DOCTYPE html></p> <p style="margin-left: 20px"><html lang="en"></p> <p style="margin-left: 20px"> <head></p> <p style="margin-left: 20px"> <meta http-equiv="content-type" content="text/html; charset=utf-8"></p> <p style="margin-left: 20px"> <title>{hotelName} - News Articles</title></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css"></p> <p style="margin-left: 20px"> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script></p> <p style="margin-left: 20px"> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script></p> <p style="margin-left: 20px"> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script></p> <p style="margin-left: 20px"> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script></p> <p style="margin-left: 20px"> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <script type="text/javascript"></p> <p style="margin-left: 20px"> document.habboLoggedIn = true;</p> <p style="margin-left: 20px"> var habboName = "{username}";</p> <p style="margin-left: 20px"> var habboId = {userid};</p> <p style="margin-left: 20px"> var habboReqPath = "";</p> <p style="margin-left: 20px"> var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";</p> <p style="margin-left: 20px"> var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";</p> <p style="margin-left: 20px"> var habboPartner = "";</p> <p style="margin-left: 20px"> var habboDefaultClientPopupUrl = "{url}/client";</p> <p style="margin-left: 20px"> window.name = "habboMain";</p> <p style="margin-left: 20px"> if (typeof HabboClient != "undefined") {</p> <p style="margin-left: 20px"> HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";</p> <p style="margin-left: 20px"> HabboClient.maximizeWindow = true;</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> </script></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <!--[if IE 8]></p> <p style="margin-left: 20px"> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css"></p> <p style="margin-left: 20px"> <![endif]--></p> <p style="margin-left: 20px"> <!--[if lt IE 8]></p> <p style="margin-left: 20px"> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" /></p> <p style="margin-left: 20px"> <![endif]--></p> <p style="margin-left: 20px"> <!--[if lt IE 7]></p> <p style="margin-left: 20px"> <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" /></p> <p style="margin-left: 20px"> <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script></p> <p style="margin-left: 20px"> <script type="text/javascript"></p> <p style="margin-left: 20px"> try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}</p> <p style="margin-left: 20px"> </script></p> <p style="margin-left: 20px"> <style type="text/css"></p> <p style="margin-left: 20px"> body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }</p> <p style="margin-left: 20px"> </style></p> <p style="margin-left: 20px"> <![endif]--></p> <p style="margin-left: 20px"> </head></p> <p style="margin-left: 20px"> <div id="overlay"></div></p> <p style="margin-left: 20px"> <?php include ("includes/header.php"); ?></p> <p style="margin-left: 20px"> <ul id="navi"></p> <p style="margin-left: 20px"> <li class="metab"><a href="{url}/me">{username}</a><span></span></li></p> <p style="margin-left: 20px"> <li class="selected"><strong>Community</strong><span></span></li></p> <p style="margin-left: 20px"> <li id="values"><a href= "{url}/values">Rare Values</a><span></span></li></p> <p style="margin-left: 20px"> <li id="tab-register-now"><a href="{url}/shop">Shop</a><span></span></li></p> <p style="margin-left: 20px"> </ul></p> <p style="margin-left: 20px"> <div id="habbos-online" style="background-color:#FFF;border-radius:6px;"><div class="rounded"><span>{online}<br> members playing</div></div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <div id="content-container"></p> <p style="margin-left: 20px"> <div id="navi2-container" class="pngbg"></p> <p style="margin-left: 20px"> <div id="navi2" class="pngbg clearfix"></p> <p style="margin-left: 20px"> <ul></p> <p style="margin-left: 20px"> <li><a href="{url}/community">Community</a></li></p> <p style="margin-left: 20px"> <li class="selected">Articles</li></p> <p style="margin-left: 20px"> <li><a href="{url}/staff">Staff Team</a></li></p> <p style="margin-left: 20px"> <li><a href="{url}/topstats">Top Stats</a></li></p> <p style="margin-left: 20px"> </ul></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> <body id="news"></p> <p style="margin-left: 20px"> <div id="container"></p> <p style="margin-left: 20px"> <!-- Author Container --></p> <p style="margin-left: 20px"> <div id="content" style="position: relative" class="clearfix"></p> <p style="margin-left: 20px"> <div id="column1" class="column"></p> <p style="margin-left: 20px"> <div class="habblet-container"></p> <p style="margin-left: 20px"> <div style="height: 120px; overflow: hidden;" class="cbb clearfix red"></p> <p style="margin-left: 20px"> <h2 class="title">Forfatter</h2></p> <p style="margin-left: 20px"> <div class="author_div" style="overflow: hidden; margin-top: 2px; word-wrap: break-word;"></p> <p style="margin-left: 20px"> <p class="author_name"><b>{newsAuthor}</b></p></p> <p style="margin-left: 20px"> <p class="author_motto"><?php</p> <p style="margin-left: 20px"> $getCom = mysql_query("SELECT * FROM cms_news WHERE id = '".htmlentities($_GET['id'])."' ");</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> while($Com = mysql_fetch_array($getCom)){</p> <p style="margin-left: 20px"> $getusermotto = mysql_query("SELECT * FROM users WHERE username = '".$Com['author']."'");</p> <p style="margin-left: 20px"> $usermotto = mysql_fetch_array($getusermotto);</p> <p style="margin-left: 20px"> echo $usermotto['motto'];</p> <p style="margin-left: 20px"> ;}</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> ?></p></p> <p style="margin-left: 20px"> <!--<div class="author_status"></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> $getCom = mysql_query("SELECT * FROM cms_news WHERE id = '".htmlentities($_GET['id'])."' ");</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> while($Com = mysql_fetch_array($getCom)){</p> <p style="margin-left: 20px"> $getuserlook = mysql_query("SELECT * FROM users WHERE username = '".$Com['author']."'");</p> <p style="margin-left: 20px"> $userlook = mysql_fetch_array($getuserlook);</p> <p style="margin-left: 20px"> if ($userlook['online'] == 1) {</p> <p style="margin-left: 20px"> echo '<img src="{url}/app/tpl/skins/Habbo/images/online.gif";>';</p> <p style="margin-left: 20px"> } else {</p> <p style="margin-left: 20px"> echo '<img src="{url}/app/tpl/skins/Habbo/images/offline.gif">';</p> <p style="margin-left: 20px"> };</p> <p style="margin-left: 20px"> };</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> </div>--></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $getCom = mysql_query("SELECT * FROM cms_news WHERE id = '".htmlentities($_GET['id'])."' ");</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> while($Com = mysql_fetch_array($getCom)){</p> <p style="margin-left: 20px"> $getuserlook = mysql_query("SELECT * FROM users WHERE username = '".$Com['author']."'");</p> <p style="margin-left: 20px"> $userlook = mysql_fetch_array($getuserlook);</p> <p style="margin-left: 20px"> echo'</p> <p style="margin-left: 20px"> <img class="author_avatar" src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$userlook['look'].'&direction=2&head_direction=3&size=m&gesture=sml"></p> <p style="margin-left: 20px"> ';}</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> <div class="habblet-container "></p> <p style="margin-left: 20px"> <div class="cbb clearfix red "></p> <p style="margin-left: 20px"> <h2 class="title">News</h2></p> <p style="margin-left: 20px"> <div id="article-archive"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <ul></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> for ($i = 0; $i < 6; $i++)</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> $sectionName = "";</p> <p style="margin-left: 20px"> $sectionCutoffMax = 0;</p> <p style="margin-left: 20px"> $sectionCutoffMin = 0;</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> switch ($i)</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> case 0:</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $sectionName = 'Today';</p> <p style="margin-left: 20px"> $sectionCutoffMax = time();</p> <p style="margin-left: 20px"> $sectionCutoffMin = time() - 86400;</p> <p style="margin-left: 20px"> break;</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> case 1:</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $sectionName = 'Yesterday';</p> <p style="margin-left: 20px"> $sectionCutoffMax = time() - 86400;</p> <p style="margin-left: 20px"> $sectionCutoffMin = time() - 172800;</p> <p style="margin-left: 20px"> break;</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> case 2:</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $sectionName = 'This Week';</p> <p style="margin-left: 20px"> $sectionCutoffMax = time() - 172800;</p> <p style="margin-left: 20px"> $sectionCutoffMin = time() - 604800;</p> <p style="margin-left: 20px"> break;</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> case 3:</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $sectionName = 'Last week';</p> <p style="margin-left: 20px"> $sectionCutoffMax = time() - 604800;</p> <p style="margin-left: 20px"> $sectionCutoffMin = time() - 1209600;</p> <p style="margin-left: 20px"> break;</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> case 4:</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $sectionName = 'This month';</p> <p style="margin-left: 20px"> $sectionCutoffMax = time() - 1209600;</p> <p style="margin-left: 20px"> $sectionCutoffMin = time() - 2592000;</p> <p style="margin-left: 20px"> break;</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> case 5:</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $sectionName = 'Last month';</p> <p style="margin-left: 20px"> $sectionCutoffMax = time() - 2592000;</p> <p style="margin-left: 20px"> $sectionCutoffMin = time() - 5184000;</p> <p style="margin-left: 20px"> break;</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC";</p> <p style="margin-left: 20px"> $getArticles = mysql_query($q);</p> <p style="margin-left: 20px"> if (mysql_num_rows($getArticles) > 0)</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> echo '<h2>' . $sectionName . '</h2></p> <p style="margin-left: 20px"> <ul>';</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> while ($a = mysql_fetch_assoc($getArticles))</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> echo '<li></p> <p style="margin-left: 20px"> <a href="https://furyhotel.net/news/' . $a['id'] . '">' . $a['title'] . '&nbsp;&raquo;</a></p> <p style="margin-left: 20px"> </li>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> echo '</ul>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> </ul></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> <div id="column2" class="column"></p> <p style="margin-left: 20px"> <div class="habblet-container "></p> <p style="margin-left: 20px"> <div class="cbb clearfix notitle "></p> <p style="margin-left: 20px"> <div id="article-wrapper"></p> <p style="margin-left: 20px"> <h2>{newsTitle} </h2></p> <p style="margin-left: 20px"> <div class="article-meta">Posted {newsDate}</div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <p class="summary">{newsTitle}</p></p> <p style="margin-left: 20px"> <div class="article-body"></p> <p style="margin-left: 20px"> {newsContent}</p> <p style="margin-left: 20px"> <br></p> <p style="margin-left: 20px"> <p><font face="Verdana" size="1"><b>- {newsAuthor}</b></p></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <script type="text/javascript" language="Javascript"></p> <p style="margin-left: 20px"> document.observe("dom:loaded", function() {</p> <p style="margin-left: 20px"> $$('.article-images a').each(function(a) {</p> <p style="margin-left: 20px"> Event.observe(a, 'click', function(e) {</p> <p style="margin-left: 20px"> Event.stop(e);</p> <p style="margin-left: 20px"> Overlay.lightbox(a.href, "Image is loading");</p> <p style="margin-left: 20px"> });</p> <p style="margin-left: 20px"> });</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $$('a.article-2729').each(function(a) {</p> <p style="margin-left: 20px"> a.replace(a.innerHTML);</p> <p style="margin-left: 20px"> });</p> <p style="margin-left: 20px"> });</p> <p style="margin-left: 20px"> </script></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"><!--Kommentar-funktion --></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> if(isset($_POST['post_comment']))</p> <p style="margin-left: 20px"> $posted_on = date("M j, Y g:i A");</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> if (empty($_POST['comment']))</p> <p style="margin-left: 20px"> $_POST['comment'] = '';</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> $comment = strip_tags (filter($_POST['comment']));</p> <p style="margin-left: 20px"> if($comment == NULL){</p> <p style="margin-left: 20px"> //define("ERROR", "You have to type in a reply!<br /><br />");</p> <p style="margin-left: 20px"> //$error_message = 'You have to type in a reply!<br /><br />';</p> <p style="margin-left: 20px"> }else{</p> <p style="margin-left: 20px"> if (isLogged)</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> mysql_query("INSERT INTO cms_comments (article, userid, comment, posted_on, author) VALUES ('".filter($_GET['id'])."', '".$_SESSION['user']['id']."', '".filter($comment)."', '".$posted_on."', '" . $_SESSION['user']['username']. "');") or die(mysql_error());</p> <p style="margin-left: 20px"> define('SUCCESS', 'You have successfully posted a comment on this news article!');</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> //define("ERROR", "<br>Thanks for your reply!<br />");</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> //$error_message = 'Thanks for your reply!<br /><br />';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <div class="habblet-container "></p> <p style="margin-left: 20px"> <div class="cbb clearfix notitle "></p> <p style="margin-left: 20px"> <div id="article-wrapper"><h2>Place Comment</h2></p> <p style="margin-left: 20px"> <div class="article-meta"></div></p> <p style="margin-left: 20px"> <div class="article-body"></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> $userPosts = mysql_query("SELECT * FROM cms_comments WHERE article = '".htmlentities(mysql_real_escape_string($_GET['id']))."' AND userid = '" . $_SESSION['user']['id']. "'");</p> <p style="margin-left: 20px"> $postNum = mysql_num_rows($userPosts);</p> <p style="margin-left: 20px"> if($postNum >= 2)</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> define('ERROR', 'Sorry, you are only allowed one comment per article.');</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> if(defined("SUCCESS")){</p> <p style="margin-left: 20px"> /* Refresh efter kommentar */</p> <p style="margin-left: 20px"> header('Refresh:0;')</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> <div>&nbsp;</div></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> if(defined("ERROR")) {</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> <div class="rounded rounded-red" width="20%"></p> <p style="margin-left: 20px"> <?php echo ERROR; ?><br /></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> <div>&nbsp;</div></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> else</p> <p style="margin-left: 20px"> {</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> <form action="" method="post"></p> <p style="margin-left: 20px"> <textarea name="comment" maxlength="500"></textarea><br /><br /></p> <p style="margin-left: 20px"> <input type="submit" name="post_comment" value="Place Comment" /></p> <p style="margin-left: 20px"> </form></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <style type="text/css"></p> <p style="margin-left: 20px"> input[type="text"], input[type="password"] {</p> <p style="margin-left: 20px"> background-color: #F1F1F1;</p> <p style="margin-left: 20px"> border: 1px solid #999999;</p> <p style="margin-left: 20px"> width: 175px;</p> <p style="margin-left: 20px"> padding: 5px;</p> <p style="margin-left: 20px"> font-family: verdana;</p> <p style="margin-left: 20px"> font-size: 10px;</p> <p style="margin-left: 20px"> color: #666666;</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> input[type="submit"] {</p> <p style="margin-left: 20px"> background-color: #F1F1F1;</p> <p style="margin-left: 20px"> border: 1px solid #999999;</p> <p style="margin-left: 20px"> padding: 5px;</p> <p style="margin-left: 20px"> font-family: verdana;</p> <p style="margin-left: 20px"> font-size: 10px;</p> <p style="margin-left: 20px"> color: #666666;</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> textarea {</p> <p style="margin-left: 20px"> background-color: #F1F1F1;</p> <p style="margin-left: 20px"> border: 1px solid #999999;</p> <p style="margin-left: 20px"> padding: 5px;</p> <p style="margin-left: 20px"> width: 517px;</p> <p style="margin-left: 20px"> height: 70px;</p> <p style="margin-left: 20px"> font-family: verdana;</p> <p style="margin-left: 20px"> font-size: 10px;</p> <p style="margin-left: 20px"> color: #666666;</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> select {</p> <p style="margin-left: 20px"> background-color: #F1F1F1;</p> <p style="margin-left: 20px"> border: 1px solid #999999;</p> <p style="margin-left: 20px"> padding: 5px;</p> <p style="margin-left: 20px"> font-family: verdana;</p> <p style="margin-left: 20px"> font-size: 10px;</p> <p style="margin-left: 20px"> color: #666666;</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> </style></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> $getComments = mysql_query("SELECT * FROM cms_comments WHERE article = '".filter($_GET['id'])."' ORDER by id DESC");</p> <p style="margin-left: 20px"> ?></p> <p style="margin-left: 20px"> <div class="habblet-container "></p> <p style="margin-left: 20px"> <div class="cbb clearfix notitle "></p> <p style="margin-left: 20px"> <div id="article-wrapper"><h2><?php echo mysql_num_rows($getComments); ?> Comments</h2></p> <p style="margin-left: 20px"> <div class="article-meta"></div></p> <p style="margin-left: 20px"> <div class="article-body"></p> <p style="margin-left: 20px"> <?php</p> <p style="margin-left: 20px"> if(mysql_num_rows($getComments) == 0) {</p> <p style="margin-left: 20px"> echo "No comments for this article!";</p> <p style="margin-left: 20px"> } else {</p> <p style="margin-left: 20px"> echo '<table width="528px">';</p> <p style="margin-left: 20px"> while($Comments = mysql_fetch_array($getComments)){</p> <p style="margin-left: 20px"> $getUserInfo = mysql_query("SELECT * FROM users WHERE username = '".$Comments['author']."'");</p> <p style="margin-left: 20px"> $userInfo = mysql_fetch_array($getUserInfo);</p> <p style="margin-left: 20px"> echo '</p> <p style="margin-left: 20px"> <tr></p> <p style="margin-left: 20px"> <td width="90px" valign="top"></div></p> <p style="margin-left: 20px"> <div style="</p> <p style="margin-left: 20px"> height: 65px;</p> <p style="margin-left: 20px"> width: 50px;</p> <p style="margin-left: 20px"> float: left;</p> <p style="margin-left: 20px"> overflow: hidden;</p> <p style="margin-left: 20px"> "></p> <p style="margin-left: 20px"> <div style="float:left"><img position:absolute; src="http://www.habbo.nl/habbo-imaging/avatarimage?figure='.$userInfo['look'].'&size=b&direction=2&head_direction=3&gesture=sml&size=2"></div></p> <p style="margin-left: 20px"> ';</p> <p style="margin-left: 20px"> if($userInfo['rank'] >= 5) {</p> <p style="margin-left: 20px"> echo $userinfo['rank'];</p> <p style="margin-left: 20px"> echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM.gif"></div>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> if($userInfo['rank'] == 3) {</p> <p style="margin-left: 20px"> echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/badges/XXX.gif"></div>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> if($userInfo['rank'] == 4) {</p> <p style="margin-left: 20px"> echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/badges/XXX.gif"></div>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> if($userInfo['rank'] == 2) {</p> <p style="margin-left: 20px"> echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/badges/VIP.gif"></div>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> if($userInfo['rank'] == 1) {</p> <p style="margin-left: 20px"> echo '<div style="position: absolute; z-index:1"><img src="{url}/lid.png"></div>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> echo '</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </td></p> <p style="margin-left: 20px"> <td width="427px" valign="top"></p> <p style="margin-left: 20px"> <i><a href="/me">'.$userInfo['username'].' </a></i></p> <p style="margin-left: 20px"> <br /><br />'.$Comments['comment'].'</p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </td></p> <p style="margin-left: 20px"> </tr></p> <p style="margin-left: 20px"> <tr></p> <p style="margin-left: 20px"> <td width="80px" valign="top"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </td></p> <p style="margin-left: 20px"> <td width="400px" align="right"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </div></div></div></div></p> <p style="margin-left: 20px"> <br></p> <p style="margin-left: 20px"> <div style="width:100%; height:1px; background-color:#ccc; margin-top:-17px;"></div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </td></p> <p style="margin-left: 20px"> </tr>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> echo '</table>';</p> <p style="margin-left: 20px"> }</p> <p style="margin-left: 20px"> ?></div> </div> </div> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p> <p style="margin-left: 20px"> <script type="text/javascript"></p> <p style="margin-left: 20px"> HabboView.run();</p> <p style="margin-left: 20px"> </script></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <!--[if lt IE 7]></p> <p style="margin-left: 20px"> <script type="text/javascript"></p> <p style="margin-left: 20px"> Pngfix.doPngImageFix();</p> <p style="margin-left: 20px"> </script></p> <p style="margin-left: 20px"> <![endif]--></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <div id="footer" ></p> <p style="margin-left: 20px"> <?php include "app/tpl/skins/Habbo/inc/footer.php"; ?></p> <p style="margin-left: 20px"> </div></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"><!-- LIKE funktion --></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> </body></p> <p style="margin-left: 20px"> </html></p> <p style="margin-left: 20px">[/CODE]</p> <p style="margin-left: 20px">[/SPOILER]</p></blockquote><p></p>
[QUOTE="JoshuaS, post: 431560, member: 41738"] [INDENT]So where excactly? i've put the code in the spoiler[SPOILER="news.php"] [CODE]<!DOCTYPE html> <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> <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> <div id="overlay"></div> <?php include ("includes/header.php"); ?> <ul id="navi"> <li class="metab"><a href="{url}/me">{username}</a><span></span></li> <li class="selected"><strong>Community</strong><span></span></li> <li id="values"><a href= "{url}/values">Rare Values</a><span></span></li> <li id="tab-register-now"><a href="{url}/shop">Shop</a><span></span></li> </ul> <div id="habbos-online" style="background-color:#FFF;border-radius:6px;"><div class="rounded"><span>{online}<br> members playing</div></div> </div> </div> <div id="content-container"> <div id="navi2-container" class="pngbg"> <div id="navi2" class="pngbg clearfix"> <ul> <li><a href="{url}/community">Community</a></li> <li class="selected">Articles</li> <li><a href="{url}/staff">Staff Team</a></li> <li><a href="{url}/topstats">Top Stats</a></li> </ul> </div> </div> <body id="news"> <div id="container"> <!-- Author Container --> <div id="content" style="position: relative" class="clearfix"> <div id="column1" class="column"> <div class="habblet-container"> <div style="height: 120px; overflow: hidden;" class="cbb clearfix red"> <h2 class="title">Forfatter</h2> <div class="author_div" style="overflow: hidden; margin-top: 2px; word-wrap: break-word;"> <p class="author_name"><b>{newsAuthor}</b></p> <p class="author_motto"><?php $getCom = mysql_query("SELECT * FROM cms_news WHERE id = '".htmlentities($_GET['id'])."' "); while($Com = mysql_fetch_array($getCom)){ $getusermotto = mysql_query("SELECT * FROM users WHERE username = '".$Com['author']."'"); $usermotto = mysql_fetch_array($getusermotto); echo $usermotto['motto']; ;} ?></p> <!--<div class="author_status"> <?php $getCom = mysql_query("SELECT * FROM cms_news WHERE id = '".htmlentities($_GET['id'])."' "); while($Com = mysql_fetch_array($getCom)){ $getuserlook = mysql_query("SELECT * FROM users WHERE username = '".$Com['author']."'"); $userlook = mysql_fetch_array($getuserlook); if ($userlook['online'] == 1) { echo '<img src="{url}/app/tpl/skins/Habbo/images/online.gif";>'; } else { echo '<img src="{url}/app/tpl/skins/Habbo/images/offline.gif">'; }; }; ?> </div>--> <?php $getCom = mysql_query("SELECT * FROM cms_news WHERE id = '".htmlentities($_GET['id'])."' "); while($Com = mysql_fetch_array($getCom)){ $getuserlook = mysql_query("SELECT * FROM users WHERE username = '".$Com['author']."'"); $userlook = mysql_fetch_array($getuserlook); echo' <img class="author_avatar" src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$userlook['look'].'&direction=2&head_direction=3&size=m&gesture=sml"> ';} ?> </div> </div> </div> <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> <ul>'; while ($a = mysql_fetch_assoc($getArticles)) { echo '<li> <a href="https://furyhotel.net/news/' . $a['id'] . '">' . $a['title'] . ' »</a> </li>'; } echo '</ul>'; } } } ?> </ul> </div> </div> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script> </div> </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> <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> </div> <!--Kommentar-funktion --> <?php if(isset($_POST['post_comment'])) $posted_on = date("M j, Y g:i A"); if (empty($_POST['comment'])) $_POST['comment'] = ''; $comment = strip_tags (filter($_POST['comment'])); if($comment == NULL){ //define("ERROR", "You have to type in a reply!<br /><br />"); //$error_message = 'You have to type in a reply!<br /><br />'; }else{ if (isLogged) { mysql_query("INSERT INTO cms_comments (article, userid, comment, posted_on, author) VALUES ('".filter($_GET['id'])."', '".$_SESSION['user']['id']."', '".filter($comment)."', '".$posted_on."', '" . $_SESSION['user']['username']. "');") or die(mysql_error()); define('SUCCESS', 'You have successfully posted a comment on this news article!'); //define("ERROR", "<br>Thanks for your reply!<br />"); //$error_message = 'Thanks for your reply!<br /><br />'; } } ?> <div class="habblet-container "> <div class="cbb clearfix notitle "> <div id="article-wrapper"><h2>Place Comment</h2> <div class="article-meta"></div> <div class="article-body"> <?php $userPosts = mysql_query("SELECT * FROM cms_comments WHERE article = '".htmlentities(mysql_real_escape_string($_GET['id']))."' AND userid = '" . $_SESSION['user']['id']. "'"); $postNum = mysql_num_rows($userPosts); if($postNum >= 2) { define('ERROR', 'Sorry, you are only allowed one comment per article.'); } if(defined("SUCCESS")){ /* Refresh efter kommentar */ header('Refresh:0;') ?> <div> </div> <?php } if(defined("ERROR")) { ?> <div class="rounded rounded-red" width="20%"> <?php echo ERROR; ?><br /> </div> <div> </div> <?php } else { ?> <form action="" method="post"> <textarea name="comment" maxlength="500"></textarea><br /><br /> <input type="submit" name="post_comment" value="Place Comment" /> </form> <?php } ?> </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 $getComments = mysql_query("SELECT * FROM cms_comments WHERE article = '".filter($_GET['id'])."' ORDER by id DESC"); ?> <div class="habblet-container "> <div class="cbb clearfix notitle "> <div id="article-wrapper"><h2><?php echo mysql_num_rows($getComments); ?> Comments</h2> <div class="article-meta"></div> <div class="article-body"> <?php if(mysql_num_rows($getComments) == 0) { echo "No comments for this article!"; } else { echo '<table width="528px">'; while($Comments = mysql_fetch_array($getComments)){ $getUserInfo = mysql_query("SELECT * FROM users WHERE username = '".$Comments['author']."'"); $userInfo = mysql_fetch_array($getUserInfo); echo ' <tr> <td width="90px" valign="top"></div> <div style=" height: 65px; width: 50px; float: left; overflow: hidden; "> <div style="float:left"><img position:absolute; src="http://www.habbo.nl/habbo-imaging/avatarimage?figure='.$userInfo['look'].'&size=b&direction=2&head_direction=3&gesture=sml&size=2"></div> '; if($userInfo['rank'] >= 5) { echo $userinfo['rank']; echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM.gif"></div>'; } if($userInfo['rank'] == 3) { echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/badges/XXX.gif"></div>'; } if($userInfo['rank'] == 4) { echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/badges/XXX.gif"></div>'; } if($userInfo['rank'] == 2) { echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/badges/VIP.gif"></div>'; } if($userInfo['rank'] == 1) { echo '<div style="position: absolute; z-index:1"><img src="{url}/lid.png"></div>'; } echo ' </td> <td width="427px" valign="top"> <i><a href="/me">'.$userInfo['username'].' </a></i> <br /><br />'.$Comments['comment'].' </td> </tr> <tr> <td width="80px" valign="top"> </td> <td width="400px" align="right"> </div></div></div></div> <br> <div style="width:100%; height:1px; background-color:#ccc; margin-top:-17px;"></div> </td> </tr>'; } echo '</table>'; } ?></div> </div> </div> </div> </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" > <?php include "app/tpl/skins/Habbo/inc/footer.php"; ?> </div> <!-- LIKE funktion --> </body> </html> [/CODE] [/SPOILER][/INDENT] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
REVCMS NEWS PAGE
Top