<?php
ob_start();

session_start();

/******************INCLUDES**********************/

include('connection/connection.php');

include_once('index.fns.php');

include_once('lib/class.user.php');

include_once('lib/class.report_handler.php');

include_once('lib/class.validate.php');

include_once 'admin_end/config.php';

include_once 'admin_end/includes/mysql.inc.php';



$frontEnd= new frontEnd;

$user= new user;

/************************************************/



$action = isset($_POST['action'])?$_POST['action']:NULL;

$id = $_REQUEST['id'];

$level= $_REQUEST['level'];

$parent= $_REQUEST['parent'];





// Number of entries per page

$numentries=6;



// Get form data

if(!isset($_GET['page'])) {

	$page=0;

} else {

	$page=$_GET['page'];

}

if(!isset($_GET['sort'])) {

	$sort='name';

} else {

	$sort=$_GET['sort'];

}

if(!isset($_GET['order'])) {

	$order='ASC';

} else {

	$order=$_GET['order'];

}



// Set up vars, all default order ASC

$orderAddress='ASC';

$orderName='ASC';

$orderPhone='ASC';

$orderFax='ASC';

$orderLocation='ASC';

$orderLsent='ASC';

$orderList='ASC';

$orderWebsiteAddress='ASC';

$orderEmailAddress1='ASC';



// Change current sorted group order

switch($sort) {

	case 'Location':

		if($order=='ASC') {

			$orderLocation='DESC';

		} else {

			$orderLocation='ASC';

		}

		break;

	case 'name':

		if($order=='ASC') {

			$orderName='DESC';

		} else {

			$orderName='ASC';

		}

		break;

	case 'PhoneNo1':

		if($order=='ASC') {

			$orderPhone='DESC';

		} else {

			$orderPhone='ASC';

		}

		break;

	case 'WebsiteAddress':

		if($order=='ASC') {

			$orderWebsiteAddress='DESC';

		} else {

			$orderWebsiteAddress='ASC';

		}

		break;

	case 'EmailAddress1':

		if($order=='ASC') {

			$orderEmailAddress1='DESC';

		} else {

			$orderEmailAddress1='ASC';

		}

		break;

	case 'listid':

		if($order=='ASC') {

			$orderList='DESC';

		} else {

			$orderList='ASC';

		}

		break;

}





	

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="css/style.css" type="text/css" rel="stylesheet" />

<link href="css/menu1.css" type="text/css" rel="stylesheet" />

<title>Kuwaitcommercials.com is the only leading web based business directory of Kuwait with online ordering features</title>
<meta name="keywords" content="Kuwait Commercials, online business directory, business directory kuwait, business directory of kuwait, kuwait business directory, kuwait online business directory, online purchase kuwait, kuwait companies, companies in kuwait, business, online shopping, online shopping kuwait">
<meta name="description" content="This website is a comprehensive list of information of leading business entities in kuwait with an emphasis on online shopping">

<!--<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/ddaccordion.js"></script>

<script src="Scripts/scriptaculous/prototype.js" type="text/javascript"></script>

<script src="Scripts/scriptaculous/scriptaculous.js" type="text/javascript"></script>

<script type="text/javascript" src="js/dropdown.js"></script>-->

<?php

				include("includes/jquery.php");

			?>

</head>

<body>

<div id="main_wrap">

  <div id="main_container">

  

       <?php
				include("includes/index_header.php");
			?>


    <div class="blue_line"> <?php

			include("includes/menu.php");

		?></div>

	

   <div class="top_content">

       <?php

				include("includes/top_bar.php");

		?>

    </div>


	
    <div id="inner_content">

      <div class="left_side_content">

        <div class="search_box_content">

          <?php

			include("includes/search.php");

		?>

        </div>

        <div class="left_content">

          <?

		 if(is_object($user) && $user->getErr()){ 

		echo "<div class=\"error_msg\"><ul>".$user->getErr()."</ul></div>";

         } 

		?>

          <iframe class="companyframe" src="company_listing.php?id=<?php echo $id; ?>&level=<?php echo $level; ?>&parent=<?php echo $parent; ?>" width="750" scrolling="yes" height="3000" style="margin-left:2px;"></iframe>

        </div>

      </div>

      <div class="right_sidebar">

        <? $frontEnd->showCategories($id,$level,$parent);?>

      </div>

    </div>
	
	<div id="useful_links">

     <?

		echo $frontEnd->getUsefulLinks();

	?>

    </div>


    <div class="footer">

     <?php include("static/footer_statistics.php"); ?>

    </div>

  </div>

</div>

</body>

</html>

