Changeset 11406 for temp/branches/mobile/data
- Timestamp:
- 2007/02/02 23:44:36 (20 years ago)
- Location:
- temp/branches/mobile/data
- Files:
-
- 29 added
- 7 edited
-
Smarty/templates/mobile/cart (added)
-
Smarty/templates/mobile/cart/index.tpl (added)
-
Smarty/templates/mobile/contact (added)
-
Smarty/templates/mobile/contact/index.tpl (added)
-
Smarty/templates/mobile/forgot (added)
-
Smarty/templates/mobile/forgot/complete.tpl (added)
-
Smarty/templates/mobile/forgot/index.tpl (added)
-
Smarty/templates/mobile/forgot/secret.tpl (added)
-
Smarty/templates/mobile/guide (added)
-
Smarty/templates/mobile/guide/about.tpl (added)
-
Smarty/templates/mobile/guide/charge.tpl (added)
-
Smarty/templates/mobile/guide/index.tpl (added)
-
Smarty/templates/mobile/guide/kiyaku.tpl (added)
-
Smarty/templates/mobile/guide/privacy.tpl (added)
-
Smarty/templates/mobile/guide/usage.tpl (added)
-
Smarty/templates/mobile/guide/usage1.tpl (added)
-
Smarty/templates/mobile/guide/usage2.tpl (added)
-
Smarty/templates/mobile/guide/usage3.tpl (added)
-
Smarty/templates/mobile/guide/usage4.tpl (added)
-
Smarty/templates/mobile/products/category_list.tpl (modified) (2 diffs)
-
Smarty/templates/mobile/products/detail.tpl (modified) (1 diff)
-
Smarty/templates/mobile/products/list.tpl (modified) (2 diffs)
-
Smarty/templates/mobile/products/search.tpl (modified) (1 diff)
-
Smarty/templates/mobile/shopping (added)
-
Smarty/templates/mobile/shopping/index.tpl (added)
-
Smarty/templates/mobile/top.tpl (modified) (1 diff)
-
class/GC_MobileKaraMail.php (added)
-
conf/mobile.conf (modified) (1 diff)
-
include/mobile.inc (modified) (3 diffs)
-
module/Mail (added)
-
module/Mail/mime.php (added)
-
module/Mail/mimeDecode.php (added)
-
module/Mail/mimePart.php (added)
-
script (added)
-
script/receive_kara_mail.php (added)
-
script/send_kara_mail.php (added)
Legend:
- Unmodified
- Added
- Removed
-
temp/branches/mobile/data/Smarty/templates/mobile/products/category_list.tpl
r11398 r11406 10 10 <!--{/if}--> 11 11 <!--{if $i+1<9}--> 12 [emoji:<!--{$i+125}-->]<a href="<!--{$path}-->?category_id=<!--{$arrChild.category_id}-->" accesskey="<!--{$i+1}-->"><!--{$arrChild.category_name|escape}-->(<!--{$arrChild.product_count}-->)</a><br>12 <a href="<!--{$path}-->?category_id=<!--{$arrChild.category_id}-->" accesskey="<!--{$i+1}-->"><!--{$i+1|numeric_emoji}--><!--{$arrChild.category_name|escape}-->(<!--{$arrChild.product_count}-->)</a><br> 13 13 <!--{else}--> 14 14 [<!--{$i+1}-->]<a href="<!--{$path}-->?category_id=<!--{$arrChild.category_id}-->"><!--{$arrChild.category_name|escape}-->(<!--{$arrChild.product_count}-->)</a><br> … … 19 19 <hr> 20 20 21 < !--XXX--><a href="#" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br>22 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"> [emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br>21 <a href="<!--{$smarty.const.URL_CART_TOP}-->" accesskey="9"><!--{9|numeric_emoji}-->¤«¤´¤ò¸«¤ë</a><br> 22 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"><!--{0|numeric_emoji}-->TOP¥Ú¡¼¥¸¤Ø</a><br> 23 23 24 24 <br> 25 25 26 26 <!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é --> 27 < center>LOCKON CO.,LTD.</center>27 <!--{include file='footer.tpl'}--> 28 28 <!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç --> -
temp/branches/mobile/data/Smarty/templates/mobile/products/detail.tpl
r11398 r11406 65 65 66 66 <br> 67 <a href="<!--{$smarty.const.URL_CART_TOP}-->" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br> 68 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0">[emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br> 67 68 <a href="<!--{$smarty.const.URL_CART_TOP}-->" accesskey="9"><!--{9|numeric_emoji}-->¤«¤´¤ò¸«¤ë</a><br> 69 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"><!--{0|numeric_emoji}-->TOP¥Ú¡¼¥¸¤Ø</a><br> 69 70 70 71 <br> 71 72 72 73 <!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é --> 73 < center>LOCKON CO.,LTD.</center>74 <!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç --> <!--¢¥MAIN-->74 <!--{include file='footer.tpl'}--> 75 <!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç --> -
temp/branches/mobile/data/Smarty/templates/mobile/products/list.tpl
r11398 r11406 7 7 <!--{foreach from=$arrProducts key=i item=arrProduct}--> 8 8 <!-- ¢§¾¦ÉÊ ¤³¤³¤«¤é --> 9 <!--{if $i+1<9}--> [emoji:<!--{$i+125}-->]<!--{else}-->[<!--{$i+1}-->]<!--{/if}-->9 <!--{if $i+1<9}--><!--{$i+1|numeric_emoji}--><!--{else}-->[<!--{$i+1}-->]<!--{/if}--> 10 10 <!-- ¾¦ÉÊ̾ --><!--{$arrProduct.name|escape}--><br> 11 11 … … 32 32 <hr> 33 33 34 <!--XXX--><a href="#" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br> 35 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0">[emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br> 34 <a href="<!--{$smarty.const.URL_CART_TOP}-->" accesskey="9"><!--{9|numeric_emoji}-->¤«¤´¤ò¸«¤ë</a><br> 35 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"><!--{0|numeric_emoji}-->TOP¥Ú¡¼¥¸¤Ø</a><br> 36 36 37 <br> 37 38 38 39 <!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é --> 39 < center>LOCKON CO.,LTD.</center>40 <!--{include file='footer.tpl'}--> 40 41 <!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç --> -
temp/branches/mobile/data/Smarty/templates/mobile/products/search.tpl
r11398 r11406 15 15 <hr> 16 16 17 < !--XXX--><a href="#" accesskey="9">[emoji:133]¤«¤´¤ò¸«¤ë</a><br>18 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"> [emoji:134]TOP¥Ú¡¼¥¸¤Ø</a><br>17 <a href="<!--{$smarty.const.URL_CART_TOP}-->" accesskey="9"><!--{9|numeric_emoji}-->¤«¤´¤ò¸«¤ë</a><br> 18 <a href="<!--{$smarty.const.URL_SITE_TOP}-->" accesskey="0"><!--{0|numeric_emoji}-->TOP¥Ú¡¼¥¸¤Ø</a><br> 19 19 20 20 <br> 21 21 22 22 <!-- ¢§¥Õ¥Ã¥¿¡¼ ¤³¤³¤«¤é --> 23 < center>LOCKON CO.,LTD.</center>23 <!--{include file='footer.tpl'}--> 24 24 <!-- ¢¥¥Õ¥Ã¥¿¡¼ ¤³¤³¤Þ¤Ç --> -
temp/branches/mobile/data/Smarty/templates/mobile/top.tpl
r11398 r11406 25 25 <!--XXX--><a href="#" accesskey="3"><!--{3|numeric_emoji}-->¥á¥ë¥Þ¥¬ÅÐÏ¿</a><br> 26 26 <!--XXX--><a href="#" accesskey="4"><!--{4|numeric_emoji}-->²ñ°÷ÅÐÏ¿¡¦Âà²ñ</a><br> 27 < !--XXX--><a href="#" accesskey="5"><!--{5|numeric_emoji}-->¤´ÍøÍÑ¥¬¥¤¥É</a><br>28 <!--XXX--><a href=" #" accesskey="6"><!--{6|numeric_emoji}-->¤ªÌ䤤¹ç¤»</a><br>27 <a href="guide/index.php" accesskey="5"><!--{5|numeric_emoji}-->¤´ÍøÍÑ¥¬¥¤¥É</a><br> 28 <!--XXX--><a href="contact/index.php" accesskey="6"><!--{6|numeric_emoji}-->¤ªÌ䤤¹ç¤»</a><br> 29 29 <!-- ¢¥¥á¥Ë¥å¡¼ ¤³¤³¤Þ¤Ç --> 30 30 -
temp/branches/mobile/data/conf/mobile.conf
r11401 r11406 28 28 29 29 /** 30 * ¶õ¥á¡¼¥ëµ¡Ç½¤ò»ÈÍѤ¹¤ë¤«¤É¤¦¤« 31 */ 32 define('MOBILE_USE_KARA_MAIL', true); 33 34 /** 30 35 * ¶õ¥á¡¼¥ë¼õ¤±ÉÕ¤±¥¢¥É¥ì¥¹¤Î¥æ¡¼¥¶¡¼Ì¾Éôʬ 31 36 */ -
temp/branches/mobile/data/include/mobile.inc
r11398 r11406 3 3 * ¥â¥Ð¥¤¥ë¥µ¥¤¥È¶¦Í´Ø¿ô¥Õ¥¡¥¤¥ë 4 4 */ 5 6 require_once DATA_PATH . 'module/Net/URL.php'; 7 require_once DATA_PATH . 'class/SC_DbConn.php'; 8 require_once DATA_PATH . 'class/SC_Query.php'; 5 9 6 10 /** … … 132 136 if ($_SERVER['REQUEST_METHOD'] == 'GET') { 133 137 // GET ¤Î¾ì¹ç¤ÏƱ¤¸¥Ú¡¼¥¸¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ 134 require_once(DATA_PATH . 'module/Net/URL.php'); 135 $url = new Net_URL(); 136 $url->addQueryString(session_name(), session_id()); 137 header('Location: ' . $url->getURL()); 138 header('Location: ' . gfAddSessionId()); 138 139 } else { 139 140 // GET °Ê³°¤Î¾ì¹ç¤Ï¥È¥Ã¥×¥Ú¡¼¥¸¤Ø¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¡£ … … 197 198 lfMobileInitOutput(); 198 199 } 200 201 /** 202 * LocationÅù¤Ç¥»¥Ã¥·¥ç¥óID¤òÉղ乤ëɬÍפ¬¤¢¤ëURL¤Ë¥»¥Ã¥·¥ç¥óID¤òÉղ乤롣 203 * 204 * @return String 205 */ 206 function gfAddSessionId($url = null) { 207 $objURL = new Net_URL($url); 208 $objURL->addQueryString(session_name(), session_id()); 209 return $objURL->getURL(); 210 } 211 212 /** 213 * ¶õ¥á¡¼¥ëÍѤΥȡ¼¥¯¥ó¤òÀ¸À®¤¹¤ë¡£ 214 * 215 * @return string À¸À®¤·¤¿¥È¡¼¥¯¥ó¤òÊÖ¤¹¡£ 216 */ 217 function lfGenerateKaraMailToken() { 218 $token_chars = '0123456789abcdefghijklmnopqrstuvwxyz'; 219 $token_chars_length = strlen($token_chars); 220 $token_length = 10; 221 $token = ''; 222 223 while ($token_length > 0) { 224 $token .= $token_chars{mt_rand(0, $token_chars_length - 1)}; 225 --$token_length; 226 } 227 228 return $token; 229 } 230 231 /** 232 * ¶õ¥á¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë¤Ë¿·µ¬¥¨¥ó¥È¥ê¡¼¤òÅÐÏ¿¤·¡¢¥È¡¼¥¯¥ó¤òÊÖ¤¹¡£ 233 * 234 * @param string $next_url ¶õ¥á¡¼¥ë¼õ¤±ÉÕ¤±¸å¤ËÁ«°Ü¤µ¤»¤ë¥Ú¡¼¥¸ (¥â¥Ð¥¤¥ë¥µ¥¤¥È¥È¥Ã¥×¤«¤é¤ÎÁêÂÐURL) 235 * @param string $session_id ¥»¥Ã¥·¥ç¥óID (¾Êά¤·¤¿¾ì¹ç¤Ï¸½ºß¤Î¥»¥Ã¥·¥ç¥óID) 236 * @return string|false ¥È¡¼¥¯¥ó¤òÊÖ¤¹¡£¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ïfalse¤òÊÖ¤¹¡£ 237 */ 238 function gfPrepareKaraMail($next_url, $session_id = null) { 239 if (!isset($session_id)) { 240 $session_id = session_id(); 241 } 242 243 $objQuery = new SC_Query; 244 245 // GC 246 $time = date('Y-m-d H:i:s', time() - MOBILE_SESSION_LIFETIME); 247 $objQuery->delete('dtb_mobile_kara_mail', 'email IS NULL AND create_date < ?', array($time)); 248 249 $objQuery->delete('dtb_mobile_kara_mail', 'session_id = ?', array($session_id)); 250 251 $arrValues = array('session_id' => $session_id, 252 'next_url' => $next_url); 253 254 $try = 10; 255 256 while ($try > 0) { 257 $arrValues['token'] = $token = lfGenerateKaraMailToken(); 258 259 $objQuery->insert('dtb_mobile_kara_mail', $arrValues); 260 $count = $objQuery->count('dtb_mobile_kara_mail', 'token = ?', array($token)); 261 262 if ($count == 1) { 263 break; 264 } 265 266 $objQuery->delete('dtb_mobile_kara_mail', 'session_id = ?', array($session_id)); 267 $token = false; 268 --$try; 269 } 270 271 return $token; 272 } 273 274 /** 275 * ¶õ¥á¡¼¥ë¤«¤é¼èÆÀ¤·¤¿¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò¶õ¥á¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë¤ËÅÐÏ¿¤¹¤ë¡£ 276 * 277 * @param string $token ¥È¡¼¥¯¥ó 278 * @param string $email ¥á¡¼¥ë¥¢¥É¥ì¥¹ 279 * @return boolean À®¸ù¤·¤¿¾ì¹ç¤Ïtrue¡¢¼ºÇÔ¤·¤¿¾ì¹ç¤Ïfalse¤òÊÖ¤¹¡£ 280 */ 281 function gfRegisterKaraMail($token, $email) { 282 $objQuery = new SC_Query; 283 284 // GC 285 $time = date('Y-m-d H:i:s', time() - MOBILE_SESSION_LIFETIME); 286 $objQuery->delete('dtb_mobile_kara_mail', 287 '(email IS NULL AND create_date < ?) OR (email IS NOT NULL AND receive_date < ?)', 288 array($time, $time)); 289 290 $kara_mail_id = $objQuery->get('dtb_mobile_kara_mail', 'kara_mail_id', 'token = ?', array($token)); 291 if (!isset($kara_mail_id)) { 292 return false; 293 } 294 295 $arrValues = array('email' => $email); 296 $arrRawValues = array('receive_date' => 'now()'); 297 $objQuery->update('dtb_mobile_kara_mail', $arrValues, 'kara_mail_id = ?', array($kara_mail_id), $arrRawValues); 298 299 return true; 300 } 301 302 /** 303 * ¶õ¥á¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë¤«¤é¥È¡¼¥¯¥ó¤¬°ìÃפ¹¤ë¹Ô¤òºï½ü¤·¡¢ 304 * ¼¡¤ËÁ«°Ü¤µ¤»¤ë¥Ú¡¼¥¸¤ÎURL¤òÊÖ¤¹¡£¡¡ 305 * 306 * ¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ï $_SESSION['mobile']['kara_mail_from'] ¤ËÅÐÏ¿¤µ¤ì¤ë¡£ 307 * 308 * @param string $token ¥È¡¼¥¯¥ó 309 * @return string|false URL¤òÊÖ¤¹¡£¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ïfalse¤òÊÖ¤¹¡£ 310 */ 311 function gfFinishKaraMail($token) { 312 $objQuery = new SC_Query; 313 314 $arrRow = $objQuery->getrow('dtb_mobile_kara_mail', 'session_id, next_url, email', 315 'token = ? AND email IS NOT NULL AND receive_date >= ?', 316 array($token, date('Y-m-d H:i:s', time() - MOBILE_SESSION_LIFETIME))); 317 if (!isset($arrRow)) { 318 return false; 319 } 320 321 $objQuery->delete('dtb_mobile_kara_mail', 'token = ?', array($token)); 322 323 list($session_id, $next_url, $email) = $arrRow; 324 $objURL = new Net_URL(SITE_URL . $next_url); 325 $objURL->addQueryString(session_name(), $session_id); 326 $url = $objURL->getURL(); 327 328 session_id($session_id); 329 session_start(); 330 $_SESSION['mobile']['kara_mail_from'] = $email; 331 session_write_close(); 332 333 return $url; 334 } 199 335 ?>
Note: See TracChangeset
for help on using the changeset viewer.
