<?php







ob_start();







session_start();







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







include('connection/connection.php');







include_once('index.fns.php');







include_once('lib/class.news.blog.php');







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







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







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







$frontEnd= new frontEnd;







$newsBlog = new newsBlog;



unset($_SESSION['post']);



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











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







if($action) {







	switch ($action) {



		case 'comment':







			$_SESSION['post']=$_REQUEST;







			if($newsBlog->leaveComment($_POST)) {



				



				$frontEnd->redirect('/post.php?bid='.$_REQUEST['bid']);



                unset($_SESSION['post']);



			}







		break;







		default:







			echo "Invalid Action. ";







		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" />

<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">























ddaccordion.init({







	headerclass: "expandable", //Shared CSS class name of headers group that are expandable







	contentclass: "categoryitems", //Shared CSS class name of contents group







	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"







	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover







	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 







	defaultexpanded: [-1], //index of content(s) open by default [index1, index2, etc]. [] denotes no content







	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)







	animatedefault: false, //Should contents open by default be animated into view?







	persiststate: false, //persist state of opened contents within browser session?







	toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]







	togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)







	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"







	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized







		//do nothing







	},







	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed







		//do nothing







	}







})























</script>

</head>

<body>

<div id="main_wrap">

  <div id="main_container">

    <div class="header">

      <?php



				include("includes/header.php");



			?>

    </div>

    <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 class="sub_title"><img src="images/page_white_edit.png" /><a href="new_topic.php">Submit an Article</a> </div>





        </div>

        <div class="left_content">

          <?







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







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







         } 







		?>

          <?=$newsBlog->getDetailedBlogPosts($_REQUEST['bid'])?>

        </div>

      </div>

      <div class="right_sidebar">

        <? $frontEnd->showCategories();?>

      </div>

    </div>

<div id="useful_links">

     <?

		echo $frontEnd->getUsefulLinks();

	 ?>

    </div>

      <div class="footer">
	<?php

				include("static/footer_statistics.php");

		?></div>

  </div>

</div>

</body>

</html>

