<?php /** * @desc show_archives.php is DEPRECATED, use show_news.php instead * In news is [archid] field, copied by migration script */ require_once 'core/init.php'; // Check including & init check_direct_including('show_archives.php'); $_list_archives = db_get_archives(); if (isset($static) && $static) { $_archive = 0; } else { $_archive = REQ('archive'); } // Select if (!$_archive) { krsort($_list_archives); foreach ($_list_archives as $id => $info) { $count = intval($info['c']); if ($url = cn_rewrite('archive', $id)) { $arch_url = $url; } else { $arch_url = cn_url_modify('archive=' . $id); } echo "<a href=\"{$arch_url}\">" . date("d M Y", $info['min']) . " – " . date("d M Y", $info['max']) . " (<b>{$count}</b>)</a><br />"; } $_found_archives = count($_list_archives); unset($static, $id); } else { include 'show_news.php';
<?php require_once 'core/init.php'; // plugin tells us: he is fork, stop if (hook('fork_search', false)) { return; } // Check including check_direct_including('search.php'); // Variables by default list($template, $dosearch, $search, $user, $archives) = GET('template, dosearch, search, user, archives'); list($search_st, $number) = GET('search_st, number', 'GPG'); list($_fd, $_fm, $_fy) = GET('from_date_day, from_date_month, from_date_year'); list($_td, $_tm, $_ty) = GET('to_date_day, to_date_month, to_date_year'); // Default date range if ($_fm && $_fd && $_fy) { $date_from = mktime(0, 0, 0, intval($_fm), intval($_fd), intval($_fy)); } else { $date_from = ctime() - 3600 * 24 * 365 * 3; } if ($_tm && $_td && $_ty) { $date_to = mktime(0, 0, 0, intval($_tm), intval($_td), intval($_ty)); } else { $date_to = ctime() + 3600 * 24 * 365 * 3; } $search_st = intval($search_st); $number = intval($number); if (!$template) { $template = "Default"; } if (!$number) {
} require_once dirname(__FILE__) . '/core/init.php'; // Quick Redirect if (isset($_GET['cn_rewrite_url']) && $_GET['cn_rewrite_url']) { // Remove request string unset($_GET['cn_rewrite_url']); // Query include CN_REWRITE; die; } // plugin tells us: he is fork, stop if (hook('fork_news', false)) { return; } // Check including & init check_direct_including('show_news.php'); global $PHP_SELF; // Store GET $bGET = $_GET; // Get external control list($subaction, $category, $nocategory, $ucat, $id) = GET('subaction, category, nocategory, ucat, id', 'GPG'); // Sanitize variables $category = preg_replace('/\\s/', '', $category); $ucat = preg_replace('/\\s/', '', $ucat); cn_extrn_init(); hook('show_news/social_init'); // Decoding requested categories list($requested_cats, $is_in_category) = cn_get_requested_cats($category, $ucat, $nocategory); // Allowed modules $allow_add_comment = false; $allow_full_story = false;