Exemple #1
0
function rosterPropList($type)
{
    global $USER;
    $uber = isUber($USER);
    $cols = array("#" => 10, "Name" => 260, "Contact" => 180, "Location" => 200);
    if ($uber || hasPosition($USER, "Treasurer")) {
        $cols["Balance"] = 60;
        $cols["Dues"] = 60;
    }
    return $cols;
}
Exemple #2
0
function actionOptions($userEmail)
{
    $officerOptions = '';
    if (isOfficer($userEmail)) {
        $officerOptions .= '
			<li><a href="#addAnnouncement">Make an Announcement</a></li>';
    }
    if (hasPosition($userEmail, "Treasurer") || isUber($userEmail)) {
        $officerOptions .= '
			<li><a href="#money">Add Transactions</a></li>';
    }
    if (isUber($userEmail)) {
        $officerOptions .= '
			<li><a href="#absenceRequest">Absence Requests</a></li>
			<li><a href="#ties">Ties</a></li>
			<li><a href="#semester">Edit Semester</a></li>
			<li><a href="#officers">Edit Officers</a></li>
			<li><a href="#doclinks">Edit Document Links</a></li>
			<li><a href="#dues">Edit Dues</a></li>
			<li><a href="#timeMachine">Past Semesters</a></li>';
    }
    echo $officerOptions;
}
Exemple #3
0
{
	padding: 10px;
}
button.action
{
	margin-right: 10px;
}
</style>

<?php 
require_once 'functions.php';
if (!$USER) {
    die("You must be logged in to view member profiles.");
}
$officer = isOfficer($USER);
$uber = isUber($USER);
$email = mysql_real_escape_string($_GET['person']);
$query = mysql_query("select `email` from `member` where `email` = '{$email}'");
if (mysql_num_rows($query) == 0) {
    die("No such user");
}
function basic_info($person)
{
    global $officer, $uber;
    $member = mysql_fetch_array(mysql_query("select * from `member` where `email` = '{$person}'"));
    $about = getMemberAttribute('about', $person);
    if ($about == '') {
        $about = "I don't have a quote";
    }
    $html .= "<img class='profile' src='" . profilePic($person) . "'>";
    $html .= "<h3><span style='font-weight: normal; padding-right: 8pt'>" . implode(" and ", positions($person)) . " </span> " . completeNameFromEmail($person) . "</h3>";
Exemple #4
0
<?php

require_once 'functions.php';
if (!isUber($USER)) {
    die("DENIED");
}
function tietable($result)
{
    global $SEMESTER;
    echo "<table class='table'><tr><th>#</th><th>Status</th><th>Comments</th><th>Actions</th></tr>";
    while ($row = mysql_fetch_array($result)) {
        if ($row['borrower'] == '') {
            if ($row['status'] == "Circulating") {
                $status = "Not checked out";
            } else {
                $status = $row['status'];
            }
            $rowstyle = '';
        } else {
            if ($row['status'] == "Circulating") {
                $stat = "Checked out to";
            } else {
                if ($row['status'] == "Lost") {
                    $stat = "Lost by";
                } else {
                    $stat = "<span style='color: red'>{$row['status']}</span>; held by";
                }
            }
            $status = "{$stat} <a href='#profile:{$row['borrower']}'>{$row['borrowerName']}</a> since {$row['dateOut']}";
            $active = mysql_num_rows(mysql_query("select * from `activeSemester` where `member` = '{$row['borrower']}' and `semester` = '{$SEMESTER}'"));
            if ($active) {
Exemple #5
0
function canEditEvents($email)
{
    if (isUber($email)) {
        return true;
    }
    if (hasPosition($email, "President") || hasPosition($email, "Vice President") || hasPosition($email, "Liaison")) {
        return true;
    }
    return false;
}
Exemple #6
0
function rosterPropList($type)
{
    global $USER;
    $officer = isOfficer($USER);
    $uber = isUber($USER);
    $cols = array("#" => 10, "Name" => 260, "Section" => 80, "Contact" => 180, "Location" => 200);
    if ($officer) {
        $cols["Enrollment"] = 40;
    }
    if ($uber || hasPosition($USER, "Treasurer")) {
        $cols["Balance"] = 60;
        $cols["Dues"] = 60;
        $cols["Tie"] = 40;
    }
    if ($uber) {
        $cols["Gigs"] = 40;
        $cols["Score"] = 60;
    }
    if ($type == 'print') {
        unset($cols["Contact"]);
        unset($cols["Location"]);
        unset($cols["Balance"]);
    }
    return $cols;
}
Exemple #7
0
<?php

require_once 'functions.php';
echo "<div id='roster_table' style='width: 100%'><img style='width: 28px; height: 28px; display: block; margin: 0px auto' src='/images/loading.gif'></div>";
if (!isOfficer($USER)) {
    die("Not authorized");
}
echo "<br><br>";
//<div class='btn-group'><button class='btn filter active' data-toggle='button' data-cond='b2'>B2</button><button class='btn filter active' data-toggle='button' data-cond='b1'>B1</button><button class='btn filter active' data-toggle='button' data-cond='t2'>T2</button><button class='btn filter active' data-toggle='button' data-cond='t1'>T1</button></div>
echo "<span class='pull-left'><div class='btn-toolbar' style='display: inline-block' id='roster_filters'>\n\t<div class='btn-group'><button class='btn filter' data-toggle='button' data-cond='inactive'>Inactive</button><button class='btn filter active' data-toggle='button' data-cond='club'>Club</button><button class='btn filter active' data-toggle='button' data-cond='class'>Class</button></div>\n\t<div class='btn-group'><button class='btn filter' data-toggle='button' data-cond='dues'>Dues unpaid</button></div>\n\t</div><span class='spacer'></span><a href='#' class='fmt_tbl' data-format='print'>Printable</a> &middot; <a href='#' class='fmt_tbl' data-format='csv'>CSV</a>\n\t</span>";
//<div class='btn-group'><button class='btn filter' data-toggle='button' data-cond='fail'>Below 80%</button></div>
echo "<span class='pull-right' id='roster_ops'>";
if (isUber($USER)) {
    $result = mysql_fetch_array(mysql_query("select `gigreq` from `semester` where `semester` = '{$SEMESTER}'"));
    $gigreq = $result['gigreq'];
    echo "Volunteer gig requirement:  <input type='text' id='gigreq' style='width: 20px; margin-bottom: 0px' value='{$gigreq}'><button class='btn' onclick='setGigReq(\$(\"#gigreq\").attr(\"value\"))'>Go</button><span class='spacer'></span><div style='display: inline-block'><input type='checkbox' style='margin-top: -16px' name='gigcheck' onclick='setGigCheck(\$(this).attr(\"checked\"))'";
    $result = mysql_fetch_array(mysql_query("select `gigCheck` from `variables`"));
    if ($result['gigCheck']) {
        echo " checked";
    }
    echo "> <div style='display: inline-block'>Include gig requirement<br>in grade calculation</div></div>";
}
if (isUber($USER) || hasPosition($USER, "Treasurer")) {
    echo "<span class='spacer'></span><div class='btn-group'><button class='btn dropdown-toggle' data-toggle='dropdown' href='#'>Dues <span class='caret'></span></button><ul class='dropdown-menu'>";
    echo "<li><a href='#' id='semdues' onclick='addDues(); return false;' data-placement='right' data-toggle='tooltip' title='Adds a \$20 fee to the account of every active member who does not yet have a dues charge for this semester'>Apply semester dues</a></li>";
    echo "<li><a href='#' id='latefee' onclick='addLateFee(); return false;' data-placement='right' data-toggle='tooltip' title='Adds a \$5 fee to the account of every active member whose dues balance for this semester is not \$0'>Add late fee</a></li></ul></div>";
}
echo "</div>";
Exemple #8
0
<?php

require_once 'functions.php';
if (!isUber($USER) && !hasPosition($USER, "Treasurer")) {
    die("Access denied");
}
function transacTypes()
{
    $html = "<select class='ttype' style='width: 140px'>";
    $result = mysql_query("select `id`, `name` from `transacType` order by `name` asc");
    while ($row = mysql_fetch_array($result)) {
        $html .= "<option value='" . $row['id'] . "'";
        if ($row['id'] == 'other') {
            $html .= " selected";
        }
        $html .= ">" . $row['name'] . "</option>";
    }
    $html .= "</select>";
    return $html;
}
if (!isset($_POST['action']) || $_POST['action'] == "none") {
    ?>
<style>
button { margin-left: 10px; }
</style>
<table id='transac' class='table'></table>
<div id='roster_ops' class='pull-right'><button type='button' class='btn' onclick='addMoneyForm()'>Add Transaction</button></div>
<?php 
    exit(0);
}
switch ($_POST['action']) {
* Return a form with which a semester can be removed
*/
function changeSemesterForm()
{
    $html = "\n\t<div id='changeSemesterDiv' class=\"semesterDiv\">\n\t\t<form id='changeSemesterForm'>\n\t\t\t<fieldset>\n\t\t\t    <legend>Change Semester</legend>\n\t\t\t    <select class=\"changeSemesterName\" id=\"changeSemesterName\">\n\t\t\t\t\t<option value=''>Pick One</option>";
    $sql = "select semester from semester where 1";
    $result = mysql_query($sql);
    while ($semesterInfo = mysql_fetch_array($result)) {
        $semester = $semesterInfo['semester'];
        $html .= "\n\t\t\t\t\t<option value='{$semester}'>{$semester}</option>";
    }
    $html .= "</select>\n\t\t\t\t <br><button type='button' class=\"btn {$btnClasses} semesterChange\" id='semesterChange' disabled>Switch to this semester!</button>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n\t<script>checkChangeSemesterFields();</script>";
    return $html;
}
/**
* Return a page where the President can add a semester or change the current semester
*/
function semesterPage()
{
    $html = "\n\t<div id='semester'>\n\t\t<div>\n\t\t    <h3>It Looks Like You Wanna Do Some Work With Semesters!</h3>\n\t\t</div>\n\t\t<div>\n\t\t\t<p>This is a form that will allow you to add and remove semesters in Gree-C-Web's database. It will also change the current semester.</p>\n\t\t    <p><strong>WARNING:</strong> Removing a semester will remove all related events and attendance info <strong>permanently</strong> and <strong>completely</strong> . And changing the current semester will change the entire face of the website.  Only stuff from the current semester is shown on the main website.  Changing the semester also changes every member's status to 'inactive' until he logs in and confirms himself.</p>\n\t\t    <p>To see old stuff, officers can click on the \"Actions &gt; Look Into The Past\" option.</p>\n\t\t    <p>With great power comes great potential to screw everyone over.  Use this feature wisely.</p>\n\t\t\t<p>Now, pick your poison:</p>\n\t\t\t<div id='semesterOptions'>\n\t\t\t\t<button type=\"button\" class=\"btn semesterChoice\" id=\"newSemester\" value=\"newSemesterDiv\">Add New Semester</button>\n\t\t\t\t<button type=\"button\" class=\"btn semesterChoice\" id=\"deleteSemester\" value=\"removeSemesterDiv\">Delete a Semester</button>\n\t\t\t\t<button type=\"button\" class=\"btn semesterChoice\" id=\"changeSemester\" value=\"changeSemesterDiv\">Change Current Semester</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<br>\n\t\t" . newSemesterForm() . "\n\t\t" . removeSemesterForm() . "\n\t\t" . changeSemesterForm() . "\n\t</div>";
    return $html;
}
//if they aren't the President, lock 'em out
if (isUber($USER)) {
    echo semesterPage();
} else {
    echo "<p id='title'><°o°> You're not supposed to be here, mate. <°o°></p>";
}
?>