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

    if($G_userid > 0 && $G_userid != null && $G_userid != '')
    {
    	$formid = $_GET['formid'];
        $sql = "select * from ".ALLFORM_TABLE." where formid = $formid and domainname LIKE '%".DOMAIN_NAME."%' order by formid ASC";
       $data = $allform->getallform('','', $sql);
       //print_r($data);
       $count = count($data);
        
       if($count > 0)
       {
       		$formid 		= $data[0]['formid'];
       		$space				= $data[0]['space'];
       		$area				= $data[0]['stall_area'];
       		$opportunity		= $data[0]['sponsorship_oportunity'];
       		$fname				= $data[0]['fname'];
       		$lname				= $data[0]['lname'];
            $company_name		= $data[0]['company_name'];
            $designation		= $data[0]['designation'];
            $email				= $data[0]['email'];
            $telno				= $data[0]['telno'];
            $mobile				= $data[0]['mobile'];
            $fromname			= $data[0]['fromname'];
            $fromemail			= $data[0]['fromemail'];
            $receipt_name 		= $data[0]['recipientname'];
            $recipientemail	= $data[0]['recipientemail'];
            $subject			= $data[0]['subject'];
			$formname           = $data[0]['formname'];
            $domainname         = $data[0]['domainname'];            
            $entry_date         = date('d-m-Y h:i:s',strtotime($data[0]['entry_date']));
           
         
       }
       else
       {
      	 	echo "Error";
       }
       require_once "exhibitor_details1.html";    
    }
    else
    {
        $redirect = ADMIN_DIR."auth/login.php";
        header("location:".$redirect);
        exit();
    }   
?>
   