//======================================== // dehead(config/function/lib) Include //======================================== include $_SERVER['DOCUMENT_ROOT']."/front/include/dehead.php"; //======================================== // Meta Tag //======================================== $metaTitle = $metaInfo['counseling']['title']; $metaDescription = $metaInfo['counseling']['description']; $metaKeyword = $metaInfo['counseling']['keyword']; $metaImage = $metaInfo['counseling']['image']; //======================================== // Class Connect //======================================== $Db = new Db(); // 데이터 베이스 클래스 //======================================== // Data Process //======================================== $rowCount = $pageInfo['counselA']['rowCount']; // 한 페이지에 보여질 게시물 수 $startNum = ($page - 1) * $rowCount; // limit 시작 위치 $param = array('no' => PARAMETER_NO, 'del' => PARAMETER_N, 'sort' => "A"); //======================================== // Data Load //======================================== $totalCount = $Db->single("SELECT COUNT(*) FROM $TABLE_COUNSEL WHERE no > :no AND del = :del AND sort = :sort", $param); $totalPages = ceil($totalCount / $rowCount); $param = array_merge($param, array('startNum' => $startNum, 'rowCount' => $rowCount)); $list = $Db->query("SELECT no, reply, store, title, reg_date, id FROM $TABLE_COUNSEL WHERE no > :no AND del = :del AND sort = :sort ORDER BY reg_date DESC LIMIT :startNum, :rowCount", $param); $Db->CloseConnection; //======================================== // header Include //======================================== include PATH_INCLUDE."header.php"; ?>