Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
view
/
doc
/
view
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/view/doc/view/hygiene_view.php
<?php $idx = $_REQUEST['idx']; // print 정보 $print_sql = " select * from post where idx = $idx "; $print_res = \DB::queryFirstRow($print_sql); $reception_number_param = $_REQUEST['reception_number']; // hatchery_sanitation 정보 $sql = "SELECT * FROM hygiene H, post P WHERE hygiene_post = P.idx AND hygiene_post = $idx"; $arry_res = \DB::query($sql); $flock_code = $arry_res['reception_number']; ?> <div class="ibox-content"> <table class="table table-borderless"> <tr> <td class="float-right"> <div class="col-auto"> <!-- <a href="javascript:excel_update('<?php echo $idx; ?>')" class="btn btn-warning btn-md"><i class="ion-trash-b"></i><?php echo (" 수 정")?></a> --> <a href="javascript:excel_delete('<?php echo $idx; ?>', '<?php echo $flock_code; ?>')" class="btn btn-danger btn-md"><i class="ion-trash-b"></i><?php echo (" 삭 제")?></a> <a href="javascript:goList('<?php echo $idx; ?>')" class="btn btn-primary btn-md"><i class="ion-navicon-round"></i><?php echo (" 목 록")?></a> </div> </td> </tr> </table> <ul class="nav nav-pills"> <?php $trigger = true; $tabno = 0; if($trigger){ foreach ($arry_res as $key => $value ) { if($reception_number_param == $value['reception_number']) { ?> <li class="nav-item border"> <a class="nav-link active " data-toggle="tab" href="#home<?php echo $value['reception_number'];?>"><?php echo $value['sheet_name']?></a> </li> <?php } else { ?> <li class="nav-item border"> <a class="nav-link " data-toggle="tab" href="#home<?php echo $value['reception_number'];?>"><?php echo $value['sheet_name']?></a> </li> <?php } $tabno++; $trigger =false; } } ?> </ul> <div id="myTabContent" class="tab-content"> <?php for ($no=0; $no < count($arry_res); $no++) { $farm_name = $arry_res[$no]['farm_name']; // 농장이름 $reception_number = $arry_res[$no]['reception_number']; // 접수번호 $completion_date = $arry_res[$no]['completion_date']; // 검사완료일 $sample_collected_date = $arry_res[$no]['sample_collected_date']; // 샘플 채취 일자 $sample_collector = $arry_res[$no]['sample_collector']; // 샘플 채취자 $hygiene_result = $arry_res[$no]['hygiene_result']; // 검사결과 $sheet_name = $arry_res[$no]['sheet_name']; // 시트이름 if($reception_number_param == $reception_number) { ?> <div class='tab-pane active show' id='home<?php echo $reception_number?>'> <?php } else { ?> <div class='tab-pane fade' id='home<?php echo $reception_number?>'> <?php } ?> <table class="table table-bordered text-center" > <thead> <tr style="boarder:0"> <th colspan=8><h3 > <?php echo ("농장 세척•소독 후 위생검사");?> </h3></th> </tr> <tr> <th class="table-info" rowspan=2;><?php echo ("농장명");?></td> <td class="table-warning" rowspan=2;><?php echo ($farm_name.'농장');?></td> <th class="table-info"><?php echo ("샘플채취일");?></td> <td class="table-warning" colspan=2><?php echo substr($sample_collected_date,0,10);?></td> <th> <?php echo ("접수번호");?> </th> <th class="table-warning" colspan=2;> <?php echo $arry_res[$no]['reception_number'];?> </th> </tr> <tr> <th class="table-info"><?php echo ("검사완료일");?></td> <td class="table-warning" colspan=2><?php echo substr($completion_date,0,10);?></td> <th class="table-info" style="vertical-align: middle;"><?php echo ("샘플채취자");?></td> <td class="table-warning" colspan=2 style="vertical-align: middle;"><?php echo ($sample_collector);?></td> </tr> </thead> <tbody class="text-center"> <tr><td></td></tr> <tr style="boader-top:2px solid black"> <th class="table-info"> <?php echo ("계사");?> <th class="table-info"> <?php echo ("샘플위치");?> <th class="table-info"> <?php echo ("총세균");?> <th class="table-info"> <?php echo ("결과");?> <th class="table-info"> <?php echo ("계사");?> <th class="table-info"> <?php echo ("샘플위치");?> <th class="table-info"> <?php echo ("총세균");?> <th class="table-info"> <?php echo ("결과");?> </tr> <!-- loop contents start --> <?php $hygiene_result_Final = json_decode($hygiene_result); $x = 0; $i = 0; $tmp = 0; $house = array(); $loaction = array(); $count = array(); $result = array(); foreach ($hygiene_result_Final as $key => $value) { foreach($value as $k => $v) { $house[$tmp] = $k; $location[0][$tmp] = $v->location1; $count[0][$tmp] = $v->count1; $result[0][$tmp] = $v->result1; $location[1][$tmp] = $v->location2; $count[1][$tmp] = $v->count2; $result[1][$tmp] = $v->result2; $location[2][$tmp] = $v->location3; $count[2][$tmp] = $v->count3; $result[2][$tmp] = $v->result3; } $tmp++; if($i % 2 != 0) { ?> <tr> <td style="background: yellow" rowspan=3><?= $house[0]; ?></td> <td><?= $location[0][0]; ?></td> <td style="background: yellow"><?= $count[0][0]; ?></td> <td ><?= $result[0][0]; ?></td> <td style="background: yellow" rowspan=3><?= $house[1]; ?></td> <td><?= $location[0][1]; ?></td> <td style="background: yellow"><?= $count[0][1]; ?></td> <td><?= $result[0][1]; ?></td> </tr> <tr> <td><?= $location[1][0]; ?></td> <td style="background: yellow"><?= $count[1][0]; ?></td> <td><?= $result[1][0]; ?></td> <td><?= $location[1][1]; ?></td> <td style="background: yellow"><?= $count[1][1]; ?></td> <td><?= $result[1][1]; ?></td> </tr> <tr> <td><?= $location[2][0]; ?></td> <td style="background: yellow"><?= $count[2][0]; ?></td> <td><?= $result[2][0]; ?></td> <td><?= $location[2][1]; ?></td> <td style="background: yellow"><?= $count[2][1]; ?></td> <td><?= $result[2][1]; ?></td> </tr> <?php $tmp = 0; } else if ($i % 2 == 0 && $i == count($hygiene_result_Final)-1) { ?> <tr> <td style="background: yellow" rowspan=3><?= $house[0]; ?></td> <td><?= $location[0][0]; ?></td> <td style="background: yellow"><?= $count[0][0]; ?></td> <td><?= $result[0][0]; ?></td> </tr> <tr> <td><?= $location[1][0]; ?></td> <td style="background: yellow"><?= $count[1][0]; ?></td> <td><?= $result[1][0]; ?></td> </tr> <tr> <td><?= $location[2][0]; ?></td> <td style="background: yellow"><?= $count[2][0]; ?></td> <td><?= $result[2][0]; ?></td> </tr> <?php } $i++; } ?> <!-- loop contents end --> <tr> <th colspan=8 class="text-left"><?php echo ("*TNTC: 세균이 매우 많아 셀수 없음"); ?> </th> </tr> <tr><td></td></tr> <tr> <th colspan=8 class="text-left"><?php echo ("*위생검사 결과 판단 기준"); ?> </th> </tr> <tr> <th class="table-info"><?php echo ("항목"); ?></th> <th class="table-info"><?php echo ("결과"); ?></th> <th class="table-info" colspan=2><?php echo ("우수"); ?></th> <th class="table-info" colspan=2><?php echo ("양호"); ?></th> <th class="table-info" colspan=2><?php echo ("불량"); ?></th> </tr> <tr> <td colspan=2><?php echo ("부화장 표면"); ?></td> <td colspan=2><?php echo ("40 이하"); ?></td> <td colspan=2><?php echo ("41 ~ 80"); ?></td> <td colspan=2><?php echo ("81 이상"); ?></td> </tr> <tr> <td colspan=2><?php echo ("발육기, 발생기 표면"); ?></td> <td colspan=2><?php echo ("20 이하"); ?></td> <td colspan=2><?php echo ("21 ~ 40"); ?></td> <td colspan=2><?php echo ("41 이상"); ?></td> </tr> <tr> <td colspan=2><?php echo ("차량 표면"); ?></td> <td colspan=2><?php echo ("30 이하"); ?></td> <td colspan=2><?php echo ("31 ~ 60"); ?></td> <td colspan=2><?php echo ("61 이상"); ?></td> </tr> <tr> <th colspan=8 class="text-left"><?php echo ("Comment"); ?> </th> </tr> </tbody> <tfoot> <tr><td> </td> </tr> <tr><td> </td> </tr> <tr><td> </td> </tr> <tr> <th class="text-success" colspan=6; >본 결과서는 의뢰된 시료에 한하며, 검사 결과는 소송 및 법적인 용도로 사용 할 수 없습니다. </td> </tr> <tr> <th colspan=6;>제2017-1호 가축병성감정실시기관 <strong>(주)체리부로 중앙연구소</strong></th> </tr> </tfoot> </table> </div> <?php } ?> </div> </div> <script> function excel_update(idx) { location.href = "../process/excel_update.php?idx=" + idx; } function excel_delete(idx, flock_code) { var obj = { "types" : "confirm", "title" : "MessageBox", "content" : "삭제하시겠습니까? 삭제된 내용은 복구할 수 없습니다.", "lbFunction" : "goDelProcess(true,"+idx+","+flock_code+")", "rbFunction" : "goDelProcess(false,"+idx+","+flock_code+")" }; alertModals(obj); } function goDelProcess(bool, idx,flock_code) { if(bool) { var data = new FormData(); data.append("type","hygiene"); data.append("division", "delete"); data.append("idx", idx); data.append("flock_code",idx); $.ajax({ data: data, type: 'post', url: "/doc/process/doc_process.php", cache: false, contentType: false, processData: false, dataType: 'json', success: function(data) { switch(data['msg']) { case "failed delete" : var obj = { "types" : "alert", "title" : "잘못된 엑셀파일 등록", "content" : "부화장 환경 검사 문서를 등록해주세요" }; alertModals(obj); break; case 'success delete': location.href = '/doc/farmList/hygiene_list.php?page=1'; break; } }, error: function(error,request) { console.log('code:' + request.status+'\n'+'message: '+request.responseText+'\n'+'error: '+error); } }); }else { } } function goList() { history.go(-1); } </script> <style> .slash { background: url('//cdn.zetawiki.com/png/backslash.png'); background-size: 100% 100%; } </style>