2 /***************************************************************
5 * (c) 1999-2003 Kasper Skaarhoj (kasperYYYY@typo3.com)
8 * This script is part of the Typo3 project. The Typo3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
28 * Super admin configuration and main script (sample)
32 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
36 * This script is intended to provide administrator information and
37 * relevant links to multiple Typo3 sites on a webserver.
40 * This script must be located in a directory with the Typo3 source available in typo3_src/
41 * The script includes the class t3lib/class.t3lib_superadmin.php
44 * This script MUST be secured as it reads out password information an provides direct login links to sites!
45 * It's recommended to use the script over a secure connection and to use the strongest webserver http-based authentication, you can.
46 * Furthermore it's adviced to out-comment the 'die'-line below when you're not using the script.
49 * The point is that you configure one or more directories (parent directories) on the webserver to the script.
50 * The script expects these directories (parents) to contain other directories (childs) exclusively with Typo3 sites in + any number of directories names 'typo3_src*' which will be ignored.
51 * Every Typo3 site (child) in these parent directories will get listed in the interface.
53 * For each 'parent directory' you enter information like this:
55 * $parentDirs[] = array(
56 * 'dir'=> '/www/htdocs/typo3/32/',
57 * 'url' => 'http://192.168.1.4/typo3/32/'
60 * 'dir' is the absolute path of the parent directory where the sites are located in subdirs
61 * 'url' is the web-accessible url of the parent directory.
68 die('Script secured by a die() function. Comment the line if you want to use the script!');
74 require_once ('./typo3_src/t3lib/class.t3lib_superadmin.php');
79 // This is just an example!
81 $parentDirs = array();
82 $parentDirs[] = array(
83 'dir'=> '/www/htdocs/typo3/commercial_sites/',
84 'url' => 'http://123.234.43.212/typo3/commercial_sites/'
86 $parentDirs[] = array(
87 'dir'=> '/www/htdocs/typo3/nonprofit_sites/',
88 'url' => 'http://123.234.43.212/typo3/nonprofit_sites/'
96 $superadmin = t3lib_div
::makeInstance('t3lib_superadmin');
97 $superadmin->init($parentDirs);
98 $superadmin->defaultSet();