ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/admin/ticket/ |
Upload File : |
<? include "../include/top_proc.html"; include "_common.php"; if ( !$mode ) exit; if($mode=="good_search"){ // 티켓목록에서 공급처 선택 시 상품 검색 if($producer_id == "") { exit; } $sql = "SELECT ticket_nm, group_code from TB_TICKET where producer_id = '{$producer_id}' AND del_flag = 'N' group by group_code;"; $rs = db_query($sql); echo "<select name=\"group_code\" style=\"width:auto; min-width:300px;\">"; echo "<option value=\"\" style=\"background:#000000;color:#ffffff;\">==티켓그룹명==</option>"; for($i=0 ; $row=db_fetch_array($rs) ; $i++) { if ($row['group_code']==$group_code) { $selected = "selected"; } else { $selected = ""; } echo "<option value=\"{$row['group_code']}\" {$selected}>{$row['ticket_nm']} ({$row['group_code']})</option>"; } echo "</select>"; } else if($mode == "ticket_check") { // 티켓 체크 (티켓관리 > 대량검색) $search_list_arr = explode("\r\n", trim($search_list)); // 500개씩 끊어서 검색 (REGEXP 길이 제한 32000bytes); $search_data = array_chunk($search_list_arr, 500); foreach($search_data as $key => $value){ // 티켓 검색 $sql = "SELECT ticket_number, ticket_status from TB_TICKET where producer_id='".$producer_id."' and del_flag='N'"; $sql .= " and ticket_number REGEXP '".implode("|", $value)."' "; $rs = db_query($sql); for($i=0 ; $row=db_fetch_array($rs); $i++) { $ticket_data[$row['ticket_number']] = $row['ticket_status']; } } $result = array( 'send' => array(), 'wait' => array(), 'none' => array(), ); foreach($search_list_arr as $k => $v){ switch($ticket_data[$v]){ case "S" : // 발송완료 case "U" : // 사용완료 $result['send'][] = $v; break; case "C" : // 취소 case "W" : // 미사용 $result['wait'][] = $v; break; case "" : $result['none'][] = $v; break; } } // 검색결과 수량 $result['count_send'] = count($result['send']); $result['count_wait'] = count($result['wait']); $result['count_none'] = count($result['none']); echo json_encode($result); } ?>