set_smarty( SMARTY_TEMPLATE_DIR , SMARTY_COMPILE_DIR , SMARTY_CONFIG_DIR , SMARTY_DEBUG ); // イニシャライズ $koe->initialize(); // DBの開始 $koe->start_db( DB_HOST_ADDRESS , DB_PORT , DB_ID , DB_PASS , DB_NAME , DB_ENCODING ); // RSS items list: $example_list = array(); // オフセット設定 $start = 0; $end = LIST_MAX; // 詳細ページアドレス $a_url = explode(',' , DETAIL_PAGE_ADDRESS ); $a_cid = explode(',' , C_ID ); for ( $i = 0 ; $i < count( $a_cid ) ; $i++ ) { if( isset( $a_url[$i] ) != FALSE ) { $a_detail[$a_cid[$i]] = $a_url[$i]; $temp = $a_detail[$a_cid[$i]]; } else { $a_detail[$a_cid[$i]] = $temp; } } // ドキュメントデータを取得 $result = $koe->My_GetDocumentData( C_ID , $start , $end , $d_data); if ( $result == false ) exit(); $d_data = $koe->replace_extend( """ , "\"" , $d_data ); $d_data = $koe->replace_extend( "\\\\" , "¥" , $d_data ); // エンコード $d_data = $koe->mb_convert_encoding_extend($d_data , 'eucjp-win' , 'UTF-8' ); //$d_data = My_htmlentities_extend($d_data,'UTF-8'); // データを生成 for( $i=0 ; $i "【" . $kind . "】" . str_replace('¥','¥',$d_data[$i]['title']), 'url' => SITE_ADDRESS . $a_detail[$d_data[$i]['c_id']] . '?d=' . $d_data[$i]['d_id'] , 'desc' => str_replace('¥','¥',$d_data[$i]['explanation']), 'date' => strtotime( $d_data[$i]['release_date'] ), ); } // create new RSS object: $rss = new rss74(); /* ** Set RSS informations: */ // RSS title: $rss->title = RSS_TITLE; // RSS description: $rss->desc = RSS_DEC; // base URL of your homepage: $rss->base_url = SITE_ADDRESS; // limit entry $rss->limit_entries = LIST_MAX; // language: $rss->language = 'ja-JP'; // Add entries to the RSS object: while (list($date, $entry) = each($example_list)){ $rss->add_entry(array( 'title' => $entry['title'], 'url' => $entry['url'], 'desc' => $entry['desc'], 'date' => $entry['date'] )); } // let rss74 do the rest: $rss->print_rss(); ?>