Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.99 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <link rel="shortcut icon" href="{url}/app/tpl/skins/{skin}/images/favicon.ico" type="image/vnd.microsoft.icon"/>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  6. <title>{hotelName}: News Articles</title>
  7.  
  8. <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
  9. <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
  10. <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
  11. <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
  12. <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
  13. <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>
  14.  
  15. <script type="text/javascript">
  16. document.habboLoggedIn = true;
  17. var habboName = "{username}";
  18. var habboId = {userid};
  19. var habboReqPath = "";
  20. var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
  21. var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
  22. var habboPartner = "";
  23. var habboDefaultClientPopupUrl = "{url}/client";
  24. window.name = "habboMain";
  25. if (typeof HabboClient != "undefined") {
  26. HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
  27. HabboClient.maximizeWindow = true;
  28. }
  29. </script>
  30.  
  31. <!--[if IE 8]>
  32. <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
  33. <![endif]-->
  34. <!--[if lt IE 8]>
  35. <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
  36. <![endif]-->
  37. <!--[if lt IE 7]>
  38. <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
  39. <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
  40. <script type="text/javascript">
  41. try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
  42. </script>
  43. <style type="text/css">
  44. body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
  45. </style>
  46. <![endif]-->
  47. </head>
  48.  
  49. <body id="news">
  50.  
  51. <div id="overlay"></div>
  52. <?php include ("includes/header.php"); ?>
  53. <ul id="navi">
  54. <li class="metab"><a href="{url}/me">{username}</a><span></span></li>
  55. <li class="selected"><strong>Community</strong><span></span></li>
  56. <li id="tab-register-now"><a href="http://hablore.com/forum/index.php" target="_blank">LoreForums</a><span></span></li>
  57. <li id="tab-register-now"><a href="{url}/values/index.php" target="_blank">LoreValues</a><span></span></li>
  58. <li id="tab-register-now"><a href="{url}/store">Store</a><span></span></li>
  59. <?php
  60. if(isset($_SESSION['user']['id']))
  61. if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 1) {
  62. echo '<li id="tab-register-now"><a href="http://hc-uploader.ga" target="_blank">Image Uploader</a><span></span></li>';
  63. }
  64. ?>
  65. </ul>
  66. <div id="habbos-online"><div id="content"><div class="cbb "><span><b>{online}</b><br>{hotelName}(s)<br>online</span></div></div></div>
  67. </div>
  68. </div>
  69. <div id="content-container">
  70. <div id="navi2-container" class="pngbg">
  71. <div id="navi2" class="pngbg clearfix">
  72. <ul>
  73. <li class=""><a href="{url}/community">Community</a></li>
  74. <li class="selected">News</li>
  75. <li class=""><a href="{url}/staff">{hotelname} Staff</a></li>
  76. <li class=""><a href="{url}/topstats">Top Player Stats</a></li>
  77. <li class=""><a href="{url}/richest">Richest Players</a></li>
  78. <li class="last"><a href="{url}/stats">{hotelname} Statistics</a></li>
  79. </ul>
  80. </div>
  81. </div>
  82. <div id="container">
  83. <div id="content" style="position: relative" class="clearfix">
  84. <div id="column1" class="column">
  85. <div class="habblet-container ">
  86. <div class="cbb clearfix default ">
  87. <h2 class="title">News</h2>
  88. <div id="article-archive">
  89. <ul>
  90. <?php
  91. {
  92. for ($i = 0; $i < 6; $i++)
  93. {
  94. $sectionName = "";
  95. $sectionCutoffMax = 0;
  96. $sectionCutoffMin = 0;
  97.  
  98. switch ($i)
  99. {
  100. case 0:
  101.  
  102. $sectionName = 'Today';
  103. $sectionCutoffMax = time();
  104. $sectionCutoffMin = time() - 86400;
  105. break;
  106.  
  107. case 1:
  108.  
  109. $sectionName = 'Yesterday';
  110. $sectionCutoffMax = time() - 86400;
  111. $sectionCutoffMin = time() - 172800;
  112. break;
  113.  
  114. case 2:
  115.  
  116. $sectionName = 'This week';
  117. $sectionCutoffMax = time() - 172800;
  118. $sectionCutoffMin = time() - 604800;
  119. break;
  120.  
  121. case 3:
  122.  
  123. $sectionName = 'Last week';
  124. $sectionCutoffMax = time() - 604800;
  125. $sectionCutoffMin = time() - 1209600;
  126. break;
  127.  
  128. case 4:
  129.  
  130. $sectionName = 'This month';
  131. $sectionCutoffMax = time() - 1209600;
  132. $sectionCutoffMin = time() - 2592000;
  133. break;
  134.  
  135. case 5:
  136.  
  137. $sectionName = 'Last month';
  138. $sectionCutoffMax = time() - 2592000;
  139. $sectionCutoffMin = time() - 5184000;
  140. break;
  141. }
  142.  
  143. $q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC";
  144. $getArticles = mysql_query($q);
  145. if (mysql_num_rows($getArticles) > 0)
  146. {
  147. echo '<br>';
  148. echo '<h2>' . $sectionName . '</h2>';
  149.  
  150. while ($a = mysql_fetch_assoc($getArticles))
  151. {
  152. if($a['id'] == $_GET['id'])
  153. {
  154. echo '' . $a['title'] . '&nbsp;&raquo;';
  155. }
  156. else
  157. {
  158. echo '<li><a href="/index.php?url=news&id=' . $a['id'] . '">' . $a['title'] . '&nbsp;&raquo;</a></li>';
  159. }
  160. }
  161. }
  162. }
  163. }
  164. ?>
  165. </ul>
  166. </div>
  167. </div>
  168. </div>
  169. <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
  170. </div>
  171. <div id="column2" class="column">
  172. <div class="habblet-container ">
  173. <div class="cbb clearfix notitle ">
  174. <div id="article-wrapper">
  175. <h2>{newsTitle}</h2>
  176. <div class="article-meta">Posted {newsDate}</div>
  177. <p class="summary">{newsTitle}</p>
  178. <div class="article-body">
  179. {newsContent}
  180. <br><br>
  181. <script type="text/javascript" language="Javascript">
  182. document.observe("dom:loaded", function() {
  183. $$('.article-images a').each(function(a) {
  184. Event.observe(a, 'click', function(e) {
  185. Event.stop(e);
  186. Overlay.lightbox(a.href, "Image is loading");
  187. });
  188. });
  189.  
  190. $$('a.article-2729').each(function(a) {
  191. a.replace(a.innerHTML);
  192. });
  193. });
  194. </script>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. <?php
  200. if (filter(! isset($_POST['comment'])))
  201. {
  202. $_POST['comment'] = '';
  203. }
  204.  
  205. $comment = strip_tags (filter($_POST['comment']));
  206. if($comment == NULL)
  207. {
  208. //define("ERROR", "You have to type in a reply!<br /><br />");
  209. }
  210. elseif (preg_match("|habbi|", $comment) | preg_match("|habsay|", $comment) | preg_match("|habbihotel|", $comment) | preg_match("|lime|", $comment) | preg_match("|l i m e|", $comment) | preg_match("|h a b b i|", $comment) | preg_match("|h a b s a y|", $comment) | preg_match("|section|", $comment) | preg_match("|s e c t i o n|", $comment) | preg_match("|static|", $comment) | preg_match("|s t a t i c|", $comment) | preg_match("|.com|", $comment) | preg_match("|.côm|", $comment) | preg_match("|.c0m|", $comment) | preg_match("|. c 0 m|", $comment) | preg_match("|.net|", $comment) | preg_match("|.n e t|", $comment) | preg_match("|.org|", $comment) | preg_match("|.0rg|", $comment) | preg_match("|.o r g|", $comment) | preg_match("|.0 r g|", $comment) | preg_match("|.us|", $comment) | preg_match("|.u s|", $comment))
  211. define('ERROR', 'Sorry but you can\'t advertise here buddy!');
  212. else
  213. {
  214. if (isLogged)
  215. {
  216. mysql_query("INSERT INTO site_news_comments (article, userid, comment, posted_on, author) VALUES ('".htmlentities($_GET['id'])."', '".$_SESSION['userid']."', '".filter($comment)."', '".$posted_on."', '" . $_SESSION['user']['username']. "');");
  217. define('SUCCESS', 'You have successfully posted a comment on this news article!');
  218. }
  219. }
  220. ?>
  221.  
  222. <div class="habblet-container ">
  223. <div class="cbb clearfix notitle ">
  224. <div id="article-wrapper"><h2>Place Comment</h2>
  225. <div class="article-meta"></div>
  226. <div class="article-body">
  227. <?php
  228. if($userPosts >= 1)
  229. {
  230. define('ERROR', 'Sorry, you are only allowed one comment per article.');
  231. }
  232. if(defined("SUCCESS")){
  233. ?>
  234. <div class="rounded rounded-green" width="20%">
  235. <?php echo SUCCESS; ?><br />
  236. </div>
  237. <div>&nbsp;</div>
  238. <?php
  239. }
  240. if(defined("ERROR")) {
  241. ?>
  242. <div class="rounded rounded-red" width="20%">
  243. <?php echo ERROR; ?><br />
  244. </div>
  245. <div>&nbsp;</div>
  246. <?php
  247. }
  248. else
  249. {
  250. ?>
  251. <form action="" method="post">
  252. <textarea name="comment" maxlength="500"></textarea><br /><br />
  253. <input type="submit" name="post_comment" value="Place Comment" />
  254. </form>
  255. <?php
  256. }
  257. ?>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262.  
  263. <style type="text/css">
  264. input[type="text"], input[type="password"] {
  265. background-color: #F1F1F1;
  266. border: 1px solid #999999;
  267. width: 175px;
  268. padding: 5px;
  269. font-family: verdana;
  270. font-size: 10px;
  271. color: #666666;
  272. }
  273. input[type="submit"] {
  274. background-color: #F1F1F1;
  275. border: 1px solid #999999;
  276. padding: 5px;
  277. font-family: verdana;
  278. font-size: 10px;
  279. color: #666666;
  280. }
  281. textarea {
  282. background-color: #F1F1F1;
  283. border: 1px solid #999999;
  284. padding: 5px;
  285. width: 517px;
  286. height: 70px;
  287. font-family: verdana;
  288. font-size: 10px;
  289. color: #666666;
  290. }
  291. select {
  292. background-color: #F1F1F1;
  293. border: 1px solid #999999;
  294. padding: 5px;
  295. font-family: verdana;
  296. font-size: 10px;
  297. color: #666666;
  298. }
  299. </style>
  300. <?php
  301. $getComments = mysql_query("SELECT * FROM site_news_comments WHERE article = '".htmlentities($_GET['id'])."' ORDER by id DESC");
  302. ?>
  303. <div class="habblet-container ">
  304. <div class="cbb clearfix notitle ">
  305. <div id="article-wrapper"><h2>Comments (<?php echo mysql_num_rows($getComments); ?>)</h2>
  306. <div class="article-meta"></div>
  307. <div class="article-body">
  308. <?php
  309. if(mysql_num_rows($getComments) == 0) {
  310. echo "No comments for this article!";
  311. } else {
  312. echo '<table width="528px">';
  313. while($Comments = mysql_fetch_array($getComments)){
  314. $getUserInfo = mysql_query("SELECT * FROM users WHERE username = '".$Comments['author']."'");
  315. $userInfo = mysql_fetch_array($getUserInfo);
  316. echo '
  317. <tr>
  318. <td width="90px" valign="top"></div>
  319. <div style="
  320. height: 65px;
  321. width: 50px;
  322. float: left;
  323. overflow: hidden;
  324. ">
  325. <div style="float:left"><img position:absolute; src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$userInfo['look'].'&size=b&direction=2&head_direction=3&gesture=sml&size=2"></div>
  326. ';
  327. if($userInfo['rank'] == 9) {
  328. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  329. }
  330. if($userInfo['rank'] == 8) {
  331. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  332. }
  333. if($userInfo['rank'] == 7) {
  334. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  335. }
  336. if($userInfo['rank'] == 6) {
  337. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  338. }
  339. if($userInfo['rank'] == 5) {
  340. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  341. }
  342. if($userInfo['rank'] == 3) {
  343. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  344. }
  345. if($userInfo['rank'] == 4) {
  346. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  347. }
  348. if($userInfo['rank'] == 2) {
  349. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/ADM90.gif"></div>';
  350. }
  351. if($userInfo['rank_vip'] == 3) {
  352. echo '<div style="position: absolute; z-index:1"><img src="{url}/swf/c_images/album1584/PVIP.gif"></div>';
  353. }
  354.  
  355.  
  356. echo '
  357.  
  358. </td>
  359. <td width="427px" valign="top">
  360. <i><a href="/home/'.$userInfo['username'].'">'.$userInfo['username'].' </a></i>
  361. <br /><br />'.$Comments['comment'].'
  362.  
  363.  
  364. </td>
  365. </tr>
  366. <tr>
  367. <td width="80px" valign="top">
  368.  
  369. </td>
  370. <td width="400px" align="right">
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377. </div></div></div></div>
  378. <br>
  379. <div style="width:100%; height:1px; background-color:#ccc; margin-top:-17px;"></div>
  380.  
  381.  
  382. </td>
  383. </tr>';
  384. }
  385. echo '</table>';
  386. }
  387. ?></div> </div> </div> </div>
  388. <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
  389. </div>
  390. </div>
  391. <script type="text/javascript">
  392. document.observe('dom:loaded', function() {
  393. CurrentRoomEvents.init();
  394. });
  395. </script>
  396. </div>
  397.  
  398. <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
  399. <script type="text/javascript">
  400. HabboView.run();
  401. </script>
  402.  
  403. <!--[if lt IE 7]>
  404. <script type="text/javascript">
  405. Pngfix.doPngImageFix();
  406. </script>
  407. <![endif]-->
  408.  
  409.  
  410. <?php include('includes/footer.php'); ?>
  411. <?php include('includes/checktheban.php'); ?>
  412.  
  413.  
  414. </body>
  415. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement