<?php
//<--
/*////////////////////////////////////////////////////////
// ####################################################///
// # duhokFRM 1.3                                     # //
// #################################################### //
// #                                                  # //
// #       --  DUHOK FORUM IS FREE SOFTWARE  --       # //
// #                                                  # //
// #  ========= Programming By Dilovan ============== # //
// # Copyright © 2010 Dilovan. All Rights Reserved.   # //
// #--------------------------------------------------# //
// #--------------------------------------------------# //
// # If you want any support vist this site.          # //
// # http://startimes2.com/f.aspx?mode=f&f=136        # //
// #################################################### //
////////////////////////////////////////////////////////*/

require_once("./cp_inc/change_url.class.php");
// difne the http referer
define('Caller', $HTTP_SERVER_VARS["HTTP_REFERER"]);

   // run the class object
   $URLChange = new ChangeURL();
   // check the change of url
   $URLChange->CheckChangeURL();
   
// start the memory self
if ($inter_confi['parametre']['change_url'] == 1):
  /* set the return of f.aspx where url is enabled
  //if (searchIndexSelf()) { require('customavatars/foundfile.htm'); exit; }
  // get the ob starts information*/
  ob_start();
endif;

//######### System cp_incd filed ##############//

//################################## GET THE FILE SCRIPT #####################//

   if (file_exists("install/index.php")) 

         exit('<b>Waring: </b>The file install/index.php has not deleted this is dangerous for your script');
   if (file_exists("c99.php")) 

         exit('<b>Waring: </b>A dongrous File En your From Please Deleted');  
		 if (file_exists("c100.php")) 

  exit('<b>Waring: </b>A dongrous File En your From Please Deleted');
  if (file_exists("shell.php")) 

         exit('<b>Waring: </b>The file install.php has not deleted this is dangerous for your script');
		   if (file_exists("hack.php")) 

         exit('<b>Waring: </b>The file install.php has not deleted this is dangerous for your script');
		   if (file_exists(".exe")) 

         exit('<b>Waring: </b>The file install.php has not deleted this is dangerous for your script');
		   if (file_exists("r57.php")) 

         exit('<b>Waring: </b>The file install.php has not deleted this is dangerous for your script');
		   if (file_exists("Haking.php")) 

         exit('<b>Waring: </b>The file install.php has not deleted this is dangerous for your script');
//#################################### GET THE FILE OF SYSTEM FORUMS #######################//

    require_once("./cp_inc/sql_injection.class.php");
    require_once("template.php");
    
//#################################### GET THE FILE OF CLASS MYSQL ###################//
 
    require_once("./cp_inc/mysql.class.php");
    
      // run the class object of online
      $DataBase = new DF_MySQL();
    
//#################################### GET THE FILE OF CLASS OBJECT  #######################//

    require_once("./cp_inc/class_object.php");
    require_once("icons.php");
    require_once("language.php");
    require_once("check_session.php");

//#################################### GET THE FILE OF CLASS PM MESSAGE  #######################//

    require_once("./cp_inc/pm_message.class.php");
    
      // run the class object of online
      $PM_Message   = new DF_PM_Message();   
      // run the system zone time
      $TimeZone     = new DF_TimeZone();      
      // run the system of style name
      $StyleChoose  = new DF_Style();
	  // run the system of cookie || session descute
	  if($inter_confi['default']['site_session'] == "cookie") new RUNcookieDescutes(0);

//#################################### GET THE FILE OF CLASS ONLINE ###################//

    require_once("./cp_inc/online.class.php");
    
      // run the class object of online
      $Online = new DF_Online();

//################################### START THE SCRIPT NOW ############################//

   require_once("./cp_inc/admin_function.php");
   require_once("header.php");

//################ RUN THE SYSTEM PAGES URLS ################//

       $CasePages = new DF_CasePage();
       
       // get the array system
       $CasePages->condition = array(
'ForumID > 0 && !EditCaller'  => 'forum.php',
'ForumInfo && $Mlevel > 0'=> 'forum_info.php',
'URLarchive == "true"'    => 'archive.php',
'$EditMode' => 'editor.php',
'TopicID > 0 && !EditCaller'  => 'topic.php',
'EditorURL == "edittopicinfo"' => 'permitted.php',
'ArchiveID' => 'forum_archive.php',
'PrintMode == "true"' => 'print.php',
'rulesURL' => 'rules.php',
'noticeURL' => 'notice.php',
'topicsURL != "" && $Mlevel > 0' => 'topics.php',
'postsURL != "" && $Mlevel > 0' => 'posts.php',
'((activeURL == "monitored" || activeURL == "private") && $Mlevel > 0) || activeURL == "hot" || activeURL == "active" || activeURL == "read" || activeURL == "top"' => 'active.php',
'topicmonitorURL != "" && TopicID > 0 && $Mlevel > 0' => 'topicmonitor.php',
'MailID != "" && $Mlevel > 0' => 'message.php',
'SendMSGurl == "0" && $Mlevel > 0' => 'send_message.php',
'$HTTP_GET_VARS[policy] == "true" && $Mlevel < 1' => 'policy.php',	  
'$HTTP_GET_VARS[register] == "true" && $Mlevel < 1' => 'register.php',	 
'$HTTP_GET_VARS[requestpass] == "true" && $Mlevel < 1' => 'forget_pass.php',
'chatURL == "true" || chatURL == "admin"' => 'chat.php',	   
		                             );

	// if the forum is empty then return of the index page
    (ForumID == "0") ? head(index) : true;
    
    // set the deleted reply by author
    if (URLdeleter > 0) deletedReplyByAuthor();
    
	// eval and run the system php requires files   
	if (!URLmode) eval($CasePages->descute_mode());
	   
if (PrfileID) head(index . '?mode=profile&id=' . PrfileID);
if (MojoValue == "treads") head(index . '?mode=svc&svc=edits&t=' . $_GET[tid]);
if ($_GET[files] == "true" && $_GET[plaques] > 0) head(index . '?mode=mf&f=' . $_GET[plaques]);

//############### SWITCH FOR SYSTEM PAGE ######
  switch (URLmode) 
  {
  
     // if the mode is empty the require the home page
     case "": require_once("home.php"); break;

     // eval and run the system php requires files
     case "f":
	  // set the insertion of forum
	  require_once("global_insert.php"); 
	  // eval system requires file
	  eval($CasePages->descute_mode()); 
	  // home file
	  require_once("home.php");
	 
	 break;
     
     // if the mode is empty the require the home page
     case "t": require_once("topic.php"); break;

     case "members":
          require_once("members.php");
     break;
     case "profile":
          require_once("profile.php");
     break;
     case "lock":
          require_once("lock.php");
     break;
     case "list_forum":
          require_once("list_forum.php");
     break;
     case "open":
          require_once("open.php");
     break;
     case "delete":
          require_once("delete.php");
     break;
     case "msg":
          require_once("msg.php");
     break;
      case "quick_admin":
          require_once("quick_admin.php");
     break;
     case "sendmsg":
          require_once("send_message.php");
     break;
     case "mail":
          require_once("forum_mail.php");
     break;
     case "svc":
          require_once("svc.php");
     break;
     case "user_svc":
          require_once("user_svc.php");
     break;
     case "changename":
          require_once("change_name.php");
     break;
     case "sendpm":
          require_once("pm_to_admin.php");
     break;
     case "files":
          require_once("files.php");
     break;
     case "search":
          require_once("search.php");
     break;
     case "mf":
          require_once("medal_files.php");
     break;
     case "admin_svc":
          require_once("admin_svc.php");
     break;
     case "requestmon":
          require_once("requestmon.php");
     break;
     case "moderate":
          require_once("moderation.php");
     break;
     case "mods":
          require_once("moderator_info.php");
     break;
     case "notify":
          require_once("notify.php");
     break;
     case "notifylist":
          require_once("notifylist.php");
     break;
     case "tellfriend":
          require_once("tellfriend.php");
     break;
     case "list":
          require_once("list.php");
     break;
     case "email_to_m":
          require_once("email_to_m.php");
     break;
     case "show":
          require_once("mem_forum.php");
     break;
     case "details":
          require_once("details.php");
     break;
     case "admin_notify":
          require_once("admin_notify.php");
     break;
     case "ip":
          require_once("ip.php");
     break;
     case "permission":
          require_once("permission.php");
     break;
     case "ultralock":
          require_once("ultralock.php");
     break;
     case "ultraopen":
          require_once("ultraopen.php");
     break;
     case "quick":
          require_once("quick.php");
     break;
	 case "adminchat":
          require_once("adminchat.php");
     break;
	 case "reqmods":
          require_once("reqmods.php");
     break;
	  case "dz":
          require_once("dz.php");
     break;
	 	  case "control7":
          require_once("control7.php");
     break;
	 	  case "control6":
          require_once("control6.php");
     break;
	  	  case "member_m":
          require_once("member_m.php");
     break;
     default:
          head(index);
     break;


}

require("footer.php");

     // change theURL and SET the true contents of page
     $URLChange->EnableChangeURL($inter_confi['parametre']['change_url']);
	 	   require_once("not.php");


?>
