<?php
session_start();
?>

<!DOCTYPE html>
<html>
<title>Aiderstech Services</title>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<link href="../buda_cssfile.css" rel="stylesheet" type=" text/css">

<link href="../buda_shop.css" rel="stylesheet" type=" text/css">
<script type= "text/javascript"  src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script>
<script src="https://unpkg.com/vue@2.5.16/dist/vue.min.js"></script>
<script src="../image-compressor.js"></script>
  <!--<script src="../main.js"></script>



<script type= "text/javascript"  src="../../uncjQuery.js"></script>--> 
         <?php
 
        $imageP="";
        $pName="";
        
        
    if ($_GET['i']=="qgsfhuw8891o1pggywiuiwpwp8091hhwjmbbbnbsnusbbsggs98202iiahjhabbabbabba89299200gsgshsiisi00200hhshhsbbssbbsbbs2002002002002" && $_GET['s']=="sqwesgbsynnebbdyyeuueumnennenneeyyyy3yy3uu33iii3o3oo3oo3i3iii3ii3uu3uu3uuu3uuu3uuu3uuu3uuuu3uuu3uu3uu3uuu3uu3ttyy3yy3yy3yy3yy3yyy3yy3yy3yy3yy3shshhshhwhhwhhwhhheh"){
              
                          //$userid=$_GET['id']; id=$shopid&&id2=$ownID&&id3=$ownerid
                          $ownID=$_GET['id2'];
                          $ownerid=$_GET['id3'];
                          $shopid=$_GET['id'];
                        }
           
           
    if (isset($_POST['owniD']) && isset($_POST['shopid']) && isset($_POST['ownerid'])) {
              $ownID=$_POST['owniD'];
              $shopid=$_POST['shopid']; 
              $ownerid=$_POST['ownerid'];
              }
              
         
    if ($ownID=="" || $ownerid=="" || $shopid=="") 
     {
          
            $r="Invalid detail!.";
            
             echo "<script> window.location.href='defaultShopingCenter.php?id=$r' </script>";
           // header("location:defaultShopingCenter.php?id=$r");
        
      }
      
      else
      { 
 
           require("buda_connect.php");
           $con = new connect_class(); 
           require("buda_agro_class.php");
           $gcon = new buda_agro_class();
           
       
          
         
          
         $img = $con->getMyWorkersProfilePicture($ownerid);
         if($img->rowCount()>0)
         {
           $rr=$img->fetch();
           $imageP=$rr["directory"];
         }
         else{
          $imageP='../accountProfileImages/default.jpg';
         }

         $pN=$con->getMyShopWorkersprofileName($ownerid);

         if($pN->rowCount()>0)
          {
           $rN=$pN->fetch();
           $pName=$rN["lname"];
           }
         $MyH =$pcon->getMyShop($ownID);//getMyOfficeHotel($ownID);
          if($MyH->rowCount()>0)
          {
           $HN=$MyH->fetch();
           $shopid=$HN["shopid"];
           }
         }
         ?>                                                              

                                    <!-- HEADING TABLE FOR LOGO   ON LINK-->


<table class="headtab" border="0"><tr> <td align="left"  colspan="2" style="padding-left: 40px;"> 
       <img src="../hotel_images/aiderslogo.PNG" style="width:5%; height:20px;"/>
     </td>
    
</tr>
<tr>
   <td align="center">
     <label  style="color:white; font-weight:bold; font-style: italic;">MULT-BUSINESS ONLINE MARKET</label>
   </td>
  

  </td>
  <td width="8%" valign="bottom" align="center" rowspan="2">
       <img id="owp" src="<?php echo $imageP;?>"  alt="Profile photo" />

   <br/><small><?php echo $pName;?></small>
 </td> 
 </tr>

<tr id="link">

<td id="leff" valign="bottom">
  <ul class="homeD">

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

                 </form>

                </li>
              </ul> <p/>
<?php
require_once("shopStaffNavLink.php");
?>

 
 </td>
 

</tr>

</table>
<table width="100%">
       <tr>
           <td align="right">
           <form action="shopWorkersAccountView.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="pos" type="submit" value="My account" name="post">

           </form>
           <form action="../home.php" method="post">

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


              <input class="pos" type="submit" style="color:red;" value="Logout" name="post">

           </form>
          </td>
      </tr>
</table>

</head>