Small update
[iDB.git] / messenger.php
blob6f92b9059beb736ed404a654f211d131b35dc297
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: messenger.php - Last Update: 08/02/2019 SVN 905 - 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> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
27 <?php $iWrappers['TITLETAG'] = ob_get_clean();
28 ob_start("idb_suboutput_handler"); ?>
29 </head>
30 <body>
31 <?php $iWrappers['BODYTAG'] = ob_get_clean();
32 ob_start("idb_suboutput_handler");
33 require($SettDir['inc'].'navbar.php');
34 $iWrappers['NAVBAR'] = ob_get_clean();
35 ob_start("idb_suboutput_handler");
36 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['CanPM']=="no") {
37 redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
38 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
39 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
42 <?php
43 if($_SESSION['UserGroup']!=$Settings['GuestGroup']||
44 $GroupInfo['CanPM']=="yes") {
45 if($_GET['act']==null)
46 { $_GET['act']="view"; }
47 if(!in_array($_GET['act'], $idbactcheck))
48 { $_GET['act']="view"; }
49 if(!is_numeric($_GET['id'])&&$_GET['act']!="create")
50 { $_GET['id']="1"; }
51 if($_GET['act']=="view"||$_GET['act']=="viewsent")
52 { require($SettDir['inc'].'messages.php'); }
53 if($_GET['act']=="read"||$_GET['act']=="create"||
54 $_GET['act']=="sendmessage"||$_POST['act']=="sendmessages")
55 { require($SettDir['inc'].'messages.php'); } }
56 $iWrappers['CONTENT'] = ob_get_clean();
57 ob_start("idb_suboutput_handler");
58 require($SettDir['inc'].'endpage.php');
59 $iWrappers['COPYRIGHT'] = ob_get_clean();
60 ob_start("idb_suboutput_handler");
61 if(!isset($MessageName)) { $MessageName = null; }
63 </body>
64 </html>
65 <?php
66 $iWrappers['HTMLEND'] = ob_get_clean();
67 require($SettDir['inc'].'iwrapper.php');
68 if($_GET['act']=="read") {
69 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$MessageName,$Settings['use_gzip'],$GZipEncode['Type']); }
70 if($_GET['act']=="viewsent") {
71 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Sent MailBox",$Settings['use_gzip'],$GZipEncode['Type']); }
72 if($_GET['act']=="view") {
73 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing MailBox",$Settings['use_gzip'],$GZipEncode['Type']); }
74 if($_GET['act']=="create") {
75 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Message",$Settings['use_gzip'],$GZipEncode['Type']); }
76 if($_GET['act']=="sendmessage"&&$_POST['act']=="sendmessages") {
77 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Seanding a Message",$Settings['use_gzip'],$GZipEncode['Type']); }