
<?php
include("include/connection.php");

if(isset($_GET['id']))
{
$id=$_GET['id'];
$detailservice=mysql_fetch_array(mysql_query("select * from `service` where `service_id`='$id'"));
$service_name=$detailservice['service_name'];
$jiage=$detailservice['jiage'];
$shuxing=$detailservice['shuxing'];
$shuxing2=$detailservice['shuxing2'];
$shuxing3=$detailservice['shuxing3'];
$shuxing4=$detailservice['shuxing4'];
$shuxing5=$detailservice['shuxing5'];
$url=$detailservice['url'];

echo '
<div class="modal-header">
												<button data-dismiss="modal" class="close" type="button">&times;</button>
												<h3>编辑产品</h3>
											</div>
											<div class="modal-body">
<form action="#" method="post" id="form1">
 <input  type="hidden"  value="'.$id.'" style="width:350px;" name="serviceid1" /> 
 
                           <div class="form-group" style="margin-bottom:1px;">

										<div class="col-sm-9">
产品名称：<input type="text"   value="'.$service_name.'"  name="service1"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
										<div class="col-sm-9">
产品价格：<input type="text"   value="'.$jiage.'"  name="jiage"   class="col-xs-10 col-sm-5" style="width:200px;"  required/> / 月

										</div>
										<div class="col-sm-9">
产品属性：<input type="text"   value="'.$shuxing.'"  name="shuxing"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
										<div class="col-sm-9">
产品属性：<input type="text"   value="'.$shuxing2.'"  name="shuxing2"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
										<div class="col-sm-9">
产品属性：<input type="text"   value="'.$shuxing3.'"  name="shuxing3"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
										<div class="col-sm-9">
产品属性：<input type="text"   value="'.$shuxing4.'"  name="shuxing4"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
										<div class="col-sm-9">
产品属性：<input type="text"   value="'.$shuxing5.'"  name="shuxing5"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
										<div class="col-sm-9">
购买地址：<input type="text"   value="'.$url.'"  name="url"   class="col-xs-10 col-sm-5" style="width:200px;"  required/>

										</div>
									</div>
									 
                                    
                                    
                                    
                                   
									
                                    
                                    <div class="clearfix form-actions">
										<div class="col-md-offset-3 col-md-9">
<button class="btn btn-primary" style="width:150px;position:relative;left:120px;" type="submit" id="submit1"  name="submit1" onclick="submitForm()">
												<i class="icon-pencil icon-white"></i>
												编辑
											</button>
                                            
                                            

											
											
										</div>
									
					
                                            </form>
											</div>



';
}

?>

  
  
          <script>
		$(document).ready(function(e) {
            
			$(".close").click(function(){
			setTimeout(function(){
  window.location = 'service.php';
}, 500);
			});
			
			$(document).keyup(function(e) {
     
  if (e.keyCode == 27) { $('.close').click(); }   // esc
});
        });
		</script>