Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
view
/
farm
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/view/farm/farm-insert.php
<?php $FARM_TYPE = [ "원종계"=>"GP", "종계"=>"PS", "육계"=>"CC", "종계부화장"=>"PS_HC", "육계부화장"=>"CC_HC" ]; ?> <div class="card-box"> <form method="post" id="form1" name="form1" action="#"> <input type="hidden" id="paramFarmCode" name="paramFarmCode" value=""/> <input type="hidden" id="mode" name="mode" value="edit"/> <div class="card-block"> <div class="row"> <div class="col-sm-12"> <div class="float-right"> <a class="btn btn-primary w-lg btn-custom waves-effect waves-light" href="javascript:goSave()" ><i class="md-save"> <?php echo ("저장하기")?> </i></a> <a class="btn btn-primary w-lg btn-custom waves-effect waves-light" href="javascript:goBack()" ><i class="ion-ios7-arrow-back"> <?php echo ("뒤로가기")?> </i></a> </div> </div> <div style="height:50px"> </div> </div> <!-- Tab panes --> <div class="tab-content card-block"> <div class="tab-pane active" id="tab_card_default" role="tabpanel"> <div class="row"> <div class="col-sm-12"> <div> <table class="table table-bordered"> <thead class="thead-light text-center"> <tr> <th><a class="btn btn-primary" id="img_mng" name="img_mng" data-toggle="modal" data-target="#view-modal"><?php echo ("농장이미지 관리"); ?></a></th> <th><h6><i class="ti-layers"> 농장정보</i></h6></th> </tr> </thead> <tbody> <?php include('farm-img-management.php');?> <tr> <td class="text-center"> <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel" data-interval="3000"> <div class="carousel-inner"> <div class="carousel-item active"> <img style="width:400px;height:250px;" src="/web/files/farm/farm-tmp2.jpg" class="img-fluid img-thumbnail"> </div> </div> <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> </td> <td> <div class="table-responsive"> <table class="table table-bordered"> <thead class="thead-light text-center"> <tr class=""> <th><?php echo ("농장명")?></th> <th><?php echo ("농장주")?></th> <th><?php echo ("연락처")?></th> </tr> </thead> <tbody> <tr> <td class="text-center"> <input type="text" class="form-control" id="farm_name" name="farm_name" /> </td> <td class="text-center"> <input type="text" class="form-control" id="farm_admin" name="farm_admin" /></td> <td class="text-center"> <div class="row ml-2"> <div class="col-3"> <input type="text" class="form-control" id="farm_phoneno1" name="farm_phoneno1"/> </div>- <div class="col-4"> <input type="text" class="form-control" id="farm_phoneno2" name="farm_phoneno2"/> </div>- <div class="col-4"> <input type="text" class="form-control" id="farm_phoneno3" name="farm_phoneno3" /> </div> </div> </td> </tr> </tbody> </table> </div> <div class="table-responsive mt-3"> <table class="table table-bordered"> <thead class="thead-light text-center"> <tr class=""> <th><?php echo ("농장주소")?></th> <th><?php echo ("농장타입")?></th> <th><?php echo ("HACCP")?></th> </tr> </thead> <tbody> <tr> <td class="text-center"> <div class="row"> <div class="col-sm-2"> <a class="btn btn-primary" href="javascript:viewPostCode('farm_postcode','farm_address_1','farm_address_2');" ><?php echo ("우편번호 검색"); ?></a> </div> <div class="col-sm-2"> <input type="text" class="form-control" id="farm_postcode" name="farm_postcode" value="" onclick="javascript:viewPostCode('farm_postcode','farm_address_1','farm_address_2');" readonly/> </div> <div class="col-sm-5"> <input type="text" class="form-control" id="farm_address_1" name="farm_address_1" value="" onclick="javascript:viewPostCode('farm_postcode','farm_address_1','farm_address_2');" readonly/> </div> <div class="col-sm-3"> <input type="text" class="form-control" id="farm_address_2" name="farm_address_2" value="" placeholder="<?php echo ("상세 주소"); ?>"/> </div> </div> </td> <td class="text-center"> <select name="farm_type" id="farm_type" class="form-control form-control-sm"> <?php foreach($FARM_TYPE as $key2=>$val2):?> <option value="<?php echo $val2?>"><?php echo $key2?></option> <?php endforeach;?> </select> </td> <td class="text-center"> <div style="text-align:center;vertical-align:middle;margin-top:10px"> <div class="radio radio-primary form-check-inline ml-3"> <input type="radio" id="haccp" value="Y" name="haccp" checked /> <label for="inlineRadio1"> 예 </label> </div> <div class="radio form-check-inline"> <input type="radio" id="haccp" value="N" name="haccp" /> <label for="inlineRadio2"> 아니오 </label> </div> </div> </td> </tr> </tbody> </table> </div> </td> </tr></tbody> </table> </div> </div> </div> </div> </div> </div> </form> </div> <script> function goBack(){ history.back(); } function goSave(){ $("#mode").val("insert"); document.form1.action="process.php"; document.form1.submit(); } $(document).ready(function() { //getAddressToLatLng(); 집 주소로 위도경도 구하기, 추후 개발 해야함 //프로세스 부분에서 넘어온 CODE값 처리 var codeTmp = "<?php echo $_REQUEST["code"]?>"; if(!codeTmp || codeTmp.length <=0 || codeTmp == undefined){ // console.log("Don't Parameter Code"); }else{ if(codeTmp == "FARM_INSERT_SUCCESS"){ var obj = { "types" : "alert", "title" : "MessageBox", "content" : "농장을 등록하였습니다." }; alertModals(obj); }else if(codeTmp == "FARM_INSERT_FAIL"){ var obj = { "types" : "alert", "title" : "MessageBox", "content" : "농장정보 등록을 실패하였습니다." }; alertModals(obj); } } }); </script> <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script> <script> function viewPostCode($postCode,$addr1,$addr2) { new daum.Postcode({ oncomplete: function(data) { // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분. // 각 주소의 노출 규칙에 따라 주소를 조합한다. // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다. var fullAddr = ''; // 최종 주소 변수 var extraAddr = ''; // 조합형 주소 변수 // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다. if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우 fullAddr = data.roadAddress; } else { // 사용자가 지번 주소를 선택했을 경우(J) fullAddr = data.jibunAddress; } // 사용자가 선택한 주소가 도로명 타입일때 조합한다. if(data.userSelectedType === 'R'){ //법정동명이 있을 경우 추가한다. if(data.bname !== ''){ extraAddr += data.bname; } // 건물명이 있을 경우 추가한다. if(data.buildingName !== ''){ extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); } // 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다. fullAddr += (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); } // 우편번호와 주소 정보를 해당 필드에 넣는다. document.getElementById($postCode).value = data.zonecode; //5자리 새우편번호 사용 document.getElementById($addr1).value = fullAddr; // 커서를 상세주소 필드로 이동한다. document.getElementById($addr2).focus(); } }).open(); } </script>