forked from leonardoxc/leonardoxc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEXT_config.php
73 lines (62 loc) · 2.3 KB
/
EXT_config.php
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
<?
/************************************************************************/
/* Leonardo: Gliding XC Server */
/* ============================================ */
/* */
/* Copyright (c) 2004-5 by Andreadakis Manolis */
/* http://leonardo.thenet.gr */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
// $currentlang="english";
@session_start();
setVarFromRequest("lng",$PREFS->language);
$currentlang=$lng;
// $currentlang=$PREFS->language;
$lang=$currentlang;
$language=$currentlang;
if ( $opMode==2) {
require_once "language/lang-".$currentlang.".php";
define('IN_PHPBB', true);
$phpbb_root_path = dirname(__FILE__).'/../../';
//WAS
// $phpbb_root_path = '../../';
$prefix="phpbb";
require($phpbb_root_path . 'extension.inc');
require($phpbb_root_path . 'common.'.$phpEx);
} else if ( $opMode==1) {
$newlang=$currentlang;
$inside_mod =1;
define('INSIDE_MOD',1);
require_once("../../mainfile.php");
// re-set $module_name;
$tmpDir=dirname(__FILE__);
$tmpParts=split("/",str_replace("\\","/",$tmpDir));
$module_name=$tmpParts[count($tmpParts)-1];
} else if ( $opMode==3) {
$newlang=$currentlang;
$inside_mod =1;
define('INSIDE_MOD',1);
require_once("mainfile.php");
// re-set $module_name;
$tmpDir=dirname(__FILE__);
$tmpParts=split("/",str_replace("\\","/",$tmpDir));
$module_name=$tmpParts[count($tmpParts)-1];
}
/*
$baseInstallationPath="";
$parts=explode("/",$_SERVER['REQUEST_URI']);
if ( count($parts)>1 ) {
for($i=1;$i<count($parts);$i++) {
if ($parts[$i-1]=="modules") break;
if ($parts[$i-1]!='') $baseInstallationPath.="/".$parts[$i-1];
}
}
*/
//$OLCScoringServerPath="http://".$_SERVER['SERVER_NAME'].$baseInstallationPath."/modules/".$module_name."/server/scoreOLC.php";
//$OLCScoringServerPassword="mypasswd";
session_start();
$userID = $_SESSION['userID'];
?>