=$content?>
// $request_uri = $_SERVER['REQUEST_URI']; // $request_category = $_GET['category']; // $reqeust_arr = array( // '/front/nsurgery/n_dns.php', // '/front/nsurgery/n_congestion1.php', // '/front/nsurgery/nsurgery4.php', // '/front/nsurgery/nsurgery5.php', // '/front/nsurgery/nsurgery6.php', // '/front/nplastic/n_band.php', // '/front/nplastic/n_updown.php', // '/front/nplastic/nplastic3.php', // '/front/nplastic/nplastic4.php', // '/front/nplastic/n_flat_nose.php', // '/front/nplastic/nplastic6.php', // '/front/nplastic/n_fracture.php', // '/front/nplastic/nplastic8.php' // ); // $request_sub_arr = array( // 'A1' => '/front/nsurgery/n_dns.php', // 'A2' => '/front/nsurgery/n_congestion1.php', // 'A3' => '/front/nsurgery/nsurgery4.php', // 'A4' => '/front/nsurgery/nsurgery5.php', // 'A5' => '/front/nsurgery/nsurgery6.php', // 'B1' => '/front/nplastic/n_band.php', // 'B2' => '/front/nplastic/n_updown.php', // 'B3' => '/front/nplastic/nplastic3.php', // 'B4' => '/front/nplastic/nplastic4.php', // 'B5' => '/front/nplastic/n_flat_nose.php', // 'B6' => '/front/nplastic/nplastic6.php', // 'B7' => '/front/nplastic/n_fracture.php', // 'B8' => '/front/nplastic/nplastic8.php' // ); // if($request_category){ // if(in_array($request_uri, $reqeust_arr) == FALSE){ // echo "\n"; // exit; // } // } include_once $_SERVER['DOCUMENT_ROOT']."/front/include/dehead.php"; //======================================== // Class Connect //======================================== $Db = new Db(); // 데이터 베이스 클래스 //======================================== // Data Process //======================================== $rowCount = $pageInfo['post']['rowCount']; // 한 페이지에 보여질 게시물 수 $startNum = ($page - 1) * $rowCount; // limit 시작 위치 //$param = array('no' => PARAMETER_NO, 'show' => PARAMETER_Y, 'del' => PARAMETER_N, 'disease' => $disease, 'category' => $Db->likeify($category)); $param = array('no' => PARAMETER_NO, 'show' => PARAMETER_Y, 'del' => PARAMETER_N, 'category' => $Db->likeify($category)); //$addPath = "&category=$category&disease=$disease#tab"; $addPath = "&category=$category#tab"; //======================================== // Data Load //======================================== //$totalCount = $Db->single("SELECT COUNT(*) FROM $TABLE_POST WHERE no > :no AND d_show = :show AND del = :del AND disease = :disease AND category LIKE :category", $param); $totalCount = $Db->single("SELECT COUNT(*) FROM $TABLE_POST WHERE no > :no AND d_show = :show AND del = :del AND category LIKE :category", $param); $totalPages = ceil($totalCount / $rowCount); $param = array_merge($param, array('startNum' => $startNum, 'rowCount' => $rowCount, 'code' => "post", 'seq' => PARAMETER_ONE)); //2017-08-03 if($category=='A1'){ $addOrderQry = '(A.no = 19 or A.no = 28 or A.no = 39 or A.no = 47) DESC,'; } //$list = $Db->query("SELECT A.no, A.category, A.title, A.content, A.hit, A.reg_date, B.no AS fno, B.attach, B.attach_ori, B.mod_date FROM $TABLE_POST A LEFT JOIN $TABLE_ATTACH B ON A.no = B.wno AND B.code = :code AND B.seq = :seq WHERE A.no > :no AND A.d_show = :show AND A.del = :del AND A.disease = :disease AND A.category LIKE :category ORDER BY A.reg_date DESC LIMIT :startNum, :rowCount", $param); $list = $Db->query("SELECT A.no, A.category, A.title, A.content, A.hit, A.reg_date, B.no AS fno, B.attach, B.attach_ori, B.mod_date FROM $TABLE_POST A LEFT JOIN $TABLE_ATTACH B ON A.no = B.wno AND B.code = :code AND B.seq = :seq WHERE A.no > :no AND A.d_show = :show AND A.del = :del AND A.category LIKE :category ORDER BY $addOrderQry A.reg_date DESC LIMIT :startNum, :rowCount", $param); $Db->CloseConnection; include_once PATH_INCLUDE."header.php"; ?>
=$content?>