<?php
 
 
require_once("../headShopStaff.php");
?>
<!--<table border="0" class="shop_default">
<tr>
	<td> 

	  <label id="main_title">WELCOME TO BUDA SHOPING CENTRE</label>

     
  </td>
  <td align="right">
  
        
                <form action="myOrder.php" method="post">

                      <input class="hi" type="text" name="owniD"  value="<?php// echo $ownID;?>">
 
                      <input  class="spos" type="submit" value="My Order" name="post"  >

                 </form>
 

   </td>
 </tr>

 <tr>
  <td colspan="2">
<ul>
  <li style="padding-right:3%;">
    <form id="order" action="buda_shoping_center.php" method="post">

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

                       
                      <input  id="spos" type="submit" value="My shop" name="post"> 

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

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

                       
                      <input  id="spos" type="submit" value="Other shop" name="post"> 

                 </form> 
</li>
 
  <li>
 <form id="order" action="itemViewInOther.php" method="post">

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

                       
                      <input  id="spos" type="submit" value="Item view" name="post"> 

                 </form>  
 </li>
</ul>
</td>
</tr> 
</table>-->
<?php 
//$ownID="";
//if(isset($_POST['owniD']) && isset($_POST['shopid']) && isset($_POST['ownerid']) ){
//$ownID=$_POST['owniD'];
//$ownerid=$_POST['ownerid'];
?>
<table border="0" class="shop_default">
 <tr>
	<td colspan="2"> 

	  <label id="main_lab">MY SHOP</label>

    </td>
 </tr>
<?php    
$myS=$scon->getMyShop($ownID);
if($myS->rowCount()>0){
 $shop=$myS->fetch(); 
  
?> 

 
 
  <tr>
       <td>
             
  <label id="main_lab">PRODUCTS</label><p/>
  <?php
 $shopid=$shop['shopid']; 
  ///////
$pm=$scon->getShopItemPrices($shopid,$ownID);

if($pm->rowCount()>0){
   $pim=$pm->fetchAll();
   ?>
    <ul>
    <?php
   foreach ($pim as $key => $pi) {
$itemid=$pi['itemID'];
$item=$scon->getThisItem($itemid);
if($item->rowCount()>0){
   $it=$item->fetch(); 
  /////
   
      ?>

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

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

                 



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

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


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

                      <input class="hi" type="hidden" 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="main_lab">LOCATION AND CONTACT INFORMATION</label><p/>

     <ul>
        <li id="padli">
          <label id="min_lab">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">
			Not yet register a shop!..
		</td>

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

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