示例#1
0
function get_content_end($urlTipi, $turu = "content")
{
    if ($turu == "content") {
        $con = "<h1>" . get_info("categories", $urlTipi, "Category") . "</h1>\n";
        $con .= get_category_content($urlTipi) . "\n";
    } else {
        $con = "<h1>" . get_info("contents", $urlTipi, "Title") . "</h1>\n";
        $con .= get_content($urlTipi) . "\n";
    }
    return $con;
}
         $item->attribute('isvisible', 'true');
         $itemtitle =& $item->createChild('title');
         $itemtitle->text($owncat->name);
         // get everything inside this category:
         $mainNotEmpty = get_category_content($item, $resources, $owncat->id, $owncat->name, $exportdir, 'data/', $identifier, $ridentifier, $viewid);
         $innerowncats = get_records_select("block_exabeporcate", "userid={$USER->id} AND pid='{$owncat->id}'", "name ASC");
         if ($innerowncats) {
             foreach ($innerowncats as $innerowncat) {
                 unset($subitem);
                 $i++;
                 $subitem =& $parsedDoc->createElement('item');
                 $subitem->attribute('identifier', sprintf('B%04d', $i));
                 $subitem->attribute('isvisible', 'true');
                 $subitemtitle =& $subitem->createChild('title');
                 $subitemtitle->text($innerowncat->name);
                 $subNotEmpty = get_category_content($subitem, $resources, $innerowncat->id, $innerowncat->name, $exportdir, 'data/', $identifier, $ridentifier, $viewid);
                 if ($subNotEmpty) {
                     // if the subcategory is not empty:
                     //	-> append it to the maincategory
                     //  -> set the main category as not empty
                     $item->appendChild($subitem);
                     $mainNotEmpty = true;
                 }
             }
         }
         if ($mainNotEmpty) {
             // if the main category is not empty, append it to the xml-file
             $organization->appendChild($item);
         }
     }
 }
示例#3
0
文件: seo.php 项目: nolines/TinyCms
        continue;
    }
    if (in_array($l, $siteUrl_req)) {
        continue;
    }
    $seo_url[$i] = $l;
    $i++;
}
$seo_url_son = explode(".", $seo_url[1]);
if ($seo_url[0] == "style.css") {
    header('Content-type: text/css');
    echo file_get_contents($siteUrl . "css/style.php");
    exit;
}
$_GET["type"] = $seo_url[0];
$_GET["id"] = $seo_url_son[0];
if (trim($_GET["id"]) != "") {
    if (trim($_GET["type"]) == "category") {
        if (trim(get_category_content($_GET["id"])) == "") {
            $_GET["id"] = "404";
            $_GET["type"] = "content";
        }
    } else {
        if (trim(get_content($_GET["id"])) == "") {
            $_GET["id"] = "404";
            $_GET["type"] = "content";
        }
    }
}
$contenID = trim($_GET["id"]) == "" ? "homepage" : $_GET["id"];
$contentType = trim($_GET["type"]) == "" ? "content" : $_GET["type"];