Update killglobals.php
[iDB.git] / messenger.php
blobbaa51daa15ef513146e0878b0a2a206dcd86b531
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-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: messenger.php - Last Update: 6/22/2023 SVN 984 - Author: cooldude2k $
16 if(ini_get("register_globals")) {
17 require_once('inc/misc/killglobals.php'); }
18 require('preindex.php');
19 $usefileext = $Settings['file_ext'];
20 if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
21 $filewpath = $exfile['messenger'].$usefileext.$_SERVER['PATH_INFO'];
22 $idbactcheck = array("view", "viewsent", "read", "create", "sendmessage");
24 <?php $iWrappers['EXTRALINKS'] = null;
25 ob_start("idb_suboutput_handler");
26 $title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
28 <meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
29 <meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
30 <meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
31 <meta name="title" content="<?php echo $title_html; ?>" />
32 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
33 <?php $iWrappers['TITLETAG'] = ob_get_clean();
34 ob_start("idb_suboutput_handler"); ?>
35 </head>
36 <body>
37 <?php $iWrappers['BODYTAG'] = ob_get_clean();
38 ob_start("idb_suboutput_handler");
39 require($SettDir['inc'].'navbar.php');
40 $iWrappers['NAVBAR'] = ob_get_clean();
41 ob_start("idb_suboutput_handler");
42 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['CanPM']=="no") {
43 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
44 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
45 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
48 <?php
49 if($_SESSION['UserGroup']!=$Settings['GuestGroup']||
50 $GroupInfo['CanPM']=="yes") {
51 if($_GET['act']==null)
52 { $_GET['act']="view"; }
53 if(!in_array($_GET['act'], $idbactcheck))
54 { $_GET['act']="view"; }
55 if(!is_numeric($_GET['id'])&&$_GET['act']!="create")
56 { $_GET['id']="1"; }
57 if($_GET['act']=="view"||$_GET['act']=="viewsent")
58 { require($SettDir['inc'].'messages.php'); }
59 if($_GET['act']=="read"||$_GET['act']=="create"||
60 $_GET['act']=="sendmessage"||$_POST['act']=="sendmessages")
61 { require($SettDir['inc'].'messages.php'); } }
62 $iWrappers['CONTENT'] = ob_get_clean();
63 ob_start("idb_suboutput_handler");
64 require($SettDir['inc'].'endpage.php');
65 $iWrappers['COPYRIGHT'] = ob_get_clean();
66 ob_start("idb_suboutput_handler");
67 if(!isset($MessageName)) { $MessageName = null; }
69 </body>
70 </html>
71 <?php
72 $iWrappers['HTMLEND'] = ob_get_clean();
73 require($SettDir['inc'].'iwrapper.php');
74 if($_GET['act']=="read") {
75 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$MessageName,$Settings['use_gzip'],$GZipEncode['Type']); }
76 if($_GET['act']=="viewsent") {
77 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Sent MailBox",$Settings['use_gzip'],$GZipEncode['Type']); }
78 if($_GET['act']=="view") {
79 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing MailBox",$Settings['use_gzip'],$GZipEncode['Type']); }
80 if($_GET['act']=="create") {
81 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Message",$Settings['use_gzip'],$GZipEncode['Type']); }
82 if($_GET['act']=="sendmessage"&&$_POST['act']=="sendmessages") {
83 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Seanding a Message",$Settings['use_gzip'],$GZipEncode['Type']); }