tiki-register_site.php 1.15 KB
Newer Older
1
<?php
changi67's avatar
changi67 committed
2 3 4 5
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
// 
// 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.
6

changi67's avatar
changi67 committed
7
require_once ('tiki-setup.php');
8
if ($tiki_p_admin != 'y') {
9
	$smarty->assign('errortype', 401);
10 11 12 13
	$smarty->assign('msg', tra("You do not have permission to use this feature"));
	$smarty->display("error.tpl");
	die;
}
changi67's avatar
changi67 committed
14
include_once ('lib/directory/dirlib.php');
15 16 17 18
$tmp1 = isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : "";
$tmp2 = isset($_SERVER["PHP_SELF"]) ? $_SERVER["PHP_SELF"] : "";
// concat all, remove the // between server and path and then
// remove the name of the script itself:
changi67's avatar
changi67 committed
19
$url = $tmp1 . dirname($tmp2);
20
$info = Array();
21
$info["name"] = $prefs['browsertitle'];
22 23 24 25
$info["description"] = '';
$info["url"] = $url;
$info["country"] = 'None';
$info["isValid"] = 'n';
changi67's avatar
changi67 committed
26
$smarty->assign_by_ref('info', $info);
27
$countries = $tikilib->get_flags();
changi67's avatar
changi67 committed
28
$smarty->assign_by_ref('countries', $countries);
29
// Display the template
changi67's avatar
changi67 committed
30
$smarty->assign('mid', 'tiki-register_site.tpl');
31
$smarty->display("tiki.tpl");