<?php

//require('../head2Alt.php');
 
require_once("../head2Alts.php");
?>
<center>
<table border="0" class="shop_default">
<tr>
	<td colspan="2" align="center"> 

	  <label id="main_title"><small>ENTERPRENUERS BUSINESS</small></label>

    </td>
 </tr>
 <tr>
   <td colspan="2" align="right">
  <ul id="lipad">                                                       <!--MY ORDER  GOES HERE-->
  <li >
        
                <form action="myOrder.php" method="post">

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

 

 

                      <input  class="spos" type="submit" value="Order records" name="post"  >

                 </form>

       </li>
  </ul>


   </td>
 </tr>
</table>
<?php 
$ownID="";
if(isset($_POST['owniD'])){
$ownID=$_POST['owniD'];
?>
<table border="0" class="shop_default">
   
  <td>

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

	  <label id="main_lab"><small> MY BUSINESS</small></label>

    </td>
 </tr>
<?php    
$myS=$econ->getMyShop($ownID);
if($myS->rowCount()>0){
 $sho=$myS->fetchAll();
 foreach ($sho as $key => $shop) {
  $shopid=$shop['shopid'];
  $SI=$econ->getShopItem($shopid);
?> 
<tr>
  <td>
    <?php
    require_once('shopNavLink.php');
    ?>
  </td>
</tr>
 
 
  <tr>
    
       <td>
             
  <label id="main_lab">GOODS</label><p/>
  <?php
  if ($SI->rowCount()>0)
  {
    $item=$SI->fetchAll();
    ?>
    <ul id="lipad">
    <?php
    foreach ($item as $key => $it)
      {
      ?>

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

                <b><?php echo $it['itemname'];?></b><p/>

                 



                  <form action="itemMoreDetailOwner.php" method="post">

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


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


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

                      <input  id="item" type="submit" value="More detail" name="post"  >

                 </form></center>



            </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>
			Not yet register a business!..
		</td>

	</tr>
  </table>
  </center>
<?php
}

}
else{
	echo "Connect Error Reload again";
}
//require('OtherShopIn.php');
 
 require_once('../footerIns.php');
?>