function getAllXxx($type)
{
    $arr = array();
    foreach ($GLOBALS['URI'][$type] as $uri) {
        $dir = Url2Path($uri);
        for ($d = opendir($dir); $e = readdir($d);) {
            if ($e == "." || $e == ".." || $e[0] == "!" || !@is_dir($dir . '/' . $e)) {
                continue;
            }
            $data = extractTitle("{$uri}/{$e}");
            if ($data) {
                $arr[] = $data;
            }
        }
    }
    usort($arr, create_function('$a, $b', '{ return strcasecmp(@$a[order]?@$a[order]:"zzzzzz", @$b[order]?@$b[order]:"zzzzzz"); }'));
    return $arr;
}
Esempio n. 2
0
File: post.php Progetto: noikiy/cxe
     exit;
 }
 if (strlen($title) > 200) {
     echo $Meta . $strNewsNotice7;
     exit;
 }
 if (strlen($body) > 65000) {
     echo $Meta . $strNewsNotice5;
     exit;
 }
 $dtime = time();
 $msql->query("select catpath from {P}_news_cat where catid='{$catid}'");
 if ($msql->next_record()) {
     $catpath = $msql->f('catpath');
 }
 $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") {