Advertisement
KHIT

downsgaming_addons_editor

Feb 19th, 2012
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.44 KB | None | 0 0
  1. <?php require_once('Connections/downsgaming.php'); ?>
  2. <
  3. <?php
  4. if (!function_exists("GetSQLValueString")) {
  5. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  6. {
  7.   if (PHP_VERSION < 6) {
  8.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  9.   }
  10.  
  11.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  12.  
  13.   switch ($theType) {
  14.     case "text":
  15.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  16.       break;    
  17.     case "long":
  18.     case "int":
  19.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  20.       break;
  21.     case "double":
  22.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  23.       break;
  24.     case "date":
  25.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  26.       break;
  27.     case "defined":
  28.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  29.       break;
  30.   }
  31.   return $theValue;
  32. }
  33. }
  34.  
  35. mysql_select_db($database_downsgaming, $downsgaming);
  36. mysql_set_charset('utf8');
  37. $query_addons = "SELECT * FROM addons";
  38. $addons = mysql_query($query_addons, $downsgaming) or die(mysql_error());
  39. $row_addons = mysql_fetch_assoc($addons);
  40. $totalRows_addons = mysql_num_rows($addons);
  41. ?>
  42. <!DOCTYPE HTML>
  43. <html lang="da">
  44. <head>
  45. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  46. <link href="style.css" rel="stylesheet" type="text/css" />
  47. <link rel="icon" href="images/favicon.ico" />
  48. <title>[Down-South] Gaming [DK]</title>
  49. <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
  50. <script type="text/javascript">
  51. tinyMCE.init({
  52. // General options
  53. mode : "divs",
  54. theme : "advanced",
  55. plugins:"autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
  56. // Theme options
  57. theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
  58. theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
  59. theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
  60. theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
  61. theme_advanced_toolbar_location : "top",
  62. theme_advanced_toolbar_align : "left",
  63. theme_advanced_statusbar_location : "bottom",
  64. theme_advanced_resizing : true,
  65. // Skin options
  66. skin : "o2k7",
  67. skin_variant : "silver",
  68. //Select when to enable editor
  69. editor_selector : "mceEditor",
  70. //Stylesheet
  71. content_css : "style.css"
  72. }
  73. );
  74. </script>
  75. </head>
  76.  
  77. <body>
  78. <div id="container">
  79.     <div id="header"></div>
  80.     <div id="menu">
  81.         <ul>
  82.             <li><a href="index.php">Forside</a></li>
  83.                         <li><a href="nyheder.php">Nyheder</a></li>
  84.             <li><a href="om.php">Om os</a></li>
  85.             <li><a href="admins.php">Admins</a></li>
  86.             <li><a href="servers.php">Servere</a>
  87.                     <ul>
  88.                         <li><a href="addons.php" id="submenu">Addons</a></li>
  89.                         <li><a href="stats.php" id="submenu">Stats</a></li>
  90.                     </ul>
  91.           </li>
  92.             <li><a href="forum.php">Forum</a></li>
  93.         </ul>
  94.         <h1>Addons</h1>
  95.         <h2>Admins</h2>
  96.     </div>
  97.    
  98.     <div id="main"><br />
  99.         <div id="content">
  100.        
  101.             <div id="left">
  102.                            
  103. <?php
  104. if(isset($_SESSION["webmaster"]) && $_SESSION["webmaster"]==true){
  105. if(isset($_GET["edit"])){
  106. echo "<div class='rediger'>".$row_addons["tekst"]."</div>";
  107. }else{
  108. echo "<a href='addons.php?id=".$row_addons["id"]."&edit=true'>Rediger</a>";
  109. echo nl2br($row_addons["tekst"]);
  110. }
  111. }else{
  112. echo nl2br($row_addons["tekst"]);
  113. }
  114. ?>
  115.  
  116.           </div>
  117.             <div id="right">
  118.                     <div class="member">
  119.                         <a href="http://steamcommunity.com/profiles/76561197999047451" target="_blank"><img src="images/mx-ghost.png" width="75" height="75" alt="member" /></a>
  120.                         <span><a href="http://steamcommunity.com/profiles/76561197999047451" target="_blank">MX-Ghost</a></span>
  121.                     </div>
  122.                     <div class="member">
  123.                         <a href="http://steamcommunity.com/profiles/76561198008085717" target="_blank"><img src="images/aben.png" width="75" height="75" alt="member" /></a>
  124.                         <span><a href="http://steamcommunity.com/profiles/76561198008085717" target="_blank">[Down-South]<br>Jeg fik aben!</a></span>
  125.                     </div>
  126.             </div>
  127.             <div class="clear"></div>
  128.         </div>
  129.        
  130.     </div>
  131.     <div id="footer">
  132.         <br /><br />
  133.         <ul>
  134.             <li><a href="index.php">Forside</a></li>
  135.             <li><a href="om.php">Om os</a></li>
  136.             <li><a href="admins.php">Admins</a></li>
  137.             <li><a href="servers.php">Servere</a></li>
  138.             <li><a href="forum.php">Forum</a></li>
  139.             <li class="lastchild"><a href="kontakt.php">Kontakt</a></li>
  140.         </ul>
  141.         <span>© [Down-South] Gaming [DK] 2012. All rights reserved.</span> </div> 
  142. </div>
  143. </body>
  144. </html>
  145. <?php
  146. mysql_free_result($addons);
  147. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement