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 Releases
CMS Releases
(Release) Sledmores ASE News Comment Editor.
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="Kristopher" data-source="post: 216456" data-attributes="member: 1958"><p>Sledmores housekeeping editor.</p><p>[CODE]<?php $pagerank = 7; include "templates/header.php"; ?></p><p> </p><p> <div id="site_content"></p><p> <?php include "templates/sidebar.php"; ?></p><p> <div id="content_container"></p><p> <div id="content"></p><p> <h1>{hotelName} Hotel ASE :: News Comments</h1><hr/></p><p> <?php</p><p> if (isset($_GET['edit']) && $_GET['edit'] != null)</p><p> {</p><p> $two = mysql_fetch_assoc(mysql_query("SELECT * FROM cms_comments WHERE article = '" . filter($_GET['edit']) . "'"));</p><p> ?></p><p> </p><p> <?php</p><p> if($_GET['delete'])</p><p> {</p><p> if(mysql_num_rows(mysql_query("SELECT * FROM cms_comments WHERE id = '".filter($_GET['delete'])."'")))</p><p> {</p><p> mysql_query("DELETE FROM cms_comments WHERE id = '".filter($_GET['delete'])."'");</p><p> echo '<div class="alert alert-success" align="center">That comment has now been deleted!</div>';</p><p> }</p><p> else</p><p> {</p><p> echo '<div class="alert alert-error" align="center">Couldn\'t find that comment, sorry!</div>';</p><p> }</p><p> }</p><p> ?></p><p> </p><p> <table class="table table-striped table-bordered table-condensed"></p><p> <tr></p><p> <td><b>User</b></td></p><p> <td><b>Comment</b></td></p><p> <td><b>Action</b></td></p><p> </tr></p><p> <?php</p><p> $getArticles = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['edit'])."'");</p><p> </p><p> while(($articles = mysql_fetch_array($getArticles)))</p><p> {</p><p> $getUserInfo = mysql_query("SELECT * FROM users WHERE id = '".$articles['userid']."'");</p><p> $userInfo = mysql_fetch_array($getUserInfo);</p><p> </p><p> echo "</p><p> <tr></p><p> <td><a href='?url=player_edit&username=".$userInfo['username']."'>" . $userInfo['username'] ."</a></td></p><p> <td>" . $articles['comment'] ."</td></p><p> <td><a href='?url=logs_news_comments&edit=".$articles['article']."&delete=" . $articles['id'] . "'><b>Delete</b></a></td></p><p> </tr>";</p><p> }</p><p> ?></p><p> </table></p><p> </p><p> </p><p> <?php</p><p> }</p><p> else</p><p> {</p><p> ?></p><p> <table class="table table-striped table-bordered table-condensed"></p><p> <tr></p><p> <td><b>Article</b></td></p><p> <td><b>View Comments</b></td></p><p> </tr></p><p> <?php</p><p> $getArticles = mysql_query("SELECT * FROM `cms_news`");</p><p> </p><p> while(($articles = mysql_fetch_array($getArticles)))</p><p> {</p><p> echo "</p><p> <tr></p><p> <td>" . $articles['title'] ."</td></p><p> <td><a href='?url=logs_news_comments&edit=".$articles['id']."'><b>View comments</b></a></td></p><p> </tr>";</p><p> }</p><p> }</p><p> ?></p><p> </table></p><p> </div></p><p> </div></p><p> </div></p><p></div></p><p><?php include "templates/footer.php"; ?>[/CODE]</p><p> </p><p>Changed a few querys so it works with my release:</p><p><a href="http://devbest.com/threads/revcms-working-news-comments.27532/" target="_blank">http://devbest.com/threads/revcms-working-news-comments.27532/</a></p><p> </p><p>The housekeeping if you don't have:</p><p><a href="http://devbest.com/threads/1-x-x-housekeeping-release.24211/" target="_blank">http://devbest.com/threads/1-x-x-housekeeping-release.24211/</a></p><p> </p><p>Credits:</p><p>Sledmore</p><p>Stoner (Me)</p><p>Kryptos</p><p>Hejula</p><p>Holmes</p></blockquote><p></p>
[QUOTE="Kristopher, post: 216456, member: 1958"] Sledmores housekeeping editor. [CODE]<?php $pagerank = 7; include "templates/header.php"; ?> <div id="site_content"> <?php include "templates/sidebar.php"; ?> <div id="content_container"> <div id="content"> <h1>{hotelName} Hotel ASE :: News Comments</h1><hr/> <?php if (isset($_GET['edit']) && $_GET['edit'] != null) { $two = mysql_fetch_assoc(mysql_query("SELECT * FROM cms_comments WHERE article = '" . filter($_GET['edit']) . "'")); ?> <?php if($_GET['delete']) { if(mysql_num_rows(mysql_query("SELECT * FROM cms_comments WHERE id = '".filter($_GET['delete'])."'"))) { mysql_query("DELETE FROM cms_comments WHERE id = '".filter($_GET['delete'])."'"); echo '<div class="alert alert-success" align="center">That comment has now been deleted!</div>'; } else { echo '<div class="alert alert-error" align="center">Couldn\'t find that comment, sorry!</div>'; } } ?> <table class="table table-striped table-bordered table-condensed"> <tr> <td><b>User</b></td> <td><b>Comment</b></td> <td><b>Action</b></td> </tr> <?php $getArticles = mysql_query("SELECT * FROM `cms_comments` WHERE `article` = '".filter($_GET['edit'])."'"); while(($articles = mysql_fetch_array($getArticles))) { $getUserInfo = mysql_query("SELECT * FROM users WHERE id = '".$articles['userid']."'"); $userInfo = mysql_fetch_array($getUserInfo); echo " <tr> <td><a href='?url=player_edit&username=".$userInfo['username']."'>" . $userInfo['username'] ."</a></td> <td>" . $articles['comment'] ."</td> <td><a href='?url=logs_news_comments&edit=".$articles['article']."&delete=" . $articles['id'] . "'><b>Delete</b></a></td> </tr>"; } ?> </table> <?php } else { ?> <table class="table table-striped table-bordered table-condensed"> <tr> <td><b>Article</b></td> <td><b>View Comments</b></td> </tr> <?php $getArticles = mysql_query("SELECT * FROM `cms_news`"); while(($articles = mysql_fetch_array($getArticles))) { echo " <tr> <td>" . $articles['title'] ."</td> <td><a href='?url=logs_news_comments&edit=".$articles['id']."'><b>View comments</b></a></td> </tr>"; } } ?> </table> </div> </div> </div> </div> <?php include "templates/footer.php"; ?>[/CODE] Changed a few querys so it works with my release: [URL]http://devbest.com/threads/revcms-working-news-comments.27532/[/URL] The housekeeping if you don't have: [URL]http://devbest.com/threads/1-x-x-housekeeping-release.24211/[/URL] Credits: Sledmore Stoner (Me) Kryptos Hejula Holmes [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
(Release) Sledmores ASE News Comment Editor.
Top