Example #1
0
function ViewEvent()
{
    global $CFG, $dbConn, $aSmilies;
    // Does the user have authorization to use the calendar?
    if (!$_SESSION['permissions']['ccalendar']) {
        // No. Let them know the bad news.
        Unauthorized();
    }
    // What event do they want to view?
    $iEventID = (int) $_REQUEST['eventid'];
    // Get the information for this event.
    $dbConn->query("SELECT author, startdate, title, body, private, dsmilies FROM event WHERE id={$iEventID}");
    if (!(list($iAuthor, $strDate, $strTitle, $strEventInfo, $bPrivate, $bDisableSmilies) = $dbConn->getresult())) {
        Msg("Invalid event specified.{$CFG['msg']['invalidlink']}");
    }
    $bPublic = !$bPrivate;
    // Are they allowed to view this event?
    if (!$bPublic && $iAuthor != $_SESSION['userid']) {
        // Nope. Give them the Unauthorized page.
        Unauthorized();
    }
    // Parse the message.
    $strEventInfo = ParseMessage($strEventInfo, $bDisableSmilies);
    // Template
    require "./skins/{$CFG['skin']}/viewevent.tpl.php";
    // Send the page.
    exit;
}
Example #2
0
$strPostBody = $aPost[BODY];
$bDisableSmilies = $aPost[DSMILIES];
$bLoggedIP = $aPost[LOGGEDIP];
$strReadStatus = $aPost[DT_POSTED] > $tLastViewed ? 'new.png' : 'old.png';
// Set the status flag.
$bIsOnline = $dateAuthorLastActive + 300 >= $CFG['globaltime'] && !$bInvisible && $aAuthor[ONLINE] ? TRUE : FALSE;
// For guests.
if ($iPostAuthor == 0) {
    $strAuthorTitle = $aGroup[0]['usertitle'];
    list($strPostAuthor, $strPostBody) = explode("\n", $strPostBody);
    $strPostAuthor = htmlsanitize($strPostAuthor);
}
// Parse the message.
$strPostBody = ParseMessage($strPostBody, $bDisableSmilies);
// Parse the signature.
$strAuthorSignature = ParseMessage($strAuthorSignature, FALSE);
?>

<table bgcolor="<?php 
echo $CFG['style']['table']['bgcolor'];
?>
" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cellb'];
?>
" width="175" align="left" valign="top" class="smaller" nowrap="nowrap">
		<div class="medium"><b><?php 
echo $strPostAuthor;
?>
</b></div>
Example #3
0
    $bSaveCopy = (bool) $_REQUEST['savecopy'];
    $bTrack = (bool) $_REQUEST['track'];
    // Did we preview or submit?
    if (is_array($aError)) {
        // We submitted and got an error, so display that.
        DisplayErrors($aError);
    } else {
        // Make a copy of the message, so we can parse it for the
        // preview, yet still have the original.
        $strParsedMessage = $strMessage;
        // Put [email] tags around suspected e-mail addresses if they want us to.
        if ($bParseEMails) {
            $strParsedMessage = ParseEMails($strParsedMessage);
        }
        // Parse any BB code in the message.
        $strParsedMessage = ParseMessage($strParsedMessage, $bDisableSmilies);
        ?>

<br /><table width="100%" cellpadding="4" cellspacing="1" border="0" bgcolor="<?php 
        echo $CFG['style']['table']['bgcolor'];
        ?>
" align="center">
	<tr class="heading"><td align="left" class="smaller">Message Preview</td></tr>
	<tr><td bgcolor="<?php 
        echo $CFG['style']['table']['cella'];
        ?>
" class="medium"><?php 
        echo $strParsedMessage;
        ?>
</td></tr>
</table><br />
Example #4
0
<?php 
// Display any errors.
if (is_array($aError)) {
    DisplayErrors($aError);
} else {
    if ($_REQUEST['submit'] == 'Preview Event') {
        // Make a copy of the event information, so we can parse
        // it for the preview, yet still have the original.
        $strParsedInfo = $aEventInfo['body'];
        // Put [email] tags around suspected e-mail addresses if they want us to.
        if ($aEventInfo['parseemails']) {
            $strParsedInfo = ParseEMails($strParsedInfo);
        }
        // Parse any BB code in the message.
        $strParsedInfo = ParseMessage($strParsedInfo, $aEventInfo['dsmilies']);
        ?>

<br />
<table bgcolor="<?php 
        echo $CFG['style']['table']['bgcolor'];
        ?>
" cellspacing="1" cellpadding="4" border="0" align="center">

<tr class="heading">
	<td colspan="2" align="center" class="medium"><?php 
        echo htmlsanitize($aEventInfo['title']);
        ?>
</td>
</tr>
Example #5
0
?>
" width="100%" align="center">

<tr class="heading">
	<td width="10%" align="center" valign="middle" class="smaller">Delete?</td>
	<td width="90%" align="center" valign="middle" class="smaller">Post</td>
</tr>

<?php 
// Display the posts.
foreach ($aPosts as $iPostID => $aPost) {
    // Store the post information temporarily.
    $iAuthorID = $aPost[AUTHOR];
    $strAuthor = htmlsanitize($aUsernames[$aPost[AUTHOR]]);
    $tPostDate = $aPost[POSTDATE];
    $strPost = ParseMessage($aPost[BODY], TRUE, TRUE);
    // Set the color.
    $strColor = $strColor == $CFG['style']['table']['cella'] ? $CFG['style']['table']['cellb'] : $CFG['style']['table']['cella'];
    ?>

<tr>
	<td bgcolor="<?php 
    echo $strColor;
    ?>
" class="smaller" align="center" valign="middle">
		<input type="checkbox" name="postid[]" value="<?php 
    echo $iPostID;
    ?>
" checked="checked" />
	</td>
	<td bgcolor="<?php 
Example #6
0
$strAuthor = htmlsanitize($aAuthor['username']);
if ($aAuthor['title']) {
    $strAuthorTitle = htmlsanitize($aAuthor['title']);
} else {
    $strAuthorTitle = htmlsanitize($aGroup[$aAuthor['usergroup']]['usertitle']);
}
$tAuthorJoined = strtotime($aAuthor['datejoined']);
$strAuthorLocation = htmlsanitize($aAuthor['residence']);
$iAuthorPostCount = $aAuthor['postcount'];
$tLastActive = $aAuthor['lastactive'];
if ($tLastActive + 300 >= $CFG['globaltime'] && !$aAuthor['invisible'] && $aAuthor['loggedin']) {
    $bIsOnline = TRUE;
} else {
    $bIsOnline = FALSE;
}
$strAuthorSignature = ParseMessage($aAuthor['signature'], FALSE);
$strAuthorWebsite = htmlsanitize($aAuthor['website']);
// FIXME!!!
// Header.
$strPageTitle = " :: Private Messages :. {$strSubject}";
require "./skins/{$CFG['skin']}/header.tpl.php";
?>

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
	<td align="left" valign="top"><a href="index.php"><img src="images/ovbb.png" align="middle" border="0" alt="<?php 
echo htmlsanitize($CFG['general']['name']);
?>
 :: Powered by OvBB" /></a></td>
	<td width="100%" align="left" valign="top" class="medium"><b><a href="index.php"><?php 
echo htmlsanitize($CFG['general']['name']);
Example #7
0
    ?>
" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
	<td bgcolor="<?php 
    echo $strColor;
    ?>
" width="175" align="left" valign="top" nowrap="nowrap"><?php 
    echo htmlsanitize($aPost[AUTHOR]);
    ?>
</td>
	<td bgcolor="<?php 
    echo $strColor;
    ?>
" align="left" valign="top">
		<div class="postbit"><div style="float: left; width: 100%;"><?php 
    echo ParseMessage($aPost[BODY], $aPost[DSMILIES]);
    ?>
</div></div>
	</td>
</tr>
</table>

<?php 
}
?>

<script language="JavaScript" type="text/javascript">
<!--
	document.theform.status.value='';
//-->
</script>