1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <?php
  3. $curdir = getcwd ();
  4. chdir('forum');
  5. require_once(global.php');
  6. chdir ($curdir);
  7. ?>
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  11. <title>Svex</title>
  12.  
  13. <?php include 'header.php'; ?>
  14. <link rel="stylesheet" type="text/css" href="scripts/css/svex.css" />
  15. <script src="scripts/js/svexmenu.js" type="text/javascript"> </script>
  16.  
  17. <style type="text/css">
  18. <!--
  19. div.svexmenu {color:#5B6275; font-family: Arial; font-size: 17px}
  20.  
  21. div.svexmenu a {color:#5B6275; font-family: Arial; font-size: 17px}
  22.  
  23. div.svexmenu a:hover {color:#3C404D; font-family: Arial; font-size: 17px}
  24.  
  25. div.svextitle {color:#FFFFFF; font-family: Arial; font-size: 22px}
  26.  
  27. div.svextitle a {color:#FFFFFF; font-family: Arial; font-size: 22px}
  28.  
  29. div.svextitle a:hover {color:#5B6275; font-family: Arial; font-size: 22px}
  30.  
  31. div.svexuser {color:#DCDFE1; font-family: Arial; font-size: 17px}
  32.  
  33. div.svexuser a {color:#DCDFE1; font-family: Arial; font-size: 17px}
  34.  
  35. div.svexuser a:hover {color:#5B6275; font-family: Arial; font-size: 17px}
  36.  
  37. .style34 {
  38. font-family: Arial;
  39. color: #5B6275;
  40. }
  41. a:link {
  42. color: #FFFFFF;
  43. }
  44. a:visited {
  45. color: #FFFFFF;
  46. }
  47. a:hover {
  48. color: #A8AEB8;
  49. }
  50. a:active {
  51. color: #FFFFFF;
  52. }
  53. .style36 {color: #000000}
  54. body,td,th {
  55. color: #FFFFFF;
  56. }
  57.  
  58.  
  59. -->
  60. </style>
  61.  
  62.  
  63. </head>
  64.  
  65. <body>
  66.  
  67. <?php
  68. /* CONNECTION VARIABLES */
  69. $db_hostname = ""; // Usually "localhost"
  70. $db_username = "";
  71. $db_password = "";
  72. $db_name = "";
  73. $table = "";
  74.  
  75.  
  76. $sql = "SELECT * FROM WHERE cat1 = 'SimCity 4' AND validator !='' ORDER BY id DESC LIMIT 0,6";
  77. $result=mysql_query($sql);
  78.  
  79. $row = @mysql_fetch_array($result);
  80.  
  81. $sql = "SELECT * FROM WHERE cat1 = 'SimCity 4' AND validator !='' ORDER BY id DESC LIMIT 0,6";
  82. $query = mysql_query($sql);
  83. while($row = mysql_fetch_array($query)) {
  84.  
  85.  
  86. $archive = $row['archive'];
  87.  
  88. ?>
  89.  
  90. <div style="width: 748px; height: 200px; background-color:#A8AEB8;">
  91. <div style="width: 748px; height: 21px; background-image:url(images/index/common/headblue.jpg); background-color:#A8AEB8;">  <?php echo $row['cat2']; ?> > <?php echo $row['cat3']; ?> </div>
  92. <div style="width: 261px; float: left; padding-left: 6px; height: 200px; background-color:#A8AEB8;">
  93. <div style="width: 257px; height: 148px; padding-top: 22px; background-color:#A8AEB8;">
  94. <img src="<?php echo $row['thumburl1']; ?>" alt="" width="254" height="148" border="3" style="border-color: #5B6275;"
  95. />
  96. </div>
  97. </div>
  98.  
  99. <div style="float: left; width: 480px; height: 200px; background-color:#A8AEB8;">
  100. <div class="svextitle" style="float: left; width: 480px;"> <a href="http://simvision.net/svex.php?p=details&id=<?php echo $row['id']; ?> "><?php echo $row['name']; ?></a></div>
  101. <div class="svexuser" style="float: left; width: 480px;"> <a href="http://www.simvision.net/svex.php?p=user&id=<?php echo $row['userid']; ?>">by <?php echo $row['username']; ?></a> </div>
  102. <div style="float: left; width: 480px; height: 100px;"><?php echo substr($row['descrip'],0,150); ?>... </div>
  103. <div style="float: left; width: 480px; background-color:#B5B5B5; height: 35px;">
  104.  
  105. <?=date("F j, Y",$row["dt"])?> | Views <?php echo $row['views']; ?> | Downloads: <?php echo $row['dls']; ?> |
  106.  
  107. <?php $score = $row['score'];
  108. $votes = $row['votes'];
  109.  
  110.  
  111. if ( $votes == 0 ) {
  112. echo "No Votes";
  113. } else {
  114.  
  115. $total = $score / $votes;
  116.  
  117.  
  118.  
  119. $stars = $total / 2;
  120.  
  121. $starstotal = ceil($stars);
  122.  
  123. switch ($starstotal){
  124. case "1":
  125. ?> <img src="images/index/common/star.png" /><?php
  126. break;
  127. case "2":
  128. ?><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /> <?php
  129. break;
  130. case "3":
  131. ?><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /> <?php
  132. break;
  133. case "4":
  134. ?><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /> <?php
  135. break;
  136. case "5":
  137. ?><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /><img src="images/index/common/star.png" /> <?php
  138. break;
  139. }
  140.  
  141.  
  142. ?>
  143. </div>
  144.  
  145.  
  146. </div>
  147. </div>
  148. <div style="height: 10px; width: 748px; color: #FFFFFF"> </div>
  149.  
  150. <?php
  151.  
  152. }
  153. }
  154.  
  155. die(mysql_error())
  156. ?>
  157.  
  158.  
  159.  
  160. </body>
  161. </html>
  162.