 
<?php 
$ownID="";
if(isset($_POST['owniD'])){
$ownID=$_POST['owniD'];
?>

<table border="0" class="shop_default">
 <tr>
	<td colspan="2"> 

	  <label id="main_lab">OTHER AVAILABLE SHOPS</label>

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

                <li>
                 <form action="selectedShopItemDetailInOther.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="pos" type="submit" value="<?php echo $shop['shopname'];?>" name="post"  >

                 </form>

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

	<td valign="top" width="85%">
	<label id="main_lab">PRODUCTS</label><p/>
	<?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="itemMoreDetailOtherIn.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="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";
}

?>