function getStatisticsSidebar($db) { $value = ""; $value .= "<h2>Statistics</h2>"; $value .= "<p>The Stacks project now consists of</p>"; $value .= "<ul>"; $value .= "<li>" . getLineCount($db, "total") . " lines of code"; $value .= "<li>" . getTagCount($db) . " tags (" . getInactiveTagCount($db) . " inactive tags)"; $value .= "<li>" . getSectionCount($db) . " sections"; $value .= "<li>" . getChapterCount($db) . " chapters"; $value .= "<li>" . getPageCount($db, "book") . " pages"; $value .= "<li>" . getActiveSloganCount($db) . " slogans"; // . " slogans (" . getSubmittedSloganCount($db) . " submitted)"; $value .= "</ul>"; return $value; }
public function getSidebar() { $value = ""; $value .= "<h2>Navigating chapters</h2>"; $value .= $this->printNavigation(false); $value .= "<h2>Downloads</h2>"; $value .= "<ul>"; $value .= "<li><a href='" . href("download/" . $this->chapter["filename"] . ".pdf") . "'><code>pdf</code> of this chapter</a>"; $value .= "<li><a href='https://github.com/stacks/stacks-project/blob/master/" . $this->chapter["filename"] . ".tex'><code>tex</code> file for this chapter</a>"; $value .= "</ul>"; $value .= "<h2>Permalink</h2>"; $value .= "<p>The number of chapters in the Stacks project is likely to change. So this URL is <em>not stable</em>.</p>"; $value .= "<p>To provide a truly stable link, use the <a href='" . href("tag/" . $this->chapter["tag"]) . "'>corresponding tag lookup page for tag " . $this->chapter["tag"] . "</a>. This identifier will never change.</p>"; $value .= "<p>When referring to this chapter of the Stacks project, it is better to say<blockquote>Tag " . $this->chapter["tag"] . "<br>Chapter " . $this->chapter["tag"] . "</blockquote> or refer to the full name of the chapter.</p>"; $value .= "<h2>Statistics</h2>"; $value .= "<ul>"; $value .= "<li>" . getLineCount($this->db, $this->chapter["filename"] . ".tex") . " lines of code</li>"; $value .= "<li>" . getTagsInFileCount($this->db, $this->chapter["filename"]) . " tags</li>"; $value .= "<li>" . (getSectionsInFileCount($this->db, $this->chapter["filename"]) - 1) . " sections</li>"; // -1 to take care of the phantom section $value .= "<li>" . getPageCount($this->db, $this->chapter["filename"]) . " pages</li>"; $value .= "</ul>"; return $value; }
} } } } } } } //查询sql if (!empty($dest_id)) { $sql = "select {$fields},a.litpic as litpic,b.isjian,b.isding,b.istejia from #@__line as a left join #@__kindorderlist b on(a.id=b.aid and b.typeid=1 and b.classid={$dest_id} ) {$where}{$orderby},modtime desc,addtime desc "; } else { $sql = "select {$fields},a.litpic as litpic,b.isjian,b.isding,b.istejia from #@__line as a left join #@__allorderlist b on(a.id=b.aid and b.typeid=1 ) {$where}{$orderby},modtime desc,addtime desc "; } $seoarr = array(); //seo信息数组 $temparr = getLineCount($wherecount); $destinfo = getDestInfo($typeid, $dest_id); //目的地优化信息; $searchtitle = getSearchTitle($destinfo, $day, $priceid, $attrid, $cityid); $newnavtitle = getNewNavTitle($day, $attrid, $destinfo['dest_name'], $cityid); $seoarr['totalline'] = $temparr[0]; $seoarr['totalvisit'] = $temparr[1]; //总访问次数 //当前页数->title里面使用 $seoarr['pageno'] = !empty($pageno) ? '第' . $pageno . '页-' : ""; //父级与当前级信息 //$seoarr['pkname'] = getCurkind($dest_id); $seoarr['pkname'] = get_par_value($dest_id, $typeid); $seoarr['dest_id'] = $destid; $seoarr['channelname'] = getTypeName($typeid); //是否存在下级目的地