Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. error_reporting(E_ERROR);
  4. require_once ("function/site_function.php");
  5. require_once('function/form_process.php');
  6. require_once('function/main_function.php');
  7. require_once("admin/phpmailer/class.phpmailer.php");
  8. require_once("admin/phpmailer/sentmail.php");
  9.  
  10. include "config.php";
  11. include "dbconnect.php";
  12. session_start();
  13.  
  14. global $fileurl,$themedir,$instdir,$baseurl,$pluginfol,$themestyle;
  15. global $sitename,$emailhost,$emailuser,$emailpwd,$emailsender,$modrewrite,$golcat;
  16.  
  17. $baseurl =$cfg['baseurl'];
  18. $instdir = $cfg['instdir'];
  19. $fileurl =$cfg['fileurl'];
  20. if($fileurl=="")
  21. $fileurl =$baseurl;
  22. $emailsender =$cfg['emailsender'];
  23. $emailhost =$cfg['emailhost'];
  24. $emailuser =$cfg['emailuser'];
  25. $emailpwd =$cfg['emailpwd'];
  26. $sitename =$cfg['sitename'];
  27. $absolutepath = $cfg[absolutepath];
  28. $func = mysql_escape_string($_GET[func]);
  29. $pluginpath = $instdir."admin/plugins/";
  30. $current_plugins = opendir($pluginpath);
  31. $plugindir = array();
  32. $pluginfol = array();
  33. $modrewrite = is_modrewrite($instdir);
  34.  
  35. while (false !== ($path = readdir($current_plugins))) {
  36. $plugindir[]= $path;
  37. }
  38.  
  39. if (is_array($plugindir))
  40. {
  41. $sublinks="";
  42. foreach ($plugindir as $plugin) {
  43.  
  44. if($plugin=="." || $plugin=="..")
  45. continue;
  46.  
  47. if (is_dir($pluginpath."/".$plugin)){
  48. $path = $instdir."admin/plugins/$plugin";
  49. $function_file ="{$plugin}_functions.php";
  50. if(file_exists($path."/".$function_file))
  51. include_once($path."/".$function_file);
  52. }
  53. }
  54. }
  55.  
  56. /* Get Site config here */
  57. $config = get_site_config();
  58. /* Check member credit and member online status */
  59. $creditleft =check_credit_left();
  60.  
  61.  
  62. delete_idle_online_member();
  63. $themestyle =$config['themestyle'];
  64. $themedir = "theme/$themestyle";
  65. /* end of site config */
  66.  
  67. require_once("$themedir/function.php");
  68.  
  69. /* version 1.5 added in */ // language file, theme control
  70. global $themconfig,$disppage;
  71.  
  72. include("$themedir/lang/en_us.php"); //language file
  73. $themconfig = "$themedir/config.php"; // theme control
  74. if(file_exists($themconfig))
  75. {
  76. include("$themconfig");
  77. $themconfig=1;
  78. }
  79. else
  80. $themconfig = 0;
  81. /* end of theme config check */
  82.  
  83. /* retrieve display name from category */
  84. $sqlcat = "select name,display_name from categories";
  85. $query = mysql_query($sqlcat);
  86. while(list($name,$display_name) = mysql_fetch_array($query))
  87. {
  88. if($display_name<>"")
  89. $golcat[$name] =$display_name;
  90. else
  91. $golcat[$name] =$name;
  92. }
  93. /* end of retrieve display name from category */
  94. if($creditleft<=0 && !is_member() && $creditleft<>"")
  95. {
  96. $file = "register.php";
  97. $disppage="dispmain";
  98. require_once("$themedir/main.php");
  99. }
  100. else// if($func<>"")
  101. {
  102. ob_start("member_set_content");
  103.  
  104. if($func=="logout") //logging out before proceed
  105. {
  106. $disppage="dispmain";
  107. require_once("$themedir/logout.php");
  108. }
  109.  
  110. if($func<>"")
  111. {
  112. /* add Tab Handler */
  113. if($func=="games" || $func=="videos"){
  114. $_SESSION["functype"] = $func;
  115. $functype = $func;
  116. $func = "index.php";
  117. }
  118. /* enf of Tab module */
  119.  
  120. $disppage="dispmain";
  121.  
  122. if(file_exists($themedir."/$func.php"))
  123. $file = "$func.php";
  124. else
  125. $file ="";
  126. }
  127.  
  128. if($_POST[islogin]<>"" && $_SESSION[username]<>"")
  129. {
  130. $category="";
  131. $games="";
  132. $file="";
  133.  
  134. }
  135. //category page config
  136. $category = mysql_escape_string($_GET[category]);
  137. //games detail page config
  138. $games = mysql_escape_string($_GET[games]);
  139. //preview games page
  140. $funcpage = mysql_escape_string($_GET[funcpage]);
  141.  
  142. ob_end_flush();
  143.  
  144. if($funcpage<>"") //preview game page
  145. {
  146. $disppage="";
  147.  
  148. if(file_exists($themedir."/$funcpage.php"))
  149. require_once("$themedir/$funcpage.php");
  150. }
  151. else if($category=="" && $games=="")
  152. {
  153. $disppage="dispmain";
  154. require_once("$themedir/main.php");
  155. }
  156. else if($category<>"")
  157. {
  158. $disppage="dispcat";
  159. require_once("$themedir/category.php");
  160. }
  161. else{
  162. $disppage="dispgame";
  163. require_once("$themedir/games.php");
  164. }
  165. }
  166.  
  167. mysql_close();
  168.  
  169. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement