Ignore:
Timestamp:
2012/02/06 21:27:04 (12 years ago)
Author:
Seasoft
Message:

#1613 (ソース整形・ソースコメントの改善)

  • 無意味なスペースを削除
File:
1 edited

Legend:

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

    r21442 r21444  
    8686     * @return void 
    8787     */ 
    88     function EXIST_CHECK( $value ) { 
     88    function EXIST_CHECK( $value) { 
    8989        if (isset($this->arrErr[$value[1]])) { 
    9090            return; 
     
    105105     * @return void 
    106106     */ 
    107     function EXIST_CHECK_REVERSE( $value ) { 
     107    function EXIST_CHECK_REVERSE( $value) { 
    108108        if (isset($this->arrErr[$value[0]])) { 
    109109            return; 
     
    122122     * @return void 
    123123     */ 
    124     function SPTAB_CHECK( $value ) { 
     124    function SPTAB_CHECK( $value) { 
    125125        if (isset($this->arrErr[$value[1]])) { 
    126126            return; 
     
    139139     * @return void 
    140140     */ 
    141     function NO_SPTAB( $value ) { 
     141    function NO_SPTAB( $value) { 
    142142        if (isset($this->arrErr[$value[1]])) { 
    143143            return; 
     
    167167     * @return void 
    168168     */ 
    169     function SELECT_CHECK( $value ) { 
     169    function SELECT_CHECK( $value) { 
    170170        if (isset($this->arrErr[$value[1]])) { 
    171171            return; 
     
    184184     * @return void 
    185185     */ 
    186     function EQUAL_CHECK( $value ) { 
     186    function EQUAL_CHECK( $value) { 
    187187        if (isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[3]])) { 
    188188            return; 
     
    202202     * @return void 
    203203     */ 
    204     function DIFFERENT_CHECK( $value ) { 
     204    function DIFFERENT_CHECK( $value) { 
    205205        if (isset($this->arrErr[$value[2]]) || isset($this->arrErr[$value[3]])) { 
    206206            return; 
     
    238238     * @return void 
    239239     */ 
    240     function MAX_LENGTH_CHECK( $value ) { 
     240    function MAX_LENGTH_CHECK( $value) { 
    241241        if (isset($this->arrErr[$value[1]])) { 
    242242            return; 
     
    256256     * @return void 
    257257     */ 
    258     function MIN_LENGTH_CHECK( $value ) { 
     258    function MIN_LENGTH_CHECK( $value) { 
    259259        if (isset($this->arrErr[$value[1]])) { 
    260260            return; 
     
    274274     * @return void 
    275275     */ 
    276     function MAX_CHECK( $value ) { 
     276    function MAX_CHECK( $value) { 
    277277        if (isset($this->arrErr[$value[1]])) { 
    278278            return; 
     
    292292     * @return void 
    293293     */ 
    294     function MIN_CHECK( $value ) { 
     294    function MIN_CHECK( $value) { 
    295295        if (isset($this->arrErr[$value[1]])) { 
    296296            return; 
     
    309309     * @return void 
    310310     */ 
    311     function NUM_CHECK( $value ) { 
     311    function NUM_CHECK( $value) { 
    312312        if (isset($this->arrErr[$value[1]])) { 
    313313            return; 
     
    326326     * @return void 
    327327     */ 
    328     function NUM_POINT_CHECK( $value ) { 
     328    function NUM_POINT_CHECK( $value) { 
    329329        if (isset($this->arrErr[$value[1]])) { 
    330330            return; 
     
    520520    // 入力文字がカナ以外ならエラーを返す 
    521521    // value[0] = 項目名 value[1] = 判定対象文字列 
    522     function KANA_CHECK( $value ) { 
     522    function KANA_CHECK( $value) { 
    523523        if (isset($this->arrErr[$value[1]])) { 
    524524            return; 
     
    533533    // 入力文字がカナ以外ならエラーを返す 
    534534    // value[0] = 項目名 value[1] = 判定対象文字列 
    535     function KANABLANK_CHECK( $value ) { 
     535    function KANABLANK_CHECK( $value) { 
    536536        if (isset($this->arrErr[$value[1]])) { 
    537537            return; 
     
    546546    // 入力文字が英数字以外ならエラーを返す 
    547547    // value[0] = 項目名 value[1] = 判定対象文字列 
    548     function ALNUM_CHECK( $value ) { 
     548    function ALNUM_CHECK( $value) { 
    549549        if (isset($this->arrErr[$value[1]])) { 
    550550            return; 
     
    559559    // 入力文字が英数記号以外ならエラーを返す 
    560560    // value[0] = 項目名 value[1] = 判定対象文字列 
    561     function GRAPH_CHECK( $value ) { 
    562         if (isset($this->arrErr[$value[1]])) { 
    563             return; 
    564         } 
    565         $this->createParam($value); 
    566         if (strlen($this->arrParam[$value[1]]) > 0 && !preg_match("/^[[:graph:]|[:space:]]+$/i", $this->arrParam[$value[1]] )) { 
     561    function GRAPH_CHECK( $value) { 
     562        if (isset($this->arrErr[$value[1]])) { 
     563            return; 
     564        } 
     565        $this->createParam($value); 
     566        if (strlen($this->arrParam[$value[1]]) > 0 && !preg_match("/^[[:graph:]|[:space:]]+$/i", $this->arrParam[$value[1]])) { 
    567567            $this->arrErr[$value[1]] = "※ " . $value[0] . "は英数記号で入力してください。<br />"; 
    568568        } 
     
    572572    // 入力値で0が許されない場合エラーを返す 
    573573    // value[0] = 項目名 value[1] = 判定対象 
    574     function ZERO_CHECK( $value ) { 
     574    function ZERO_CHECK( $value) { 
    575575        $this->createParam($value); 
    576576        if ($this->arrParam[$value[1]] == "0") { 
     
    582582    // 入力文字の桁数判定 → 最小桁数<入力文字列<最大桁数 
    583583    // value[0] = 項目名 value[1] = 判定対象文字列 value[2] = 最小桁数 value[3] = 最大桁数 
    584     function NUM_RANGE_CHECK( $value ) { 
     584    function NUM_RANGE_CHECK( $value) { 
    585585        if (isset($this->arrErr[$value[1]])) { 
    586586            return; 
     
    589589        // $this->arrParam[$value[0]] = mb_convert_kana($this->arrParam[$value[0]], 'n'); 
    590590        $count = strlen($this->arrParam[$value[1]]); 
    591         if (( $count > 0 ) && $value[2] > $count || $value[3] < $count) { 
     591        if (( $count > 0) && $value[2] > $count || $value[3] < $count) { 
    592592            $this->arrErr[$value[1]] =  "※ $value[0]は$value[2]桁~$value[3]桁で入力して下さい。<br />"; 
    593593        } 
     
    597597    // 入力文字の桁数判定 → 入力文字列 = 桁数 以外はNGの場合 
    598598    // value[0] = 項目名 value[1] = 判定対象文字列 value[2] = 桁数 
    599     function NUM_COUNT_CHECK( $value ) { 
     599    function NUM_COUNT_CHECK( $value) { 
    600600        if (isset($this->arrErr[$value[1]])) { 
    601601            return; 
     
    616616     * @return void 
    617617     */ 
    618     function EMAIL_CHECK( $value ){ 
     618    function EMAIL_CHECK( $value){ 
    619619        if (isset($this->arrErr[$value[1]])) { 
    620620            return; 
     
    666666    // メールアドレスに使用する文字を正規表現で判定する 
    667667    //  value[0] = 項目名 value[1] = 判定対象メールアドレス 
    668     function EMAIL_CHAR_CHECK( $value ){ 
     668    function EMAIL_CHAR_CHECK( $value){ 
    669669        if (isset($this->arrErr[$value[1]])) { 
    670670            return; 
     
    679679    // URLを正規表現で判定する。デフォルトでhttp://があってもOK 
    680680    //  value[0] = 項目名 value[1] = 判定対象URL 
    681     function URL_CHECK( $value ){ 
     681    function URL_CHECK( $value){ 
    682682         if (isset($this->arrErr[$value[1]])) { 
    683683            return; 
    684684        } 
    685          if (strlen($this->arrParam[$value[1]]) > 0 && !preg_match("@^https?://+($|[a-zA-Z0-9_~=:&\?\.\/-])+$@i", $this->arrParam[$value[1]] )) { 
     685         if (strlen($this->arrParam[$value[1]]) > 0 && !preg_match("@^https?://+($|[a-zA-Z0-9_~=:&\?\.\/-])+$@i", $this->arrParam[$value[1]])) { 
    686686            $this->arrErr[$value[1]] = "※ " . $value[0] . "を正しく入力してください。<br />"; 
    687687        } 
     
    690690    /* IPアドレスの判定 */ 
    691691    //  value[0] = 項目名 value[1] = 判定対象IPアドレス文字列 
    692     function IP_CHECK( $value ){ 
     692    function IP_CHECK( $value){ 
    693693        if (isset($this->arrErr[$value[1]])) { 
    694694            return; 
     
    713713    // 受け取りがない場合エラーを返す 
    714714    // value[0] = 項目名 value[1] = 判定対象 value[2]=array(拡張子) 
    715     function FILE_EXT_CHECK( $value ) { 
     715    function FILE_EXT_CHECK( $value) { 
    716716        if (isset($this->arrErr[$value[1]]) || count($value[2]) == 0) { 
    717717            return; 
     
    737737                    $ext = preg_replace("/.$/", "" ,$ext); 
    738738                } else { 
    739                     $ext = $array_ext[ count ( $array_ext ) - 1 ]; 
     739                    $ext = $array_ext[ count ( $array_ext) - 1 ]; 
    740740                } 
    741741 
     
    761761    // 受け取りがない場合エラーを返す 
    762762    // value[0] = 項目名 value[1] = 判定対象  value[2] = 指定ディレクトリ 
    763     function FIND_FILE( $value ) { 
     763    function FIND_FILE( $value) { 
    764764        if (isset($this->arrErr[$value[1]])) { 
    765765            return; 
     
    784784    // 受け取りがない場合エラーを返す 
    785785    // value[0] = 項目名 value[1] = 判定対象  value[2] = 指定サイズ(KB) 
    786     function FILE_EXIST_CHECK( $value ) { 
     786    function FILE_EXIST_CHECK( $value) { 
    787787        if (isset($this->arrErr[$value[1]])) { 
    788788            return; 
     
    797797    // 受け取りがない場合エラーを返す 
    798798    // value[0] = 項目名 value[1] = 判定対象  value[2] = 指定サイズ(KB) 
    799     function FILE_SIZE_CHECK( $value ) { 
     799    function FILE_SIZE_CHECK( $value) { 
    800800        if (isset($this->arrErr[$value[1]])) { 
    801801            return; 
     
    815815    // 入力文字が英数字,"_","-"以外ならエラーを返す 
    816816    // value[0] = 項目名 value[1] = 判定対象文字列 
    817     function FILE_NAME_CHECK( $value ) { 
     817    function FILE_NAME_CHECK( $value) { 
    818818        if (isset($this->arrErr[$value[1]])) { 
    819819            return; 
     
    828828    // 入力文字が英数字,"_","-"以外ならエラーを返す 
    829829    // value[0] = 項目名 value[1] = 判定対象文字列 
    830     function FILE_NAME_CHECK_BY_NOUPLOAD( $value ) { 
     830    function FILE_NAME_CHECK_BY_NOUPLOAD( $value) { 
    831831        if (isset($this->arrErr[$value[1]])) { 
    832832            return; 
     
    874874        if ($this->arrParam[$value[1]] > 0 || $this->arrParam[$value[2]] > 0 || $this->arrParam[$value[3]] > 0 || $this->arrParam[$value[4]] >= 0 || $this->arrParam[$value[5]] >= 0) { 
    875875            // 年月日時のどれかが入力されていない。 
    876             if (!(strlen($this->arrParam[$value[1]]) > 0 && strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]]) > 0 && strlen($this->arrParam[$value[5]]) > 0 )) { 
     876            if (!(strlen($this->arrParam[$value[1]]) > 0 && strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]]) > 0 && strlen($this->arrParam[$value[5]]) > 0)) { 
    877877                $this->arrErr[$value[1]] = "※ " . $value[0] . "はすべての項目を入力して下さい。<br />"; 
    878878            } else if (! checkdate($this->arrParam[$value[2]], $this->arrParam[$value[3]], $this->arrParam[$value[1]])) { 
     
    942942    /*          1.開始年月日 (YYYYMMDD 000000) 
    943943    /*          2.終了年月日 (YYYYMMDD 235959) 
    944     /*          3.エラー ( 0 = OK, 1 = NG ) 
     944    /*          3.エラー ( 0 = OK, 1 = NG) 
    945945    /*-----------------------------------------------------------------*/ 
    946946    // value[0] = 項目名1 
     
    960960        $this->createParam($value); 
    961961        $error = 0; 
    962         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]] ) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) { 
     962        if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) { 
    963963            $this->arrErr[$value[2]] = "※ " . $value[0] . "を正しく指定してください。<br />"; 
    964964        } 
    965         if ((strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]] ) > 0) && ! checkdate($this->arrParam[$value[6]], $this->arrParam[$value[7]], $this->arrParam[$value[5]])) { 
     965        if ((strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]]) > 0) && ! checkdate($this->arrParam[$value[6]], $this->arrParam[$value[7]], $this->arrParam[$value[5]])) { 
    966966            $this->arrErr[$value[5]] = "※ " . $value[1] . "を正しく指定してください。<br />"; 
    967967        } 
    968         if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]] ) > 0) &&  (strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]] ) > 0)) { 
     968        if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]] ) > 0) &&  (strlen($this->arrParam[$value[5]]) > 0 || strlen($this->arrParam[$value[6]]) > 0 || strlen($this->arrParam[$value[7]]) > 0)) { 
    969969 
    970970            $date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]) .sprintf("%02d",$this->arrParam[$value[4]]) ."000000"; 
     
    985985    /*          1.開始年月日 (YYYYMMDDHHmmss) 
    986986    /*          2.終了年月日 (YYYYMMDDHHmmss) 
    987     /*          3.エラー ( 0 = OK, 1 = NG ) 
     987    /*          3.エラー ( 0 = OK, 1 = NG) 
    988988    /*-----------------------------------------------------------------*/ 
    989989    // value[0] = 項目名1 
     
    10111011        $this->createParam($value); 
    10121012        $error = 0; 
    1013         if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]] ) > 0 || strlen($this->arrParam[$value[5]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) { 
     1013        if ((strlen($this->arrParam[$value[2]]) > 0 || strlen($this->arrParam[$value[3]]) > 0 || strlen($this->arrParam[$value[4]]) > 0 || strlen($this->arrParam[$value[5]]) > 0) && ! checkdate($this->arrParam[$value[3]], $this->arrParam[$value[4]], $this->arrParam[$value[2]])) { 
    10141014            $this->arrErr[$value[2]] = "※ " . $value[0] . "を正しく指定してください。<br />"; 
    10151015        } 
    1016         if ((strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]] ) > 0 || strlen($this->arrParam[$value[11]] ) > 0) && ! checkdate($this->arrParam[$value[9]], $this->arrParam[$value[10]], $this->arrParam[$value[8]])) { 
     1016        if ((strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]] ) > 0 || strlen($this->arrParam[$value[11]]) > 0) && ! checkdate($this->arrParam[$value[9]], $this->arrParam[$value[10]], $this->arrParam[$value[8]])) { 
    10171017            $this->arrErr[$value[8]] = "※ " . $value[1] . "を正しく指定してください。<br />"; 
    10181018        } 
    1019         if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]] ) > 0 && strlen($this->arrParam[$value[5]] ) > 0) &&  (strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]] ) > 0 || strlen($this->arrParam[$value[11]] ) > 0)) { 
     1019        if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && strlen($this->arrParam[$value[4]] ) > 0 && strlen($this->arrParam[$value[5]] ) > 0) &&  (strlen($this->arrParam[$value[8]]) > 0 || strlen($this->arrParam[$value[9]]) > 0 || strlen($this->arrParam[$value[10]] ) > 0 || strlen($this->arrParam[$value[11]]) > 0)) { 
    10201020 
    10211021            $date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]) .sprintf("%02d",$this->arrParam[$value[4]]) .sprintf("%02d",$this->arrParam[$value[5]]).sprintf("%02d",$this->arrParam[$value[6]]).sprintf("%02d",$this->arrParam[$value[7]]); 
     
    10391039    /*          1.開始年月日 (YYYYMMDD 000000) 
    10401040    /*          2.終了年月日 (YYYYMMDD 235959) 
    1041     /*          3.エラー ( 0 = OK, 1 = NG ) 
     1041    /*          3.エラー ( 0 = OK, 1 = NG) 
    10421042    /*-----------------------------------------------------------------*/ 
    10431043    // value[0] = 項目名1 
     
    10611061            $this->arrErr[$value[4]] = "※ " . $value[1] . "を正しく指定してください。<br />"; 
    10621062        } 
    1063         if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && (strlen($this->arrParam[$value[4]]) > 0 || strlen($this->arrParam[$value[5]]) > 0 ))) { 
     1063        if ((strlen($this->arrParam[$value[2]]) > 0 && strlen($this->arrParam[$value[3]]) > 0 && (strlen($this->arrParam[$value[4]]) > 0 || strlen($this->arrParam[$value[5]]) > 0))) { 
    10641064 
    10651065            $date1 = $this->arrParam[$value[2]] .sprintf("%02d", $this->arrParam[$value[3]]); 
     
    10961096    // メールアドレスを正規表現で判定する 
    10971097    // value[0] = 項目名 value[1] = 判定対象メールアドレス 
    1098     function MOBILE_EMAIL_CHECK( $value ){ 
     1098    function MOBILE_EMAIL_CHECK( $value){ 
    10991099        if (isset($this->arrErr[$value[1]])) { 
    11001100            return; 
     
    11411141     * @example $objErr->doFunc(array('URL', 'contents', $arrReviewDenyURL), array("PROHIBITED_STR_CHECK")); 
    11421142     */ 
    1143     function PROHIBITED_STR_CHECK( $value ) { 
     1143    function PROHIBITED_STR_CHECK( $value) { 
    11441144        if (isset($this->arrErr[$value[1]]) || empty($this->arrParam[$value[1]])) { 
    11451145            return; 
Note: See TracChangeset for help on using the changeset viewer.