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