Changeset 13349


Ignore:
Timestamp:
2007/05/23 19:56:37 (15 years ago)
Author:
naka
Message:
 
Location:
branches/dev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/include/mobile.inc

    r11813 r13349  
    397397 */ 
    398398function gfIsMobileMailAddress($address) { 
    399     $arrMobileMailDomains = array('docomo.ne.jp', 'ezweb.ne.jp', 'softbank.ne.jp', 'vodafone.ne.jp'); 
     399    $arrMobileMailDomains = array('docomo.ne.jp', 'ezweb.ne.jp', 'softbank.ne.jp', 'vodafone.ne.jp', 'pdx.ne.jp'); 
    400400 
    401401    if (defined('MOBILE_ADDITIONAL_MAIL_DOMAINS')) { 
  • branches/dev/html/test/naka/test.php

    r8 r13349  
    1 <html lang="ja"> 
    2 <head> 
    3 <meta http-equiv=Content-Type content="text/html; charset=EUC-JP"> 
    4 </head> 
     1<?php 
    52 
    6 <body> 
     3function gfIsMobileMailAddress($address) { 
     4    $arrMobileMailDomains = array('docomo.ne.jp', 'ezweb.ne.jp', 'softbank.ne.jp', 'vodafone.ne.jp', 'pdx.ne.jp'); 
    75 
    8 <table> 
    9 <form name="form1" action="test.php" method="POST"> 
    10 <tr> 
    11     <td>ʸ»ú¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤</td> 
    12     <td><input type="text" name="string"></td> 
    13     <td><input type="submit" value="Á÷¿®"></td> 
    14 </tr> 
    15 </form> 
    16 </table> 
     6    if (defined('MOBILE_ADDITIONAL_MAIL_DOMAINS')) { 
     7        $arrMobileMailDomains = array_merge($arrMobileMailDomains, split('[ ,]+', MOBILE_ADDITIONAL_MAIL_DOMAINS)); 
     8    } 
    179 
    18 <?php 
    19 require_once("../../require.php"); 
     10    foreach ($arrMobileMailDomains as $domain) { 
     11        $domain = str_replace('.', '\\.', $domain); 
     12        if (preg_match("/@([^@]+\\.)?$domain\$/", $address)) { 
     13            return true; 
     14        } 
     15    } 
    2016 
    21     if(isset($_POST['string'])) { 
    22         print("string is " . $_POST['string']); 
    23     } 
     17    return false; 
     18} 
     19 
     20 
     21print(gfIsMobileMailAddress('tatsuyadake-aisitel@dk.pdx.ne.jp')); 
     22 
    2423?> 
    25  
    26 </body> 
    27 </html> 
Note: See TracChangeset for help on using the changeset viewer.