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/notice1.php
<? /* 기본 메뉴 세팅 시작*/ include_once("inc_header.php"); $on_menu="permit"; $on_sub_menu=1; /* 기본 메뉴 세팅 끝*/ /* 첫 게시판 생성 */ $queryBoard = mysql_query("SELECT * FROM company_board WHERE cb_breed = '0' AND cb_company = $_COOKIE[ucompany_no] "); /* 없을 시 생성 */ $tmpEmpty = mysql_fetch_object($queryBoard); if(empty($tmpEmpty)) { mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 1, '관리자', 1, '공지사항', '공지게시판', 0, 0)"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 2, '관리자', 1, '일반게시판', '일반게시판', 0, 0)"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '육계', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '육계', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '육계', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '육계', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '육계', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '육계', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '육계', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '육계', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '육계', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '육계', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '삼계', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '삼계', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '삼계', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '삼계', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '삼계', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '삼계', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '삼계', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '삼계', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '삼계', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '삼계', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '오리', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '오리', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '오리', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '오리', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '오리', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '오리', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '오리', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '오리', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '오리', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '삼계', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '토종닭', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '토종닭', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '토종닭', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '토종닭', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 11, '관리자', 1, '경쟁사현황', '경쟁사현황', '토종닭', 'CC')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '토종닭', 'GPS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '토종닭', 'GPS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '토종닭', 'PS산란')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '토종닭', 'PS육성')"); mysql_query("insert into company_board (cb_company, cb_type, cb_admin, cb_auth, cb_title , cb_note, cb_breed, cb_gps ) VALUES ($_COOKIE[ucompany_no], 12, '관리자', 1, '사양관리게시판', '사양관리게시판', '토종닭', 'CC')"); } /* 농가 상태 로테이션 */ $farmTotalCount = mysql_fetch_object(mysql_query("select count(F.no) as cnt from farm F, (select if(ltms_status = 5 , '사육중', '출하완료')as status, farm_no from farm_contract order by status DESC ) as FC where F.`no` = FC.farm_no group by F.farm_name")); $one = $farmTotalCount->cnt / 8; $two = $farmTotalCount->cnt % 8 != 0 ? 1 : 0; $loopCount = $one + $two ; /* AI 방역 로테이션 */ $aiCnt = mysql_num_rows(mysql_query("SELECT * FROM event_prevention WHERE prevention_state = 'on' AND prevention_type = 'AI'")); // 현재 진행중이 (on) 방역 지역 수 $aiOne = $aiCnt / 2; $aiTwo = $aiCnt % 2; $aiCnt = $aiOne + $aiTwo ; /* 농가 상태 값 */ $objContract = mysql_fetch_object(mysql_query("SELECT tfarm, ffarm, (tfarm-ffarm) as mfarm, tdong, fdong, (tdong-fdong) as mdong FROM (SELECT COUNT(FC.`no` ) AS tfarm FROM farm_contract FC WHERE 1 AND FC.contractor_company_no = $_COOKIE[ucompany_no] ) AS tfarm , (SELECT COUNT(FC.`no` ) AS ffarm FROM farm_contract FC WHERE 1 AND FC.contractor_company_no = $_COOKIE[ucompany_no] AND FC.ltms_status = 5) AS ffarm , (SELECT COUNT(FC.`no` ) AS tdong FROM farm_contract FC, farm_contract_dong FCD WHERE FC.`no` = FCD.farm_no AND FC.contractor_company_no = $_COOKIE[ucompany_no] ) AS tdong , (SELECT COUNT(FC.`no` ) AS fdong FROM farm_contract FC, farm_contract_dong FCD WHERE FC.`no` = FCD.farm_no AND FC.contractor_company_no = $_COOKIE[ucompany_no] AND ltms_status = 5 ) AS fdong")); if($objContract->tfarm) { $contractFarm = $objContract->ffarm / $objContract->tfarm * 100; } if($objContract->tdong) { $contractDong = $objContract->fdong / $objContract->tdong * 100; } /* 수수 상태 */ $objSusu = mysql_fetch_object(mysql_query("SELECT FORMAT(totalsusu,0) AS totalSusu, FORMAT(tmpsusu,0) AS tmpsusu , FORMAT((tmpsusu - totalSusu ),0) AS tmpTsusu, FORMAT(tmpsusu,0) AS tmpTotalSusu FROM (SELECT sum(susu) AS totalSusu FROM farm_ipchu_confirm_log FICL, farm_contract FC WHERE FICL.contract_no = FC.`no` AND FICL.company_no = $_COOKIE[ucompany_no] AND FICL.is_auth = 1 AND FC.ltms_status = 5) AS totalsusu, (SELECT SUM(FDI.max_chick_limit) AS tmpsusu FROM farm_contract FC, farm_contract_dong FCD, farm_dong_info FDI WHERE FC.`no` = FCD.farm_contract_no AND FCD.farm_dong_info_no = FDI.`no` AND FC.contractor_company_no = $_COOKIE[ucompany_no] AND FC.is_auth = 1) AS tmpsusu")); $tmpsusu = $objSusu->tmpsusu == 0 ? 1 : $objSusu->tmpsusu; $percentageSusu = str_replace(",","",$objSusu->totalSusu) / str_replace(",","",$tmpsusu) * 100; $minusSusu = (str_replace(",","",$tmpsusu) - str_replace(",","",$objSusu->totalSusu)) / str_replace(",","",$tmpsusu) * 100; /* 사육 총량 */ $pbreedtype = 'CC'; $jong_type = '육계'; $countFc = mysql_num_rows(mysql_query("SELECT * from farm_contract where contractor_company_no = '{$_COOKIE[ucompany_no]}' and breed_type='$jong_type' and gps_type= '$pbreedtype' and contractor_company_no = $_COOKIE[ucompany_no] and ltms_status in (4,5)")); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <META HTTP-EQUIV="refresh" CONTENT="<?=600?>; URL=notice.php?cntFeed=<?=$cntFeed?>"> <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"> <style> .invisible-scrollbar::-webkit-scrollbar { display: none; } #chartdiv { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; } #chartdiv { width: 100%; height: 195px; } </style> </head> <body class="fixed-sidebar no-skin-config full-height-layout pace-done mini-navbar"> <!-- <body class="pace-done mini-navbar"> --> <div id="wrapper"> <? include_once("inc_sidemenu.php"); ?> <!-- 사이드 메뉴 --> <div id="page-wrapper" class="gray-bg"> <? include_once("inc_top.php"); // include_once("inc_now_position.php"); /* 큰 알림 텍스트 */ include_once("navigation.php"); ?> <!-- 헤더 메뉴 끝 --> <div class="row"> <!-- 사육관리 탭메뉴 --> <? // include_once("inc_top_submenu.php"); /* 사육관리전용 탭 그외 주석처리 */ ?> </div> <div class="row wrapper border-bottom white-bg page-heading py-3"> <? include_once("inc_nav_menu.php"); /* 네비게이션 판 */ ?> </div> <!-- 네비 wrapper 끝 --> <div class="wrapper wrapper-content"> <div class="row animated fadeInDown"> <div class="col-lg-12"> <div class="ibox-content border-0 py-0 text-right"> <? // include_once("inc_icon_menu.php");/* 농장관련 아이콘 농장 외 주석 */ ?> </div> </div> <!-- col-lg-크기 지정 후 컨텐츠 입력 --> <div class="col-lg-12 invisible-scrollbar" style="height: 83vh; overflow:scroll;"> <div class="row"> <div class="col-lg-8"> <div class="row"> <!-- top --> <div class="col-lg-12"> <div class="row ipchu-viewer"> <!-- 농가 상태 --> <div class="col-lg-4"> <div class="ibox "> <div class="ibox-title pr-4"> <span class="label label-primary float-right">status</span> <h5>농가 상태</h5> </div> <div class="ibox-content table-responsive h-100 invisible-scrollbar py-0" style="overflow:hidden;"> <div class="row" style="height:148px"> <div class="col-md-6 " style="position:relative"> <div style="position: absolute; left: 25%; top: 18%; margin-left: 10px; z-index: 10;">사육농가 수</div> <div style="position: absolute; left: 3.13rem; bottom:3rem; z-index: 10; font-weight:bold; color:white; text-shadow: 1px 1px 1px gray"> <?=$objContract->ffarm?></div> <div style="position: absolute; right: 3.13rem; bottom:3rem; z-index: 10; font-weight:bold; color:white; text-shadow: 1px 1px 1px gray"> <?=$objContract->mfarm?></div> <div id="chart1"></div> </div><!-- 6 --> <div class="col-md-6"> <div style="position: absolute; left: 25%; top: 18%; margin-left: 10px; z-index: 10;">사육계사 수</div> <div style="position: absolute; left: 3.13rem; bottom:3rem; z-index: 10; font-weight:bold; color:white; text-shadow: 1px 1px 1px gray"> <?=$objContract->fdong?></div> <div style="position: absolute; right: 3.13rem; bottom:3rem; z-index: 10; font-weight:bold; color:white; text-shadow: 1px 1px 1px gray"> <?=$objContract->mdong?></div> <div id="chart2"></div> </div><!-- 6 --> </div><!-- row --> </div> <!-- content--> </div> <!-- ibox --> </div> <!-- col 4 --> <div class="col-lg-8"> <div class="row"> <div class="col-lg-12"> <div class="ibox "> <div class="ibox-title pr-4"> <span class="label label-primary float-right">status</span> <h5>입추 정보</h5> </div> <div class="ibox-content"> <div class="row"> <div class="col-lg-4 border-right mb-2"> <div class="mb-2"> <h4 class="text-success">전월</h4> <small>현재</small> <h3 class="no-margins float-right"><span class="animated fadeInDown pr-1" id="monthSusu"></span> <small>수</small></h3> </div> <div class="mb-2"> <small>대비</small> <div class="stat-percent font-bold float-right text-info"><span class="animated fadeInDown pr-2" id="imonthSusu"> </span><i class="fa fa-level-up"></i></div> </div> <div class=""> <small>전월 총</small> <div class="stat-percent font-bold text-warning float-right"><span class="animated fadeInDown pr-2" id="tmonthSusu"> </span><small class="text-dark">수</small></div> </div> </div><!-- 4 --> <div class="col-lg-4 border-right mb-2"> <div class="mb-2"> <h4 class="text-success">전주</h4> <small>현재</small> <h3 class="no-margins float-right"><span class="animated fadeInDown pr-1" id="weekSusu"></span> <small>수</small></h3> </div> <div class="mb-2"> <small>대비</small> <div class="stat-percent font-bold float-right text-info"><span class="animated fadeInDown pr-2" id="iweekSusu"> </span><i class="fa fa-level-up"></i></div> </div> <div class=""> <small>전주 총</small> <div class="stat-percent font-bold text-warning float-right"><span class="animated fadeInDown pr-2" id="tweekSusu"> </span><small class="text-dark">수</small></div> </div> </div><!-- 4 --> <div class="col-lg-4 mb-2"> <div class="mb-2"> <h4 class="text-success">전일</h4> <small>현재</small> <h3 class="no-margins float-right"><span class="animated fadeInDown pr-1" id="susu"></span> <small>수</small></h3> </div> <div class="mb-2"> <small>대비</small> <div class="stat-percent font-bold float-right text-info"><span class="animated fadeInDown pr-2" id="isusu"> </span><i class="fa fa-level-up"></i> </div> </div> <div class=""> <small>전일 총</small> <div class="stat-percent font-bold text-warning float-right"><span class="animated fadeInDown pr-2" id="tsusu"></span> <small class="text-dark">수</small></div> </div> </div><!-- 4 --> </div><!-- row --> </div><!-- content 입추 --> </div> <!-- ibox 입추 --> </div><!-- col 6 --> </div><!-- row first --> </div> <!-- col-lg-9 --> </div> <!-- row 입츄 뷰 --> </div> <!-- col 12--> </div> <!-- row 1 line --> <div class="row"> <div class="col-lg-12"> <!-- top --> <div class="row"> <!-- 농가 상태 --> <div class="col-lg-4"> <div class="ibox "> <div class="ibox-title pr-4"> <span class="label label-primary float-right">status</span> <h5>농가 상태 <small>총 수수 : <?=$objSusu->tmpsusu?></small></h5> </div> <div class="ibox-content table-responsive h-100 invisible-scrollbar py-0" style="overflow:hidden;"> <div class="row" style="height:123px"> <div class="col-md-6"> <div style="position: absolute; left: 33%; top: 18%; 10px; z-index: 10;">현재 사육 수수</div> <div id="chart3"></div> </div><!-- 6 --> <div class="col-md-6"> <div style="position: absolute; left: 33%; top: 18%; z-index: 10;">사육 대기 수수</div> <div id="chart4"></div> </div><!-- 6 --> </div><!-- row --> </div><!-- content 출하 --> </div> <!-- ibox 출하--> </div><!-- col 4 --> <div class="col-lg-8"> <div class="ibox "> <div class="ibox-title pr-4"> <span class="label label-primary float-right">status</span> <h5>출하</h5> </div> <div class="ibox-content"> <div class="row"> <div class="col-lg-4 border-right mb-2"> <div class="mb-2"> <h4 class="text-success">전월</h4> <small>현재</small> <h3 class="no-margins float-right"><span class="animated fadeInDown pr-1" id="monthSusu"></span> <small>수</small></h3> </div> <div class="mb-2"> <small>대비</small> <div class="stat-percent font-bold float-right text-info"><span class="animated fadeInDown pr-2" id="imonthSusu"> </span><i class="fa fa-level-up"></i></div> </div> <div class=""> <small>전월 총</small> <div class="stat-percent font-bold text-warning float-right"><span class="animated fadeInDown pr-2" id="tmonthSusu"> </span><small class="text-dark">수</small></div> </div> </div><!-- 4 --> <div class="col-lg-4 border-right mb-2"> <div class="mb-2"> <h4 class="text-success">전주</h4> <small>현재</small> <h3 class="no-margins float-right"><span class="animated fadeInDown pr-1" id="weekSusu"></span> <small>수</small></h3> </div> <div class="mb-2"> <small>대비</small> <div class="stat-percent font-bold float-right text-info"><span class="animated fadeInDown pr-2" id="iweekSusu"> </span><i class="fa fa-level-down"></i></div> </div> <div class=""> <small>전주 총</small> <div class="stat-percent font-bold text-warning float-right"><span class="animated fadeInDown pr-2" id="tweekSusu"> </span><small class="text-dark">수</small></div> </div> </div><!-- 4 --> <div class="col-lg-4 mb-2"> <div class="mb-2"> <h4 class="text-success">전일</h4> <small>현재</small> <h3 class="no-margins float-right"><span class="animated fadeInDown pr-1" id="susu"></span> <small>수</small></h3> </div> <div class="mb-2"> <small>대비</small> <div class="stat-percent font-bold float-right text-info"><span class="animated fadeInDown pr-2" id="isusu"> </span> <i class="fa fa-level-up"></i></div> </div> <div class=""> <small>전일 총</small> <div class="stat-percent font-bold text-warning float-right"><span class="animated fadeInDown pr-2" id="tsusu"></span> <small class="text-dark">수</small></div> </div> </div><!-- 4 --> </div><!-- row --> </div><!-- content 출하 --> </div> <!-- ibox 출하--> </div><!-- 8--> </div><!-- row 2 line--> </div> <!-- 12 --> </div> <!-- row --> </div> <!-- col 9 --> <div class="col-lg-4"> <div class="ibox pb-0 "> <div class="ibox-title pr-4"> <span class="label label-primary float-right">status</span> <h5>사육현황</h5> </div> <div class="ibox-content feedStatus" style="min-height: 369px; height: 369px;"> </div><!-- content 라인 --> </div> <!-- ibox 미구현 --> </div> <!-- col 3 --> </div> <!-- row --> <div class="row"> <div class="col-lg-2"> <div class="ibox w-100"> <div class="ibox-title pr-3"> <span class="label label-info float-right">Price</span> <h5>오늘 시세</h5> </div> <!-- ibox title --> <div class="ibox-content p-0"> <div id="chartdiv"></div> <!-- 시세차트 --> </div> <!-- ibox content --> </div> <!-- ibox --> </div> <!-- col-lg-2 --> <div class="col-lg-8"> <div class="ibox w-100"> <div class="ibox-title pr-3"> <span class="label label-info float-right">update</span> <h5>업데이트</h5> </div> <!-- ibox title --> <div class="ibox-content px-0" style="height:196px;"> <? $arr_jong=array("1"=>"육계","2"=>"삼계","3"=>"오리","4"=>"토종닭"); $req_jong_type = empty($_REQUEST[jong_type]) ? 1 : $_REQUEST[jong_type]; $req_breed_type = empty($_REQUEST[pbreedtype]) ? 'cc' : $_REQUEST[pbreedtype]; /* tap1 */ /* tap2 */ $tmpObject = mysql_fetch_object(mysql_query("select count(no) as cnt from farm_contract where contractor_company_no='{$_COOKIE[ucompany_no]}' and ltms_status = 100 and breed_type='{$arr_jong[$req_jong_type]}' and gps_type='{$req_breed_type}' and is_end=0 and is_auth='1' ")); $ipchu_tab2Cnt = $tmpObject->cnt; /* tap3 */ $tmpObject = mysql_fetch_object(mysql_query("select count(no) as cnt from farm_contract where contractor_company_no='{$_COOKIE[ucompany_no]}' and ltms_status='1' and breed_type='{$arr_jong[$req_jong_type]}' and gps_type='{$req_breed_type}' and is_end=0 ")); $ipchu_tab3Cnt = $tmpObject->cnt; /* tap4 */ if(!$sel_jucha) { $today_week = date("W"); $sel_y=date('Y'); $sel_w=$today_week; // $sel_jstr=$sel_y."-W".$sel_w; } else { $exp_jstr=explode("-",$sel_jucha); $sel_y=$exp_jstr[0]; $sel_w=substr($exp_jstr[1],1); // $sel_jstr=$sel_y."-W".$sel_w; } $tmpObject=mysql_fetch_object(mysql_query("select count(no) as cnt from hatchery_jucha_plan where jyear='$sel_y' and jucha='$sel_w' and company_no='{$_COOKIE[ucompany_no]}' and jong_type='{$req_jong_type}' and breedtype='{$req_breed_type}' order by hatchery_no ")); $ipchu_tab4Cnt = $tmpObject->cnt; /* tap5 분양명단 */ $tmpObject=mysql_fetch_object(mysql_query("select count(no) as cnt from farm_contract where contractor_company_no='{$_COOKIE[ucompany_no]}' and ltms_status='2' and breed_type='{$arr_jong[$req_jong_type]}' and gps_type='{$req_breed_type}' and is_end=0 ")); $ipchu_tab5Cnt = $tmpObject->cnt; /* tap6 입추계획 */ if(!$tmpSel_date) {$tmpSel_date=date('Y-m-d');} $tab6Cntt = 0; $rs_a=mysql_query("select * from farm_contract where contractor_company_no='{$_COOKIE[ucompany_no]}' and ltms_status='3' and gps_type='{$req_breed_type}' and breed_type='{$arr_jong[$req_jong_type]}' order by no desc ") or die(mysql_error()); while($rs_b=mysql_fetch_array($rs_a)) { $rs_c=RS("select * from farm_contract_parts where contract_no='{$rs_b[no]}' order by no desc limit 0,1 "); $bl_view_a=false; $result_c_dong=mysql_query("select b.* from farm_contract_dong a, farm_dong_info b where a.farm_contract_no='{$rs_b[no]}' and a.farm_dong_info_no=b.no order by CAST(b.dong_name AS DECIMAL(10,2)) asc ") or die(); while($rs_cd=mysql_fetch_array($result_c_dong)) { $is_bun_a=RS("select * from hatchery_plan_log where contract_parts_no='{$rs_c[no]}' and jong_type='{$req_jong_type}' and breedtype='{$req_breed_type}' and dong_no='{$rs_cd[no]}' "); if(!$is_bun_a[no]) { $bl_view_a=true; } else if($is_bun_a[jdate]==$sel_date) { $bl_view_a=true; } } if($bl_view_a==true) { $tab6Cntt++; } } $ipchu_tab6Cnt = $tab6Cntt; /* tap7 입추예정내역 */ $tmpQuery = mysql_query("select max(a.no) as parts_no, a.contract_no, b.farm_no from farm_contract_parts a, farm_contract b where b.contract_status='1' and b.no=a.contract_no and (b.ltms_status='3' ) and b.gps_type='{$req_breed_type}' and b.breed_type='{$arr_jong[$req_jong_type]}' and b.contractor_company_no='{$_COOKIE[ucompany_no]}' group by a.contract_no "); while ($tmpRs = mysql_fetch_assoc($tmpQuery)) { $tmp_rs_ok_log=RS("select * from hatchery_plan_ok_log where parts_no='{$tmpRs[parts_no]}' and is_farm_confirm='1' "); if($tmp_rs_ok_log[no]) { $ipchu_tab7Cnt++; } } /* tap8 입추확인 */ $tmpObject = mysql_fetch_object(mysql_query("select count(c.no) as cnt from (select a.* from farm_ipchu_confirm_log a, farm_contract b where a.is_auth='0' and a.breedtype='{$req_breed_type}' and a.jong_type='{$req_jong_type}' and a.contract_no=b.no and b.contractor_company_no='{$_COOKIE[ucompany_no]}' group by a.parts_no order by a.jdate desc ) as c")); $ipchu_tab8Cnt = $tmpObject->cnt; /* tap9 입추내역 */ $tmpObject = mysql_fetch_object(mysql_query("select count(no) as cnt from farm_ipchu_confirm_log where company_no='{$_COOKIE[ucompany_no]}' and jong_type='{$req_jong_type}' and breedtype='{$req_breed_type}' and is_auth='1' and jdate = CURRENT_DATE ")); $ipchu_tab9Cnt = $tmpObject->cnt; /* tap10 클레임내역 */ $tmpObject = mysql_fetch_object(mysql_query("select count(no) as cnt from farm_claim_input_log where company_no='{$_COOKIE[ucompany_no]}' and answer_cont is null ")); $ipchu_tab10Cnt = $tmpObject->cnt; ?> <table class="table text-center"> <colgroup> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> </colgroup> <thead class="border-0"> <tr class="border-0"> <td class="border-0" style="line-height: 35px;"><span class="badge badge-pill badge-success">입추</span></td> <td class="border-0">출하완료농가<br/>(<small class="text-danger"><?=$ipchu_tab2Cnt?></small>)</td> <td class="border-0">입추대기농가<br/>(<small class="text-danger"><?=$ipchu_tab3Cnt?></small>)</td> <td class="border-0">분양예정병아리<br/>(<small class="text-danger"><?=$ipchu_tab4Cnt?></small>)</td> <td class="border-0">분양명단<br/>(<small class="text-danger"><?=$ipchu_tab5Cnt?></small>)</td> <td class="border-0">입추계획<br/>(<small class="text-danger"><?=$ipchu_tab6Cnt?></small>)</td> <td class="border-0">입추예정내역<br/>(<small class="text-danger"><?=$ipchu_tab7Cnt?></small>)</td> <td class="border-0">입추확인<br/>(<small class="text-danger"><?=$ipchu_tab8Cnt?></small>)</td> <td class="border-0">입추내역<br/>(<small class="text-danger"><?=$ipchu_tab9Cnt?></small>)</td> <td class="border-0">클레임내역<br/>(<small class="text-danger"><?=$ipchu_tab10Cnt?></small>)</td> </tr> </thead> </table> <table class="table text-center"> <colgroup> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> <col width="10%"/> </colgroup> <thead class="border-0"> <tr class="border-0"> <td class="border-0" style="line-height: 35px;"><span class="badge badge-pill badge-primary">출하</span></td> <td class="border-0">도계계획<br/>(<small class="text-danger"><?=$ship_tab2Cnt?></small>)</td> <td class="border-0">도계예정계획<br/>(<small class="text-danger"><?=$ship_tab3Cnt?></small>)</td> <td class="border-0">출하대기명단<br/>(<small class="text-danger"><?=$ship_tab4Cnt?></small>)</td> <td class="border-0">조기출하요청<br/>(<small class="text-danger"><?=$ship_tab5Cnt?></small>)</td> <td class="border-0">출하예정명단<br/>(<small class="text-danger"><?=$ship_tab6Cnt?></small>)</td> <td class="border-0">출하계획작성<br/>(<small class="text-danger"><?=$ship_tab7Cnt?></small>)</td> <td class="border-0">출하명단<br/>(<small class="text-danger"><?=$ship_tab8Cnt?></small>)</td> <td class="border-0">출하확인<br/>(<small class="text-danger"><?=$ship_tab9Cnt?></small>)</td> <td class="border-0">출하내역<br/>(<small class="text-danger"><?=$ship_tab10Cnt?></small>)</td> </tr> </thead> </table> </div> <!-- ibox content --> </div> <!-- ibox --> </div> <!-- col-lg-2 --> <!-- 공지사항 --> <div class="col-lg-2 h-100"> <div class="ibox h-100"> <div class="ibox-title pr-3"> <span class="label label-warning float-right">Notice</span> <h5>공지사항</h5> </div> <div class="ibox-content table-responsive h-100 invisible-scrollbar" style="overflow:hidden;"> <table class="table table-sm table-inverse table-hover text-center mb-0"> <colgroup> <col width="100%"> </colgroup> <!-- <thead class="thead-light"> <tr> <th>제목</th> </tr> </thead> --> </table> <div class="invisible-scrollbar invisible-scrollbar" style="overflow:scroll; height:160px;"> <table class="table table-sm table-inverse table-hover text-center h-75"> <tbody> <?php $board_idx = 1; $page = 1; $objBoard = mysql_fetch_object(mysql_query("SELECT cb_title FROM company_board WHERE cb_idx = $board_idx AND cb_company = '$_COOKIE[ucompany_no]'")); $sqlBookmark = mysql_query("SELECT CP.* FROM company_post CP, company_board CB WHERE CP.cp_board = CB.cb_idx AND CB.cb_breed = '0' AND CB.cb_title='$objBoard->cb_title' AND CP.cp_yn = 1 AND CB.cb_company = '$_COOKIE[ucompany_no]'"); // while($rs = mysql_fetch_assoc($sqlBookmark)) { // $fileIcon = $rs[cp_filelocation] == '' ? '' : "<i class='fa fa-floppy-o'></i>"; ?> <!-- <tr> <td><span class="badge badge-warning-light">공지</span></td> <td style='cursor:pointer' onclick="viewPost('<?=$rs[cp_board];?>', '<?=$rs[cp_idx]?>');"><?=$rs[cp_title].' '.$fileIcon?> </td> </tr> --> <?php //}?> <?php $searchAdd = ""; if(!empty($_REQUEST[searchTitle])){ $searchAdd = "AND CP.cp_title LIKE '%".$_REQUEST[searchTitle]."%' "; }else if(!empty($_REQUEST[searchWriter])){ $searchAdd = "AND CP.cp_writer LIKE '%".$_REQUEST[searchWriter]."%' "; } $searchYear = empty($_REQUEST[searchYear]) ? "" : "AND SUBSTR(CP.cp_wdate,1,4) LIKE '".$_REQUEST[searchYear]."%'" ; $minNum = ($page-1)*10 ; $sqlQuery = mysql_query("SELECT CP.* FROM company_board CB, company_post CP WHERE CB.cb_idx = CP.cp_board AND CB.cb_idx = $board_idx ".$searchYear." ".$searchAdd." AND CB.cb_company = '$_COOKIE[ucompany_no]' LIMIT $minNum, 10"); $tmpObj = mysql_fetch_object(mysql_query("SELECT count(*) as maxCount FROM company_post CP, company_board CB WHERE CB.cb_idx = CP.cp_board AND CB.cb_idx = $board_idx $searchAdd AND CB.cb_company = '$_COOKIE[ucompany_no]'")); $maxNo = $tmpObj->maxCount; $maxCount = $maxNo / 10; $maxCount= ceil($maxCount); $no = 11; if($sqlQuery) { while ($sqlRes = mysql_fetch_array($sqlQuery)) { $fileIcon = $sqlRes[cp_filelocation] == '' ? '' : "<i class='fa fa-floppy-o'></i>"; $no--; echo "<tr style='cursor:pointer' class='border-0' data-toggle='modal' data-target='#modelId{$sqlRes[cp_idx]}' >"; echo "<td style='width:230px' class='border-0 text-left d-inline-block text-truncate'>".$sqlRes['cp_title'].' '.$fileIcon."</td>"; echo "</tr>" ?> <!-- Button trigger modal --> <!-- Modal --> <div class="modal fade" id="modelId<?=$sqlRes[cp_idx]?>" tabindex="-1" role="dialog" aria-labelledby="modelTitleId" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content" style="width:1000px;"> <div class="modal-header"> <h5 class="modal-title">공지사항</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <?=htmlspecialchars_decode(base64_decode($sqlRes[cp_content]));?> </div> </div> </div> </div> <? } } else { } ?> </tbody> </table> </div> </div> </div> </div> <!-- END 공지사항 --> </div><!-- row 3 line --> <div class="row"> <div class="col-lg-10"> <div class="ibox h-100"> <div class="ibox-title pr-4"> <span class="label label-danger float-right ">?</span> <h5>?</h5> </div> <!-- ibox title --> <div class="ibox-content invisible-scrollbar" style="overflow:hidden;"> </div> <!-- ibox content --> </div> <!-- ibox --> </div> <!-- 9 --> <!-- ai 방역 --> <div class="col-lg-2 h-100 " id="aiView"> <div class="ibox h-100"> <div class="ibox-title pr-4"> <span class="label label-danger float-right ">AI</span> <h5>AI 방역관리</h5> </div> <!-- ibox title --> <div class="ibox-content invisible-scrollbar h-100" style="overflow:hidden;"> <!-- <table class="table table-sm table-inverse table-hover text-center mb-0"> <colgroup> <col width="50%"> <col width="20%"> <col width="50%"> </colgroup> <thead class="thead-light"> <tr> <th>발생위치</th> <th>포함농가</th> <th>발생 시간</th> </tr> </thead> </table> --> <div class="invisible-scrollbar invisible-scrollbar" style="overflow:scroll; height:65px;"> <table class="table table-sm table-inverse table-hover text-center h-75"> <colgroup> <col width="50%"> <!-- <col width="20%"> --> <col width="50%"> </colgroup> <tbody id="ai-body"> <tr style="cursor:pointer" data-ai="" class="ai-row"> <td scope="row" class="ai-address text-left d-inline-block text-truncate border-0" style="width:140px"></td> <!-- <td class="ai-in"></td> --> <td class="ai-sdate border-0"></td> </tr> <tr style="cursor:pointer" data-ai="" class="ai-row "> <td scope="row" class="ai-address text-left d-inline-block text-truncate border-0" style="width:140px"></td> <!-- <td class="ai-in"></td> --> <td class="ai-sdate border-0"></td> </tr> </tbody> </table> </div> <!-- ibox content --> </div> <!-- ibox --> </div> <!-- END ai 방역 --> </div><!-- row --> </div> <!-- row 4 line --> </div><!-- 12 --> </div> <!-- row animated --> </div> <!-- wrapper content 끝 --> <? include_once("inc_footer.php"); ?> <!-- footer --> </div> <!-- page wraper 끝 --> </div> <!-- wraper 끝 --> <!-- script 라인 --> <!-- 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 src="https://www.amcharts.com/lib/4/core.js"></script> <script src="https://www.amcharts.com/lib/4/charts.js"></script> <script src="https://www.amcharts.com/lib/4/themes/kelly.js"></script> <script src="https://www.amcharts.com/lib/4/themes/dataviz.js"></script> <script src="https://www.amcharts.com/lib/4/themes/frozen.js"></script> <script src="https://www.amcharts.com/lib/4/themes/material.js"></script> <script src="https://www.amcharts.com/lib/4/themes/dark.js"></script> <script src="https://www.amcharts.com/lib/4/themes/moonrisekingdom.js"></script> <script src="https://www.amcharts.com/lib/4/themes/spiritedaway.js"></script> <script src="https://www.amcharts.com/lib/4/themes/animated.js"></script> <!-- script 끝 --> <script> $(document).ready(function() { /* 끝 부장님 소스 */ function viewPost(board_idx, postIdx) { document.location.href = "company_board_view?menu=<?=$menu?>&board_idx=" + board_idx + "&postIdx=" + postIdx; } var feedBool = true; /* 사육현황 */ var feedCount = 0; var feedcnt = <?=$countFc?>; feedStatus(0); /* 입추정보 */ var timeCount = 0; var loopCount = parseInt(<?=$loopCount?>); /* 농가 상태 한번 실행 */ farmIpchu(); /* AI 방역 */ var aiTimeCnt = 2; var aiCnt = parseInt(<?=$aiCnt?>); var aiCount = 0; lotationAi(0); var setTimeA = 5000; setInterval(() => { farmIpchu(); // 분양 실시간 if (aiCount > aiCnt) { aiCount = 0; lotationAi(aiCount); // AI 방역 로테이션 } else { lotationAi(aiCount); // AI 방역 로테이션 aiCount = aiCount + 2; } if(feedBool){ if (feedCount > feedcnt) { feedCount = 0; feedStatus(feedCount); // 사육 로테이션 } else { feedStatus(feedCount); // 사육 로테이션 feedCount++; } } }, setTimeA); /* 수수분양 */ function farmIpchu() { var data = { type: "farmIpchu", } $.ajax({ type: "POST", url: "notice_process.php", data: data, dataType: "json", success: function(response) { response.forEach(function(json, index, value) { if((json.isusu).substring(0,1) == '-'){ $('#isusu').next().removeClass('fa-level-up'); $('#isusu').next().addClass('fa-level-down'); $('#isusu').parent().addClass('text-danger'); } if((json.iweekSusu).substring(0,1) == '-'){ $('#iweekSusu').next().removeClass('fa-level-up'); $('#iweekSusu').next().addClass('fa-level-down'); $('#iweekSusu').parent().addClass('text-danger'); } if((json.imonthSusu).substring(0,1) == '-'){ $('#imonthSusu').next().removeClass('fa-level-up'); $('#imonthSusu').next().addClass('fa-level-down'); $('#imonthSusu').parent().addClass('text-danger'); } $('#susu').text(json.susu); $('#isusu').text(json.isusu); $('#tsusu').text(json.tsusu); $('#weekSusu').text(json.weekSusu); $('#iweekSusu').text(json.iweekSusu); $('#tweekSusu').text(json.tweekSusu); $('#monthSusu').text(json.monthSusu); $('#imonthSusu').text(json.imonthSusu); $('#tmonthSusu').text(json.tmonthSusu); }); } }); } /* AI 방역 */ function lotationAi(aiCount) { var data = { type: "lotationAi", aiPage: aiCount, } $.ajax({ type: "POST", url: "notice_process.php", data: data, dataType: "json", success: function(response) { response.forEach(function(row, index, value) { var prevention_time = row.prevention_time; $('.ai-address').eq(index).text(row.prevention_address); // $('.ai-in').eq(index).text(row.cnt); $('.ai-sdate').eq(index).text(prevention_time.substr(0, 10)); }); } }); } /* 사육 현황 */ function feedStatus(cntFeed) { var data = { type: "feedStatus", cntFeed : cntFeed, } $.ajax({ type: "POST", url: "notice_process.php", data: data, dataType: "html", success: function(response) { $('.feedStatus').html(response); $('.bd-example-modal-lg').on('hidden.bs.modal', function (e) {//모달 창이 닫히면 feedBool = true; }) $('.bd-example-modal-lg').on('show.bs.modal', function (e) {//모달 창이 열리면 feedBool = false; }) } }); } }); /* 끝 농가 상태 로테이션 */ /* 시세차트 */ /** * --------------------------------------- * This demo was created using amCharts 4. * * For more information visit: * https://www.amcharts.com/ * * Documentation is available at: * https://www.amcharts.com/docs/v4/ * --------------------------------------- */ // Themes begin am4core.useTheme(am4themes_kelly); // Themes end // Create chart instance var chart = am4core.create("chartdiv", am4charts.XYChart3D); <?php $objPoultry = mysql_fetch_object(mysql_query( "SELECT * FROM bro_cc_sise WHERE type='poultry' ORDER BY uptime DESC LIMIT 1")); $objChicken = mysql_fetch_object(mysql_query( "SELECT * FROM bro_cc_sise WHERE type='chicken' ORDER BY uptime DESC limit 1")); ?> // Add data chart.data = [{ "country": "소", "v1": <?=$objPoultry->v1?>, "v2": <?=$objChicken->v1?> }, { "country": "중", "v1": <?=$objPoultry->v2?>, "v2": <?=$objChicken->v2?> }, { "country": "대", "v1": <?=$objPoultry->v3?>, "v2": <?=$objChicken->v3?> }, { "country": "병아리", "v1": <?=$objPoultry->v4?>, "v2": <?=$objChicken->v4?> }]; // Create axes var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis()); categoryAxis.dataFields.category = "country"; categoryAxis.renderer.grid.template.location = 0; categoryAxis.renderer.minGridDistance = 5; categoryAxis.renderer.labels.template.fontSize = 9; var valueAxis = chart.yAxes.push(new am4charts.ValueAxis()); // valueAxis.title.text = "오늘 시세 비교"; valueAxis.renderer.labels.template.fontSize = 9; valueAxis.renderer.minGridDistance = 10; valueAxis.renderer.labels.template.adapter.add("text", function(text) { return text + "원"; }); // Create series var series = chart.series.push(new am4charts.ColumnSeries3D()); series.dataFields.valueY = "v1"; series.dataFields.radiusValue = "v1"; series.dataFields.categoryX = "country"; series.name = "양계협회"; series.clustered = false; series.columns.template.tooltipText = "(양계협회) : [bold]{valueY}[/]"; series.columns.template.fillOpacity = 0.8; var series2 = chart.series.push(new am4charts.ColumnSeries3D()); series2.dataFields.valueY = "v2"; series.dataFields.radiusValue = "v2"; series2.dataFields.categoryX = "country"; series2.name = "육계협회"; series2.clustered = false; series2.columns.template.tooltipText = "(육계협회) : [bold]{valueY}[/]"; chart.legend = new am4charts.Legend(); chart.legend.fontSize = 10; let markerTemplate = chart.legend.markers.template; markerTemplate.width = 10; markerTemplate.height = 10; am4core.ready(function() { // Themes begin // Themes end // create chart var chart = am4core.create("chart1", am4charts.GaugeChart); chart.innerRadius = am4core.percent(82); /** * Normal axis */ var axis = chart.xAxes.push(new am4charts.ValueAxis()); chart.innerRadius = -25; /** * Axis for ranges */ var colorSet = new am4core.ColorSet(); var axis2 = chart.xAxes.push(new am4charts.ValueAxis()); axis2.min = 0; axis2.max = 100; axis2.renderer.innerRadius = 10 axis2.strictMinMax = true; axis2.renderer.labels.template.disabled = true; axis2.renderer.ticks.template.disabled = true; axis2.renderer.grid.template.disabled = true; var range0 = axis2.axisRanges.create(); range0.value = 0; range0.endValue = <?=$contractFarm?>; range0.axisFill.fillOpacity = 1; range0.axisFill.fill = colorSet.getIndex(0); var range1 = axis2.axisRanges.create(); range1.value = <?=$contractFarm?>; range1.endValue = 100; range1.axisFill.fillOpacity = 1; range1.axisFill.fill = colorSet.getIndex(2); /** * Label */ var label = chart.radarContainer.createChild(am4core.Label); label.isMeasured = false; label.fontSize = 16; label.fontWeight = "bold"; label.x = am4core.percent(50); label.y = am4core.percent(100); label.horizontalCenter = "middle"; label.verticalCenter = "bottom"; label.text = "<?=$objContract->tfarm?>"; /** * Hand */ // var hand = chart.hands.push(new am4charts.ClockHand()); // hand.axis = axis2; // hand.innerRadius = am4core.percent(20); // hand.startWidth = 10; // hand.pin.disabled = true; // hand.value = 50; // hand.events.on("propertychanged", function(ev) { // range0.endValue = ev.target.value; // range1.value = ev.target.value; // axis2.invalidate(); // }); }); // end am4core.ready() /* chart 2 */ am4core.ready(function() { // Themes begin am4core.useTheme(am4themes_moonrisekingdom); // Themes end // create chart var chart = am4core.create("chart2", am4charts.GaugeChart); chart.innerRadius = am4core.percent(82); /** * Normal axis */ var axis = chart.xAxes.push(new am4charts.ValueAxis()); chart.innerRadius = -25; /** * Axis for ranges */ var colorSet = new am4core.ColorSet(); var axis2 = chart.xAxes.push(new am4charts.ValueAxis()); axis2.min = 0; axis2.max = 100; axis2.renderer.innerRadius = 10 axis2.strictMinMax = true; axis2.renderer.labels.template.disabled = true; axis2.renderer.ticks.template.disabled = true; axis2.renderer.grid.template.disabled = true; var range0 = axis2.axisRanges.create(); range0.value = 0; range0.endValue = <?=$contractDong?>; range0.axisFill.fillOpacity = 1; range0.axisFill.fill = colorSet.getIndex(0); var range1 = axis2.axisRanges.create(); range1.value = <?=$contractDong?>; range1.endValue = 100; range1.axisFill.fillOpacity = 1; range1.axisFill.fill = colorSet.getIndex(2); /** * Label */ var label = chart.radarContainer.createChild(am4core.Label); label.isMeasured = false; label.fontSize = 16; label.fontWeight = "bold"; label.x = am4core.percent(50); label.y = am4core.percent(100); label.horizontalCenter = "middle"; label.verticalCenter = "bottom"; label.text = "<?=$objContract->tdong?>"; }); // end am4core.ready() /* chart3 */ am4core.ready(function() { // Themes begin am4core.useTheme(am4themes_material); // Themes end // create chart var chart = am4core.create("chart3", am4charts.GaugeChart); chart.innerRadius = am4core.percent(82); /** * Normal axis */ var axis = chart.xAxes.push(new am4charts.ValueAxis()); chart.innerRadius = -25; /** * Axis for ranges */ var colorSet = new am4core.ColorSet(); var axis2 = chart.xAxes.push(new am4charts.ValueAxis()); axis2.min = 0; axis2.max = 100; axis2.renderer.innerRadius = 10 axis2.strictMinMax = true; axis2.renderer.labels.template.disabled = true; axis2.renderer.ticks.template.disabled = true; axis2.renderer.grid.template.disabled = true; var range0 = axis2.axisRanges.create(); range0.value = 0; range0.endValue = <?=$percentageSusu?>; range0.axisFill.fillOpacity = 1; range0.axisFill.fill = colorSet.getIndex(0); var range1 = axis2.axisRanges.create(); range1.value = <?=$percentageSusu?>; range1.endValue = 100; range1.axisFill.fillOpacity = 1; range1.axisFill.fill = colorSet.getIndex(2); /** * Label */ var label = chart.radarContainer.createChild(am4core.Label); label.isMeasured = false; label.fontSize = 13; label.fontWeight = "bold"; label.x = am4core.percent(50); label.y = am4core.percent(100); label.horizontalCenter = "middle"; label.verticalCenter = "bottom"; label.text = "<?=$objSusu->totalSusu?>"; }); // end am4core.ready() /* chart 4 */ am4core.ready(function() { // Themes begin am4core.useTheme(am4themes_frozen); // Themes end // create chart var chart = am4core.create("chart4", am4charts.GaugeChart); chart.innerRadius = am4core.percent(82); chart.innerRadius = -25; /** * Normal axis */ var axis = chart.xAxes.push(new am4charts.ValueAxis()); /** * Axis for ranges */ var colorSet = new am4core.ColorSet(); var axis2 = chart.xAxes.push(new am4charts.ValueAxis()); axis2.min = 0; axis2.max = 100; axis2.renderer.innerRadius = 10 axis2.strictMinMax = true; axis2.renderer.labels.template.disabled = true; axis2.renderer.ticks.template.disabled = true; axis2.renderer.grid.template.disabled = true; var range0 = axis2.axisRanges.create(); range0.value = 0; range0.endValue = <?=$minusSusu?>; range0.axisFill.fillOpacity = 1; range0.axisFill.fill = colorSet.getIndex(0); var range1 = axis2.axisRanges.create(); range1.value = <?=$minusSusu?>; range1.endValue = 100; range1.axisFill.fillOpacity = 1; range1.axisFill.fill = colorSet.getIndex(2); /** * Label */ var label = chart.radarContainer.createChild(am4core.Label); label.isMeasured = false; label.fontSize = 13; label.fontWeight = "bold"; label.x = am4core.percent(50); label.y = am4core.percent(100); label.horizontalCenter = "middle"; label.verticalCenter = "bottom"; label.text = "<?=$objSusu->tmpTsusu?>"; }); // end am4core.ready() /* 부장님 코드 클릭 이벤트 */ function getAgesData(param) { window.open("http://ltms.eemo.co.kr/super/whole_breeding_status.php?pbreedtype=CC&jong_type=1&contract_no="); /* var status = $("#preview_" + param).css('display'); if (status == "none") { $("#preview_" + param).css("display", ""); } else { $("#preview_" + param).css("display", "none"); } */ } </script> </body> </html>