include_once "../../config.php"; $tmp = explode("/",$_SERVER['PHP_SELF']); $topmenu_dir = "/".$tmp[2]; $load_page = $tmp[3]; $out_left_menu = true; // 강좌 리스트 구하기 $TClass = load("TClass"); $Category = load("Category"); if($perPage=="") $perPage = 10; // ---------------------------------------------- // 키워드 처리 // ---------------------------------------------- $keys = array( "student_title"=>"강좌명", "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"; ?> if($company_id == "edu"){ include_once ROOT_PATH_BY_FILE.$_config[theme_dir]."/include/edu_top.html"; }else{ include_once ROOT_PATH_BY_FILE.$_config[theme_dir]."/include/top.html"; } ?> $theme_file = ROOT_PATH_BY_FILE.$_config[theme_dir].$topmenu_dir."/".$load_page; $skin_file = ROOT_PATH_BY_FILE.$_config[skin_dir].$topmenu_dir."/".$load_page; // 스킨 파일 먼저 적용 후 테마 파일 적용 if(is_file($skin_file)) { require_once "$skin_file"; } else if(is_file($theme_file)) { require_once "$theme_file"; // 테마 파일이 존재하지 않을 경우 } else { $theme_file_url = str_replace(ROOT_PATH_BY_FILE,"",$theme_file); ?>
=trans('테마 파일이 존재하지 않습니다.')?> =trans('해당 테마파일을 생성해 주세요.')?> =$theme_file_url?>