예제 #1
0
 $categorycount = count($categorylist);
 if (!$ids) {
     $ids = 1;
 }
 if ($ids <= $categorycount) {
     $curpage = $_GET['page'];
     if ($curpage < 1) {
         $curpage = 1;
     }
     $alltrue = $all == "true" ? "all=true&" : '';
     $htmlmsg = "共 {$categorycount} 分类,正在生成第 {$ids} 个, 第 {$curpage} 页...";
     $category = $categorylist[$ids - 1];
     $source = getcategorysource($category, $curpage);
     $total = $source['totalpage'];
     $urlparam = array('name' => $category->filename, 'type' => 'category', 'generatehtml' => 1, 'page' => $curpage);
     $fileurl = formaturl($urlparam);
     $cachedata->WriteFileCache(YIQIROOT . '/' . $fileurl . 'index.html', $source['source'], true);
     if ($total > $curpage) {
         $curpage = $curpage + 1;
         $nextlink = "?" . $alltrue . "gt=category&ids=" . $ids . "&page=" . $curpage;
         redirect("" . $nextlink);
     } else {
         $nextlink = "?" . $alltrue . "gt=category&ids=" . ($ids + 1);
         redirect("" . $nextlink);
     }
 } elseif ($all == "true") {
     redirect("?all=true&gt=maps");
 } else {
     $htmlmsg = "生成HTML完成.";
 }
 break;
예제 #2
0
    $site_map_container->add_item($site_map_item);
}
//列出文章
for ($i = 0; $i < count($articlelist); $i++) {
    $value = $articlelist[$i];
    $locobj = array("type" => "article", "name" => "{$value->filename}", "siteurl" => "{$siteurl}");
    $loc = formaturl($locobj);
    $site_map_item = new google_sitemap_item($loc, date("c"), 'monthly', "0.5");
    $site_map_container->add_item($site_map_item);
}
//列出产品分类
for ($i = 0; $i < count($productcategory); $i++) {
    $value = $productcategory[$i];
    $locobj = array("type" => "category", "name" => "{$value->filename}", "siteurl" => "{$siteurl}");
    $loc = formaturl($locobj);
    $site_map_item = new google_sitemap_item($loc, date("c"), 'weekly', "0.8");
    $site_map_container->add_item($site_map_item);
}
//列出文章分类
for ($i = 0; $i < count($articlecategory); $i++) {
    $value = $articlecategory[$i];
    $locobj = array("type" => "category", "name" => "{$value->filename}", "siteurl" => "{$siteurl}");
    $loc = formaturl($locobj);
    $site_map_item = new google_sitemap_item($loc, date("c"), 'weekly', "0.8");
    $site_map_container->add_item($site_map_item);
}
//列出首页
$site_map_item = new google_sitemap_item("{$siteurl}", date("c"), 'always', "1.0");
$site_map_container->add_item($site_map_item);
header("Content-type: application/xml; charset=\"" . $site_map_container->charset . "\"", true);
print $site_map_container->build();
예제 #3
0
 /**
  \brief Allianzinfos
 
  Zeigt Informationen zu einer Allianz an
 */
 function Ally_details()
 {
     #check rights
     if (!$this->_checkUserRights(array("addally", "editally", "deleteally"))) {
         #no permission
         $this->_header("", "no permission");
     }
     $id = param_num("id");
     if (!$id) {
         $this->_header("", "Fehlende allyid!");
     }
     $ally = getAlly($id);
     if (!$ally) {
         $this->_header("", "Ungültige allyid!");
     }
     $ally[id] = $id;
     if ($ally['url']) {
         $ally['url'] = formaturl($ally['url']);
     }
     #can edit
     if ($this->userdata['rights']['editally']['rank'] == 1 || $this->userdata['rights']['editally']['rank'] == 2 && $this->userdata['aid'] == $ally['aid']) {
         $this->template->assign("editlink", "admin.php?action=editally&id={$id}");
     }
     #can delete
     if ($this->userdata['rights']['deleteally']['rank'] == 1 || $this->userdata['rights']['deleteally']['rank'] == 2 && $this->userdata['aid'] == $ally['aid']) {
         $this->template->assign("deletelink", "admin.php?action=deleteally&id={$id}");
     }
     $this->template->assign("ally", $ally);
     $this->show('ally_details', "Allianzdetails");
 }
예제 #4
0
    ?>
"></span>
			      	<span class="top"></span>
			      	<span class="middle">
			      	  <span class="nickname"><a href="<?php 
    echo http($url);
    ?>
" alt="<?php 
    echo $nickname;
    ?>
"><?php 
    echo $nickname;
    ?>
</a></span>
			      	  <span class="content"><?php 
    echo formaturl(nl2br($content));
    ?>
</span>
			      	</span>
			      	<span class="bottom" id="<?php 
    echo $entry->id;
    ?>
">
			      		<span class="info">
			      		  <span class="time"><a href="index.php?page=view&id=<?php 
    echo $entry->id;
    ?>
" target=""><?php 
    echo time_past($entry->time);
    ?>
</a></span>