author | Dan |
Tue, 13 Nov 2007 22:30:19 -0500 | |
changeset 8 | 850e1b1209a9 |
parent 1 | 6f8b7c6fac02 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/* |
|
3 |
* Decir |
|
4 |
* Version 0.1 |
|
5 |
* Copyright (C) 2007 Dan Fuhry |
|
6 |
* common.php - Loader and common basic functions |
|
7 |
* |
|
8 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
9 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
12 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
13 |
*/ |
|
14 |
||
15 |
if(!defined('DECIR_ROOT')) |
|
16 |
{ |
|
17 |
$_GET['title'] = 'null'; |
|
18 |
header('HTTP/1.1 403 Forbidden'); |
|
19 |
require('../includes/common.php'); |
|
20 |
die_friendly('Access denied', '<p>This script cannot be run outside of Enano.</p>'); |
|
21 |
} |
|
22 |
||
23 |
require('constants.php'); |
|
1
6f8b7c6fac02
Let's just say: major progress and still only 20% complete. So many changes I forgot to commit.
Dan
parents:
0
diff
changeset
|
24 |
require('functions.php'); |
0 | 25 |
|
26 |
$html = ' <!-- Decir\'s updated namespace extractor function --> |
|
27 |
<script type="text/javascript"> |
|
28 |
function strToPageID(string) |
|
29 |
{ |
|
30 |
var ret; |
|
31 |
for(var i in namespace_list) |
|
32 |
if(namespace_list[i] != \'\') |
|
33 |
if(namespace_list[i] == string.substr(0, namespace_list[i].length)) |
|
34 |
ret = [string.substr(namespace_list[i].length), i]; |
|
35 |
||
36 |
if ( ret ) |
|
37 |
return ret; |
|
38 |
||
39 |
return [string, \'Article\']; |
|
40 |
} |
|
41 |
</script> |
|
42 |
'; |
|
43 |
||
44 |
$template->add_header($html); |
|
45 |
||
46 |
?> |