Advertisement
KHIT

downsgaming_index

Feb 18th, 2012
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.58 KB | None | 0 0
  1. <?php require_once('Connections/downsgaming.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. mysql_select_db($database_downsgaming, $downsgaming);
  35.  
  36. $query_forside = "SELECT * FROM forside";
  37. mysql_set_charset('utf8');
  38. $forside = mysql_query($query_forside, $downsgaming) or die(mysql_error());
  39. $row_forside = mysql_fetch_assoc($forside);
  40. $totalRows_forside = mysql_num_rows($forside);
  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="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
  50. <link rel="stylesheet" href="jscripts/fancybox/source/jquery.fancybox.css?v=2.0.5" type="text/css" media="screen" />
  51. <script type="text/javascript" src="jscripts/fancybox/source/jquery.fancybox.pack.js?v=2.0.5"></script>
  52.  
  53. <script type="text/javascript">
  54. $(document).ready(function() {
  55.     $(".various").fancybox({
  56.         maxWidth    : 400,
  57.         maxHeight   : 210,
  58.         fitToView   : false,
  59.         width       : '70%',
  60.         height      : '70%',
  61.         autoSize    : false,
  62.         closeClick  : false,
  63.         openEffect  : 'none',
  64.         closeEffect : 'none'
  65.     });
  66. });
  67. </script>
  68. </head>
  69.  
  70. <body>
  71. <div id="container">
  72.     <div id="header">
  73.             <div id="logind">
  74.             <?php
  75.             if(isset($_SESSION['username'])){
  76.                 session_start();
  77.                 echo 'Velkommen <br/>';
  78.                 echo $username;
  79.                 echo '<a href="<?php echo $logoutAction ?>">Log ud</a>';
  80. // session not logged in so display form
  81.  
  82.             }else{
  83.                 echo '<p><a class="various fancybox.iframe" href="login.php">Login Form
  84.     </a></p>';
  85. // session logged
  86.             }
  87.             ?>
  88.             </div>
  89.         </div>
  90.     <div id="menu">
  91.         <ul>
  92.             <li><a href="index.php">Forside</a></li>
  93.                         <li><a href="nyheder.php">Nyheder</a></li>
  94.             <li><a href="om.php">Om os</a></li>
  95.             <li><a href="admins.php">Admins</a></li>
  96.             <li><a href="servers.php">Servere</a>
  97.                     <ul>
  98.                         <li><a href="addons.php" id="submenu">Addons</a></li>
  99.                         <li><a href="stats.php" id="submenu">Stats</a></li>
  100.                     </ul>
  101.                         </li>
  102.             <li><a href="forum.php">Forum</a></li>
  103.         </ul>
  104.         <h1>Velkommen</h1>
  105.         <h2>Servere</h2>
  106.     </div>
  107.    
  108.     <div id="main"><br />
  109.         <div id="content">
  110.        
  111.                     <div id="left"><?php echo $row_forside['tekst']; ?><p><a class="various fancybox.iframe" href="login.php">Login Form
  112.     </a></p>
  113.                     </div>
  114.             <div id="right">
  115.                            
  116.                     <iframe src="http://cache.www.gametracker.com/components/html0/?host=94.18.107.46:27015&bgColor=6E6943&fontColor=CCCCCC&titleBgColor=222222&titleColor=FF9900&borderColor=555555&linkColor=FFCC00&borderLinkColor=222222&showMap=1&currentPlayersHeight=100&showCurrPlayers=1&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=200" frameborder="0" scrolling="no" width="200" height="536"></iframe>
  117.             </div>
  118.             <div class="clear"></div>
  119.         </div>
  120.        
  121.     </div>
  122.     <div id="footer">
  123.         <br /><br />
  124.         <ul>
  125.             <li><a href="index.php">Forside</a></li>
  126.             <li><a href="om.php">Om os</a></li>
  127.             <li><a href="admins.php">Admins</a></li>
  128.             <li><a href="servers.php">Servere</a></li>
  129.             <li><a href="forum.php">Forum</a></li>
  130.             <li class="lastchild"><a href="kontakt.php">Kontakt</a></li>
  131.         </ul>
  132.         <span>© [Down-South] Gaming [DK] 2012. All rights reserved.</span> </div> 
  133. </div>
  134. </body>
  135. </html>
  136. <?php
  137. mysql_free_result($forside);
  138. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement