tiki-directory_ranking.php 1.34 KB
Newer Older
1
<?php
changi67's avatar
changi67 committed
2 3 4
/**
 * @package tikiwiki
 */
5
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
6
// 
7 8
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
9
// $Id$
changi67's avatar
changi67 committed
10

11
$section = 'directory';
12 13
require_once ('tiki-setup.php');
include_once ('lib/directory/dirlib.php');
14 15
$access->check_feature('feature_directory');
$access->check_permission('tiki_p_view_directory');
16
if (isset($_REQUEST['maxRecords'])) {
17
	$maxRecords = $_REQUEST['maxRecords'];
18
}
19 20
// Listing: sites
// Pagination resolution
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
if (!isset($_REQUEST["sort_mode"])) {
	$sort_mode = 'created_desc';
} else {
	$sort_mode = $_REQUEST["sort_mode"];
}
if (!isset($_REQUEST["offset"])) {
	$offset = 0;
} else {
	$offset = $_REQUEST["offset"];
}
if (isset($_REQUEST["find"])) {
	$find = $_REQUEST["find"];
} else {
	$find = '';
}
$smarty->assign_by_ref('offset', $offset);
$smarty->assign_by_ref('sort_mode', $sort_mode);
$smarty->assign('find', $find);
$items = $dirlib->dir_list_all_valid_sites($offset, $maxRecords, $sort_mode, $find);
$smarty->assign_by_ref('items', $items["data"]);
41
$smarty->assign_by_ref('cant', $items["cant"]);
42
include_once ('tiki-section_options.php');
43
ask_ticket('dir-ranking');
44
$smarty->assign('mid', 'tiki-directory_ranking.tpl');
45
$smarty->display("tiki.tpl");