Changeset 16737
- Timestamp:
- 2007/11/07 21:58:46 (15 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/Smarty/templates/default/admin/home.tpl
r16582 r16737 160 160 <table width="266" border="0" cellspacing="0" cellpadding="0" summary=" "> 161 161 <!--お知らせここから--> 162 <!--{ section name=i loop=$arrInfo}-->162 <!--{foreach item=info from=$arrInfo}--> 163 163 <tr><td height="15"></td></tr> 164 164 <tr> … … 168 168 </tr> 169 169 <tr> 170 <td background="<!--{$TPL_DIR}-->img/contents/infottl_day_left.jpg"><img src="<!--{$TPL_DIR}-->img/contents/infottl_day_left.jpg" width="12" height="10" alt="" border="0"></td> 171 <td background="<!--{$TPL_DIR}-->img/contents/infottl_bg01.jpg"><img src="<!--{$TPL_DIR}-->img/contents/icon.jpg" width="15" height="9" alt=""><span class="infodate"><!--{$arrInfo[i][0]}--></span></td> 172 <td background="<!--{$TPL_DIR}-->img/contents/infottl_day_right.jpg"><img src="<!--{$TPL_DIR}-->img/contents/infottl_day_right.jpg" width="5" height="10" alt="" border="0"></td> 170 <td background="<!--{$TPL_DIR}-->img/contents/infottl_day_left.jpg"> 171 <img src="<!--{$TPL_DIR}-->img/contents/infottl_day_left.jpg" width="12" height="10" alt="" border="0"> 172 </td> 173 <td background="<!--{$TPL_DIR}-->img/contents/infottl_bg01.jpg"> 174 <img src="<!--{$TPL_DIR}-->img/contents/icon.jpg" 175 width="15" 176 height="9" 177 alt=""> 178 <span class="infodate"><!--{$info.disp_date|sfDispDBDate:false|escape}--></span> 179 </td> 180 <td background="<!--{$TPL_DIR}-->img/contents/infottl_day_right.jpg"> 181 <img src="<!--{$TPL_DIR}-->img/contents/infottl_day_right.jpg" 182 width="5" 183 height="10" 184 alt="" 185 border="0"> 186 </td> 173 187 </tr> 174 188 <tr><td colspan="3"><img src="<!--{$TPL_DIR}-->img/contents/infottl_middle.jpg" width="266" height="8" alt="" border="0"></td></tr> 175 189 <tr> 176 190 <td background="<!--{$TPL_DIR}-->img/contents/infottl_bottom_left.jpg"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="12" height="1" alt=""></td> 177 <td background="<!--{$TPL_DIR}-->img/contents/infottl_bg02.jpg" class="infottl"><!--{$ arrInfo[i][1]}--></td>191 <td background="<!--{$TPL_DIR}-->img/contents/infottl_bg02.jpg" class="infottl"><!--{$info.title}--></td> 178 192 <td background="<!--{$TPL_DIR}-->img/contents/infottl_bottom_right.jpg"><img src="<!--{$TPL_DIR}-->img/common/_.gif" width="5" height="1" alt=""></td> 179 193 </tr> … … 181 195 <tr><td height="5"></td></tr> 182 196 <tr> 183 <td colspan="3" class="fs10"><span class="info"><!--{$ arrInfo[i][2]}--></span></td>184 </tr> 185 <!--{/ section}-->197 <td colspan="3" class="fs10"><span class="info"><!--{$info.body}--></span></td> 198 </tr> 199 <!--{/foreach}--> 186 200 <!--お知らせここまで--> 187 201 </table> -
branches/feature-module-update/data/class/pages/admin/LC_Page_Admin_Home.php
r16735 r16737 23 23 24 24 // {{{ requires 25 require_once(CLASS_PATH . "pages/LC_Page.php"); 25 require_once CLASS_PATH . "pages/LC_Page.php"; 26 require_once DATA_PATH . 'module/Services/JSON.php'; 27 require_once DATA_PATH . 'module/Request.php'; 26 28 27 29 /** … … 245 247 } 246 248 247 // お知らせ取得 249 /** 250 * リリース情報を取得する. 251 * 252 * @return unknown 253 */ 248 254 function lfGetInfo() { 249 // 更新情報を最新にする 250 $objQuery = new SC_Query(); 251 $path = UPDATE_HTTP . "info.txt"; 252 $fp = @fopen($path, "rb"); 253 254 $arrRet = array(); 255 if(!$fp) { 256 SC_Utils_Ex::sfErrorHeader(">> " . $path . "の取得に失敗しました。"); 257 } else { 258 while (!feof($fp)) { 259 $arrCSV = fgetcsv($fp, UPDATE_CSV_LINE_MAX); 260 $arrRet[] = $arrCSV; 261 } 262 fclose($fp); 263 } 264 265 // CHAR_CODE が EUC-JP 以外の場合は CHAR_CODE へ変換 266 if (CHAR_CODE == "EUC-JP") { 267 return $arrRet; 268 } else { 269 $newArrRet = array(); 270 foreach ($arrRet as $inKey => $inArr) { 271 $inVal = array(); 272 if(is_array($inArr)) { 273 foreach($inArr as $key => $val) { 274 275 $inVal[$key] = mb_convert_encoding($val, CHAR_CODE, "EUC-JP"); 276 } 277 $newArrRet[$inKey] = $inVal; 278 } 279 } 280 return $newArrRet; 281 } 255 $query = ''; 256 // TODO サイト情報の送信可否設定を行う 257 if (true) { 258 $query = '?site_url=' . SITE_URL . '&eccube_version=' . ECCUBE_VERSION; 259 } 260 261 $url = UPDATE_HTTP . $query; 262 $jsonStr = @file_get_contents($url); 263 264 $objJson = new Services_JSON; 265 $arrTmpData = is_string($jsonStr) ? $objJson->decode($jsonStr) : null; 266 267 if (empty($arrTmpData)) { 268 SC_Utils_Ex::sfErrorHeader(">> 更新情報の取得に失敗しました。"); 269 return array(); 270 } 271 272 $arrInfo = array(); 273 foreach ($arrTmpData as $objData) { 274 $arrInfo[] = get_object_vars($objData); 275 } 276 277 return $arrInfo; 282 278 } 283 279 } -
branches/feature-module-update/data/mtb_constants_init.php
r16725 r16737 45 45 define('MASTER_DATA_DIR', DATA_PATH . "cache/"); 46 46 /** アップデート管理用ファイル格納場所 */ 47 define('UPDATE_HTTP', "http:// www.lockon.co.jp/share/");47 define('UPDATE_HTTP', "http://sv01.ec-cube.net/info/index.php"); 48 48 /** アップデート管理用CSV1行辺りの最大文字数 */ 49 49 define('UPDATE_CSV_LINE_MAX', 4096); -
branches/feature-module-update/html/install/sql/insert_data.sql
r16712 r16737 767 767 INSERT INTO mtb_constants VALUES ('MAX_LIFETIME', '7200', 26, 'DBセッションの有効期限(秒)'); 768 768 INSERT INTO mtb_constants VALUES ('MASTER_DATA_DIR','DATA_PATH . "cache/"',27,'マスタデータキャッシュディレクトリ'); 769 INSERT INTO mtb_constants VALUES ('UPDATE_HTTP','"http:// www.lockon.co.jp/share/"',28,'アップデート管理用ファイル格納場所');769 INSERT INTO mtb_constants VALUES ('UPDATE_HTTP','"http://sv01.ec-cube.net/info/index.php"',28,'アップデート管理用ファイル格納場所'); 770 770 INSERT INTO mtb_constants VALUES ('UPDATE_CSV_LINE_MAX','4096',29,'アップデート管理用CSV1行辺りの最大文字数'); 771 771 INSERT INTO mtb_constants VALUES ('UPDATE_CSV_COL_MAX','13',30,'アップデート管理用CSVカラム数');
Note: See TracChangeset
for help on using the changeset viewer.