Example #1
0
function AddEvent()
{
    global $CFG, $aMonths, $aSmilies, $aPostIcons;
    // Default values.
    $aEventInfo['month'] = gmtdate('m', $CFG['globaltime']);
    $aEventInfo['day'] = gmtdate('j', $CFG['globaltime']);
    $aEventInfo['year'] = gmtdate('Y', $CFG['globaltime']);
    $aEventInfo['parseurls'] = 0;
    $aEventInfo['parseemails'] = 1;
    $aEventInfo['dsmilies'] = 0;
    // Do they have authorization to add events?
    if (!$_SESSION['permissions']['cmakeevent']) {
        // No. Let them know the bad news.
        Unauthorized();
    }
    // What kind of event do they want to create?
    switch ($_REQUEST['type']) {
        case 'public':
            // Set the event type.
            $strType = ' Public';
            $aEventInfo['ispublic'] = 1;
            // Does the user have authorization to add public events?
            if (!$_SESSION['permissions']['cmakepubevent']) {
                // No, so let them know the bad news.
                Unauthorized();
            }
            break;
        case 'private':
            // Set the event type.
            $strType = ' Private';
            $aEventInfo['ispublic'] = 0;
            // Does the user have authorization to add private events?
            if (!$_SESSION['permissions']['cmakeevent']) {
                // No, so let them know the bad news.
                Unauthorized();
            }
            break;
        default:
            // Set the event type.
            $aEventInfo['ispublic'] = (int) (bool) $_REQUEST['type'];
            $strType = $aEventInfo['ispublic'] ? ' Public' : ' Private';
            // Does the user have authorization to add events?
            if ($aEventInfo['ispublic'] && !$_SESSION['permissions']['cmakepubevent'] || !$aEventInfo['ispublic'] && !$_SESSION['permissions']['cmakeevent']) {
                // No, so let them know the bad news.
                Unauthorized();
            }
            break;
    }
    // Are they submitting or previewing??
    if (isset($_REQUEST['submit'])) {
        // Yes, so out with the default values and in with what they submitted.
        $aEventInfo['title'] = trim($_REQUEST['title']);
        $aEventInfo['body'] = trim($_REQUEST['message']);
        $aEventInfo['month'] = (int) $_REQUEST['month'];
        $aEventInfo['day'] = (int) $_REQUEST['day'];
        $aEventInfo['year'] = (int) $_REQUEST['year'];
        $aEventInfo['parseurls'] = (int) (bool) $_REQUEST['parseurls'];
        $aEventInfo['parseemails'] = (int) (bool) $_REQUEST['parseemails'];
        $aEventInfo['dsmilies'] = (int) (bool) $_REQUEST['dsmilies'];
        // Submitting or just previewing?
        if ($_REQUEST['submit'] == 'Submit Event') {
            // Submitting.
            $aError = AddEventNow($aEventInfo);
        }
    }
    // Template
    require "./skins/{$CFG['skin']}/addevent.tpl.php";
    // Send the page.
    exit;
}
Example #2
0
<tr>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cellb'];
?>
" width="175" align="left" valign="middle" class="smaller"><img src="images/<?php 
echo $strReadStatus;
?>
" alt="" /> <?php 
echo gmtdate('m-d-Y', $datePosted);
?>
 <span style="color: <?php 
echo $CFG['style']['table']['timecolor'];
?>
;"><?php 
echo gmtdate('h:i A', $datePosted);
?>
</span></td>

	<td bgcolor="<?php 
echo $CFG['style']['table']['cellb'];
?>
" align="left" valign="middle">
	<table width="100%" cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td align="left" valign="middle" class="smaller"><?php 
if ($iPostAuthor) {
    ?>
<img src="images/<?php 
    if (!$bIsOnline) {
        echo 'in';
Example #3
0
 posts per day)</td>
</tr>

<tr>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cella'];
?>
" class="medium"><b>Last Post</b></td>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cella'];
?>
" class="medium">
<?php 
// Display the member's last post.
if (isset($aUserStats[LASTPOST])) {
    echo gmtdate('m-d-Y h:i A', $aUserStats[LASTPOST][POSTDATE]);
    ?>
<br />
		<a href="thread.php?threadid=<?php 
    echo $aUserStats[LASTPOST][THREAD];
    ?>
&amp;postid=<?php 
    echo $aUserStats[LASTPOST][POSTID];
    ?>
#post<?php 
    echo $aUserStats[LASTPOST][POSTID];
    ?>
"><?php 
    echo htmlsanitize($aUserStats[LASTPOST][TITLE]);
    ?>
</a>
Example #4
0
function ReplaceTime($tTime)
{
    return gmtdate('m-d-Y h:i A', (int) $tTime);
}
Example #5
0
	</table>
	</td>
	<td bgcolor="<?php 
        echo $strColor;
        ?>
" width="20%" align="center"><?php 
        if ($aMember[WEBSITE]) {
            echo '<a href="' . $aMember[WEBSITE] . '" target="_blank"><img src="images/user_www.png" alt="Visit ' . $aMember[USERNAME] . '\'s Web site" border="0" /></a>';
        }
        ?>
</td>
	<td bgcolor="<?php 
        echo $strColor;
        ?>
" width="20%" align="center" class="medium"><?php 
        echo gmtdate('m-d-Y', $aMember[JOINDATE]);
        ?>
</td>
	<td bgcolor="<?php 
        echo $strColor;
        ?>
" width="20%" align="center" class="medium"><?php 
        echo $aMember[POSTCOUNT];
        ?>
</td>
</tr>
<?php 
    }
    ?>

</table>
Example #6
0
        ?>
</td>
	<td bgcolor="<?php 
        echo $CFG['style']['table']['cella'];
        ?>
" nowrap="nowrap" valign="middle">
		<table cellpadding="0" cellspacing="0" border="0" align="right">
		<tr>
			<td align="right" class="smaller" nowrap="nowrap"><?php 
        echo gmtdate('m-d-Y', $dateLastPost);
        ?>
 <span style="color: <?php 
        echo $CFG['style']['table']['timecolor'];
        ?>
;"><?php 
        echo gmtdate('h:i A', $dateLastPost);
        ?>
</span><br />by <a class="underline" href="member.php?action=getprofile&amp;userid=<?php 
        echo $iLastPoster;
        ?>
"><b><?php 
        echo $strLastPoster;
        ?>
</b></a></td>
			<td>&nbsp;<a href="thread.php?threadid=<?php 
        echo $iThreadID;
        ?>
&amp;page=<?php 
        echo $iLastPostPage;
        ?>
#lastpost"><img src="images/lastpost.png" border="0" alt="Go to last post" /></a></td>
Example #7
0
        ?>
"><?php 
        echo htmlsanitize($aUsernames[$aMessage[RECIPIENT]]);
        ?>
</a></td>
	<td bgcolor="<?php 
        echo $CFG['style']['table']['cella'];
        ?>
" class="smaller"><?php 
        echo gmtdate('m-d-Y', $aMessage[DATETIME]);
        ?>
<br /><span style="color: <?php 
        echo $CFG['style']['table']['timecolor'];
        ?>
;"><?php 
        echo gmtdate('h:i A', $aMessage[DATETIME]);
        ?>
</span></td>
	<td bgcolor="<?php 
        echo $CFG['style']['table']['cellb'];
        ?>
" class="smaller" align="center"><input type="checkbox" name="message[]" value="<?php 
        echo $iMessageID;
        ?>
" /></td>
</tr>

<?php 
    }
    ?>
Example #8
0
	</td>
	<td bgcolor="<?php 
    echo $strColor;
    ?>
" align="left" valign="top">
		<span class="smaller" style="padding-bottom: 3px; border-bottom: solid 1px;">Posted by <a href="member.php?action=getprofile&amp;userid=<?php 
    echo $iAuthorID;
    ?>
"><?php 
    echo $strAuthor;
    ?>
</a> on <?php 
    echo gmtdate('m-d-Y', $tPostDate);
    ?>
 at <?php 
    echo gmtdate('h:i A', $tPostDate);
    ?>
</span>
		<div class="medium" style="padding-top: 0.75em; overflow: auto;"><?php 
    echo $strPost;
    ?>
</div>
	</td>
</tr>

<?php 
}
?>

</table><br />
Example #9
0
        ?>
" class="smaller" width="13%" valign="middle">
<?php 
        if ($aForum[POSTCOUNT]) {
            ?>
		<table cellpadding="0" cellspacing="0" border="0" align="right">
		<tr>
			<td align="right" nowrap="nowrap">
				<?php 
            echo gmtdate('m-d-Y', $aForum[LPOST]);
            ?>
 <span style="color: <?php 
            echo $CFG['style']['table']['timecolor'];
            ?>
;"><?php 
            echo gmtdate('h:i A', $aForum[LPOST]);
            ?>
</span><br />
				&nbsp;by <a class="underline" href="member.php?action=getprofile&amp;userid=<?php 
            echo $aForum[LPOSTER];
            ?>
"><span style="color: <?php 
            echo $CFG['style']['l_normal']['l'];
            ?>
"><b><?php 
            echo htmlsanitize($aUsernames[$aForum[LPOSTER]]);
            ?>
</b></span></a>
			</td>
			<td nowrap="nowrap">
				&nbsp;<a href="thread.php?threadid=<?php 
Example #10
0
        ?>
" class="medium"><?php 
        echo "<a href=\"member.php?action=getprofile&amp;userid={$iLastPosterID}\">{$strLastPoster}</a>";
        ?>
</td>
			<td align="center" bgcolor="<?php 
        echo $CFG['style']['table']['cellb'];
        ?>
" class="medium"><?php 
        echo gmtdate('m-d-Y', $tLastPost);
        ?>
 <span style="color: <?php 
        echo $CFG['style']['table']['timecolor'];
        ?>
;"><?php 
        echo gmtdate('h:i A', $tLastPost);
        ?>
</span></td>
		</tr>
<?php 
    }
}
?>
		</table>
	</td>
</tr>
</table>

<?php 
// Footer.
require "./skins/{$CFG['skin']}/footer.tpl.php";
Example #11
0
?>
</b> members registered.<br />
        <?php 
if ($aStats['newestmember']) {
    echo "Please welcome our newest member, <a href=\"member.php?action=getprofile&amp;userid={$aStats['newestmember']}\">" . htmlsanitize($aUsernames[$aStats['newestmember']]) . '</a>';
}
?>
<br />
        Most users ever online was <b><?php 
echo $iMostUsersCount;
?>
 on <?php 
echo gmtdate('m-d-Y', $iMostUsersDate);
?>
</b> at <b><?php 
echo gmtdate('h:i A', $iMostUsersDate);
?>
</b>
	</td>
</tr>

<?php 
if ($_SESSION['loggedin'] && $_SESSION['enablepms']) {
    ?>

<?php 
}
?>

</table>
Example #12
0
	</table>
	</td>
</tr>

<tr>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cellb'];
?>
" width="20%" align="left" valign="middle" class="smaller"><?php 
echo gmtdate('m-d-Y', $tDateTime);
?>
 <span style="color: <?php 
echo $CFG['style']['table']['timecolor'];
?>
;"><?php 
echo gmtdate('h:i A', $tDateTime);
?>
</span></td>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cellb'];
?>
" width="80%" align="left" valign="middle" class="smaller"><img src="images/<?php 
if (!$bIsOnline) {
    echo 'in';
}
?>
active.png" align="middle" alt="<?php 
echo $strAuthor;
?>
 is <?php 
if ($bIsOnline) {
Example #13
0
	<td bgcolor="<?php 
    echo $CFG['style']['table']['cella'];
    ?>
" align="left" class="medium">Guest</td>
	<td bgcolor="<?php 
    echo $CFG['style']['table']['cellb'];
    ?>
" align="left" class="medium"><?php 
    echo $aGuest[LOCATION];
    ?>
</td>
	<td bgcolor="<?php 
    echo $CFG['style']['table']['cella'];
    ?>
" align="center" class="medium"><?php 
    echo gmtdate('g:i A', $aGuest[LASTACTIVE]);
    ?>
</td>
	<td bgcolor="<?php 
    echo $CFG['style']['table']['cellb'];
    ?>
" align="center"></td>
	<?php 
    if ($_SESSION['permissions']['cviewips'] && $CFG['iplogging']) {
        ?>
<td bgcolor="<?php 
        echo $CFG['style']['table']['cella'];
        ?>
" align="left" class="medium"><?php 
        echo $aGuest[IPADDRESS];
        ?>
Example #14
0
            ?>
;"><?php 
            echo gmtdate('h:i A', $tDateTime);
            ?>
</span></td>
	<td bgcolor="<?php 
            echo $CFG['style']['table']['cella'];
            ?>
" class="smaller" align="center" nowrap="nowrap"><?php 
            echo gmtdate('m-d-Y', $tReadTime);
            ?>
 <span style="color: <?php 
            echo $CFG['style']['table']['timecolor'];
            ?>
;"><?php 
            echo gmtdate('h:i A', $tReadTime);
            ?>
</span></td>
</tr>

<?php 
        }
        ?>

</table>
</form>

<?php 
    }
} else {
    echo '<div class="medium" align="center"><br /><b>There are currently no messages for which you have Tracking enabled.</b><br /><br /></div>';
Example #15
0
	</td>
	<td bgcolor="<?php 
echo $CFG['style']['table']['cellb'];
?>
">
<?php 
if (trim($strBody) == trim($aPostInfo['body'])) {
    ?>
		<div class="smaller">Originally posted by <?php 
    echo htmlsanitize($aPostInfo['username']);
    ?>
 on <?php 
    echo gmtdate('m-d-Y', $aPostInfo['datetime_posted']);
    ?>
 at <?php 
    echo gmtdate('h:i A', $aPostInfo['datetime_posted']);
    ?>
:</div>
<?php 
}
?>
		<textarea name="message" cols="70" rows="20"><?php 
echo htmlsanitize($strBody);
?>
</textarea>
		<div class="smaller">[<a href="javascript:alert('The maximum permitted length is <?php 
echo $CFG['maxlen']['messagebody'];
?>
 characters.\n\nYour message is '+document.theform.message.value.length+' characters long.');">Check message length.</a>]</div>
	</td>
</tr>