示例#1
0
<?php

header("Content-Type:text/html;charset=UTF-8");
include "../../../system.php";
include "../../system.php";
include "../../../gd.php";
include "../../../function/new_function.php";
include "pic_unit.php";
//System-----------------------------------------------------------
$now_table = $pro_pic_table;
//System-----------------------------------------------------------
$sam = new guard();
$unit = new pic();
$img = new img_uploader();
//Images UPLOAD------------------------------------------------------------
$error = "";
$msg = "";
$fileElementName = 'picsUpload';
if (!empty($_FILES[$fileElementName]['error'])) {
    switch ($_FILES[$fileElementName]['error']) {
        case '1':
            $error = '超過主機系統設定上傳檔案大小。';
            break;
        case '2':
            $error = '超過表單設定上傳檔案大小';
            break;
        case '3':
            $error = '上傳失敗,檔案僅部分上傳。';
            break;
        case '4':
            $error = '上傳失敗,無檔案上傳。';
示例#2
0
 static function check_code()
 {
     $check_code = substr(md5(rand()), -4);
     return pic::code($check_code);
 }
示例#3
0
<?php

include "../../../system.php";
include "../../system.php";
include "pic_unit.php";
//System-----------------------------------------------------------
$now_table = $pro_pic_table;
//System-----------------------------------------------------------
$unit = new pic();
$id = $_POST['id'];
$unit->table = $now_table;
$unit->id = $id;
$unit->get_db_var();
$unit->del();
@unlink("../" . $unit->pic);
@unlink("../" . $unit->s_pic);
//刪除圖檔