1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2.  
  3. <?php
  4. $curdir = getcwd ();
  5. chdir(omgz/forum');
  6. require_once(omgz/global.php');
  7. chdir ($curdir);
  8. ?>
  9.  
  10. <html xmlns="http://www.w3.org/1999/xhtml">
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  13. <title>Untitled Document</title>
  14. <style type="text/css">
  15. <!--
  16. #svexy {width: 900px; margin: auto; height: 200px; background:#A8AEB8;}
  17. #test {width: 900px; background:#A8AEB8;}
  18. #header {background: #7F8595; height: 30px; width:900px; }
  19. #download {width: 900px; margin:auto; height: 170px;}
  20. #thumb {height: 170px; width: 240px; float: left;}
  21. #description {height: 170px; width:420px; float: left; }
  22. #right {height: 170px; width: 240px; float: left;}
  23.  
  24.  
  25.  
  26.  
  27. -->
  28. </style>
  29.  
  30. <script type="text/javascript">
  31.  
  32. /***********************************************
  33. * Contractible Headers script- © Dynamic Drive (www.dynamicdrive.com)
  34. * This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
  35. * Visit http://www.dynamicdrive.com/ for full source code
  36. ***********************************************/
  37.  
  38. var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
  39. var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)
  40.  
  41. if (document.getElementById){
  42. document.write('<style type="text/css">')
  43. document.write('.switchcontent{display:none;}')
  44. document.write('</style>')
  45. }
  46.  
  47. function getElementbyClass(classname){
  48. ccollect=new Array()
  49. var inc=0
  50. var alltags=document.all? document.all : document.getElementsByTagName("*")
  51. for (i=0; i<alltags.length; i++){
  52. if (alltags[i].className==classname)
  53. ccollect[inc++]=alltags[i]
  54. }
  55. }
  56.  
  57. function contractcontent(omit){
  58. var inc=0
  59. while (ccollect[inc]){
  60. if (ccollect[inc].id!=omit)
  61. ccollect[inc].style.display="none"
  62. inc++
  63. }
  64. }
  65.  
  66. function expandcontent(cid){
  67. if (typeof ccollect!="undefined"){
  68. if (collapseprevious=="yes")
  69. contractcontent(cid)
  70. document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
  71. }
  72. }
  73.  
  74. function revivecontent(){
  75. contractcontent("omitnothing")
  76. selectedItem=getselectedItem()
  77. selectedComponents=selectedItem.split("|")
  78. for (i=0; i<selectedComponents.length-1; i++)
  79. document.getElementById(selectedComponents[i]).style.display="block"
  80. }
  81.  
  82. function get_cookie(Name) {
  83. var search = Name + "="
  84. var returnvalue = "";
  85. if (document.cookie.length > 0) {
  86. offset = document.cookie.indexOf(search)
  87. if (offset != -1) {
  88. offset += search.length
  89. end = document.cookie.indexOf(";", offset);
  90. if (end == -1) end = document.cookie.length;
  91. returnvalue=unescape(document.cookie.substring(offset, end))
  92. }
  93. }
  94. return returnvalue;
  95. }
  96.  
  97. function getselectedItem(){
  98. if (get_cookie(window.location.pathname) != ""){
  99. selectedItem=get_cookie(window.location.pathname)
  100. return selectedItem
  101. }
  102. else
  103. return ""
  104. }
  105.  
  106. function saveswitchstate(){
  107. var inc=0, selectedItem=""
  108. while (ccollect[inc]){
  109. if (ccollect[inc].style.display=="block")
  110. selectedItem+=ccollect[inc].id+"|"
  111. inc++
  112. }
  113.  
  114. document.cookie=window.location.pathname+"="+selectedItem
  115. }
  116.  
  117. function do_onload(){
  118. uniqueidn=window.location.pathname+"firsttimeload"
  119. getElementbyClass("switchcontent")
  120. if (enablepersist=="on" && typeof ccollect!="undefined"){
  121. document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
  122. firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
  123. if (!firsttimeload)
  124. revivecontent()
  125. }
  126. }
  127.  
  128.  
  129. if (window.addEventListener)
  130. window.addEventListener("load", do_onload, false)
  131. else if (window.attachEvent)
  132. window.attachEvent("onload", do_onload)
  133. else if (document.getElementById)
  134. window.onload=do_onload
  135.  
  136. if (enablepersist=="on" && document.getElementById)
  137. window.onunload=saveswitchstate
  138.  
  139. </script>
  140. <div style="width: 900px; margin: auto; height: 60px; background:#999999;"> </div>
  141.  
  142. </head>
  143.  
  144. <body>
  145.  
  146. <?php $host="omgz"; // Host name
  147. $username="omgz"; // Mysql username
  148. $password="omgz"; // Mysql password
  149. $db_name="omgz"; // Database name
  150. $tbl_name="omgz"; // Table name
  151.  
  152.  
  153. // Connect to server and select databse.
  154. mysql_connect("$host", "$username", "$password")or die("cannot connect");
  155. mysql_select_db("$db_name")or die("cannot select DB");
  156.  
  157.  
  158. $sql = "SELECT * FROM omgz WHERE cat1 = 'SimCity 4' AND validator !='' ORDER BY id DESC LIMIT 0,6";
  159. $result=mysql_query($sql);
  160.  
  161. $rows=mysql_fetch_array($result);
  162.  
  163. $sql = "SELECT * FROM omgz WHERE cat1 = 'SimCity 4' AND validator !='' ORDER BY id DESC LIMIT 0,6";
  164. $query = mysql_query($sql);
  165. while($row = mysql_fetch_array($query)) {
  166.  
  167. ?><div id="svexy">
  168. <div id="header" onClick="expandcontent('<?php echo $row['id']; ?>')" style="cursor:hand; cursor:pointer"> <a href="http://simvision.net/svex.php?p=details&id=<?php echo $row['id']; ?> "><?php echo $row['name']; ?></a> by <a href="http://www.simvision.net/svex.php?p=user&id=<?php echo $row['userid']; ?>"><?php echo $row['username']; ?></a> </div>
  169. <div id="download">
  170. <div id="thumb"><img src="<?php echo $row['thumburl1']; ?>" alt="" width="200" height="148" border="3" style="border-color: #5B6275;"
  171. /></div>
  172. <div id="description"><?php echo substr($row['descrip'],0,125); ?> </div>
  173. <div id="right"> Download Here </div>
  174. </div>
  175. <div id="<?php echo $row['id']; ?>" class="switchcontent" style="background: #7F8595; height: 200px; width:900px;"> sup yall </div>
  176. </div>
  177. <?php } ?>
  178. </body>
  179. </html>
  180.