<?php
 //session_start();
require_once("../head2Alts.php");

?>
  
 
<center>
<table width="95%">
<tr><td colspan="2" align="center"><b>ENTERPRENEURS' GOODS</b></td></tr>
 
 
 <tr>
  <td colspan="2">

<ul>
  <li style="padding-right:3%;">
    <form id="order" action="buda_enterprenuers_center.php" method="post">

                      <input   type="hidden" name="owniD" id="owniD" value="<?php  echo $ownID;?>">

                       
                      <input  class="spos" type="submit" value="My business" name="post"> 

                 </form>  
     
  </li>
<li style="padding-right:70%;">
   
</li>
 
<li>
 
 <form id="order" action="OtherShopIn.php" method="post">

                      <input   type="hidden" name="owniD"  value="<?php  echo $ownID;?>">

                       
                      <input  class="spos" type="submit" value="Detail view " name="post"> 

                 </form>

 </li>


</ul>
 
</td>
</tr> 
<tr>
  <td colspan="2" align="center">
    
      <form action="defaultEnterpreneursEntryIn.php" method="post">

            <label id="search_lab">
                       <i>
                          Search enterprenuers here:-
                      </i> 
             </label>
                       <input   type="hidden" name="owniD" id="owniD" value="<?php  echo $ownID;?>">

                      <input type="text" class="hotel_info" height="25px" name="searchValue" id="searchValue"  onkeyup ="submision()">
                      <input class="subs" type="submit" value="Search" name="post"><br>
                      <i>You can search by business  name and category.</i>
            
      </form>
        <div  id="result" >
      
      </div>
  </td>
</tr>
 
</table>
</center>
  <?php
 
     if(isset($_POST['post']))
       {
       $search=$_POST['post'];
       if ($search=="Search") {
    
        $searchValue=$_POST['searchValue'];
        if ($searchValue!="") {
           
        require("searchEnterprenuerEntryIn.php");
         }////////////////////EMPTY POST 
         else{
          ?>
          <p><label id="min_lab">
           Searching empty results!.. 
           </label>
           <?php

         }

         
       }
       else{
        /////////////NONE POST
          require("searchNoEnterprenuerEntryIn.php");
       }
     }
 

?> 
<script>

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

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