Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- error_reporting(E_ERROR);
- require_once ("function/site_function.php");
- require_once('function/form_process.php');
- require_once('function/main_function.php');
- require_once("admin/phpmailer/class.phpmailer.php");
- require_once("admin/phpmailer/sentmail.php");
- include "config.php";
- include "dbconnect.php";
- session_start();
- global $fileurl,$themedir,$instdir,$baseurl,$pluginfol,$themestyle;
- global $sitename,$emailhost,$emailuser,$emailpwd,$emailsender,$modrewrite,$golcat;
- $baseurl =$cfg['baseurl'];
- $instdir = $cfg['instdir'];
- $fileurl =$cfg['fileurl'];
- if($fileurl=="")
- $fileurl =$baseurl;
- $emailsender =$cfg['emailsender'];
- $emailhost =$cfg['emailhost'];
- $emailuser =$cfg['emailuser'];
- $emailpwd =$cfg['emailpwd'];
- $sitename =$cfg['sitename'];
- $absolutepath = $cfg[absolutepath];
- $func = mysql_escape_string($_GET[func]);
- $pluginpath = $instdir."admin/plugins/";
- $current_plugins = opendir($pluginpath);
- $plugindir = array();
- $pluginfol = array();
- $modrewrite = is_modrewrite($instdir);
- while (false !== ($path = readdir($current_plugins))) {
- $plugindir[]= $path;
- }
- if (is_array($plugindir))
- {
- $sublinks="";
- foreach ($plugindir as $plugin) {
- if($plugin=="." || $plugin=="..")
- continue;
- if (is_dir($pluginpath."/".$plugin)){
- $path = $instdir."admin/plugins/$plugin";
- $function_file ="{$plugin}_functions.php";
- if(file_exists($path."/".$function_file))
- include_once($path."/".$function_file);
- }
- }
- }
- /* Get Site config here */
- $config = get_site_config();
- /* Check member credit and member online status */
- $creditleft =check_credit_left();
- delete_idle_online_member();
- $themestyle =$config['themestyle'];
- $themedir = "theme/$themestyle";
- /* end of site config */
- require_once("$themedir/function.php");
- /* version 1.5 added in */ // language file, theme control
- global $themconfig,$disppage;
- include("$themedir/lang/en_us.php"); //language file
- $themconfig = "$themedir/config.php"; // theme control
- if(file_exists($themconfig))
- {
- include("$themconfig");
- $themconfig=1;
- }
- else
- $themconfig = 0;
- /* end of theme config check */
- /* retrieve display name from category */
- $sqlcat = "select name,display_name from categories";
- $query = mysql_query($sqlcat);
- while(list($name,$display_name) = mysql_fetch_array($query))
- {
- if($display_name<>"")
- $golcat[$name] =$display_name;
- else
- $golcat[$name] =$name;
- }
- /* end of retrieve display name from category */
- if($creditleft<=0 && !is_member() && $creditleft<>"")
- {
- $file = "register.php";
- $disppage="dispmain";
- require_once("$themedir/main.php");
- }
- else// if($func<>"")
- {
- ob_start("member_set_content");
- if($func=="logout") //logging out before proceed
- {
- $disppage="dispmain";
- require_once("$themedir/logout.php");
- }
- if($func<>"")
- {
- /* add Tab Handler */
- if($func=="games" || $func=="videos"){
- $_SESSION["functype"] = $func;
- $functype = $func;
- $func = "index.php";
- }
- /* enf of Tab module */
- $disppage="dispmain";
- if(file_exists($themedir."/$func.php"))
- $file = "$func.php";
- else
- $file ="";
- }
- if($_POST[islogin]<>"" && $_SESSION[username]<>"")
- {
- $category="";
- $games="";
- $file="";
- }
- //category page config
- $category = mysql_escape_string($_GET[category]);
- //games detail page config
- $games = mysql_escape_string($_GET[games]);
- //preview games page
- $funcpage = mysql_escape_string($_GET[funcpage]);
- ob_end_flush();
- if($funcpage<>"") //preview game page
- {
- $disppage="";
- if(file_exists($themedir."/$funcpage.php"))
- require_once("$themedir/$funcpage.php");
- }
- else if($category=="" && $games=="")
- {
- $disppage="dispmain";
- require_once("$themedir/main.php");
- }
- else if($category<>"")
- {
- $disppage="dispcat";
- require_once("$themedir/category.php");
- }
- else{
- $disppage="dispgame";
- require_once("$themedir/games.php");
- }
- }
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement