Esempio n. 1
0
function mail_org_string($vo)
{
    $count = 0;
    if (!empty($vo['sender_check']) && $count < 1) {
        $count++;
        if ($vo["sender_option"] == 1) {
            $str1 = "包含";
        } else {
            $str1 = "不包含";
        }
        $str2 = $vo['sender_key'];
        $str3 = get_folder_name($vo["to"]);
        $html = "发件人" . $str1 . " " . $str2 . " 则 : 移动到 " . $str3;
    }
    if (!empty($vo['domain_check']) && $count < 1) {
        $count++;
        if ($vo["domain_option"] == 1) {
            $str1 = "包含";
        } else {
            $str1 = "不包含";
        }
        $str2 = $vo['domain_key'];
        $str3 = get_folder_name($vo["to"]);
        $html = "发件域" . $str1 . " " . $str2 . " 则 : 移动到 " . $str3;
    }
    if (!empty($vo['recever_check']) && $count < 1) {
        $count++;
        if ($vo["recever_option"] == 1) {
            $str1 = "包含";
        } else {
            $str1 = "不包含";
        }
        $str2 = $vo['recever_key'];
        $str3 = get_folder_name($vo["to"]);
        $html = "收件人" . $str1 . " " . $str2 . " 则 : 移动到 " . $str3;
    }
    if (!empty($vo['title_check']) && $count < 1) {
        $count++;
        if ($vo["title_option"] == 1) {
            $str1 = "包含";
        } else {
            $str1 = "不包含";
        }
        $str2 = $vo['title_key'];
        $str3 = get_folder_name($vo["to"]);
        $html = "标题中" . $str1 . " " . $str2 . " 则 : 移动到 " . $str3;
    }
    if ($count > 1) {
        $html .= " 等";
    }
    return $html;
}
Esempio n. 2
0
 private function upload($current, $uploadFile)
 {
     // Checks whether the current file's containing folder exists, if not, it will create it.
     global $folder_name, $flag, $awesome_path;
     if (!is_dir($this->folder)) {
         mkdir($this->folder);
         if ($flag == 0) {
             $awesome_path = $this->folder;
         }
         $flag = 1;
         $folder_name = get_folder_name($awesome_path);
         //$file = fopen("../files/test.txt","a");
         //fwrite($file,$folder_name);
         //fclose($file);
     }
     // Moves current file to upload destination
     if (move_uploaded_file($current['tmp_name'], $uploadFile)) {
         return true;
     } else {
         return false;
     }
 }