// 기본 설정 로딩 require_once('config.php'); require_once('function.php'); require_once('lib.php'); ?> $query="select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,servicedb.coupon_use,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012','C497','C464','C526') and service_ip not like '27.125.204%' order by clientdb.client_name asc"; $coupon_data = @mysql_query($query , $db_connect) or die($db_q_error); $total = mysql_num_rows($coupon_data); $list_no = (!$_GET[ea]) ? '50': $_GET[ea]; if($list_no>$total){$list_no=$total;} $total_page = ($total != '0' ) ? ceil($total/$list_no) : '0'; $page = $_GET[curPage]; if(!$page) {$page = 1;} elseif($page >= $total_page){$page=$total_page;} else {$page=$page;} $next_page=($page-'1')*$list_no; $next_no=$next_page+$list_no; $query="select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,servicedb.coupon_use,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012','C497','C464','C526') and service_ip not like '27.125.204%' order by clientdb.client_name,service_open_date asc limit ".$next_page.",".$next_no; //$query="select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012') order by service_code asc"; $coupon_data = @mysql_query($query , $db_connect) or die($db_q_error); $total_coupon=mysql_query("select sum(coupon),sum(coupon_use) from servicedb" , $db_connect) or die($db_q_error); $total_coupon=mysql_fetch_assoc($total_coupon); ?>
| No | 발급쿠폰 | 남은수량 | 사용완료 | 고객명 | 서비스코드 | 장비명 | 서버IP | 서비스개시일 | 회선종류 |
|---|---|---|---|---|---|---|---|---|---|
| =$num?> | =$coupon[coupon]+$coupon[coupon_use]?> | =$coupon[coupon]?>// if ( $server_timestamp < $default ) { echo "5"; } else { echo "3";}?> | =$coupon[coupon_use]?> | =$coupon[client_name]?> | =$coupon[service_code]?> | =$coupon[server_code]?> | =$coupon[service_ip]?> | =$coupon[service_open_date]?> | =$coupon[service_line]?> |