OSDN Git Service

Another small update to admin cp.
[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-2008 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: messenger.php - Last Update: 12/19/2008 SVN 219 - Author: cooldude2k $
15 */
16 require('preindex.php');
17 $usefileext = $Settings['file_ext'];
18 if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
19 $filewpath = $exfile['messenger'].$usefileext.$_SERVER['PATH_INFO'];
20 ?>
21
22 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
23 </head>
24 <body>
25 <?php require($SettDir['inc'].'navbar.php');
26 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['CanPM']=="no") {
27 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
28 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
29 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
30 ?>
31
32 <?php 
33 if($_SESSION['UserGroup']!=$Settings['GuestGroup']||
34         $GroupInfo['CanPM']=="yes") {
35 if($_GET['act']==null)
36 { $_GET['act']="view"; }
37 if(!is_numeric($_GET['id'])&&$_GET['act']!="create")
38 { $_GET['id']="1"; }
39 if($_GET['act']=="view"||$_GET['act']=="viewsent")
40 { require($SettDir['inc'].'pm.php'); }
41 if($_GET['act']=="read"||$_GET['act']=="create"||
42         $_GET['act']=="sendmessage"||$_POST['act']=="sendmessages")
43 { require($SettDir['inc'].'pm.php'); } }
44 require($SettDir['inc'].'endpage.php');
45 if(!isset($MessageName)) { $MessageName = null; }
46 ?>
47
48 </body>
49 </html>
50 <?php 
51 if($_GET['act']=="read") {
52 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$MessageName,$Settings['use_gzip'],$GZipEncode['Type']); }
53 if($_GET['act']=="viewsent") { 
54 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Sent MailBox",$Settings['use_gzip'],$GZipEncode['Type']); }
55 if($_GET['act']=="view") {
56 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing MailBox",$Settings['use_gzip'],$GZipEncode['Type']); }
57 if($_GET['act']=="create") { 
58 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Message",$Settings['use_gzip'],$GZipEncode['Type']); }
59 if($_GET['act']=="sendmessage"&&$_POST['act']=="sendmessages") { 
60 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Seanding a Message",$Settings['use_gzip'],$GZipEncode['Type']); }
61 ?>