<?php
require_once("../include/config.php");
require_once("../include/startup.php");

if($G_memberid > 0)
{
		$Company_obj					=	new Company();	
		$memberid = $G_memberid;
		//$membercompanyid = $_GET['companyid'];

		$sql_Company = "SELECT *
		FROM user_company a 
		where a.membercompanyid=$membercompanyid ORDER BY `membercompanyid` DESC limit 0,1";
		//echo $sql_Company;
		//die();
		$sqllist_Company = $Company_obj->getCompany('',$sql_Company);
		if(is_array($sqllist_Company))
		{
			 $rowcount_Company = count($sqllist_Company);
		}

		
				 	//$invoiceno  				= $sqllist_Company[0]['invoiceno'];
				 	//$invoicedate  				= $sqllist_Company[0]['invoicedate'];
				 	$invoice_fromcompanyname  				= $sqllist_Company[0]['companyname'];
				 	$invoice_fromcompanyid  				= $sqllist_Company[0]['membercompanyid'];
		$AllStatesList 	= getAllStates();
$stetelist = '<option value="">Select State</option>'.getAllStateListForCombo('','','',$AllStatesList);


		require_once("header1.html");
		require_once("leftnav.html");
		require_once("create-user1.html");
		require_once("footer1.html");
}
else if (!headers_sent($filename, $linenum)) 
{
				$redirect_url = DOC_ROOT."login.php";
				header("Location: $redirect_url");
    				exit;
					// You would most likely trigger an error here.
}
else 
{
				echo "Headers already sent in $filename on line $linenum\n" .
          			"Cannot redirect, for now please click this <a ";
    				exit;
}   

?>
