Beispiel #1
0
 }
 $body = Url2Path($body);
 //标签过滤
 $title = str_replace("{#", "", $title);
 $title = str_replace("#}", "", $title);
 $memo = str_replace("{#", "", $memo);
 $memo = str_replace("#}", "", $memo);
 $body = str_replace("{#", "{ #", $body);
 $body = str_replace("#}", "# }", $body);
 //?????
 if ($pic["size"] > 0) {
     $nowdate = date("Ymd", time());
     $picpath = "../pics/" . $nowdate;
     @mkdir($picpath, 0777);
     $uppath = "news/pics/" . $nowdate;
     $arr = NewUploadImage($pic["tmp_name"], $pic["type"], $pic["size"], $uppath);
     if ($arr[0] != "err") {
         $src = $arr[3];
     } else {
         echo $Meta . $arr[1];
         exit;
     }
 }
 //??????
 if ($file["size"] > 0) {
     $nowdate = date("Ymd", time());
     $picpath = "../upload/" . $nowdate;
     @mkdir($picpath, 0777);
     $uppath = "news/upload/" . $nowdate;
     $filearr = NewUploadFile($file["tmp_name"], $file["type"], $file["name"], $file["size"], $uppath);
     if ($filearr[0] != "err") {
Beispiel #2
0
    }
    if ($pic2["size"] > 0) {
        $msql->query("select src2 from {P}_advs_duilian where id='{$id}'");
        if ($msql->next_record()) {
            $src2 = $msql->f('src2');
        }
        $fname2 = ROOTPATH . $src2;
        if ($src2 != "" && strlen($src2) > 9 && file_exists($fname2)) {
            @unlink($fname2);
        }
        $nowdate = date("Ymd", time());
        $nowdate2 = $nowdate . "x";
        $pic2path = "../pics/" . $nowdate2;
        @mkdir($pic2path, 0777);
        $uppath2 = "advs/pics/" . $nowdate2;
        $arr2 = NewUploadImage($pic2["tmp_name"], $pic2["type"], $pic2["size"], $uppath2);
        $src2 = $arr2[3];
        $msql->query("update {P}_advs_duilian set src2 = '{$src2}' where id = '{$id}'");
    }
    $msql->query("update {P}_advs_duilian set\r\n\t\tgroupname = '{$groupname}',\r\n\t\turl2 = '{$url2}',\r\n\t\turl = '{$url}'\r\n\t\twhere id = '{$id}' \r\n\t\t");
    Sayok($strModifyOk, "advs_duilian.php", "");
}
//NEW ADVS
if ($id == "0" || $id == "") {
    $groupname = "";
    $url = "http://";
    $url2 = "http://";
    $src = "";
    $src2 = "";
    $nowstep = "add";
} else {