Small update to edit reply. :P
[iDB.git] / inc / navbar.php
blob63631503b3ee8c9930cf6fe975c6acd4035baeee
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-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: navbar.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="navbar.php"||$File3Name=="/navbar.php") {
18 require('index.php');
19 exit(); }
20 if($_SESSION['UserGroup']!=$Settings['GuestGroup']||$GroupInfo['CanPM']=="yes") {
21 $pmquery1 = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."messenger\" WHERE \"ReciverID\"=%i AND \"Read\"=0", array($_SESSION['UserID']));
22 $pmresult1=sql_query($pmquery1,$SQLStat);
23 $PMNumber=sql_num_rows($pmresult1);
24 sql_free_result($pmresult1); /*
25 $pmquery2 = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."messenger\" WHERE \"SenderID\"=%i AND \"Read\"=0", array($_SESSION['UserID']));
26 $pmresult2=sql_query($pmquery2,$SQLStat);
27 $SentPMNumber=sql_num_rows($pmresult2);
28 sql_free_result($pmresult2); */ }
29 if($ThemeSet['LogoStyle']==null) { $logostyle = ""; }
30 if($ThemeSet['LogoStyle']!=null) { $logostyle = "style=\"".$ThemeSet['LogoStyle']."\" "; }
31 // Am I hidden from everyone
32 if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
33 $PreAmIHidden = GetUserName($_SESSION['UserID'],$Settings['sqltable'],$SQLStat);
34 $AmIHidden = $PreAmIHidden['Hidden']; }
35 // Hide me from everyone! >_> ^_^ <_<
37 <div class="NavBorder">
38 <?php if($ThemeSet['TableStyle']=="div") { ?>
39 <div class="NavBarRow1">
40 <span class="NavBarSpan1">
41 <?php echo $ThemeSet['PreLogo']; ?>
42 <a <?php echo $logostyle; ?>title="<?php echo $Settings['board_name'].$idbpowertitle; ?>" href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">
43 <?php echo $ThemeSet['Logo']; ?></a>
44 <?php echo $ThemeSet['SubLogo']; ?>
45 </span></div>
46 <?php } ?>
47 <table id="NavBarTable" class="NavBar">
48 <?php if($ThemeSet['TableStyle']=="table") { ?>
49 <tr class="NavBarRow1">
50 <td id="NavBarLogo" class="NavBarColumn1"><?php echo $ThemeSet['PreLogo']; ?>
51 <a <?php echo $logostyle; ?>title="<?php echo $Settings['board_name'].$idbpowertitle; ?>" href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">
52 <?php echo $ThemeSet['Logo']; ?></a>
53 <?php echo $ThemeSet['SubLogo']; ?></td>
54 </tr><?php } ?>
55 <tr class="NavBarRow2">
56 <td id="NavBarLinks" class="NavBarColumn2">
57 <span style="float: left;">&nbsp;<?php if($_SESSION['UserGroup']==$Settings['GuestGroup']) { if(!isset($_SESSION['GuestName'])) { ?>Welcome Guest
58 <?php } if(isset($_SESSION['GuestName'])) { ?>Welcome <?php echo $_SESSION['GuestName']; } ?> ( <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log in</a><?php echo $ThemeSet['LineDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Register</a> )
59 <?php } if($_SESSION['UserGroup']!=$Settings['GuestGroup']) { ?>Logged as: <?php if($_SESSION['UserID']>0&&$AmIHidden=="no") { ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_SESSION['UserID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php } if($_SESSION['UserID']<0||$AmIHidden=="yes") { echo "<span>"; } echo $_SESSION['MemberName']; ?><?php if($_SESSION['UserID']>0&&$AmIHidden=="no") { ?></a><?php } if($_SESSION['UserID']<0||$AmIHidden=="yes") { echo "</span>"; } ?> ( <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log out</a><?php if($GroupInfo['HasAdminCP']=="yes") { ?><?php echo $ThemeSet['LineDivider']; ?><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=view&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Admin CP</a><?php } ?> )<?php } ?></span>
60 <span style="float: right;">
61 <?php
62 if($Settings['enable_search']=="on"&&
63 $GroupInfo['CanSearch']=="yes") { ?>
64 <a href="<?php echo url_maker($exfile['search'],$Settings['file_ext'],"act=topics",$Settings['qstr'],$Settings['qsep'],$prexqstr['search'],$exqstr['search']); ?>">Search</a><?php echo $ThemeSet['LineDivider']; }
65 if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
66 if($GroupInfo['CanEditProfile']=="yes") { ?>
67 <a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Profile</a><?php echo $ThemeSet['LineDivider']; }
68 if($GroupInfo['CanPM']=="yes") { ?>
69 <a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>" title="<?php echo "You have ".$PMNumber." new messages."; ?>">MailBox</a><?php echo $ThemeSet['LineDivider']; ?><?php } } ?>
70 <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&page=1",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Members</a><?php echo $ThemeSet['LineDivider']; ?>
71 <a href="<?php echo url_maker($exfile['calendar'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['calendar'],$exqstr['calendar']); ?>">Calendar</a><?php if(isset($Settings['weburl'])) { echo $ThemeSet['LineDivider']; ?>
72 <a href="<?php echo $Settings['weburl']; ?>">Homepage</a><?php } ?>&nbsp;</span>
73 </td></tr>
74 </table></div>
75 <div class="DivNavBar">&nbsp;</div>