function category_list($message = "") { global $use_sections, $use_categories; pagetop(gTxt('categories'), $message); $out = array('<table cellspacing="20" align="center">', '<tr>', $use_categories ? tdtl(article_list(), ' class="categories"') : '', tdtl(link_list(), ' class="categories"'), tdtl(image_list(), ' class="categories"'), '</tr>', endTable()); echo join(n, $out); }
function article_delete() { $dID = ps('dID'); $rs = safe_delete("textpattern", "ID={$dID}"); if ($rs) { article_list(messenger('article', $dID, 'deleted'), 1); } }
echo "</ol>"; echo "<div class='group'>"; echo "<a href='#top' class='back-to-top'>back to top</a>"; echo "</div>"; } wp_reset_postdata(); $guide_query = new WP_Query("posts_per_page=-1&orderby=date&order=ASC&post_status=publish&post_type=alis_guides&alis_help_topics={$current_topic}"); if ($guide_query->have_posts()) { echo "<ol class='alis-list'>"; echo "<h2 class='bottom-border group'><span>Guides</span><span class='count'>(" . $guide_query->post_count . ")</span></h2>"; } while ($guide_query->have_posts()) { $guide_query->the_post(); ?> <?php article_list(null, 'alis_guides'); ?> <?php $totalCount++; } if ($guide_query->have_posts()) { echo "</ol>"; echo "<div class='group'>"; echo "<a href='#top' class='back-to-top'>back to top</a>"; echo "</div>"; } wp_reset_postdata(); } if ($totalCount < 1) { echo "<p class='no-results'>Sorry, there are no articles for this topic.</p>";
include 'inc-promotion.php'; ?> <article class="with-border"> <h1 class="faqs">Top 10 FAQs <a class="show-links" href="/all-faqs" title="Show all FAQs">+ Show all FAQs</a></h1> <ol class="alis-list"> <?php $count = 1; query_posts('posts_per_page=10&orderby=date&order=ASC&post_status=publish&post_type=alis_faqs'); while (have_posts()) { the_post(); ?> <?php article_list($count); ?> <?php $count++; } wp_reset_query(); ?> </ol> </article> <a href="#top" class="back-to-top">back to top</a> </section> </div> </section>
$doi .= "/"; } } article_json_doi($doi); } } } else { if ($parts[1] == "search") { $parts = explode("=", $parts[2]); $q = urldecode($parts[1]); search_lucene($q); } else { if ($parts[1] == "list") { $parts = explode("=", $parts[2]); $q = json_encode($parts[1]); article_list($q); /* $getdata = http_build_query(array("query" => $q,'action' => 'article_list')); $opts = array('http' =>array('method'=>'POST','header'=>'Content-type: application/x-www-form-urlencoded')); $context = stream_context_create($opts); $result = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/php/brainspell.php?'.$getdata, false, $context); echo $result; */ } else { if ($parts[1] == "about") { about(); } else { if ($parts[1] == "blog") { blog(); } else { if ($parts[1] == "download") {
user_logout(); break; case "article": article($_GET["PMID"]); break; case "article_json_pmid": article_json_pmid($_GET["PMID"]); break; case "article_json_doi": article_json_doi($_GET["PMID"]); break; case "search_lucene": search_lucene($_GET["query"]); break; case "article_list": article_list($_GET["query"]); break; case "index_lucene": index_lucene($_GET, 1); break; case "get_article": get_article($_GET); break; case "get_concept": get_concept($_GET); break; case "add_log": add_log($_GET); break; case "get_log": get_log($_GET);
function article_manage() { global $head_url, $header_config; $data = article_get_args(); $info = $data['info']; $args = $data['args']; $data = get_pick_info(); $info['public_class'] = unserialize($data['public_class']); $info['status'] = $args['status'] ? $args['status'] : intval($_GET['status']); $info['pid'] = $_GET['pid'] ? intval($_GET['pid']) : $args['pid']; //if(!VIP) unset($info['status_arr'][4]); foreach ($info['status_arr'] as $k => $v) { $info['a_c'][$k] = article_count($info['pid'], $k); } $info['oparea'] = $_GET['oparea']; $info['optype'] = $_GET['optype']; $args['pid'] = $info['pid']; $article_data = article_list($args); $info['pick'] = $data = get_pick_info(); if ($info['optype'] == 'move_portal') { $info['public_class'][0] = $_GET['portal']; } else { if ($info['optype'] == 'move_forums') { $info['public_class'][0] = $_GET['forums']; $info['public_class'][1] = $_GET['threadtypeid']; } else { if ($info['optype'] == 'move_blog') { $info['public_class'][0] = $_GET['blog']; } } } if ($_GET['time_public'] == 1) { $info['pick']['public_start_time'] = $info['pick']['public_end_time'] = ''; } $info['p'] = $_GET['p']; //判断是不是从采集器列表进来 $info['pick']['public_start_time'] = $_GET['public_start_time'] ? $_GET['public_start_time'] : $info['pick']['public_start_time']; $info['pick']['public_end_time'] = $_GET['public_end_time'] ? $_GET['public_end_time'] : $info['pick']['public_end_time']; $info['pick']['public_sort'] = $info['pick']['public_sort'] ? $info['pick']['public_sort'] : $_GET['public_sort']; $info['pick']['public_start_time'] = dgmdate($info['pick']['public_start_time']); $info['pick']['public_end_time'] = dgmdate($info['pick']['public_end_time']); $info['pick_select'] = pick_search_select('set[pid]', intval($info['pid'])); $info['article_move_pick_select'] = pick_search_select('move_pid', intval($_GET['move_pid']), $_GET['pid']); $info['rs'] = $article_data['rs']; $info['multipage'] = $article_data['multipage']; $info['count'] = $article_data['count']; if (!$info['p']) { $info['header'] = pick_header_output($header_config, $head_url); } $info['threadtypes'] = getthreadtypes(array('typeid' => $info['public_class'][1], 'fid' => $info['public_class'][0])); $info['forumselect'] = '<select id="forums" name="forums" onchange="getthreadtypes(this.value, 0)">' . forumselect(FALSE, 0, $info['public_class'][0], TRUE) . '</select>'; $info['forumselect_public'] = '<select id="public_forums" name="public_forums" >' . forumselect(FALSE, 0, $info['public_class'][0], TRUE) . '</select>'; $info['portalselect'] = category_showselect('portal', 'portal', FALSE, $info['public_class'][0]); $info['blogselect'] = category_showselect('blog', 'blog', TRUE, $info['public_class'][0]); $info['public_portalselect'] = category_showselect('portal', 'public_portal', FALSE, $info['public_class'][0]); $info['public_blogselect'] = category_showselect('blog', 'public_blog', TRUE, $info['public_class'][0]); $url_args = ''; unset($args['mpurl']); foreach ((array) $args as $k => $v) { if ($k == 'perpage' || $k == 'pid') { continue; } $url_args .= '&' . $k . '=' . $v; } $info['url_args'] = urlencode($url_args); return $info; }
<?php /* Generates the actual RSS feed from the database */ require 'lib.php'; $db = db_connect(); $feed = get_feed($db, $_GET['f']); $articles = article_list($db, $_GET['f']); header("Content-Type: application/rss+xml"); header("Content-Disposition: attachment; filename=\"{$feed['title']}.rss\""); echo '<?xml version="1.0" encoding="ISO-8859-1" ?>'; ?> <rss version="2.0"> <channel> <title><?php echo $feed['title']; ?> </title> <link><?php echo $feed['link']; ?> </link> <description><![CDATA[<?php echo $feed['description']; ?> ]]></description> <? if ($feed['category']!='') { ?> <category><?php echo $feed['category']; ?> </category> <? } if ($feed['copyright']!='') { ?>
function rm_feed($db, $id) { $id = sqlite_escape_string($id); $articles = article_list($db, $id); foreach ($articles as $a) { //Remove all articles from that feed rm_article($db, $a['id']); } $db->query("DELETE FROM feeds WHERE id='{$id}'"); return true; }
} } ?> </div> </article> </div> <div class="entry"> <section class="successful-case"> <h3><?php list_title('hui_successful_case', '成功案例'); ?> </h3> <ul> <?php article_list('hui_successful_case', 4, 134, 95, 95, 34); ?> </ul> </section> <section class="recommended-articles"> <h3>推荐阅读</h3> <ul> <?php if (function_exists('get_most_viewed')) { ?> <?php get_most_viewed('post', 9, 16); ?> <?php } else { ?>