OSDN Git Service

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