Project

General

Profile

1
<?php
2

    
3
/*
4

    
5
 Website Baker Project <http://www.websitebaker.org/>
6
 Copyright (C) 2004-2008, Ryan Djurovich
7

    
8
 Website Baker is free software; you can redistribute it and/or modify
9
 it under the terms of the GNU General Public License as published by
10
 the Free Software Foundation; either version 2 of the License, or
11
 (at your option) any later version.
12

    
13
 Website Baker is distributed in the hope that it will be useful,
14
 but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 GNU General Public License for more details.
17

    
18
 You should have received a copy of the GNU General Public License
19
 along with Website Baker; if not, write to the Free Software
20
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21

    
22
*/
23

    
24
require_once('../../config.php');
25

    
26
if(isset($_GET['template_name'])) {
27
	$temp_name = $_GET['template_name'];
28
	// check if specified template exists
29
	if(file_exists(WB_PATH .'/templates/' .$temp_name)) {
30
		// parse the editor.css and write XML output
31
		require_once(WB_PATH .'/modules/fckeditor/class.cssparser.php');
32
		$cssparser = new cssparser();
33
		$cssparser->Parse(WB_PATH .'/templates/' .$temp_name .'/editor.css');
34
		header('Content-type: text/xml'); 
35
		echo $cssparser->GetXML();
36
	}
37
}
38
?>
(4-4/8)