<style>
.control-label {  
  padding-top: 0 !important;
}
.div-left {  
  width: 100%;
}
.placepicker-map {
   width: 100%;
        height: 300px;
      }
      .another-map-class {
        width: 100%;
        height: 300px;
      }
      .pac-container {
        border-radius: 5px;
      }
.div-left {
  width: 70%;
}
</style>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" rel="stylesheet"></link>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCDgFNMkZRmDv6tkxbKut5eIqaQbcM8zS8&sensor=true&libraries=places"></script>
<script>
      $(document).ready(function() {
        // Basic usage
        $(".placepicker").placepicker();
      }); // END document.ready
      
      var geo;
		function init() {
			var valLat = <?php echo $resEdit['latitude'];?>;
			var valLong = <?php echo $resEdit['longitude'];?>;
			var myLatLng = {lat: <?php echo $resEdit['latitude'];?>, lng: <?php echo $resEdit['longitude'];?>};					
			if(valLat!='' && valLong!=''){ /*ok*/ } else {
				valLat = 8.5241391;
				valLong = 76.9366376;
			}			
		    var map_elem = document.getElementById('map-canvas');
		    var map = new google.maps.Map(map_elem, {
		        center: new google.maps.LatLng(valLat, valLong),
		        /*mapTypeControlOptions: {
					style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
					mapTypeIds: ['roadmap', 'terrain']
				}*/		        
		        zoom: 14,
		        minZoom: 10,
		        maxZoom: 22,
		        /*mapTypeId: google.maps.MapTypeId.HYBRID*/
		        mapTypeId: 'roadmap'
		    });	
		    var marker = new google.maps.Marker({
	          position: myLatLng,
	          map: map,
	          title: '<?php echo $resEdit['building_name'];?>'
	        });	
		}
		google.maps.event.addDomListener(window, 'load', init);   		  
</script>
<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">View Shop</div>                                
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.php?page=home">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="index.php?page=manage_purchase_partner">Manage Shops</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">View Shop</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header>View Shop</header>  
                                    <div style="margin-left:20px;">
	                                	<a class="btn btn-info" href="index.php?page=manage_purchase_partner&p=<?php echo $p;?>">Back</a>&nbsp;
	                                	<a class="btn btn-info" href="index.php?page=add_purchase_partner&id=<?php echo $editId; ?>">Edit</a>&nbsp;
	                                	<a class="btn btn-info" href="index.php?page=purchase_partner_photos&id=<?php echo $editId; ?>">Photos</a>&nbsp;
	                                	<a class="btn btn-info" href="index.php?page=shop_assign_category&shop_id=<?php echo $editId; ?>">Assign Categories</a>
	                                </div>                                  
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($error) && $error!='') { ?> 
                                	<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } ?>                                		
                                		                                      	                          	                                	
                                    <form action="" id="form_staff_add" class="form-horizontal" method="post">
                                    	<div class="form-body div-right">
										
                                            <div class="form-group row">                                          	
		                                        <div class="col-md-12">
													<?php if($resEdit['image']!='') { ?>
												<img src="<?php echo SHOP_IMG_URL.$resEdit['image']; ?>" style="width:150px; margin-bottom: 15px;" >
													<br>
												<?php } ?>
		                                        	<div id="map-canvas"></div> 		                                        	
		                                        </div>
		                                    </div>		                                    
                                        </div>
                                        <div class="form-body div-left">                                        	                                        	 
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Name</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['name'];?>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Email Address</label>
                                                <div class="col-md-4">                                                                                                                                                                   
                                                    <?php echo $resEdit['email'];?>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Phone Number</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['phone'];?>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Mobile Number</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['mobile'];?>
                                                </div>
                                            </div>                                            
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Shop Name</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['building_name'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Address</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['address'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Location</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['place'];?>                                            
                                                </div>
                                            </div>                                            
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">City</label>
                                                <div class="col-md-4">        
                                                	<?php echo getCityName($resEdit['city']);?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Regular Commission (%)</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['commission'];?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Lat-Long</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo $resEdit['latitude'].','.$resEdit['longitude'];?>   
                                                </div>
                                            </div>                                                                                        
                                            
                                        </div>  
                                                                              
                                      	
                                    </form>
                                </div>
                            </div>
                        </div>
                        
                        
                        
                        
                        <div class="col-md-12">
                            <div class="card card-topline-red">
                                <div class="card-head">
                                    <header>Payments</header>
                                    <div class="tools">                                        
	                                    <a class="t-collapse btn-color fa fa-chevron-down" href="javascript:;"></a>
	                                    <a class="t-close btn-color fa fa-times" href="javascript:;"></a>
                                    </div>
                                </div>                                
                                    <!--<?php if(isset($_REQUEST['success'])){ ?><div class="alert alert-success"><?php echo urldecode($_REQUEST['success']); ?></div></div><?php } ?>-->
                                    <?php if(isset($execDetails) && mysqli_num_rows($execDetails)>0) { ?>
                                    <table class="table table-striped table-bordered table-hover table-checkable order-column" style="width: 100%" id="example4">
                                        <thead>
                                            <tr>                                                
                                                <th> S.No. </th>
                                                <th> Amount </th>
                                                <th> Date </th>
                                                <th> Added By </th>                                                                                           
                                                <th> Actions </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        	<?php
                                        	if(isset($_GET['p']) && is_numeric($_GET['p']) && ($_GET['p'] > 1)) {
												$slNo = ($_GET['p']*30-29);
											} else {
												$slNo = 1;
											}
												while($resDetails = mysqli_fetch_array($execDetails)) {	?>
                                            <tr class="odd gradeX">                                                
                                                <td><?php echo $slNo; ?></td>
                                                <td><?php echo $resDetails['amount']; ?></td>
                                                <td><?php echo getFormattedDateTime($resDetails['date']); ?></td>
                                                <td><?php echo getAdminUserName($resDetails['added_by']); ?></td>                                                                                                                                               
                                                <td class="valigntop">
                                                    <div class="btn-group">
                                                        <button class="btn btn-xs deepPink-bgcolor dropdown-toggle no-margin" type="button" data-toggle="dropdown" aria-expanded="false"> Actions
                                                            <i class="fa fa-angle-down"></i>
                                                        </button>
                                                        <ul class="dropdown-menu pull-left" role="menu">                                                        	
                                                            <!--<li>
                                                                <a  onclick="return confirm('Are you sure to delete this item?');" href="index.php?page=view_purchase_partner&action=delete_payment&del_id=<?php echo $resDetails['id']; ?>&p=<?php echo $p; ?>">
                                                                    <i class="icon-docs"></i> Delete </a>
                                                            </li> -->                                                          
                                                        </ul>
                                                    </div>
                                                </td>
                                            </tr>
                                            <?php ++$slNo; } ?>                                            
                                        </tbody>
                                    </table>
                                    <div style="float: left; width: 25%;"> <?php echo $pageNums; ?> </div>
                                    <?php } else { ?>
                                    	<div class="alert alert-danger">Sorry! No Results Found.</div>					        		
					        		<?php }	?> 
                                </div>
                            </div>
                        
                        
                        
                        
                        
                        
                        
                    </div>
	</div>
</div>
