$sub_menu = '400630'; include_once('./_common.php'); auth_check($auth[$sub_menu], "r"); $g4['title'] = '이벤트관리'; include_once (G4_ADMIN_PATH.'/admin.head.php'); $sql_common = " from {$g4['shop_event_table']} "; // 테이블의 전체 레코드수만 얻음 $sql = " select count(*) as cnt " . $sql_common; $row = sql_fetch($sql); $total_count = $row['cnt']; $sql = "select * $sql_common order by ev_id desc "; $result = sql_query($sql); ?> 이벤트관리 건수 echo $total_count ?> 이벤트관리추가 이벤트 번호 제목 연결 상품 사용 구분 for ($i=0; $row=mysql_fetch_array($result); $i++) { $s_mod = icon("수정", "./itemeventform.php?w=u&ev_id={$row['ev_id']}"); $s_del = icon("삭제", "javascript:del('./itemeventformupdate.php?w=d&ev_id={$row['ev_id']}');"); $s_vie = icon("보기", G4_SHOP_URL."/event.php?ev_id={$row['ev_id']}"); $href = ""; $sql = " select count(ev_id) as cnt from {$g4['shop_event_item_table']} where ev_id = '{$row['ev_id']}' "; $ev = sql_fetch($sql); if ($ev[cnt]) { $href = ""; } $list = $i%2; ?> =$row['ev_id']?> =$row['ev_subject']?> =$href?>=$ev['cnt']?> =$row['ev_use'] ? "예" : "아니오"?> 수정 삭제 보기 } if ($i == 0) { echo '자료가 한건도 없습니다.'; } ?> include_once (G4_ADMIN_PATH.'/admin.tail.php'); ?>
건수 echo $total_count ?>