"강좌명", "author"=>"강사명", "company"=>"제작사", ); if($keyword!='') { $add_sql .= " AND `{$key}` LIKE '%{$keyword}%' "; $_GET['key'] = $key; $_GET['keyword'] = $keyword; } $key_opt = ''; if(is_array($keys) ) { foreach($keys as $k=>$v) { $sel = ($key==$k) ? " selected ": "" ; $key_opt .= ""; } } // 옵션처리 if($pcode!="") $add_sql .= " and category_code like '{$pcode}%' "; if($code!="") $add_sql .= " and category_code like '$code' "; // ---------------------------------------------- // 페이징 처리 // ---------------------------------------------- if($order_by=="") $order_by = " binary(student_title) asc "; if($page=="") $page = 1; $sql = " select count(*) as cnt from $TClass->table_name a left join $Category->table_name b on a.category_code = b.code left join $Category->table_name c on b.pcode = c.code where b.use_yn <> 'N' $add_sql "; $total_record = $DB->getOne($sql); $start = intval(($page - 1) * $perPage); $Member =& load("Member"); $sql = " select a.*,b.title as scategory_title, c.title as bcategory_title from $TClass->table_name a left join $Category->table_name b on a.category_code = b.code left join $Category->table_name c on b.pcode = c.code where b.use_yn <> 'N' $add_sql order by $order_by limit {$start},{$perPage} "; $rlt = $DB->query($sql); $rows = $DB->fetchAll($rlt); $no = $total_record - (($page-1) * $perPage); $Paging =& load("BootstrapPaging"); $Paging->BootstrapPaging($total_record,$perPage); $pages = $Paging->getLink(); if(is_array($rows) && sizeof($rows) > 0 ) { foreach($rows as $k=>$v) { } } // ---------------------------------------------- // 분류 카테고리 // ---------------------------------------------- $Category = load("Category"); // 대분류 $sql = " select title,code,pcode from $Category->table_name where 1=1 and use_yn <> 'N' and depth='0' order by code ASC "; $rlt = $DB->query($sql); $tbcr = $DB->fetchAll($rlt); // 소분류 $sql = " select title,code,pcode from $Category->table_name where pcode='$pcode' and use_yn <> 'N' and depth='1' order by code ASC "; $rlt = $DB->query($sql); $scr = $DB->fetchAll($rlt); // 강좌수 foreach($scr as $k=>$v) { $sql = " select count(*) as cnt from $TClass->table_name where category_code='$v[code]' "; $cnt = $DB->getOne($sql); $scr[$k][cnt] = $cnt; } // 페이징 관련 $php_self = $load_page; $total_page = ceil($total_record / $perPage); // 수강신청 URL $buy_url = "class_view.html"; ?>

THEME FILE ERROR!