Ignore:
Timestamp:
2012/02/15 19:56:17 (12 years ago)
Author:
Seasoft
Message:

#1625 (typo修正・ソース整形・ソースコメントの改善)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/util/SC_Utils.php

    r21490 r21514  
    6868 
    6969        if (SC_Utils_Ex::sfIsHTTPS()) { 
    70             $proto = "https://"; 
    71         } else { 
    72             $proto = "http://"; 
     70            $proto = 'https://'; 
     71        } else { 
     72            $proto = 'http://'; 
    7373        } 
    7474        $host = $proto . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT']; 
     
    124124        $GLOBAL_ERR.= '<div id="errorHeader">'; 
    125125        $GLOBAL_ERR.= $mess; 
    126         $GLOBAL_ERR.= "</div>"; 
     126        $GLOBAL_ERR.= '</div>'; 
    127127        if ($print) { 
    128128            echo $GLOBAL_ERR; 
     
    144144 
    145145    /* サイトエラーページの表示 */ 
    146     function sfDispSiteError($type, $objSiteSess = "", $return_top = false, $err_msg = "") { 
     146    function sfDispSiteError($type, $objSiteSess = '', $return_top = false, $err_msg = '') { 
    147147 
    148148        require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_Ex.php'; 
     
    221221     */ 
    222222    function sfPassLen($passlen) { 
    223         $ret = ""; 
     223        $ret = ''; 
    224224        for ($i=0;$i<$passlen;true) { 
    225             $ret.="*"; 
     225            $ret.='*'; 
    226226            $i++; 
    227227        } 
     
    262262    /* DB用日付文字列取得 */ 
    263263    function sfGetTimestamp($year, $month, $day, $last = false) { 
    264         if ($year != "" && $month != "" && $day != "") { 
     264        if ($year != '' && $month != '' && $day != "") { 
    265265            if ($last) { 
    266                 $time = "23:59:59"; 
     266                $time = '23:59:59'; 
    267267            } else { 
    268                 $time = "00:00:00"; 
    269             } 
    270             $date = $year."-".$month."-".$day." ".$time; 
    271         } else { 
    272             $date = ""; 
     268                $time = '00:00:00'; 
     269            } 
     270            $date = $year.'-'.$month.'-'.$day." ".$time; 
     271        } else { 
     272            $date = ''; 
    273273        } 
    274274        return     $date; 
     
    303303    } 
    304304 
    305     function sfGetCSVData($data, $prefix = "") { 
    306         if ($prefix == "") { 
     305    function sfGetCSVData($data, $prefix = '') { 
     306        if ($prefix == '') { 
    307307            $dir_name = SC_Utils_Ex::sfUpDirName(); 
    308             $file_name = $dir_name . date('ymdHis') .".csv"; 
    309         } else { 
    310             $file_name = $prefix . date('ymdHis') .".csv"; 
     308            $file_name = $dir_name . date('ymdHis') .'.csv'; 
     309        } else { 
     310            $file_name = $prefix . date('ymdHis') .'.csv'; 
    311311        } 
    312312 
     
    322322    function sfUpDirName() { 
    323323        $path = $_SERVER['PHP_SELF']; 
    324         $arrVal = explode("/", $path); 
     324        $arrVal = explode('/', $path); 
    325325        $cnt = count($arrVal); 
    326326        return $arrVal[($cnt - 2)]; 
     
    332332     */ 
    333333    function sfMergeCBValue($keyname, $max) { 
    334         $conv = ""; 
     334        $conv = ''; 
    335335        $cnt = 1; 
    336336        for ($cnt = 1; $cnt <= $max; $cnt++) { 
     
    349349     */ 
    350350    function sfMergeCheckBoxes($array, $max) { 
    351         $ret = ""; 
     351        $ret = ''; 
    352352        if (is_array($array)) { 
    353353            foreach ($array as $val) { 
     
    373373        if (is_array($array)) { 
    374374            foreach ($array as $val) { 
    375                 if ($ret != "") { 
     375                if ($ret != '') { 
    376376                    $ret.= "-$val"; 
    377377                } else { 
     
    421421     */ 
    422422    function sfMergeCBSearchValue($keyname, $max) { 
    423         $conv = ""; 
     423        $conv = ''; 
    424424        $cnt = 1; 
    425425        for ($cnt = 1; $cnt <= $max; $cnt++) { 
     
    437437     * @deprecated 
    438438     */ 
    439     function sfSplitCBValue($val, $keyname = "") { 
     439    function sfSplitCBValue($val, $keyname = '') { 
    440440        $arr = array(); 
    441441        $len = strlen($val); 
    442442        $no = 1; 
    443443        for ($cnt = 0; $cnt < $len; $cnt++) { 
    444             if ($keyname != "") { 
     444            if ($keyname != '') { 
    445445                $arr[$keyname . $no] = substr($val, $cnt, 1); 
    446446            } else { 
     
    453453 
    454454    // キーと値をセットした配列を取得 
    455     function sfArrKeyValue($arrList, $keyname, $valname, $len_max = "", $keysize = "") { 
     455    function sfArrKeyValue($arrList, $keyname, $valname, $len_max = '', $keysize = '') { 
    456456        $arrRet = array(); 
    457457        $max = count($arrList); 
    458458 
    459         if ($len_max != "" && $max > $len_max) { 
     459        if ($len_max != '' && $max > $len_max) { 
    460460            $max = $len_max; 
    461461        } 
    462462 
    463463        for ($cnt = 0; $cnt < $max; $cnt++) { 
    464             if ($keysize != "") { 
     464            if ($keysize != '') { 
    465465                $key = SC_Utils_Ex::sfCutString($arrList[$cnt][$keyname], $keysize); 
    466466            } else { 
     
    478478 
    479479    // キーと値をセットした配列を取得(値が複数の場合) 
    480     function sfArrKeyValues($arrList, $keyname, $valname, $len_max = "", $keysize = "", $connect = "") { 
     480    function sfArrKeyValues($arrList, $keyname, $valname, $len_max = '', $keysize = '', $connect = "") { 
    481481 
    482482        $max = count($arrList); 
    483483 
    484         if ($len_max != "" && $max > $len_max) { 
     484        if ($len_max != '' && $max > $len_max) { 
    485485            $max = $len_max; 
    486486        } 
    487487 
    488488        for ($cnt = 0; $cnt < $max; $cnt++) { 
    489             if ($keysize != "") { 
     489            if ($keysize != '') { 
    490490                $key = SC_Utils_Ex::sfCutString($arrList[$cnt][$keyname], $keysize); 
    491491            } else { 
     
    494494            $val = $arrList[$cnt][$valname]; 
    495495 
    496             if ($connect != "") { 
     496            if ($connect != '') { 
    497497                $arrRet[$key].= "$val".$connect; 
    498498            } else { 
     
    506506    function sfGetCommaList($array, $space=true, $arrPop = array()) { 
    507507        if (count($array) > 0) { 
    508             $line = ""; 
     508            $line = ''; 
    509509            foreach ($array as $val) { 
    510510                if (!in_array($val, $arrPop)) { 
    511511                    if ($space) { 
    512                         $line .= $val . ", "; 
     512                        $line .= $val . ', '; 
    513513                    } else { 
    514                         $line .= $val . ","; 
     514                        $line .= $val . ','; 
    515515                    } 
    516516                } 
     
    530530    /* 配列の要素をCSVフォーマットで出力する。*/ 
    531531    function sfGetCSVList($array) { 
    532         $line = ""; 
     532        $line = ''; 
    533533        if (count($array) > 0) { 
    534534            foreach ($array as $key => $val) { 
     
    565565        } 
    566566        if (! $error) { 
    567             $date1 = $start_year ."/".sprintf("%02d",$start_month) ."/".sprintf("%02d",$start_day) ." 000000"; 
    568             $date2 = $end_year   ."/".sprintf("%02d",$end_month)   ."/".sprintf("%02d",$end_day)   ." 235959"; 
     567            $date1 = $start_year .'/'.sprintf('%02d',$start_month) ."/".sprintf("%02d",$start_day) ." 000000"; 
     568            $date2 = $end_year   .'/'.sprintf('%02d',$end_month)   ."/".sprintf("%02d",$end_day)   ." 235959"; 
    569569            if ($date1 > $date2) $error = 3; 
    570570        } else { 
     
    590590 
    591591    function sfGetErrorColor($val) { 
    592         if ($val != "") { 
    593             return "background-color:" . ERR_COLOR; 
    594         } 
    595         return ""; 
     592        if ($val != '') { 
     593            return 'background-color:' . ERR_COLOR; 
     594        } 
     595        return ''; 
    596596    } 
    597597 
     
    600600            return " disabled=\"disabled\""; 
    601601        } 
    602         return ""; 
     602        return ''; 
    603603    } 
    604604 
     
    607607            return "checked=\"checked\""; 
    608608        } 
    609         return ""; 
     609        return ''; 
    610610    } 
    611611 
     
    681681 
    682682    /* ポイント付与 */ 
    683     function sfPrePoint($price, $point_rate, $rule = POINT_RULE, $product_id = "") { 
     683    function sfPrePoint($price, $point_rate, $rule = POINT_RULE, $product_id = '') { 
    684684        $real_point = $point_rate / 100; 
    685685        $ret = $price * $real_point; 
     
    707707    /* 規格分類の件数取得 */ 
    708708    function sfGetClassCatCount() { 
    709         $sql = "select count(dtb_class.class_id) as count, dtb_class.class_id "; 
    710         $sql.= "from dtb_class inner join dtb_classcategory on dtb_class.class_id = dtb_classcategory.class_id "; 
    711         $sql.= "where dtb_class.del_flg = 0 AND dtb_classcategory.del_flg = 0 "; 
    712         $sql.= "group by dtb_class.class_id, dtb_class.name"; 
     709        $sql = 'select count(dtb_class.class_id) as count, dtb_class.class_id '; 
     710        $sql.= 'from dtb_class inner join dtb_classcategory on dtb_class.class_id = dtb_classcategory.class_id '; 
     711        $sql.= 'where dtb_class.del_flg = 0 AND dtb_classcategory.del_flg = 0 '; 
     712        $sql.= 'group by dtb_class.class_id, dtb_class.name'; 
    713713        $objQuery = new SC_Query_Ex(); 
    714714        $arrList = $objQuery->getAll($sql); 
     
    720720 
    721721    function sfGetProductClassId($product_id, $classcategory_id1, $classcategory_id2) { 
    722         $where = "product_id = ?"; 
     722        $where = 'product_id = ?'; 
    723723        $objQuery = new SC_Query_Ex(); 
    724724        $ret = $objQuery->get('product_class_id', 'dtb_products_class', $where, Array($product_id)); 
     
    734734    /* DBから取り出した日付の文字列を調整する。*/ 
    735735    function sfDispDBDate($dbdate, $time = true) { 
    736         list($y, $m, $d, $H, $M) = preg_split("/[- :]/", $dbdate); 
     736        list($y, $m, $d, $H, $M) = preg_split('/[- :]/', $dbdate); 
    737737 
    738738        if (strlen($y) > 0 && strlen($m) > 0 && strlen($d) > 0) { 
    739739            if ($time) { 
    740                 $str = sprintf("%04d/%02d/%02d %02d:%02d", $y, $m, $d, $H, $M); 
     740                $str = sprintf('%04d/%02d/%02d %02d:%02d', $y, $m, $d, $H, $M); 
    741741            } else { 
    742                 $str = sprintf("%04d/%02d/%02d", $y, $m, $d, $H, $M); 
    743             } 
    744         } else { 
    745             $str = ""; 
     742                $str = sprintf('%04d/%02d/%02d', $y, $m, $d, $H, $M); 
     743            } 
     744        } else { 
     745            $str = ''; 
    746746        } 
    747747        return $str; 
     
    816816 
    817817    /* 一意かつ予測されにくいID */ 
    818     function sfGetUniqRandomId($head = "") { 
     818    function sfGetUniqRandomId($head = '') { 
    819819        // 予測されないようにランダム文字列を付与する。 
    820820        $random = GC_Utils_Ex::gfMakePassword(8); 
     
    826826    // 二回以上繰り返されているスラッシュ[/]を一つに変換する。 
    827827    function sfRmDupSlash($istr) { 
    828         if (ereg("^http://", $istr)) { 
     828        if (ereg('^http://', $istr)) { 
    829829            $str = substr($istr, 7); 
    830             $head = "http://"; 
    831         } else if (ereg("^https://", $istr)) { 
     830            $head = 'http://'; 
     831        } else if (ereg('^https://', $istr)) { 
    832832            $str = substr($istr, 8); 
    833             $head = "https://"; 
     833            $head = 'https://'; 
    834834        } else { 
    835835            $str = $istr; 
    836836        } 
    837         $str = ereg_replace("[/]+", "/", $str); 
     837        $str = ereg_replace('[/]+', '/', $str); 
    838838        $ret = $head . $str; 
    839839        return $ret; 
     
    866866            $outpath = $out_dir . 'enc_' . $basename; 
    867867 
    868             $ofp = fopen($outpath, "w+"); 
     868            $ofp = fopen($outpath, 'w+'); 
    869869 
    870870            while (!feof($ifp)) { 
     
    927927 
    928928        if ($commadisp) { 
    929             $ret = $ret . "..."; 
     929            $ret = $ret . '...'; 
    930930        } 
    931931        return $ret; 
     
    971971 
    972972        // 日付の作成 
    973         $start_date = sprintf("%d/%d/%d 00:00:00", $start_year, $start_month, $start_day); 
    974         $end_date = sprintf("%d/%d/%d 23:59:59", $end_year, $end_month, $end_day); 
     973        $start_date = sprintf('%d/%d/%d 00:00:00', $start_year, $start_month, $start_day); 
     974        $end_date = sprintf('%d/%d/%d 23:59:59', $end_year, $end_month, $end_day); 
    975975 
    976976        return array($start_date, $end_date); 
     
    978978 
    979979    // 再帰的に多段配列を検索して一次元配列(Hidden引渡し用配列)に変換する。 
    980     function sfMakeHiddenArray($arrSrc, $arrDst = array(), $parent_key = "") { 
     980    function sfMakeHiddenArray($arrSrc, $arrDst = array(), $parent_key = '') { 
    981981        if (is_array($arrSrc)) { 
    982982            foreach ($arrSrc as $key => $val) { 
    983                 if ($parent_key != "") { 
    984                     $keyname = $parent_key . "[". $key . "]"; 
     983                if ($parent_key != '') { 
     984                    $keyname = $parent_key . '['. $key . ']'; 
    985985                } else { 
    986986                    $keyname = $key; 
     
    11081108 
    11091109    // ディレクトリ以下のファイルを再帰的にコピー 
    1110     function sfCopyDir($src, $des, $mess = "", $override = false) { 
     1110    function sfCopyDir($src, $des, $mess = '', $override = false) { 
    11111111        if (!is_dir($src)) { 
    11121112            return false; 
     
    11231123        } 
    11241124 
    1125         $fileArray=glob($src."*"); 
     1125        $fileArray=glob($src.'*'); 
    11261126        if (is_array($fileArray)) { 
    11271127            foreach ($fileArray as $key => $data_) { 
    11281128                // CVS管理ファイルはコピーしない 
    1129                 if (ereg("/CVS/Entries", $data_)) { 
     1129                if (ereg('/CVS/Entries', $data_)) { 
    11301130                    break; 
    11311131                } 
    1132                 if (ereg("/CVS/Repository", $data_)) { 
     1132                if (ereg('/CVS/Repository', $data_)) { 
    11331133                    break; 
    11341134                } 
    1135                 if (ereg("/CVS/Root", $data_)) { 
     1135                if (ereg('/CVS/Root', $data_)) { 
    11361136                    break; 
    11371137                } 
     
    11651165            // フォルダ内のファイルを削除 
    11661166            while ($file = readdir($dh)) { 
    1167                 if ($file == "." or $file == "..") continue; 
    1168                 $del_file = $dir . "/" . $file; 
     1167                if ($file == '.' or $file == '..') continue; 
     1168                $del_file = $dir . '/' . $file; 
    11691169                if (is_file($del_file)) { 
    1170                     $ret = unlink($dir . "/" . $file); 
     1170                    $ret = unlink($dir . '/' . $file); 
    11711171                }else if (is_dir($del_file)) { 
    11721172                    $ret = SC_Utils_Ex::sfDelFile($del_file); 
     
    11951195     * 説明 :ファイル書き出し 
    11961196     */ 
    1197     function sfWriteFile($str, $path, $type, $permission = "") { 
     1197    function sfWriteFile($str, $path, $type, $permission = '') { 
    11981198        //ファイルを開く 
    11991199        if (!($file = fopen ($path, $type))) { 
     
    12101210        fclose ($file); 
    12111211        // 権限を指定 
    1212         if ($permission != "") { 
     1212        if ($permission != '') { 
    12131213            chmod($path, $permission); 
    12141214        } 
     
    12511251                while (!feof($src_fp)) { 
    12521252                    $line = fgets($src_fp); 
    1253                     if (ereg("@version", $line)) { 
    1254                         $arrLine = explode(" ", $line); 
     1253                    if (ereg('@version', $line)) { 
     1254                        $arrLine = explode(' ', $line); 
    12551255                        $version = $arrLine[5]; 
    12561256                    } 
     
    12881288    function arrayDefineIndexes($array, $defineIndexes) { 
    12891289        foreach ($defineIndexes as $key) { 
    1290             if (!isset($array[$key])) $array[$key] = ""; 
     1290            if (!isset($array[$key])) $array[$key] = ''; 
    12911291        } 
    12921292        return $array; 
     
    13191319    function printXMLDeclaration() { 
    13201320        $ua = $_SERVER['HTTP_USER_AGENT']; 
    1321         if (!preg_match("/MSIE/", $ua) || preg_match("/MSIE 7/", $ua)) { 
     1321        if (!preg_match('/MSIE/', $ua) || preg_match('/MSIE 7/', $ua)) { 
    13221322            echo '<?xml version="1.0" encoding="' . CHAR_CODE . '"?>' . "\n"; 
    13231323        } 
     
    13431343                foreach ($arrDir as $file) { 
    13441344                    // ./ と ../を除くファイルのみを取得 
    1345                     if ($file != "." && $file != "..") { 
    1346  
    1347                         $path = $dir."/".$file; 
     1345                    if ($file != '.' && $file != '..') { 
     1346 
     1347                        $path = $dir.'/'.$file; 
    13481348                        // SELECT内の見た目を整えるため指定文字数で切る 
    13491349                        $file_name = SC_Utils_Ex::sfCutString($file, FILE_NAME_LEN); 
    13501350                        $file_size = SC_Utils_Ex::sfCutString(SC_Utils_Ex::sfGetDirSize($path), FILE_NAME_LEN); 
    1351                         $file_time = date("Y/m/d", filemtime($path)); 
     1351                        $file_time = date('Y/m/d', filemtime($path)); 
    13521352 
    13531353                        // ディレクトリとファイルで格納配列を変える 
     
    13891389                    // 行末の/を取り除く 
    13901390                    $dir = ereg_replace("/$", "", $dir); 
    1391                     $path = $dir."/".$file; 
     1391                    $path = $dir.'/'.$file; 
    13921392                    if ($file != '..' && $file != '.' && !is_dir($path)) { 
    13931393                        $bytes += filesize($path); 
     
    14031403        } 
    14041404        // ディレクトリ(ファイル)が存在しない場合は0byteを返す 
    1405         if($bytes == "") $bytes = 0; 
     1405        if($bytes == '') $bytes = 0; 
    14061406 
    14071407        return $bytes; 
     
    14601460                natcasesort($arrDir); 
    14611461                foreach ($arrDir as $item) { 
    1462                     if ($item != "." && $item != "..") { 
     1462                    if ($item != '.' && $item != '..') { 
    14631463                        // 文末の/を取り除く 
    14641464                        $dir = ereg_replace("/$", "", $dir); 
    1465                         $path = $dir."/".$item; 
     1465                        $path = $dir.'/'.$item; 
    14661466                        // ディレクトリのみ取得 
    14671467                        if (is_dir($path)) { 
     
    15031503                    // 行末の/を取り除く 
    15041504                    $dir = ereg_replace("/$", "", $dir); 
    1505                     $path = $dir."/".$file; 
     1505                    $path = $dir.'/'.$file; 
    15061506                    if ($file != '..' && $file != '.' && is_dir($path)) { 
    15071507                        return true; 
     
    15361536    function sfDownloadFile($file) { 
    15371537         // ファイルの場合はダウンロードさせる 
    1538         Header("Content-disposition: attachment; filename=".basename($file)); 
    1539         Header("Content-type: application/octet-stream; name=".basename($file)); 
    1540         Header("Cache-Control: "); 
    1541         Header("Pragma: "); 
     1538        Header('Content-disposition: attachment; filename='.basename($file)); 
     1539        Header('Content-type: application/octet-stream; name='.basename($file)); 
     1540        Header('Cache-Control: '); 
     1541        Header('Pragma: '); 
    15421542        echo (sfReadFile($file)); 
    15431543    } 
     
    15491549     * 説明 :ファイル作成 
    15501550     */ 
    1551     function sfCreateFile($file, $mode = "") { 
     1551    function sfCreateFile($file, $mode = '') { 
    15521552        // 行末の/を取り除く 
    1553         if ($mode != "") { 
     1553        if ($mode != '') { 
    15541554            $ret = @mkdir($file, $mode); 
    15551555        } else { 
     
    15661566     */ 
    15671567    function sfReadFile($filename) { 
    1568         $str = ""; 
     1568        $str = ''; 
    15691569        // バイナリモードでオープン 
    15701570        $fp = @fopen($filename, 'rb'); 
     
    15881588            if (is_array($arrayIndex) && 0 < count($arrayIndex)) { 
    15891589                for ($j = 0; $j < count($arrayIndex); $j++) { 
    1590                     if ($j > 0) $return .= ","; 
     1590                    if ($j > 0) $return .= ','; 
    15911591                    $return .= "\""; 
    1592                     $return .= mb_ereg_replace("<","<",mb_ereg_replace("\"","\"\"",$array[$i][$arrayIndex[$j]])) ."\""; 
     1592                    $return .= mb_ereg_replace('<','<',mb_ereg_replace("\"","\"\"",$array[$i][$arrayIndex[$j]])) ."\""; 
    15931593                } 
    15941594            } else { 
    15951595                for ($j = 0; $j < count($array[$i]); $j++) { 
    1596                     if ($j > 0) $return .= ","; 
     1596                    if ($j > 0) $return .= ','; 
    15971597                    $return .= "\""; 
    1598                     $return .= mb_ereg_replace("<","<",mb_ereg_replace("\"","\"\"",$array[$i][$j])) ."\""; 
     1598                    $return .= mb_ereg_replace('<','<',mb_ereg_replace("\"","\"\"",$array[$i][$j])) ."\""; 
    15991599                } 
    16001600            } 
     
    16101610     */ 
    16111611    function getTableTag($array) { 
    1612         $html = "<table>"; 
    1613         $html.= "<tr>"; 
     1612        $html = '<table>'; 
     1613        $html.= '<tr>'; 
    16141614        foreach ($array[0] as $key => $val) { 
    16151615            $html.="<th>$key</th>"; 
    16161616        } 
    1617         $html.= "</tr>"; 
     1617        $html.= '</tr>'; 
    16181618 
    16191619        $cnt = count($array); 
    16201620 
    16211621        for ($i = 0; $i < $cnt; $i++) { 
    1622             $html.= "<tr>"; 
     1622            $html.= '<tr>'; 
    16231623            foreach ($array[$i] as $val) { 
    16241624                $html.="<td>$val</td>"; 
    16251625            } 
    1626             $html.= "</tr>"; 
     1626            $html.= '</tr>'; 
    16271627        } 
    16281628        return $html; 
     
    16841684 
    16851685        if (SC_Utils_Ex::sfIsHTTPS()) { 
    1686             $url = "https://"; 
    1687         } else { 
    1688             $url = "http://"; 
     1686            $url = 'https://'; 
     1687        } else { 
     1688            $url = 'http://'; 
    16891689        } 
    16901690 
     
    17091709            } 
    17101710 
    1711             $string .= $backtrace['file'] . " " . $backtrace['line'] . ":" . $func . "\n"; 
     1711            $string .= $backtrace['file'] . ' ' . $backtrace['line'] . ":" . $func . "\n"; 
    17121712        } 
    17131713 
     
    17541754        // 郵便番号検索文作成 
    17551755        $zipcode = mb_convert_kana($zipcode ,'n'); 
    1756         $sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?"; 
     1756        $sqlse = 'SELECT state, city, town FROM mtb_zip WHERE zipcode = ?'; 
    17571757 
    17581758        $data_list = $objQuery->getAll($sqlse, array($zipcode)); 
     
    17671767        $town =  $data_list[0]['town']; 
    17681768        $town = ereg_replace("(.*)$","",$town); 
    1769         $town = ereg_replace("以下に掲載がない場合","",$town); 
     1769        $town = ereg_replace('以下に掲載がない場合','',$town); 
    17701770        $data_list[0]['town'] = $town; 
    17711771        $data_list[0]['state'] = $arrREV_PREF[$data_list[0]['state']]; 
     
    18761876        $microtime = microtime(true); 
    18771877        if (is_string($microtime)) { 
    1878             list($usec, $sec) = explode(" ", microtime()); 
     1878            list($usec, $sec) = explode(' ', microtime()); 
    18791879            return (float)$usec + (float)$sec; 
    18801880        } 
     
    18871887     * 引数 $val が空白かどうかをチェックする. 空白の場合は true. 
    18881888     * 以下の文字は空白と判断する. 
    1889      * - " " (ASCII 32 (0x20)), 通常の空白 
     1889     * - ' ' (ASCII 32 (0x20)), 通常の空白 
    18901890     * - "\t" (ASCII 9 (0x09)), タブ 
    18911891     * - "\n" (ASCII 10 (0x0A)), リターン 
     
    19001900     * 
    19011901     * @param mixed $val チェック対象の変数 
    1902      * @param boolean $greedy "貧欲"にチェックを行う場合 true 
     1902     * @param boolean $greedy '貧欲'にチェックを行う場合 true 
    19031903     * @return boolean $val が空白と判断された場合 true 
    19041904     */ 
     
    19271927 
    19281928        if ($greedy) { 
    1929             $val = preg_replace("/ /", "", $val); 
     1929            $val = preg_replace('/ /', '', $val); 
    19301930        } 
    19311931 
     
    19491949        $host = $netURL->host; 
    19501950        if (!$host) return false; 
    1951         $host = preg_quote($host, "#"); 
     1951        $host = preg_quote($host, '#'); 
    19521952        if (!preg_match("#^(http|https)://{$host}#i", $url)) return false; 
    19531953        return true; 
     
    19691969            $res = $str; 
    19701970        } else { 
    1971             $res = hash_hmac(PASSWORD_HASH_ALGOS, $str . ":" . AUTH_MAGIC, $salt); 
     1971            $res = hash_hmac(PASSWORD_HASH_ALGOS, $str . ':' . AUTH_MAGIC, $salt); 
    19721972        } 
    19731973        return $res; 
     
    19921992                if (empty($salt)) { 
    19931993                    // 旧バージョン(2.11未満)からの移行を考慮 
    1994                     $hash = sha1($pass . ":" . AUTH_MAGIC); 
     1994                    $hash = sha1($pass . ':' . AUTH_MAGIC); 
    19951995                } else { 
    19961996                    $hash = SC_Utils_Ex::sfGetHashString($pass, $salt); 
     
    21442144        // 対象が存在するかを検証. 
    21452145        if (file_exists($path) === false) { 
    2146             GC_Utils_Ex::gfPrintLog($path . " が存在しません."); 
     2146            GC_Utils_Ex::gfPrintLog($path . ' が存在しません.'); 
    21472147        } elseif (is_dir($path)) { 
    21482148            // ディレクトリが指定された場合 
    21492149            $handle = opendir($path); 
    21502150            if (!$handle) { 
    2151                 GC_Utils_Ex::gfPrintLog($path . " が開けませんでした."); 
     2151                GC_Utils_Ex::gfPrintLog($path . ' が開けませんでした.'); 
    21522152            } 
    21532153            while (($item = readdir($handle)) !== false) { 
     
    21642164            closedir($handle); 
    21652165            // ディレクトリを削除 
    2166             GC_Utils_Ex::gfPrintLog($path . " を削除します."); 
     2166            GC_Utils_Ex::gfPrintLog($path . ' を削除します.'); 
    21672167            if ($del_myself) { 
    21682168                $flg = @rmdir($path); 
     
    21702170        } else { 
    21712171            // ファイルが指定された場合. 
    2172             GC_Utils_Ex::gfPrintLog($path . " を削除します."); 
     2172            GC_Utils_Ex::gfPrintLog($path . ' を削除します.'); 
    21732173            $flg = @unlink($path); 
    21742174        } 
Note: See TracChangeset for help on using the changeset viewer.