<?
if(!empty($_GET['id'])){
    $id = $_GET['id'];
    $r = $db->findByPK('tbpri','pri_id',$id)->executeRow();
    
}
?> 
                                        <section class="panel">
									<header class="panel-heading">
										<h2 class="panel-title bread-c"><a href="?url=review">REVIEW  > </a>Create REVIEW</h2>
									</header>
                                   
					<div class="panel-body">
						<form class="form-horizontal form-bordered" id="form_review" name="form_review" method="post" >
								<div class="col-md-12" style="margin-top:25px;margin-bottom:25px;background-color:#eee;">
								<h4 class="text-dark text-center">REVIEW</h4>
								</div>
								<div class="row">
								   <div class="col-md-12" style="margin-bottom:20px;">
							   <div class="form-group text-center" id="chkimgfield">
								   	<label class="col-md-12 control-label text-center header-form" style="float:none;text-align:center;" for="inputDefault">
								   		<i class="fa fa-file-picture-o" style="margin-bottom:15px;"></i> แบนเนอร์หลัก</label>
								   	<div class="col-md-12">
									<!-- <label class="control-label" for="imgfield">รูปภาพ</label> -->
										<ul class="img-list">
										  <li>
										    <a href="#" class="imgfield-msg img-del" id="imgfield-msg">
										      <img id="imgfield-img" style="width: 50%;margin-bottom:15px;">
										      <img id="imgfield-img" src="https://www.imaginetourservice.com/upload/<? echo $r['pri_img'];?>" style="width: 50%;margin-bottom:15px;">
										      <span class="text-content"><span>ลบรูปภาพนี้ ?</span></span>
										    </a>
										  </li>
										</ul>
									<div class="btn btn-danger">
										<input class="input-file" id="imgfield" type="file" name="files[]">
										<input type="hidden" id="imgfiles" name="pri_img" value="<? echo $r['pri_img'];?>">
										<input class="input-xlarge focused" id="imgfield-msgg" type="text" disabled="" style="display: none;">
									</div>
										<?//<a href="#" class="imgfield-msg img-del" id="imgfield-msg"><img id="imgfield-img"></a>?>
										<div class="progress progress-warning progress-striped active input-xlarge" id="progress" style="height:30px !important; display: none;">
											<div class="bar"></div>
										</div>
                                     </div>

								
								   </div>
                  <div class="col-md-12">
						<div class="form-group">
												<label class="col-md-3 control-label" for="inputDefault">ชื่อหัวข้อ : </label>
												<div class="col-md-6">
													<input type=hidden name=id value='<? echo $id;?>'>
													<input type="text" class="form-control" id="inputDefault" id='pri_name' name='pri_name' value="<?=$r[pri_name];?>">
												</div>
											</div>

									<div class="form-group">
												<label class="col-md-3 control-label">ประเทศ </label>
												<div class="col-md-6">
											<select data-plugin-selectTwo  id='pri_c' name="pri_c"  data-rel="chosen" class="form-control populate placeholder">
										<?
											$sql = "select * from tbcountry;";
                            				$result = mysql_query($sql);
                            				echo '<option value="0">-- เลือกประเทศ --</option>';
                            				while ($data = mysql_fetch_array($result) ) {
                            				echo "<option value=$data[country_name] ";
												if($r['pri_c'] == $data[country_name]){
													echo "selected";
												}
											echo ">$data[country_name]</option>";
                            			}
										?>
										</select>
												</div>
											</div>
				</div>

								<div class="col-md-12" style="margin-top:25px;">
											<div class="form-group">
												<label class="col-md-3 control-label" for="pri_text">เนื้อหา</label>
												<div class="col-md-6">
													<textarea class="form-control" rows="3" name="pri_text" id="pri_text" data-plugin-textarea-autosize>
														<?echo $r['pri_text'];?></textarea>
												</div>
											</div>	
								</div>
                                 <div class="col-md-12 text-center" style="margin-top:20px;">
								<div class="form-actions">
									<button type="submit" id="PackageBT" class="btn btn-danger"><i class="fa fa-save"></i> บันทึก</button>
									<button type="reset" onclick="window.history.back();return false;" class="btn btn-cancel-color">ยกเลิก</button>
								</div>
								</div>

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


