aboutsummaryrefslogtreecommitdiff
path: root/mod/guidtool/index.php
blob: bbf27016ad9dafc9f7d0cc1f7f16d532614598ef (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 Curverider Ltd
	 * @copyright Curverider Ltd 2008-2009
	 * @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));
?>