<?php
    require_once "../include/config.php";
    require_once GLOBAL_INCLUDE_PATH."include/startup.php";
    
    if(!adminchecklogin('', '', '', $G_userid)){
        $redirect = ADMIN_DIR."auth/login.php";
        header("location:".$redirect);
        exit();
    }

    if($G_userid > 0 && $G_userid != null && $G_userid != ''){
        
	   $parentpagecount 	= AllParentPageCount();
	   $childpagecount 	= AllChildPageCount();
	   
	   //Exhibitor Table Details
	   $exhibitor 		 = new exhibitor();
		$sqlexhibitor	 = "EXPLAIN select * from mstexhibitorinfo ";
		$exhibitordata  = $exhibitor->getexhibitor('','', $sqlexhibitor);
	 	$countexhibitor = count($exhibitordata);
      if($countexhibitor > 0)
      {
     		 $exhibitorcount  = $exhibitordata[0]['rows'];
      }   
      
      //Visa Support Table Details
	   $visitor 		= new visitor();
		$sqlvisitor 	= "EXPLAIN select * from mstvisitorinfo ";
		$visitordata 	= $visitor->getvisitor('','', $sqlvisitor);
	 	$countvisitor 	= count($visitordata);
      if($countvisitor > 0)
      {
     		 $visitordatacount  = $visitordata[0]['rows'];
      }    
      
       //Newsletter Table Details
	   $newsletter = new newsletter();
		$sqlnewsletter	 = "EXPLAIN select * from mstnewsletterinfo ";
		$newsletterdata  = $newsletter->getnewsletter('','', $sqlnewsletter);
	 	$countnewsletter = count($newsletterdata);
      if($countnewsletter > 0)
      {
     		 $newslettercount  = $newsletterdata[0]['rows'];
      }   
      
       //Contact Table Details
	   $contact = new contactus();
		$sqlcontact	 = "EXPLAIN select * from mstcontacts ";
		$contactdata  = $contact->getcontactus('','', $sqlcontact);
	 	$countcontact = count($contactdata);
      if($countcontact > 0)
      {
     		 $contactcount  = $contactdata[0]['rows'];
      }   
        
        
        require_once "index.html";    
    }else{
        $redirect = ADMIN_DIR."auth/login.php";
        header("location:".$redirect);
        exit();
    }   
?>