File: basilix.php3

package info (click to toggle)
basilix 1.0.3b-1.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 828 kB
  • ctags: 206
  • sloc: php: 2,681; sql: 45; makefile: 40; sh: 7
file content (79 lines) | stat: -rw-r--r-- 2,243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/*
+-------------------------------------------------------------------+
| BasiliX - Copyright (C) 2000 Murat Arslan <arslanm@cyberdude.com> |
+-------------------------------------------------------------------+
*/

// Launcher file
// ------------------------------------------------------------------
// -- master config file
require("/etc/basilix/conf/basilix.conf");

// -- other config files
require("$BSX_CONFDIR/global.conf");
require("$BSX_CONFDIR/db.conf");
require("$BSX_CONFDIR/request.conf");
require("$BSX_CONFDIR/lang.conf");
require("$BSX_CONFDIR/domain.conf");
require("$BSX_CONFDIR/theme.conf");

// -- utilities
require("$BSX_LIBDIR/error.inc");
require("$BSX_LIBDIR/folder.inc");
require("$BSX_LIBDIR/imap.inc");
require("$BSX_LIBDIR/lang.inc");
require("$BSX_LIBDIR/session.inc");
require("$BSX_LIBDIR/util.inc");
require("$BSX_DBSETDIR/$BSX_USE_DB_SETFILE");

// -- classes
require("$BSX_LIBDIR/imap.class");
require("$BSX_LIBDIR/$BSX_USE_DB_FILE");

// -- settings
require("$BSX_LIBDIR/settings.inc");

// ---------------- here we go ----------------
if($is_ssl) $BSX_BASEHREF = ereg_replace("http://", "https://", $BSX_BASEHREF);

// -- cookie test
if(!$BSX_TestCookie && !$nocookie && !$SESSID) url_redirect();

// if the browser is not cookie capable
if($SESSID) {
	$BSX_SESSID = $SESSID;
	$nocookie = 1;
}

// -- theme (css)
if($BSX_Theme) $BSX_THEMEDIR = $bsx_theme[$BSX_Theme]["dir"];
else $BSX_THEMEDIR = $bsx_theme[$BSX_DEFAULT_THEME]["dir"];
// --

// -- username and domain
if($username == "") $username = $BSX_User;
if($domain == "") $domain = domain2index($BSX_Domain);
// --

if(empty($RequestID)) { // -- login procedure
   if(!empty($username) || $relogin) {
	$RELOGIN_MSG = $lng->p(54);
        $BODY_ONLOAD="onLoad='document.loginForm.password.focus();'";
	$incfile = "login-relogin.htx";
   } else {
        $BODY_ONLOAD="onLoad='document.loginForm.username.focus();'";
	$incfile = "login-new.htx";
   }
   include("$BSX_HTXDIR/header.htx");
   include("$BSX_HTXDIR/$incfile");
   include("$BSX_HTXDIR/footer.htx");
   exit();
}

// -- launch the desired file
$file = ereg_replace("\.\.|\/", "", $request_id["$RequestID"]); 
if($file == "") exit();
include($BSX_FILESDIR . "/" . $file);
// --
?>