Пример #1
0
    $html = "<p class='lead'>Announcements <small>–Obviously each thing is the most important thing.</small></p>";
    //announcement block
    //Show only announcements less than a month old and unarchived
    $sql = "SELECT * FROM `announcement` WHERE date_add(timePosted, INTERVAL 1 MONTH) > now() and `choir` = '{$CHOIR}' AND `archived`=0 ORDER BY `timePosted` DESC LIMIT 0, 3";
    $result = mysql_query($sql);
    while ($announcement = mysql_fetch_array($result)) {
        $timestamp = strtotime($announcement['timePosted']);
        $dayPosted = date('M j, Y', $timestamp);
        $timePosted = date('g:i a', $timestamp);
        $op = $announcement['memberID'];
        $mid = $announcement['announcementNo'];
        $name = prefNameFromEmail($op);
        if (isOfficer($userEmail)) {
            $html .= "<div class='block' id='announce" . $mid . "'><p><b>{$dayPosted} {$timePosted}</b><i class='icon-remove archiveButton' onclick='archiveAnnouncement(" . $mid . ")' style='float: right'></i><br />" . $announcement['announcement'] . "<br /><small style='color:grey'>&mdash;{$name}</small></p></div>";
        } else {
            $html .= "<div class='block'><p><b>{$dayPosted} {$timePosted}</b><br />" . $announcement['announcement'] . "<br /><small style='color:grey'>&mdash;{$name}</small></p></div>";
        }
    }
    $html .= "<button type='button' id='allAnnounceButton' class='btn' href='#annoucnements'>See All Announcements</button>";
    return $html;
}
echo "<div class='block span5' id='attendanceHistory'>";
echo attendanceHistory($USER);
echo "</div><div class='span6 block' style='float:right'>";
echo gigBlock($USER);
echo info($USER);
echo "</div><div class='span6 block' style='float:right'>";
echo announcements($USER);
echo "</div><div class='span6 block' style='float:right'>";
echo todoBlock($USER, true, true);
echo "</div>";
Пример #2
0
<?php

require_once 'functions.php';
todoBlock($USER, false, true);
Пример #3
0
<?php

require_once 'functions.php';
//$name = mysql_real_escape_string($_POST['name']);
if (!$USER) {
    echo "You must be logged in to view minutes.";
    exit(0);
}
echo todoBlock($USER, $_POST['form'] == 'true' ? true : false, $_POST['list'] == 'true' ? true : false);