aboutsummaryrefslogtreecommitdiff
path: root/mod/guidtool/index.php
blob: 0f1bcd223d4eac1720399aeb3cc44e01431f80a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
	/**
	 * Elgg GUID Tool
	 * 
	 * @package ElggGUIDTool
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Marcus Povey
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.com/
	 */

	require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");

	admin_gatekeeper();
	
	$title = elgg_echo("guidtool");
	$body = elgg_view_title($title);
	
	$context = get_context();
	set_context('search');
	
	$limit = get_input('limit', 10);
	$offset = get_input('offset');	
	
	// Get entities
	$entities = get_entities("","","","",$limit, $offset);
	$count = get_entities("","","","",$limit, $offset, true);
	
	$wrapped_entries = array();
	
	foreach ($entities as $e)
	{
		$tmp = new ElggObject();
		$tmp->subtype = 'guidtoolwrapper';
		$tmp->entity = $e;
		$wrapped_entries[] = $tmp;
	}
	
	$body .= elgg_view_entity_list($wrapped_entries, $count, $offset, $limit, false);
	
	set_context($context);
	
// Display main admin menu
	page_draw($title,elgg_view_layout("two_column_left_sidebar", '', $body));
?>