-
Notifications
You must be signed in to change notification settings - Fork 1
/
messenger.php
105 lines (101 loc) · 4.2 KB
/
messenger.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the Revised BSD License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Revised BSD License for more details.
Copyright 2004-2024 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2024 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
$FileInfo: messenger.php - Last Update: 8/30/2024 SVN 1063 - Author: cooldude2k $
*/
if (ini_get("register_globals")) {
require_once('inc/misc/killglobals.php');
}
require('preindex.php');
$usefileext = $Settings['file_ext'];
if ($ext == "noext" || $ext == "no ext" || $ext == "no+ext") {
$usefileext = "";
}
$filewpath = $exfile['messenger'].$usefileext.$_SERVER['PATH_INFO'];
$idbactcheck = array("view", "viewsent", "read", "create", "sendmessage");
?>
<?php $iWrappers['EXTRALINKS'] = null;
ob_start("idb_suboutput_handler");
$title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
?>
<meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
<meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
<meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
<meta name="title" content="<?php echo $title_html; ?>" />
<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
<?php $iWrappers['TITLETAG'] = ob_get_clean();
ob_start("idb_suboutput_handler"); ?>
</head>
<body>
<?php $iWrappers['BODYTAG'] = ob_get_clean();
ob_start("idb_suboutput_handler");
require($SettDir['inc'].'navbar.php');
$iWrappers['NAVBAR'] = ob_get_clean();
ob_start("idb_suboutput_handler");
if ($_SESSION['UserGroup'] == $Settings['GuestGroup'] || $GroupInfo['CanPM'] == "no") {
redirect("location", $rbasedir.url_maker($exfile['index'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index'], false));
ob_clean();
header("Content-Type: text/plain; charset=".$Settings['charset']);
$urlstatus = 302;
gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
session_write_close();
die();
}
?>
<?php
if ($_SESSION['UserGroup'] != $Settings['GuestGroup'] ||
$GroupInfo['CanPM'] == "yes") {
if ($_GET['act'] == null) {
$_GET['act'] = "view";
}
if (!in_array($_GET['act'], $idbactcheck)) {
$_GET['act'] = "view";
}
if (!is_numeric($_GET['id']) && $_GET['act'] != "create") {
$_GET['id'] = "1";
}
if ($_GET['act'] == "view" || $_GET['act'] == "viewsent") {
require($SettDir['inc'].'messages.php');
}
if ($_GET['act'] == "read" || $_GET['act'] == "create" ||
$_GET['act'] == "sendmessage" || $_POST['act'] == "sendmessages") {
require($SettDir['inc'].'messages.php');
}
}
$iWrappers['CONTENT'] = ob_get_clean();
ob_start("idb_suboutput_handler");
require($SettDir['inc'].'endpage.php');
$iWrappers['COPYRIGHT'] = ob_get_clean();
ob_start("idb_suboutput_handler");
if (!isset($MessageName)) {
$MessageName = null;
}
?>
</body>
</html>
<?php
$iWrappers['HTMLEND'] = ob_get_clean();
require($SettDir['inc'].'iwrapper.php');
if ($_GET['act'] == "read") {
change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$MessageName, $Settings['use_gzip'], $GZipEncode['Type']);
}
if ($_GET['act'] == "viewsent") {
change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Sent Mailbox", $Settings['use_gzip'], $GZipEncode['Type']);
}
if ($_GET['act'] == "view") {
change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Mailbox", $Settings['use_gzip'], $GZipEncode['Type']);
}
if ($_GET['act'] == "create") {
change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Message", $Settings['use_gzip'], $GZipEncode['Type']);
}
if ($_GET['act'] == "sendmessage" && $_POST['act'] == "sendmessages") {
change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Seanding a Message", $Settings['use_gzip'], $GZipEncode['Type']);
}
?>