 
<?php 
 

require('../headers.php');
 


//$ownID="";
//if(isset($_POST['owniD'])){
//$ownID=$_POST['owniD'];
?>
<center>
<table border="0" class="shop_default">
 <tr>
	<td colspan="2"  height="150px" valign="bottom" align="center"> 

	  <label id="main_lab">ENTERPRENUERS' GOODS COMING SOON</label>

    </td>
 </tr>
 <!--- HEADING-->
<tr>
  <td colspan="2">
<ul>
  <li style="padding-right:3%;">
  <label id="lab"><a style="color:blue;"  href="defaultEnterpreneursEntry.php">Summary view</a></label> 
  </li>
<li style="padding-right:80%;">
  <!--<label id="lab"><a  href="buda_shoping_centerout.php">Shop detail view</a></label>--> 
</li>
 
  <li>
<label id="lab"><a style="color:blue;"  href="buda_enterprenuers_centerout.php">Detail view</a></label>
  <!--<label id="lab"><a  href="itemViewOut.php">Item view</a></label> -->
 </li>
</ul>
</td>
</tr>
 <tr>
  <td colspan="2" align="center">
    
      <form action="buda_enterprenuers_centerout.php" method="post">

            <label id="search_lab">
                       <i>
                          Search item here:-
                      </i> 
             </label>
                      <input type="text" class="hotel_info" height="25px" name="searchValue" id="searchValue" onkeyup ="submision()">

                      <input class="subs" type="submit" value="Search" name="search" id="search" ><br>
                      <i>You can search by name or category..</i>
            
      </form>
     
      <div  id="result" >
       <?php
      if(isset($_POST['search']))
        {

        $searchValue=$_POST['searchValue'];
       if ($searchValue!="") {
         require_once('searchItemEnterprenuerOut.php');
        } 
      }
        ?>
      </div>
  </td>

</tr>
<?php 
//////////// 
   if(isset($_POST['search']))
       {

        $searchValue=$_POST['searchValue'];

        if ($searchValue!="") {
           
          $myS=$econ->getShopBySearch($searchValue);
         
         }
         else{

        $myS=$econ->getShop();

         }
        }
        else
        {
         
        $myS=$econ->getShop();
       } 
       ////////////

 //<!--TAIL-->
//<?php   
//$myS=$econ->getShop();
if($myS->rowCount()>0){
 $sho=$myS->fetchAll();
 foreach ($sho as $key => $shop) {
  $shopid=$shop['shopid'];
  $SI=$econ->getShopItem($shopid);
?>
<tr>
	<td valign="top" width="15%"> 
<ol class="homeD">

                <li>
                 <form action="selectedShopItemDetailout.php" method="post">

                     <!--<input class="hi" type="text" name="owniD"  value="<?php// echo $ownID;?>"-->


                     <input class="hi" type="hidden" name="shopid"  value="<?php echo $shop['shopid'];?>">

                    <input  class="pos" type="submit" value="<?php echo $shop['shopname'];?>" name="post"  >

                 </form>

                </li>
              </ol> 
	</td>

	<td valign="top" width="85%"> 
	<?php
	if ($SI->rowCount()>0)
	{
		$item=$SI->fetchAll();
		?>
		<ul>
		<?php
		foreach ($item as $key => $it)
		  {
			?>

            <li> 



            <li style="padding-right:2%"> 
            <img src="<?php echo $it['profileimages'];?> " id="icon"/>
                <center><i>Sold at:<b><?php echo  $it['currency'].$it['itemcost'];?></b></i><br/> 

                <b><?php echo $it['itemname'];?></b><p/>
                <form action="itemMoreDetailOtherInout.php" method="post">

                     <!-- <input class="hi" type="text" name="owniD"  value="<?php //echo $ownID;?>"-->


                      <input class="hi" type="text" name="shopid"  value="<?php echo $it['shopid'];?>">


                      <input class="hi" type="text" name="itemid"  value="<?php echo $it['itemid'];?>">

                      <input  class="spos" type="submit" value="<?php echo $it['itemtype'];?>" name="post"  >

                 </form>



            </li>

			
			<?php
		   }
		   ?>
		   </ul>
		   <?php
	}

	else
	   {
	   	echo "Products for sale not yet uploaded!..";
	   }
	?>

	<p/><label id="min_lab">BUSINESS LOCATION AND CONTACT INFORMATION</label><p/>

     <ul>
        <li id="padli">
        	<label id="min_lab">BUSINESS NAME</label>
        	<p/><i><?php echo $shop['shopname'];?></i>
        </li>
         <li id="padli">
        	<label id="min_lab">STREET</label>

        	<p/><i><?php echo $shop['street'];?></i>
        </li>
        <li>
        	<label id="min_lab">WARD</label>

        	<p/><i><?php echo $shop['ward'];?></i>

        </li>

        <li id="padli">
        	<label id="min_lab">DISTRICT</label>

        	<p/><i><?php echo $shop['district'];?></i>
        </li>
        <li id="padli">
        	<label id="min_lab">REGION</label>

        	<p/><i><?php echo $shop['region'];?></i>
        </li>
        <li id="padli">
        	<label id="min_lab">COUNTRY</label>

        	<p/><i><?php echo $shop['country'];?></i>
        </li>

        <li id="padli">
        	<label id="min_lab">PHONE NUMBER</label>

        	<p/><i><?php echo $shop['phoneno'];?></i>
        </li>

        <li id="padli">
        	<label id="min_lab">EMAIL ADDRESS</label>

        	<p/><i><?php echo $shop['email'];?></i>
        </li>

        <li id="padli">
        	<label id="min_lab">POSTAL ADDRESS</label>

        	<p/><i><?php echo $shop['postAddress'];?></i>
        </li>
        <li id="padli">
        	<label id="min_lab">POPULAR MARK</label>

        	<p/><i><?php echo $shop['popularmark'];?></i>
        </li> 
     </ul><p/>



	</td>

</tr>
 
	

<?php
  	 
 }	
}
else{ 
	?>
	<tr>
		<td colspan="2">
			Coming soon!..
		</td>

	</tr>
  </table>
  </center>
<?php
}
//}
//else{
 // echo "Connect Error Reload again";
//}

?>
<script>

  function submision(){
    
    var searchValue=$('#searchValue').val();
    $('#result').empty();
    $.post('searchItemEnterprenuerOut.php',{searchValue:searchValue},function(data){
      $('#result').html(data);

    });
  }
/* 
$(document).ready(function(){
  
$('#search').keyup(function(){
  var searchValue= $('#search').val();
  $trim(searchValue); 
  if (searchValue!='') {
    $.ajax({
      url:"searchItemOut.php",
      method:"POST",
      data:{searchValue:searchValue},
      success:function(data){
        $('#result').html(data);
      }
    });

  }
});
});*/
</script>
<?php
require_once('../footers.php');
?> 