Project

General

Profile

1
<?php
2

    
3
// $Id: details.php 1112 2009-08-08 14:28:54Z Ruebenwurzel $
4

    
5
/*
6

    
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2009, 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
	exit(0);
33
} else {
34
	$code = $_POST['code'];
35
}
36

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

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

    
47
// Setup language object
48
$template = new Template(THEME_PATH.'/templates');
49
$template->set_file('page', 'languages_details.htt');
50
$template->set_block('page', 'main_block', 'main');
51

    
52
// Insert values
53
require(WB_PATH.'/languages/'.$code.'.php');
54
$template->set_var(array(
55
								'CODE' => $language_code,
56
								'NAME' => $language_name,
57
								'AUTHOR' => $language_author,
58
								'VERSION' => $language_version,
59
								'DESIGNED_FOR' => $language_platform,
60
								'ADMIN_URL' => ADMIN_URL,
61
								'WB_URL' => WB_URL,
62
								'WB_PATH' => WB_PATH,
63
								'THEME_URL' => THEME_URL
64
								)
65
						);
66

    
67
// Restore language to original code
68
require(WB_PATH.'/languages/'.LANGUAGE.'.php');
69

    
70
// Insert language headings
71
$template->set_var(array(
72
								'HEADING_LANGUAGE_DETAILS' => $HEADING['LANGUAGE_DETAILS']
73
								)
74
						);
75
// Insert language text and messages
76
$template->set_var(array(
77
								'TEXT_CODE' => $TEXT['CODE'],
78
								'TEXT_NAME' => $TEXT['NAME'],
79
								'TEXT_TYPE' => $TEXT['TYPE'],
80
								'TEXT_AUTHOR' => $TEXT['AUTHOR'],
81
								'TEXT_VERSION' => $TEXT['VERSION'],
82
								'TEXT_DESIGNED_FOR' => $TEXT['DESIGNED_FOR'],
83
								'TEXT_BACK' => $TEXT['BACK']
84
								)
85
						);
86

    
87
// Parse language object
88
$template->parse('main', 'main_block', false);
89
$template->pparse('output', 'page');
90

    
91
// Print admin footer
92
$admin->print_footer();
93

    
94
?>
(1-1/4)