Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
cts.eemo.co.kr
/
public_html
/
src
/
web
/
view
/
contents
/
price
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/cts.eemo.co.kr/public_html/src/web/view/contents/price/list.php
<?php use CTS\CTS; $page = $_REQUEST['page']; $eventYear = $_REQUEST['eventYear']; $eventMonth = $_REQUEST['eventMonth']; $eventDay = $_REQUEST['eventDay']; $page = $_GET['page'] ? $_GET['page'] : 1; $onePage = 10; $currentLimit = ($onePage * $page) - $onePage; $sqlLimit = ' limit ' . $currentLimit . ', ' . $onePage; if($_REQUEST['tmpDate'] != null){ $searchCondition = " AND registered_time LIKE '%{$_REQUEST['tmpDate']}%' "; } $sql = "select * from parsing_price where site_type = 'chicken' ".$searchCondition." order by registered_time DESC "; $rs = \DB::query($sql.$sqlLimit); $rsCnt = \DB::query($sql); $cnt = count($rsCnt); list($paging, $pageRecord) = CTS::createPaging($cnt, $page); ?> <!-- search --> <div class=""> <form id="chicken_price_form" name="chicken_price_form" method="post" > <div class="columns columns-right btn-group float-right"> <div class="pr-1 float-right"> <button id="farmSearchList" onclick="reSetfun()" class="btn btn-primary " type="button" name="paginationSwitch" title="Hide/Show pagination"> 검색 초기화 </button> </div> <div class="search pr-1 "> <select id="eventYear" name="eventYear" class="custom-select"> <?php $tmpYear = date("Y"); $tmpYear_ = $tmpYear-1; for($i=$tmpYear; $i>=$tmpYear_; $i--): ?> <option value="<?php echo $i?>"><?php echo $i?><?php echo "년"?></option> <?php endfor?> </select> </div> <div class="search pr-1 "> <select id="eventMonth" name="eventMonth" class="custom-select"> <?php $tmpMonth = date("m"); for($j=1; $j<=12; $j++): $tmpj = sprintf("%02d",$j); ?> <option value="<?php echo $tmpj?>" <?php echo ($tmpMonth==$tmpj)?"selected":""?>><?php echo $j?><?php echo "월"?></option> <?php endfor?> </select> </div> <div class="search pr-1 "> <select id="eventDay" name="eventDay" class="custom-select"> <?php $tmpDay = date("d"); for($k=1; $k<=31; $k++): $tmpk = sprintf("%02d",$k); ?> <option value="<?php echo $tmpk?>" <?php echo ($tmpDay==$tmpk)?"selected":""?>><?php echo $k?><?php echo "일"?></option> <?php endfor?> </select> </div> <div class="pr-1"> <input id="division" name="division" type="hidden" value="hatcherySearch" /> </div> <input type="hidden" id="tmpDate" name="tmpDate" value=""/> <div class="pr-1 float-right"> <button id="farmSearchList" onclick="eventSearch()" class="btn btn-secondary " type="button" name="paginationSwitch" title="Hide/Show pagination"> 검색 </button> </div> </div> </form> <br /> <br /> </div> <div class="card"> <div> <table class="table table-bordered"> <thead class="thead-light"> <tr class="bg-primary"> <th class="text-center"><?php echo ('날 짜');?></th> <th class="text-center"><?php echo ('대');?></th> <th class="text-center"><?php echo ('중');?></th> <th class="text-center"><?php echo ('소');?></th> <th class="text-center"><?php echo ('병아리');?></th> </tr> </thead> <tbody> <?php $i= 0; if(count($rs) == 0 ) { echo " <td colspan=5 class='text-center'> 검색 결과가 없습니다</td>"; } foreach($rs as $key => $value) : ?> <tr> <td class="text-center"><?php echo substr($value['registered_time'],0,10);?></td> <td class="text-center"><?php echo $value['type_A']?></td> <td class="text-center"><?php echo $value['type_B']?></td> <td class="text-center"><?php echo $value['type_C']?></td> <td class="text-center"><?php echo $value['type_D']?></td> </tr> <?php endforeach; ?> </tbody> </table> </div> <!-- 페이지 처리 --> <nav class="text-center"> <?php CTS::printPageNavigator($pageRecord)?> </nav> </div> <script> function reSetfun(){//검색 초기화 $('#tmpDate').val(''); document.chicken_price_form.submit(); } function eventSearch(){ var tmpDate = $("#eventYear").val()+"-"+$("#eventMonth").val() + "-" + $("#eventDay").val(); var paramDate = $('#tmpDate').val(tmpDate); document.chicken_price_form.submit(); } </script>