Baseline
[www.vanrenterghem.biz.git] / phpBB2_old / admin / xs_frameset.php
1 <?php
3 /***************************************************************************
4  *                              xs_frameset.php
5  *                              ---------------
6  *   copyright            : (C) 2003, 2004 CyberAlien
7  *   support              : http://www.phpbbstyles.com
8  *
9  *   version              : 2.0.1
10  *
11  *   file revision        : 46
12  *   project revision     : 51
13  *   last modified        : 25 Aug 2004  11:51:48
14  *
15  ***************************************************************************/
17 /***************************************************************************
18  *
19  *   This program is free software; you can redistribute it and/or modify
20  *   it under the terms of the GNU General Public License as published by
21  *   the Free Software Foundation; either version 2 of the License, or
22  *   (at your option) any later version.
23  *
24  ***************************************************************************/
26 define('IN_PHPBB', 1);
27 $phpbb_root_path = "./../";
28 $no_page_header = true;
29 require($phpbb_root_path . 'extension.inc');
30 require('./pagestart.' . $phpEx);
32 // check if mod is installed
33 if(empty($template->xs_version) || $template->xs_version !== 5)
34 {
35         message_die(GENERAL_ERROR, 'eXtreme Styles mod is not installed. You forgot to upload includes/template.php');
36 }
38 define('IN_XS', true);
39 define('NO_XS_HEADER', true);
40 include_once('xs_include.' . $phpEx);
42 $action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
43 $get_data = array();
44 foreach($HTTP_GET_VARS as $var => $value)
45 {
46         if($var !== 'action' && $var !== 'sid')
47         {
48                 $get_data[] = $var . '=' . urlencode(stripslashes($value));
49         }
50 }
52 // check for style download command
53 if(isset($HTTP_POST_VARS['action']) && $HTTP_POST_VARS['action'] === 'web')
54 {
55         $action = 'import';
56         $get_data[] = 'get_remote=' . urlencode(stripslashes($HTTP_POST_VARS['source']));
57         if(isset($HTTP_POST_VARS['return']))
58         {
59                 $get_data[] = 'return=' . urlencode(stripslashes($HTTP_POST_VARS['return']));
60         }
61 }
63 $get_data = count($get_data) ? $phpEx . '?' . implode('&', $get_data) : $phpEx;
65 $content_url = array(
66         'config'        => append_sid('xs_config.'.$get_data),
67         'install'       => append_sid('xs_install.'.$get_data),
68         'uninstall'     => append_sid('xs_uninstall.'.$get_data),
69         'default'       => append_sid('xs_styles.'.$get_data),
70         'cache'         => append_sid('xs_cache.'.$get_data),
71         'import'        => append_sid('xs_import.'.$get_data),
72         'export'        => append_sid('xs_export.'.$get_data),
73         'clone'         => append_sid('xs_clone.'.$get_data),
74         'download'      => append_sid('xs_download.'.$get_data),
75         'edittpl'       => append_sid('xs_edit.'.$get_data),
76         'editdb'        => append_sid('xs_edit_data.'.$get_data),
77         'exportdb'      => append_sid('xs_export_data.'.$get_data),
78         'updates'       => append_sid('xs_update.'.$get_data),
79         'portal'        => append_sid('xs_portal.'.$get_data),
80         );
82 if(isset($content_url[$action]))
83 {
84         $content = $content_url[$action];
85 }
86 else
87 {
88         $content = append_sid('xs_index.'.$get_data);
89 }
91 $template->set_filenames(array('body' => XS_TPL_PATH . 'frameset.tpl'));
92 $template->assign_vars(array(
93         'FRAME_TOP'             => append_sid('xs_frame_top.'.$phpEx),
94         'FRAME_MAIN'    => $content,
95         ));
97 $template->pparse('body');
98 xs_exit();
100 ?>