200812) ? $date : 200901; $date_yy = (int)substr ($date,0,4); $date_mm = (int)substr ($date,4,2); if ( !isset($res['cnt']) || $res['cnt'] < 1 ) { $cmt = $date_mm - date('n'); $date = mktime(0,0,0, $date_mm, 15 , $date_yy) - (60*60*24*31*$cmt); $date_yy = date("Y",$date); $date_mm = date("n",$date); } /**/ error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", 1); /**/ $rDomainInfo = array(); $rDomainInfo['dhcdn'] = 'http://dhcdn.design.co.kr'; $rDomainInfo['image'] = 'http://image.design.co.kr'; $mag["design"]["url"] = "http://mdesign.designhouse.co.kr/"; $mag["enfant"]["url"] = "http://enfant.designhouse.co.kr/"; $mag["happy"]["url"] = "http://happy.designhouse.co.kr/"; $mag["luxury"]["url"] = "http://luxury.designhouse.co.kr/"; $mag["menshealth"]["url"] = "http://menshealth.designhouse.co.kr/"; $mag["mywedding"]["url"] = "http://mywedding.designhouse.co.kr/"; $mag["design"]["rssurl"] = $rDomainInfo['dhcdn'] . "/rss/?m=desgin"; $mag["enfant"]["rssurl"] = $rDomainInfo['dhcdn'] . "/rss/?m=enfant"; $mag["happy"]["rssurl"] = $rDomainInfo['dhcdn'] . "/rss/?m=happy"; $mag["luxury"]["rssurl"] = $rDomainInfo['dhcdn'] . "/rss/?m=luxury"; $mag["menshealth"]["rssurl"] = $rDomainInfo['dhcdn'] . "/rss/?m=menshealth"; $mag["mywedding"]["rssurl"] = $rDomainInfo['dhcdn'] . "/rss/?m=mywedding"; $mag["design"]["logo"] = $rDomainInfo['image'] . "/footer/b_design.gif"; $mag["enfant"]["logo"] = $rDomainInfo['image'] . "/footer/b_momenfant.gif"; $mag["happy"]["logo"] = $rDomainInfo['image'] . "/footer/b_happy.gif"; $mag["luxury"]["logo"] = $rDomainInfo['image'] . "/footer/b_luxury.gif"; $mag["menshealth"]["logo"] = $rDomainInfo['image'] . "/footer/b_menshealth.gif"; $mag["mywedding"]["logo"] = $rDomainInfo['image'] . "/footer/b_mywedding.gif"; $mag["design"]["titles"] = "월간 디자인"; $mag["enfant"]["titles"] = "맘&앙팡"; $mag["happy"]["titles"] = "행복이 가득한 집"; $mag["luxury"]["titles"] = "Luxury"; $mag["menshealth"]["titles"] = "Menshealth"; $mag["mywedding"]["titles"] = "마이웨딩"; $mag["design"]["mid"] = 7; $mag["enfant"]["mid"] = 3; $mag["happy"]["mid"] = 1; $mag["luxury"]["mid"] = 5; $mag["menshealth"]["mid"] = 6; $mag["mywedding"]["mid"] = 2; $magazine = array( "menshealth"=>"맨즈헬스", "mywedding"=>"마이웨딩", "luxury"=>"럭셔리", "enfant"=>"맘앤앙팡", "happy"=>"행복이 가득한 집", "design"=>"월간 디자인"); $cats = $DB->FetchArray(" SELECT c_id -- 카테고리 코드 ,c_name -- 카테고리명 ,section_id -- 잡지코드 FROM brand_category WHERE section_id != 4 AND section_id != 16 ORDER BY section_id ASC "); $t = count($cats); for ($i=0;$i<$t;$i++) { $ct[ $cats[$i]["section_id"] ][ $cats[$i]["c_id"] ] = $cats[$i]["c_name"]; } $aList = $DB->FetchArray("SELECT info_id ,title_list ,maintitle ,lead ,subtitle ,cate_id ,img_url ,DATE_FORMAT(regdate,'%a, %d %b %Y %T') as regdate ,DATE_FORMAT(csetdate4,'%a, %d %b %Y %T') as csetdate4rs ,csetdate4 ,service_stat ,magazine ,shop_keyword ,newswriter ,editor ,gen_yy ,gen_mm ,(SELECT c_id FROM brand_index WHERE info_id = magazine_index.info_id) as cate1 ,(SELECT content FROM magazine_cont_edit WHERE info_id = magazine_index.info_id AND pageno = 1) as content1 ,(SELECT content FROM magazine_cont_edit WHERE info_id = magazine_index.info_id AND pageno = 2) as content2 ,(SELECT content FROM magazine_cont_edit WHERE info_id = magazine_index.info_id AND pageno = 3) as content3 ,(SELECT content FROM magazine_cont_edit WHERE info_id = magazine_index.info_id AND pageno = 4) as content4 ,(SELECT content FROM magazine_cont_edit WHERE info_id = magazine_index.info_id AND pageno = 5) as content5 ,(SELECT content FROM magazine_cont_edit WHERE info_id = magazine_index.info_id AND pageno = 6) as content6 ,(SELECT content FROM magazine_cont_edit2 WHERE info_id = magazine_index.info_id) as medias FROM magazine_index WHERE service_stat>1 AND del_yn='n' -- AND gen_yy >= 2009 AND magazine = '$mtype' AND codnum4 != '' AND date_format(csetdate4, '%Y') >= 2013 ORDER BY codnum4 ASC LIMIT 0, 80 "); $t = count($aList); /* DHCDN */ echo '\r\n'; echo "\r\n"; echo "\r\n"; echo "".$mag[$mtype]["titles"]."\r\n"; echo " ".$mag[$mtype]["url"]."\r\n"; echo " ".$mag[$mtype]["titles"]." RSS FEED SERVICE\r\n"; echo " ".$aList[0][csetdate4rs]." +0900\r\n"; echo " ko\r\n"; echo " Copyright © Designhouse Inc. All rights reserved.\r\n"; echo " mihye.oh@design.co.kr\r\n"; echo " Designhouse CMS\r\n"; echo " ".$mag[$mtype]["rssurl"]."\r\n"; //echo " 10\r\n"; echo " \r\n"; echo " ".$mag[$mtype]["logo"]."\r\n"; echo " ".$mag[$mtype]["titles"]."\r\n"; echo " ".$mag[$mtype]["url"]."\r\n"; echo " \r\n"; // //http://media.daum.net/politics/?X=2&nil_profile=g&nil_Content=rss1 for ($i=0;$i<$t;$i++) { $aList[$i][magazine2] = $magazine[$aList[$i][magazine]]; /*$aList[$i][content1] = preg_replace('/]*>/i','',$aList[$i][content1]); $aList[$i][content2] = preg_replace('/]*>/i','',$aList[$i][content2]); $aList[$i][content3] = preg_replace('/]*>/i','',$aList[$i][content3]); $aList[$i][content4] = preg_replace('/]*>/i','',$aList[$i][content4]); $aList[$i][content5] = preg_replace('/]*>/i','',$aList[$i][content5]); $aList[$i][content6] = preg_replace('/]*>/i','',$aList[$i][content6]); */ // 기사링크 셋팅 if ($mtype == 'enfant') { $sArtcUrl = rtrim($mag[$mtype]["url"], '/') . "/magazine/type2view.php?num={$aList [$i]['info_id']}"; } else if ($mtype == 'design') { $sArtcUrl = rtrim($mag[$mtype]["url"], '/') . "/article/article_view/100/{$aList [$i]['info_id']}"; } else if ($mtype == 'happy') { $sArtcUrl = rtrim($mag[$mtype]["url"], '/') . "/magazine/magazine_view?info_id={$aList [$i]['info_id']}"; } else { $sArtcUrl = rtrim($mag[$mtype]["url"], '/') . "/in_magazine/sub.html?at=view&info_id={$aList [$i]['info_id']}&c_id={$aList[$i]['cate1']}"; } echo " \r\n <![CDATA[".htmlspecialchars( trim($aList[$i][maintitle]) )."]]>\r\n ".$sArtcUrl."\r\n ".$aList[$i][lead]."".($aList[$i][content1] ? $aList[$i][content1] : "").($aList[$i][content2] ? $aList[$i][content2] : "").($aList[$i][content3] ? $aList[$i][content3] : "").($aList[$i][content4] ? $aList[$i][content4] : "").($aList[$i][content5] ? $aList[$i][content5] : "").($aList[$i][content6] ? $aList[$i][content6] : "")."
".($aList[$i][newswriter] ? "기자/에디터 : ".$aList[$i][newswriter] : "").($aList[$i][editor] ? " / 사진 : ".$aList[$i][editor] : "")."
]]>
\r\n \r\n"; /**/ if ($aList[$i]["medias"]) { $tmpm = unserialize($aList[$i]["medias"]); //echo " \r\n"; $tt = count($tmpm); for ($j=0;$j<$tt;$j++) { echo " ".htmlspecialchars($tmpm[$j]["desc"])." "; } //echo " \r\n"; } //if /**/ echo"".$aList[$i][csetdate4rs]." +0900\r\n
\r\n"; } ?>