Small update
[iDB.git] / inc / filename.php
blob94af1843c903ab0b834d6bf5efce1284b72462c4
1 <?php
2 /*
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: filename.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="filename.php"||$File3Name=="/filename.php") {
18 require('index.php');
19 exit(); }
20 // Check and set stuff
21 if(dirname($_SERVER['SCRIPT_NAME'])!=".") {
22 $basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
23 if(dirname($_SERVER['SCRIPT_NAME'])==".") {
24 $basedir = dirname($_SERVER['PHP_SELF'])."/"; }
25 if($basedir=="\/") { $basedir="/"; }
26 $basedir = str_replace("//", "/", $basedir);
27 $cbasedir = $basedir;
28 if($Settings['fixbasedir']!=null&&$Settings['fixbasedir']!="off") {
29 $basedir = $Settings['fixbasedir']; }
30 if($Settings['fixcookiedir']!=null&&$Settings['fixcookiedir']!="") {
31 $cbasedir = $Settings['fixcookiedir']; }
32 $BaseURL = $basedir;
33 if(!isset($_SERVER['HTTPS'])) { $_SERVER['HTTPS'] = 'off'; }
34 if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
35 if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
36 if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
37 $rssurl = $prehost.$_SERVER["HTTP_HOST"].$BaseURL; }
38 if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
39 $rssurlon = "on"; $rssurl = $Settings['idburl']; }
40 if($Settings['rssurl']!=null&&$Settings['rssurl']!="") {
41 $rssurlon = "on"; $rssurl = $Settings['rssurl']; }
42 require_once($SettDir['inc'].'versioninfo.php');
43 //File naming stuff. <_<
44 $exfile = array(); $exfilerss = array();
45 $exqstr = array(); $exqstrrss = array();
46 $exfile['calendar'] = 'calendar';
47 $prexqstr['calendar'] = null; $exqstr['calendar'] = null;
48 $exfile['category'] = 'category';
49 $prexqstr['category'] = null; $exqstr['category'] = null;
50 $exfile['event'] = 'event';
51 $prexqstr['event'] = null; $exqstr['event'] = null;
52 $exfile['forum'] = 'forum';
53 $prexqstr['forum'] = null; $exqstr['forum'] = null;
54 $exfile['index'] = 'index';
55 $prexqstr['index'] = null; $exqstr['index'] = null;
56 $exfile['member'] = 'member';
57 $prexqstr['member'] = null; $exqstr['member'] = null;
58 $exfile['messenger'] = 'messenger';
59 $prexqstr['messenger'] = null; $exqstr['messenger'] = null;
60 $exfile['profile'] = 'profile';
61 $prexqstr['profile'] = null; $exqstr['profile'] = null;
62 $exfile['rss'] = 'rss';
63 $prexqstr['rss'] = null; $exqstr['rss'] = null;
64 $exfile['search'] = 'search';
65 $prexqstr['search'] = null; $exqstr['search'] = null;
66 $exfile['subforum'] = 'subforum';
67 $prexqstr['subforum'] = null; $exqstr['subforum'] = null;
68 $exfile['subcategory'] = 'subcategory';
69 $prexqstr['subcategory'] = null; $exqstr['subcategory'] = null;
70 $exfile['topic'] = 'topic';
71 $prexqstr['topic'] = null; $exqstr['topic'] = null;
72 $exfile['redirect'] = 'forum';
73 $prexqstr['redirect'] = null; $exqstr['redirect'] = null;
74 $exfile['admin'] = 'admin';
75 $prexqstr['admin'] = null; $exqstr['admin'] = null;
76 $exfile['modcp'] = 'modcp';
77 $prexqstr['modcp'] = null; $exqstr['modcp'] = null;
78 $exfilejs['javascript'] = 'javascript';
79 $prexqstrjs['javascript'] = null; $exqstrjs['javascript'] = null;
80 $exfilerss['forum'] = 'forum';
81 $prexqstrrss['forum'] = null; $exqstrrss['forum'] = null;
82 $exfilerss['subforum'] = 'subforum';
83 $prexqstrrss['subforum'] = null; $exqstrrss['subforum'] = null;
84 $exfilerss['subcategory'] = 'subcategory';
85 $prexqstrrss['subcategory'] = null; $exqstrrss['subcategory'] = null;
86 $exfilerss['redirect'] = 'forum';
87 $prexqstrrss['redirect'] = null; $exqstrrss['redirect'] = null;
88 $exfilerss['topic'] = 'topic';
89 $prexqstrrss['topic'] = null; $exqstrrss['topic'] = null;
90 $exfilerss['category'] = 'category';
91 $prexqstrrss['category'] = null; $exqstrrss['category'] = null;
92 $exfilerss['event'] = 'event';
93 $prexqstrrss['event'] = null; $exqstrrss['event'] = null;