/app/tpl/skins/Priv/hk/news.php

https://github.com/NoVatutz/RevCMS · PHP · 111 lines · 102 code · 9 blank · 0 comment · 13 complexity · 427bd5e6789d76bffd1d3f96f6a04193 MD5 · raw file

  1. <div id="main">
  2. <div id="links"></div>
  3. <div id="header">
  4. <div id="logo">
  5. <div id="logo_text">
  6. <!-- class="logo_colour", allows you to change the color of the logo text -->
  7. <h1>ASE</h1>
  8. </div>
  9. </div>
  10. </div>
  11. <div id="site_content">
  12. <div id="sidebar_container">
  13. <!-- insert your sidebar items here -->
  14. <div class="sidebar">
  15. <div class="sidebar_top"></div>
  16. <div class="sidebar_item">
  17. <br />
  18. [ <a href='dash'>Return to Dashboard</a> ] [ <a href='logout.php'>Log out</a> ]<br /> <br />
  19. <p>
  20. <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user_id'] . "'"), 0) >= 7)
  21. { ?>
  22. Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
  23. &raquo; <a href='sub'>Last 50 VIP purchases</a> <br />
  24. &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
  25. &raquo; <a href='svip'>Give a user Super VIP</a> <br />
  26. &raquo; <a href='edit'>Edit a users account</a> <br />
  27. <br />
  28. Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
  29. &raquo; <a href='news'>Post news article</a><br />
  30. <br />
  31. <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user_id'] . "'"), 0) >= 5) { ?>
  32. Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
  33. &raquo; <a href='banlist'>Ban List</a> <br />
  34. &raquo; <a href='ip'>IP lookup</a> <br />
  35. <br />
  36. <?php } ?>
  37. <br />
  38. Statistics<br />
  39. <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
  40. Server Status:
  41. {status} <br />
  42. {online} user(s) online <br />
  43. </p>
  44. </div>
  45. <div class="sidebar_base"></div>
  46. </div>
  47. </div>
  48. <div id="content_container">
  49. <div id="content">
  50. <!-- insert the page content here -->
  51. <br />
  52. <?php
  53. if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user_id'] . "'"), 0) >= 7)
  54. {
  55. if(isset($_GET["done"]))
  56. {
  57. $get = filter($_GET["done"]);
  58. if($get == true)
  59. {
  60. echo '<h3>Article posted.</h3>';
  61. exit;
  62. }
  63. }
  64. if(isset($_POST["step1"]))
  65. {
  66. if($_POST["title"] == NULL || $_POST["shortstory"] == NULL || $_POST["longstory"] == NULL)
  67. {
  68. echo "<h2>Please fill in all the fields!</h2>";
  69. }
  70. else
  71. {
  72. $_SESSION["title"] = filter($_POST["title"]);
  73. $_SESSION["shortstory"] = filter($_POST["shortstory"]);
  74. $_SESSION["longstory"] = filter($_POST["longstory"]);
  75. header("Location: ".$_CONFIG['hotel']['url']."/ase/news2");
  76. exit;
  77. }
  78. }
  79. else
  80. { ?>
  81. <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
  82. <script type="text/javascript">
  83. tinyMCE.init({
  84. mode : "textareas",
  85. theme : "simple",
  86. editor_selector : "mceEditor",
  87. editor_deselector : "mceNoEditor"
  88. });
  89. </script>
  90. <form method="post">
  91. Title of the news article <br />
  92. <input type="text" name="title"/> <br /> <br />
  93. Short story <br />
  94. <input type="text" name="shortstory"/> <br /> <br />
  95. Main story <br />
  96. <textarea id="content1" name="longstory" cols="85" rows="10" class="mceEditor"></textarea>
  97. <br /> <br /> <input type="submit" value=" Proceed to next step (Image chooser) " name="step1" />
  98. </form>
  99. <?php
  100. }
  101. }
  102. ?>