Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ltms.eemo.co.kr
/
public_html
/
super
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//home/ltms.eemo.co.kr/public_html/super/prevention_process.php
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?=$_TITLE?></title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="font-awesome/css/font-awesome.css" rel="stylesheet"> <link href="css/plugins/iCheck/custom.css" rel="stylesheet"> <link href="css/animate.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <link href="css/messagebox.css" rel="stylesheet"> </head> <?php /* 기본 메뉴 세팅 시작*/ include_once("inc_header.php"); switch ($type) { case 'prevention': preventionProcess(); exit; break; default: # code... break; } function preventionProcess() { ?> <table class="table table-sm table-inverse table-hover text-center"> <colgroup> <col width="10%"> <col width="20%"> <col width="5%"> <col width="5%"> <col width="10%"> <col width="10%"> <col width="10%"> <col width="10%"> <col width="10%"> </colgroup> <thead class="thead-light"> <tr> <th>농가명</th> <th>농가주소</th> <th>실제거리</th> <th>반경</th> <th>사육형태</th> <th>사육단계</th> <th>발생 시점상태</th> <th>현재상태</th> <th>농가연락처</th> </tr> </thead> </table> <div class="invisible-scrollbar animated fadeInDown" style="overflow:scroll; height:28vh;"> <table class="table table-sm table-inverse table-hover text-center"> <colgroup> <col width="10%"> <col width="20%"> <col width="5%"> <col width="5%"> <col width="10%"> <col width="10%"> <col width="10%"> <col width="10%"> <col width="10%"> </colgroup> <tbody> <?php $tmpNo = empty($_REQUEST[no]) ? 0 : $_REQUEST[no]; $objFarmInfo = mysql_fetch_object(mysql_query("SELECT lat, lng FROM event_prevention WHERE no = $tmpNo AND prevention_state = 'on'")); // 현재 진행중이 (on) 방역 지역 $preventionQuery = mysql_query("SELECT * FROM farm_contract FC, (SELECT *,(6371*ACOS(COS(RADIANS('$objFarmInfo->lat'))*COS(RADIANS(lat))*COS(RADIANS(lon)-RADIANS('$objFarmInfo->lng'))+SIN(RADIANS('$objFarmInfo->lat'))*SIN(RADIANS(lat)))) AS distance, 0.5 as rang FROM farm -- GROUP BY distance HAVING distance < 0.5 -- 거리 0.5km 안을 검색 UNION SELECT *,(6371*ACOS(COS(RADIANS('$objFarmInfo->lat'))*COS(RADIANS(lat))*COS(RADIANS(lon)-RADIANS('$objFarmInfo->lng'))+SIN(RADIANS('$objFarmInfo->lat'))*SIN(RADIANS(lat)))) AS distance , 3 as rang FROM farm -- GROUP BY distance HAVING distance < 3 -- 거리 3km 안을 검색 UNION SELECT *,(6371*ACOS(COS(RADIANS('$objFarmInfo->lat'))*COS(RADIANS(lat))*COS(RADIANS(lon)-RADIANS('$objFarmInfo->lng'))+SIN(RADIANS('$objFarmInfo->lat'))*SIN(RADIANS(lat)))) AS distance , 10 as rang FROM farm -- GROUP BY distance HAVING distance < 10 ORDER BY distance ASC ) as F -- 거리 10km 안을 검색 WHERE F.`no` = FC.farm_no AND FC.contract_status = 1 AND FC.contractor_company_no = {$_COOKIE['ltms_company_no']} GROUP BY FC.`no`"); $gps_A = $gps_B = $ps_A = $ps_B = $cc = 0; while($tmpResult = mysql_fetch_assoc($preventionQuery)){ /* 통계 */ switch ($tmpResult[gps_type]) { case 'GPS육성': $gps_A++; break; case 'GPS산란': $gps_B++; break; case 'PS육성': $ps_A++; break; case 'PS산란': $ps_B++; break; case 'CC': $cc++; break; } // echo $gps_A; $rangColor = $tmpResult[rang] <= 0.5 ? "badge-warning font-italic text-dark" : $tmpResult[rang] <= 3 ? "badge-danger" : "badge-warning" ; switch ($tmpResult[ltms_status]) { case '100': $ltms_status = "출하완료"; break; case '1': $ltms_status = "입추대기"; break; case '2': $ltms_status = "분양대기"; break; case '3': $ltms_status = "입추계획"; break; case '4': $ltms_status = "입추 예정내역"; break; default: $ltms_status = "사육중"; break; } ?> <tr class="ai-farmInfo" onclick="ai_info(this, event);" style="cursor:pointer"> <td><?=$tmpResult[farm_name]?></td> <td scope="row" class="text-left pl-2"><?=$tmpResult[addr]?></td> <td><span class="badge badge-pill badge-success ml-2"><?=round($tmpResult[distance],2)." km"?></span></td> <td><span class="badge badge-pill <?=$rangColor?> ml-2"><?=(round($tmpResult[rang]) == 1 ? 0.5 : round($tmpResult[rang]))." km"?></span></td> <td><span class="badge badge-pill ml-2"><?=$tmpResult[breed_type]?></span></td> <td><span class="badge badge-pill ml-2"><?=$tmpResult[gps_type]?></span></td> <td></td> <!-- 발생시작 시간이 입추일과 출하 사이일경우 사육중 표기 --> <td><?=$ltms_status?></td> <td><?=$tmpResult[tel]?></td> </tr> <tr class="ai-info animated fadeInDown"> <td colspan=8> <div> <table class="table table-bordered text-center table-hover mb-4 "> <thead> <tr id="vertical_header"> <th rowspan="2">일령</th> <th rowspan="2">날짜</th> <th id="dotae" colspan="3">도태</th> <th colspan="2">현재수수</th> <th id="environmental" colspan="2">환경관리</th> <th id="fcr" colspan="2">FCR</th> <th rowspan="2">중량</th> <th rowspan="2" data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">표준</th> </tr> <tr> <th>도태</th> <th>폐사</th> <th>합계</th> <th data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">표준</th> <th>현재수수</th> <th>육성율</th> <th>온도</th> <th data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">표준</th> <th>습도</th> <th data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">표준</th> <th>사료섭취</th> <th data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">표준</th> <th>FCR</th> <th data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">표준</th> </tr> </thead> <tbody> <tr onclick="javascript:getAgesData('1');" style="cursor: pointer;"> <td>1</td> <td>2019-07-08</td> <td>12</td> <td>20</td> <td class="text-danger">32</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">10</td> <td>20,968</td> <td>99.8%</td> <td>0.0 ℃</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">30.8℃</td> <td>0.0 %</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">70 %</td> <td>0</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">14</td> <td>0</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">0.246</td> <td class="text-danger">0</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">57</td> </tr> <tr onclick="javascript:getAgesData('2');" style="cursor: pointer;"> <td>2</td> <td>2019-07-09</td> <td>20</td> <td>30</td> <td class="text-danger">50</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">10</td> <td>20,918</td> <td>99.6%</td> <td>0.0 ℃</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">30.8℃</td> <td>0.0 %</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">70 %</td> <td>0</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">17</td> <td>0</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">0.433</td> <td class="text-danger">0</td> <td data-dotw="stand" style="background: rgb(245, 245, 246); font-weight: bold; display: none;">72</td> </tr> </tbody> </table> </div> </td> </tr> <?}?> <!-- END 발생 이벤트 --> </tbody> </table> </div> <!-- Mainly scripts --> <script src="js/jquery-3.1.1.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap.js"></script> <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script> <!-- Peity --> <script src="js/plugins/peity/jquery.peity.min.js"></script> <!-- Custom and plugin javascript --> <script src="js/inspinia.js"></script> <script src="js/plugins/pace/pace.min.js"></script> <!-- iCheck --> <script src="js/plugins/iCheck/icheck.min.js"></script> <!-- Peity --> <script src="js/demo/peity-demo.js"></script> <script src="css/messagebox.js"></script> <!-- script 끝 --> <script> $(document).ready(function () { $('.ai-info').hide(); }); $('.gps_a').text('<?=$gps_A?>'); $('.gps_b').text('<?=$gps_B?>'); $('.ps_a').text('<?=$ps_A?>'); $('.ps_b').text('<?=$ps_B?>'); $('.cc').text('<?=$cc?>'); </script> <?php // if(1){ // $outPrint = array("mgs"=>1); // echo json_encode($outPrint); // }else { // $outPrint = array("mgs"=>0); // echo json_encode($outPrint); // } } /* end preventionProcess */