Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
view
/
farmData
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/view/farmData/prod_view_b.php
<?php use CTS\CTS; $pageTitle="prod"; $arrFileType = DOC::arrayFileType(); $file_type = empty($_REQUEST['file_type']) ? "" : $_REQUEST['file_type']; $idx = empty($_REQUEST['idx']) ? "" : $_REQUEST['idx']; // index $prodInfo = DOC::getProdInfo($idx); // dfarmInfomation $prod_type = $prodInfo['prod_type']; $prod_flock = $prodInfo['prod_flock']; $prod_farm = $prodInfo['prod_farm']; ?> <div class="ibox-content"> <table class="table table-borderless"> <tr> <td class="float-right"> <div class="col-auto"> <a href="javascript:deleteContent(<?=$idx?>)" class="btn btn-danger btn-md"><i class="ion-trash-b"></i><?php echo (" 삭 제")?></a> <a href="javascript:goList()" class="btn btn-primary btn-md"><i class="ion-navicon-round"></i><?php echo (" 목 록")?></a> </div> </td> </tr> </table> <h3 class="text-center"> <?=$prodInfo['prod_farm']?> 농장 </h3> <nav class="nav nav-pills nav-stacked justify-content-center mb-5"> <a href="prod_view_a.php?file_type=<?=$file_type?>&idx=<?=$idx?>" class="nav-link">육성농장</a> <a href="prod_view_b.php?file_type=<?=$file_type?>&idx=<?=$idx?>" class="nav-link active">성계농장</a> </nav> <table class="table text-center"> <colgroup> <col width="5%"/> <col width="20%"/> <col width="20%"/> <col width="20%"/> <col width="20%"/> <col width="5%"/> </colgroup> <thead> <tr> <th class=" "></th> <th class="bg-light " >일보</th> <th class="bg-light " >방문일지</th> <th class="bg-light " >혈청검사</th> <th class="bg-light " >살모넬라</th> <th class=" "></th> </tr> </thead> <tbody> <tr> <td></td> <td style='cursor:pointer' ><button class="btn btn-outline-light" onclick="viewContent('<?=$prodInfo['prod_dir']?>','<?=$prodInfo['prod_file'].'.'.$prodInfo['prod_ext']?>')"><span class="badge-pill badge-info" >일보</span></a></button></td> <? //방문일지 다운로드 $dfarmInfo = \DB::queryFirstRow("SELECT * FROM files WHERE file_type ='방문일지' AND file_nameA = '{$prodInfo['prod_farm']}농장' "); if($dfarmInfo) { ?> <td style='cursor:pointer' ><button class="btn btn-outline-light" onclick="viewContent('<?=$dfarmInfo['file_dir']?>','<?=$dfarmInfo['file_name'].'.'.$dfarmInfo['file_ext']?>')"><span class="badge-pill badge-info" >방문일지</span></a></button></td> <? }else{ echo "<td>파일이 없습니다.</td>"; } ?> <? // 혈청검사 다운로드 $serumInfo = \DB::queryFirstRow("SELECT file_dir, `file_name`, file_ext FROM serum WHERE farm_name ='{$prodInfo['prod_farm']}' AND flock_code ='{$prodInfo['prod_flock']}' "); if($serumInfo){ ?> <td style='cursor:pointer' ><button class="btn btn-outline-light" onclick="viewContent('<?=$serumInfo['file_dir']?>','<?=$serumInfo['file_name'].'.'.$serumInfo['file_ext']?>')"><span class="badge-pill badge-info" >혈청검사</span></a></button></td> <? }else{ echo "<td>파일이 없습니다.</td>"; } ?> <? // 살모넬라 다운로드 $salmonellaInfo = \DB::queryFirstRow("SELECT file_dir, `file_name`, file_ext FROM house_salmonella WHERE farm_name ='{$prodInfo['prod_farm']}' AND flock_code ='{$prodInfo['prod_flock']}' "); if($salmonellaInfo){ ?> <td style='cursor:pointer' ><button class="btn btn-outline-light" onclick="viewContent('<?=$salmonellaInfo['file_dir']?>','<?=$salmonellaInfo['file_name'].'.'.$salmonellaInfo['file_ext']?>')"><span class="badge-pill badge-info" >살모넬라</span></a></button></td> <? }else{ echo "<td>파일이 없습니다.</td>"; } ?> <td></td> </tr> </tbody> </table> <table class="table text-center w-50 float-left"> <colgroup> <col width="10%"/> <col width="30%"/> <col width="50%"/> <col width="10%"/> </colgroup> <thead> <tr> <th></th> <th class="bg-light text-right pr-5" >구분</th> <th class="bg-light ">결과</th> <th></th> </tr> </thead> <tbody> <tr> <td></td> <th class="text-right pr-5" scope="row">편입수수</th> <td><input type="text" class="form-control text-center" name="" id="prod_tnum" value="<?=$prodInfo['prod_tnum']?>" placeholder=""></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">도태수수</th> <td><input type="text" class="form-control text-center" name="" id="prod_dnum" value="<?=$prodInfo['prod_dnum']?>" placeholder=""></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">HH산란수</th> <td><input type="text" class="form-control text-center" name="" id="prod_snum" value="<?=$prodInfo['prod_snum']?>" placeholder=""></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">HH종란수</th> <td><input type="text" class="form-control text-center" name="" id="prod_jnum" value="<?=$prodInfo['prod_jnum']?>" placeholder=""></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">HH초생추</th> <td><input type="text" class="form-control text-center" name="" id="prod_cnum" value="<?=$prodInfo['prod_cnum']?>" placeholder=""></td> <td></td> </tr> <tr> <td></td> <td></td> <td style='cursor:pointer' class="text-right"><button class="btn btn-outline-light ml-3" onclick="apply('<?=$idx?>')"><span class="badge-pill badge-success" >조회</span></a></button></td> <td></td> </tr> </tbody> </table> <table class="table text-center w-50"> <colgroup> <col width="10%"/> <col width="30%"/> <col width="50%"/> <col width="10%"/> </colgroup> <thead> <tr> <th></th> <th class="bg-light text-right pr-5" >구분</th> <th class="bg-light ">결과</th> <th></th> </tr> </thead> <tbody> <tr> <td></td> <th class="text-right pr-5" scope="row">사육규모</th> <td><?=number_format($prodInfo['prod_feed'])?></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">사육밀도<br/>(수/m²)</th> <td><?=number_format(round(($prodInfo['prod_tnum']/$prodInfo['prod_area']),1),1)?><td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">급이기<br/>(수/개, m)</th> <td><?=number_format(round(($prodInfo['prod_tnum']/$prodInfo['prod_fsum']),1),1)?></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">급수기<br/>(수/개)</th> <td><?=number_format(round(($prodInfo['prod_tnum']/$prodInfo['prod_wsum']),1),1)?></td> <td></td> </tr> <tr> <td></td> <th class="text-right pr-5" scope="row">생존율<br/>(%)</th> <?if($prodInfo['prod_dnum']==0 || $prodInfo['prod_tnum']==0 ){ echo "<td>0%</td>"; }else{?> <td><?=round(($prodInfo['prod_dnum']/$prodInfo['prod_tnum']*100),1)?>%</td> <?}?> <td></td> </tr> </tbody> </table> </div> <script> // delete content function deleteContent(file_idx) { var delConfirm=confirm('파일 삭제시 복구되지 않습니다.'); if (delConfirm) { var data = new FormData(); data.append("prod_idx", file_idx); data.append("page", '<?=$page?>'); data.append("pageTitle", '<?=$pageTitle?>'); data.append("file_type", '<?=$file_type?>'); data.append("process_type", 'd_prod'); $.ajax({ data: data, type: 'post', url: "farmDataProcess.php", enctype: "multipart/form-data", sync: false, cache: false, contentType: false, processData: false, dataType: 'json', success: function(response) { eval(response['alert']); eval(response['link']); } }); }else { return; } } // apply function apply() { var data = new FormData(); data.append("prod_tnum", $('#prod_tnum').val()); data.append("prod_dnum", $('#prod_dnum').val()); data.append("prod_snum", $('#prod_snum').val()); data.append("prod_jnum", $('#prod_jnum').val()); data.append("prod_cnum", $('#prod_cnum').val()); data.append("process_type", "apply_prod_b"); data.append("file_type", <?=$file_type?> ); data.append("file_idx", <?=$idx?>); $.ajax({ data: data, type: 'post', url: "farmDataProcess.php", enctype: "multipart/form-data", sync: false, cache: false, contentType: false, processData: false, dataType: 'json', success: function(response) { eval(response['alert']); eval(response['link']); } }); } // go list function goList() { document.location.href="prod_list.php?file_type=1"; } function viewContent(fileDiretory, fileName) { document.location.href = "file_download.php?fileDiretory=" + fileDiretory + "&fileName=" + fileName; } </script>