Project

General

Profile

1
<?php
2

    
3
// $Id: details.php 10 2005-09-04 08:59:31Z ryan $
4

    
5
/*
6

    
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

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

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

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

    
24
*/
25

    
26
// Include the config code
27
require('../../config.php');
28

    
29
// Get language name
30
if(!isset($_POST['code']) OR $_POST['code'] == "") {
31
	header("Location: index.php");
32
} else {
33
	$code = $_POST['code'];
34
}
35

    
36
// Check if the language exists
37
if(!file_exists(WB_PATH.'/languages/'.$code.'.php')) {
38
	header("Location: index.php");
39
}
40

    
41
// Print admin header
42
require_once(WB_PATH.'/framework/class.admin.php');
43
$admin = new admin('Addons', 'languages_view');
44

    
45
// Setup language object
46
$template = new Template(ADMIN_PATH.'/languages');
47
$template->set_file('page', 'details.html');
48
$template->set_block('page', 'main_block', 'main');
49

    
50
// Insert values
51
require(WB_PATH.'/languages/'.$code.'.php');
52
$template->set_var(array(
53
								'CODE' => $language_code,
54
								'NAME' => $language_name,
55
								'AUTHOR' => $language_author,
56
								'VERSION' => $language_version,
57
								'DESIGNED_FOR' => $language_designed_for
58
								)
59
						);
60

    
61
// Restore language to original code
62
require(WB_PATH.'/languages/'.LANGUAGE.'.php');
63

    
64
// Insert language headings
65
$template->set_var(array(
66
								'HEADING_LANGUAGE_DETAILS' => $HEADING['LANGUAGE_DETAILS']
67
								)
68
						);
69
// Insert language text and messages
70
$template->set_var(array(
71
								'TEXT_CODE' => $TEXT['CODE'],
72
								'TEXT_NAME' => $TEXT['NAME'],
73
								'TEXT_TYPE' => $TEXT['TYPE'],
74
								'TEXT_AUTHOR' => $TEXT['AUTHOR'],
75
								'TEXT_VERSION' => $TEXT['VERSION'],
76
								'TEXT_DESIGNED_FOR' => $TEXT['DESIGNED_FOR']
77
								)
78
						);
79

    
80
// Parse language object
81
$template->parse('main', 'main_block', false);
82
$template->pparse('output', 'page');
83

    
84
// Print admin footer
85
$admin->print_footer();
86

    
87
?>
(2-2/6)