Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None | 0 0
  1. <?php
  2. // ____ _
  3. // | _ \ | |
  4. // ___| |_) | ___ __ _ _ __ __| |
  5. // |_ / _ < / _ \ / _` | '__/ _` |
  6. // / /| |_) | (_) | (_| | | | (_| |
  7. // /___|____/ \___/ \__,_|_| \__,_|
  8. // zBoard Nyche Forest
  9.  
  10. /// Require Engine and set header ///
  11. require "lib/zboard.php";
  12. require "lib/common.php";
  13. $action=$_GET[action];
  14.  
  15. $forestpage=array();
  16. $forestpage['explore']=array();
  17. $forestpage['explore']['id']=1;
  18. $forestpage['explore']['title']=array("Nyche Forest"=>"AFFABE","Temple of SpaceTime"=>"33EDCB");
  19. $forestpage['explore']['description']=array("Nyche Forest"=>"Where paradoxes go to die. Creatures from all across the universe end up here through rifts in the fabric of time and space. ","Temple of SpaceTime"=>"The Temple of SpaceTime is where the most skilled Hexad Warriors go to discover the secrets of the Craitial Realm.");
  20. $forestpage['explore']['prizes']=array("Nyche Forest"=>"/img/badges/grassbadge.png","Temple of SpaceTime"=>"/img/badges/ocarinabadge.png");
  21. $forestpage['explore']['area']=array("Nyche Forest"=>"1","Temple of SpaceTime"=>"2");
  22.  
  23. $forestpage['pegasia']=array();
  24. $forestpage['pegasia']['id']=2;
  25. $forestpage['pegasia']['title']=array("Lamorey Heights"=>"F0C413","Draconian Mountain"=>"EE4444");
  26. $forestpage['pegasia']['description']=array("Lamorey Heights"=>"The biggest city in all of Pegasia and the hub of antiquarian pop culture. Demons, Goblins, Elves, and more!","Draconian Mountain"=>"An inactive volcano now inhabited by the Draconian Reptile Civilization. They are very protective of their land.");
  27. $forestpage['pegasia']['prizes']=array("Lamorey Heights"=>"/img/badges/mapbadge.png","Draconian Mountain"=>"/img/badges/firebadge.png");
  28. $forestpage['pegasia']['area']=array("Lamorey Heights"=>"3","Draconian Mountain"=>"4");
  29.  
  30.  
  31. $portals=array();
  32. foreach($forestpage as $section){
  33. foreach($section['title'] as $title => $colour){
  34. $portals[$section['id']].="$L[TR]>$L[TD1]><a href=forest.php?action=explore&id=".$section['area'][$title]." style='color:#".$colour.";font-weight:bold;'>".$title."</span></td>$L[TD1]>".$section['description'][$title]."</td>$L[TD1]><img src=".$section['prizes'][$title]." float=center;></td></td>";
  35. }
  36. }
  37.  
  38. $users=$sql->query("SELECT * FROM users "
  39. ."WHERE lastview>".(ctime()-$time)." $hiddencheck"
  40. ."ORDER BY lastview DESC");
  41.  
  42. $users=$sql->query('SELECT *,'.sqlexp().' '
  43. .'FROM users u '
  44. .'LEFT JOIN usersrpg r ON u.id=r.id '
  45. .'WHERE lastact>'.(ctime()-30).' '
  46. // .'WHERE lastview>'.(ctime()-86400).' '
  47. .'ORDER BY exp DESC');
  48.  
  49.  
  50. pageheader('Nyche Forest');
  51.  
  52. $cat=$_GET['cat'];
  53. checknumeric($cat);
  54. $f=fopen("shop-ref.log","a");
  55. fwrite($f,"[".date("m-d-y H:i:s")."] ".$ref."\n");
  56. fclose($f);
  57.  
  58. if(!$log){
  59. print "$L[TBL1]>
  60. ". " $L[TD1c]>
  61. ". " You must be logged in to access the Nyche Forest<br>
  62. ". " <a href=./>Back to main</a> or <a href=login.php>login</a>
  63. ". "$L[TBLend]
  64. ";
  65. }elseif($loguser['power']==-1){
  66. print "$L[TBL1]>
  67. ". " $L[TD1c]>
  68. ". " Banned users may not use the Nyche Forest<br>
  69. ". " <a href=./>Back to main</a> or <a href=login.php>login</a>
  70. ". "$L[TBLend]
  71. ";
  72. }elseif (($_GET['action']=='edit'||$_GET['action']=='save'||$_GET['action']=='delete')&&!isadmin()) { //Added (Sukasa)
  73. print "$L[TBL1]>
  74. ". " $L[TD1c]>
  75. ". " Your level is not high enough to enter the forest.<br>
  76. ". " <a href=./>Back to main</a>
  77. ". "$L[TBLend]
  78. ";
  79. }else {
  80. $user=$sql->fetchq('SELECT u.name, u.posts, u.regdate, r.* '
  81. .'FROM users u '
  82. .'LEFT JOIN usersrpg r ON u.id=r.id '
  83. ."WHERE u.id=$loguser[id]");
  84. $p=$user['posts'];
  85. $d=(ctime()-$user['regdate'])/86400;
  86. $st=getstats($user);
  87. $GP=$st['GP'];
  88. }
  89.  
  90. print("$L[TBL1]>
  91. $L[TBL1]>
  92. $L[TRh]>$L[TDh]>Nyche Forest Entrance</td></tr>
  93.  
  94. $L[TR]>$L[TD1]><p><img src=/img/duckinator.png style=float:left; margin:0px 15px 15px 0px; />You have entered the Nyche Forest, the Duckinator <font class=sfont>TM</font> is a special time machine that allows you to explore other areas across the zQuest Universe.<br style=clear: both; />More experienced users may explore deeper beyond the zQuest Universe into other realities.</p></table>
  95. $L[TBL1]>
  96. $L[TRg]> <!-- TRg is a secondary heading. -->
  97. $L[TD] width=15%>Local</td>$L[TD]>Description</td>$L[TD] width=3%>Prize</td>
  98. </tr>
  99. $portals[1]
  100. $L[TRg]>
  101. <br>
  102. $L[TBL1]>
  103. $L[TRg]>
  104. $L[TD] width=15%>Pegasia</td>$L[TD]>Description</td>$L[TD]width=3%>Prize</td>
  105. </tr>
  106. $portals[2]
  107. $L[TRg]>
  108. <br>
  109. $L[TBL1]>
  110. </td></tr></table>");
  111.  
  112. print "
  113. ". "<br> &nbsp;
  114. ". "<img src=gfx/status.php?u=$loguser[id]>
  115. ";
  116.  
  117.  
  118.  
  119. switch($action){
  120. case 'explore':
  121. checknumeric($_GET[id]);
  122. $area=$sql->fetchq("SELECT * FROM monsters WHERE location='$_GET[id]' ORDER BY rand() LIMIT 1");
  123. print "$L[TBL1]>
  124. ". "$L[TD1c]><a href=forest.php>Return to Nyche Forest</a>
  125. ". "$L[TBLend] <br>
  126. ". "<br>
  127. ". "$L[TBL1]>
  128. ". " $L[TRh] align=left>
  129. ". " $L[TDh] colspan=9>$area[name]</td>
  130. ". "$L[TBL2]>
  131. ". "$L[TR]>$L[TD1]> $area[desc] <br>HP - $area[hp]<br>ATK - $area[atk]<br>DEF - $area[def]</td>
  132. ". "$L[TBLend]
  133. ". "<br>
  134. ". "<img src=gfx/status.php?u=$loguser[id]><br>
  135. ";
  136. break;
  137. default;
  138. }
  139.  
  140. pagefooter();
  141.  
  142. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement