Ignore:
Timestamp:
2013/05/02 18:11:36 (13 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

File:
1 edited

Legend:

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

    r22567 r22796  
    2323 
    2424/* アップロードファイル管理クラス */ 
    25 class SC_UploadFile  
    26 { 
     25class SC_UploadFile { 
    2726    var $temp_dir; 
    2827    var $save_dir; 
     
    5958 
    6059    // ファイル管理クラス 
    61     function __construct($temp_dir, $save_dir) 
    62     { 
     60    function __construct($temp_dir, $save_dir) { 
    6361        $this->temp_dir = rtrim($temp_dir, '/') . '/'; 
    6462        $this->save_dir = rtrim($save_dir, '/') . '/'; 
     
    6765 
    6866    // ファイル情報追加 
    69     function addFile($disp_name, $keyname, $arrExt, $size, $necessary=false, $width=0, $height=0, $image=true) 
    70     { 
     67    function addFile($disp_name, $keyname, $arrExt, $size, $necessary=false, $width=0, $height=0, $image=true) { 
    7168        $this->disp_name[] = $disp_name; 
    7269        $this->keyname[] = $keyname; 
     
    7976    } 
    8077    // サムネイル画像の作成 
    81     function makeThumb($src_file, $width, $height, $dst_file) 
    82     { 
     78    function makeThumb($src_file, $width, $height, $dst_file) { 
    8379        $objThumb = new gdthumb(); 
    8480        $ret = $objThumb->Main($src_file, $width, $height, $dst_file); 
     
    9490 
    9591    // アップロードされたファイルを保存する。 
    96     function makeTempFile($keyname, $rename = IMAGE_RENAME) 
    97     { 
     92    function makeTempFile($keyname, $rename = IMAGE_RENAME) { 
    9893        $objErr = new SC_CheckError_Ex(); 
    9994        $cnt = 0; 
     
    142137 
    143138    // アップロードされたダウンロードファイルを保存する。 
    144     function makeTempDownFile($keyname='down_file') 
    145     { 
     139    function makeTempDownFile($keyname='down_file') { 
    146140        $objErr = new SC_CheckError_Ex(); 
    147141        $cnt = 0; 
     
    174168 
    175169    // 画像を削除する。 
    176     function deleteFile($keyname) 
    177     { 
     170    function deleteFile($keyname) { 
    178171        $objImage = new SC_Image_Ex($this->temp_dir); 
    179172        $cnt = 0; 
     
    192185 
    193186    // 画像を削除する。 
    194     function deleteKikakuFile($keyname) 
    195     { 
     187    function deleteKikakuFile($keyname) { 
    196188        $objImage = new SC_Image_Ex($this->temp_dir); 
    197189        $cnt = 0; 
     
    210202 
    211203    // 一時ファイルパスを取得する。 
    212     function getTempFilePath($keyname) 
    213     { 
     204    function getTempFilePath($keyname) { 
    214205        $cnt = 0; 
    215206        $filepath = ''; 
     
    226217 
    227218    // 一時ファイルを保存ディレクトリに移す 
    228     function moveTempFile() 
    229     { 
     219    function moveTempFile() { 
    230220        $objImage = new SC_Image_Ex($this->temp_dir); 
    231221 
     
    248238 
    249239    // ダウンロード一時ファイルを保存ディレクトリに移す 
    250     function moveTempDownFile() 
    251     { 
     240    function moveTempDownFile() { 
    252241        $objImage = new SC_Image_Ex($this->temp_dir); 
    253242        for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 
     
    266255 
    267256    // HIDDEN用のファイル名配列を返す 
    268     function getHiddenFileList() 
    269     { 
     257    function getHiddenFileList() { 
    270258        $cnt = 0; 
    271259        $arrRet = array(); 
     
    283271 
    284272    // HIDDENで送られてきたファイル名を取得する 
    285     function setHiddenFileList($arrPOST) 
    286     { 
     273    function setHiddenFileList($arrPOST) { 
    287274        $cnt = 0; 
    288275        foreach ($this->keyname as $val) { 
     
    299286    } 
    300287 
    301     function setHiddenKikakuFileList($arrPOST) 
    302     { 
     288    function setHiddenKikakuFileList($arrPOST) { 
    303289        $cnt = 0; 
    304290        foreach ($this->keyname as $val) { 
     
    316302 
    317303    // フォームに渡す用のファイル情報配列を返す 
    318     function getFormFileList($temp_url, $save_url, $real_size = false) 
    319     { 
     304    function getFormFileList($temp_url, $save_url, $real_size = false) { 
    320305        $arrRet = array(); 
    321306        $cnt = 0; 
     
    356341 
    357342    // フォームに渡す用のダウンロードファイル情報を返す 
    358     function getFormDownFile() 
    359     { 
     343    function getFormDownFile() { 
    360344        $arrRet = ''; 
    361345        for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 
     
    368352        return $arrRet; 
    369353    } 
    370     function getFormKikakuDownFile() 
    371     { 
     354    function getFormKikakuDownFile() { 
    372355        $arrRet = array(); 
    373356        $cnt = 0; 
     
    384367 
    385368    // DB保存用のファイル名配列を返す 
    386     function getDBFileList() 
    387     { 
     369    function getDBFileList() { 
    388370        $cnt = 0; 
    389371        $dbFileList = array(); 
     
    400382 
    401383    // DBで保存されたファイル名配列をセットする 
    402     function setDBFileList($arrVal) 
    403     { 
     384    function setDBFileList($arrVal) { 
    404385        $cnt = 0; 
    405386        foreach ($this->keyname as $val) { 
     
    412393 
    413394    // DBで保存されたダウンロードファイル名をセットする 
    414     function setDBDownFile($arrVal) 
    415     { 
     395    function setDBDownFile($arrVal) { 
    416396        if (isset($arrVal['down_realfilename']) && $arrVal['down_realfilename'] != '') { 
    417397            $this->save_file[0] = $arrVal['down_realfilename']; 
     
    420400 
    421401    // DBで保存されたダウンロードファイル名をセットする(setDBDownFileと統合予定) 
    422     function setPostFileList($arrPost) 
    423     { 
     402    function setPostFileList($arrPost) { 
    424403        for ($cnt = 0;$cnt < count($this->keyname); $cnt++) { 
    425404            if (isset($arrPost['temp_down_realfilename:' . ($cnt+1)])) { 
     
    430409 
    431410    // 画像をセットする 
    432     function setDBImageList($arrVal) 
    433     { 
     411    function setDBImageList($arrVal) { 
    434412        $cnt = 0; 
    435413        foreach ($this->keyname as $val) { 
     
    442420 
    443421    // DB上のファイルの内削除要求があったファイルを削除する。 
    444     function deleteDBFile($arrVal) 
    445     { 
     422    function deleteDBFile($arrVal) { 
    446423        $objImage = new SC_Image_Ex($this->temp_dir); 
    447424        $cnt = 0; 
     
    457434 
    458435    // DB上のダウンロードファイルの内削除要求があったファイルを削除する。 
    459     function deleteDBDownFile($arrVal) 
    460     { 
     436    function deleteDBDownFile($arrVal) { 
    461437        $objImage = new SC_Image_Ex($this->temp_dir); 
    462438        $cnt = 0; 
     
    469445 
    470446    // 必須判定 
    471     function checkExists($keyname = '') 
    472     { 
     447    function checkExists($keyname = '') { 
    473448        $cnt = 0; 
    474449        $arrRet = array(); 
     
    492467 
    493468    // 拡大率を指定して画像保存 
    494     function saveResizeImage($keyname, $to_w, $to_h) 
    495     { 
     469    function saveResizeImage($keyname, $to_w, $to_h) { 
    496470        $path = ''; 
    497471 
     
    514488     * @return string 
    515489     */ 
    516     function lfGetTmpImageName($rename, $keyname = '', $uploadfile = '') 
    517     { 
     490    function lfGetTmpImageName($rename, $keyname = '', $uploadfile = '') { 
    518491 
    519492        if ($rename === true) { 
Note: See TracChangeset for help on using the changeset viewer.