//======================================== // dehead(config/function/lib) Include //======================================== include $_SERVER['DOCUMENT_ROOT']."/front/include/dehead.php"; //======================================== // Page Auth //======================================== if(MobileCheck() == "Desktop"){ // 일단 없애봄 170703 // AuthCheck($_SESSION['MEMBER_LOGIN_EXIST']); } //======================================== // Class Connect //======================================== $Db = new Db(); // 데이터 베이스 클래스 //======================================== // Data Process //======================================== $param = array('no' => $no); //======================================== // Data Load //======================================== $view = $Db->row("SELECT no, sort, best, store, insert_date, name, title, content, likes, hit, tag FROM $TABLE_EPILOGUE WHERE no = :no", $param); $keyword = explode("|", $Db->single("SELECT keyword FROM $TABLE_KEYWORD WHERE code = :code", array('code' => "B"))); $no = $view['no']; $sort = $view['sort']; $bestClass = ($view['best'] === "Y") ? "best" : ""; $store = $storeNameArr[$view['store']]; $storeColor = StoreColorClass($view['store']); $insert_date = $view['insert_date']; $name = Utf8SubstrReplace(stripslashes($view['name']), "o"); $title = stripslashes($view['title']); $content = stripslashes($view['content']); $likes = $view['likes']; $hit = $view['hit']; $temp_tag = explode(",", stripslashes($view['tag'])); $tag = implode(",", array_filter($temp_tag)); $pnparam = array('sort' => $sort, 'show' => PARAMETER_Y, 'del' => PARAMETER_N, 'best' => $view['best']); if($sd === "likes"){ $pnparam['likes'] = $likes; $prevINS .= "likes > :likes"; $nextINS .= "likes < :likes"; $prevOrderINS .= "likes ASC"; $nextOrderINS .= "likes DESC"; } else if($sd === "hit"){ $pnparam['hit'] = $hit; $prevINS .= "hit > :hit"; $nextINS .= "hit < :hit"; $prevOrderINS .= "hit ASC"; $nextOrderINS .= "hit DESC"; } else { $pnparam['insert_date'] = $insert_date; $prevINS .= "insert_date > :insert_date"; $nextINS .= "insert_date < :insert_date"; $prevOrderINS .= "insert_date ASC"; $nextOrderINS .= "insert_date DESC"; } $prev = $Db->row("SELECT no, store, title FROM $TABLE_EPILOGUE WHERE $prevINS AND sort = :sort AND d_show = :show AND del = :del AND best = :best ORDER BY $prevOrderINS LIMIT 0, 1", $pnparam); $next = $Db->row("SELECT no, store, title FROM $TABLE_EPILOGUE WHERE $nextINS AND sort = :sort AND d_show = :show AND del = :del AND best = :best ORDER BY $nextOrderINS LIMIT 0, 1", $pnparam); if($prev > 0){ $prevTitle = "[".$storeNameArr[$prev['store']]."]".stripslashes($prev['title']); $prevLink = "#".$prev['no']; } else { $prevTitle = "이전글이 없습니다."; $prevLink = "#self"; } if($next > 0){ $nextTitle = "[".$storeNameArr[$next['store']]."]".stripslashes($next['title']); $nextLink = "#".$next['no']; } else { $nextTitle = "다음글이 없습니다."; $nextLink = "#self"; } //======================================== // Hit Update //======================================== if(!$_COOKIE["HIT::".$TABLE_EPILOGUE."_".$no]){ $hitPlus = $hit + 1; $hitUp = $Db->query("UPDATE $TABLE_EPILOGUE SET hit = :hit WHERE no = :no", array('hit' => $hitPlus, 'no' => $no)); setcookie("HIT::".$TABLE_EPILOGUE."_".$no, time()+(60*60*24)); } $Db->CloseConnection; //======================================== // Meta Tag //======================================== $metaTitle = $title; $metaDescription = StrCut(strip_tags($content), 0, 100); $metaKeyword = $tag; //======================================== // header Include //======================================== include PATH_INCLUDE."header.php"; ?> '1', 'title' => 'a1b1.jpg', 'no' => '27'), array('seq' => '2', 'title' => 'a1b2.jpg', 'no' => '1229'), array('seq' => '3', 'title' => 'a1b3.jpg', 'no' => '1927') ); $tmp2 = array( array('seq' => '1', 'title' => '아들의 꿈을 지켜주셔서 감사해요!', 'no' => '2201'), array('seq' => '2', 'title' => '딸이 원장님 이름 등에 붙이고 다니고 싶대요!', 'no' => '1816'), array('seq' => '3', 'title' => '아들의 상황 이해해주셔서 너무 감사합니다.', 'no' => '724') ); $tmp3 = array( array('seq' => '1', 'title' => '남편, 이해해줘서 고마워요!', 'no' => '1426'), array('seq' => '2', 'title' => '부부가 함께 받는 코수술 의지 됩니다.', 'no' => '1445'), array('seq' => '3', 'title' => '코골이 해결 후 와이프가 좋아해요!', 'no' => '1140') ); $tmp4 = array( array('seq' => '1', 'title' => '코수술 후 인정받고 포상휴가도 많이 받았습니다!', 'no' => '2259'), array('seq' => '2', 'title' => '군인분들 코수술 적극 추천합니다!', 'no' => '1723'), array('seq' => '3', 'title' => '휴가 기간 중 코수술 만족 합니다!', 'no' => '2111') ); ?>