コード例 #1
0
ファイル: loadDetails.php プロジェクト: showermat/gree-c-web
			<td><span class="eventDetailsValue">' . $gigDetails['contactPhone'] . '</span></td>
		</tr>
		<tr>
			<td class="eventDetialsKey">Price:</td>
			<td><span class="eventDetailsValue">' . $gigDetails['price'] . '</span></td>
		</tr>
		</table>
		</div>
	';
}
$html = $html . '
	<table class="table no-highlight">
	<tr>
		<td colspan="2"><div class="btn" id="attendingButton">see who\'s attending</div></td>
	</tr>
	<tr>
		<td colspan="2"><div class="btn" id="carpoolsButton">carpools</div></td>
	</tr>
';
if (isOfficer($userEmail) || positionFromEmail($userEmail) == 'Section Leader' && getEventType($eventDetails['type']) == "Sectional") {
    $html = $html . '
		<tr>
			<td><div class="btn" id="attendanceButton" onclick="updateEventAttendance(\'' . $eventNo . '\');">update attendance</div></td>
		</tr>
		<tr>
			<td id="editButtonTd"><div class="btn" id="editButton">edit details</div></td>
		</tr>
	';
}
$html = $html . '</table>';
echo $html;
コード例 #2
0
ファイル: functions.php プロジェクト: showermat/gree-c-web
function isOfficer($email)
{
    //this should be done with numbers...
    if (positionFromEmail($email) == "Manager" || positionFromEmail($email) == "Ombudsman" || positionFromEmail($email) == "Internal VP" || positionFromEmail($email) == "External VP" || positionFromEmail($email) == "Treasurer" || positionFromEmail($email) == "President") {
        return true;
    } else {
        return false;
    }
}
コード例 #3
0
ファイル: editMembers.php プロジェクト: showermat/gree-c-web
$userEmail = $_COOKIE['email'];
if (isset($_POST['type'])) {
    $memberType = $_POST['type'];
} else {
    $memberType = 'all';
}
switch ($memberType) {
    case 'active':
        $c = "confirmed=1";
        break;
    case 'inactive':
        $c = "confirmed=0";
        break;
    default:
        $c = "1";
        break;
}
$sql = "select * from member where {$c}";
$html = "<table class='table every-other no-highlight' id='editMembersTable'>";
$html .= "\n\t\t<thead>\n\t\t<tr>\n\t\t\t<th>Confirmed</th>\n\t\t\t<th>First Name</th>\n\t\t\t<th>Pref Name</th>\n\t\t\t<th>Last Name</th>\n\t\t\t<th>Section</th>\n\t\t\t<th>Email</th>\n\t\t\t<th>Phone</th>\n\t\t\t<th>Position</th>\n\t\t\t<th>Picture</th>\n\t\t\t<th>Sectional</th>\n\t\t\t<th>Registration</th>\n\t\t\t<th>Tie</th>\n\t\t\t<th>Tie Number</th>\n\t\t\t<th>Passengers</th>\n\t\t\t<th>On campus</th>\n\t\t\t<th>Location</th>\n\t\t\t<th>About</th>\n\t\t\t<th>Major</th>\n\t\t\t<th>Tech Year</th>\n\t\t\t<th>Club Year</th>\n\t\t\t<th>Gchat</th>\n\t\t\t<th>Twitter</th>\n\t\t\t<th>Gateway Drug</th>\n\t\t\t<th>Conflicts</th>\n\t\t</tr>\n\t\t</thead>";
//$members = getConfirmedMembers();
$members = mysql_query($sql);
//print_r(mysql_fetch_array($members, MYSQL_ASSOC));
while ($row = mysql_fetch_array($members, MYSQL_ASSOC)) {
    //use class for the SQL attribute name we're editing
    //use tr's id for the person we're editing
    $html .= "<tr id='" . $row['email'] . "'>\n\t\t<td class='confirmed'>" . ($row["confirmed"] == '0' ? '<span data-value="0" class="label">inactive</span>' : '<span data-value="1" class="label label-info">active</span>') . "</td>\n\t\t<td class='firstName'>" . $row["firstName"] . "</td>\n\t\t<td class='prefName'>" . $row["prefName"] . "</td>\n\t\t<td class='lastName'>" . $row["lastName"] . "</td>\n\t\t<td class='section'>" . $row["section"] . "</td>\n\t\t<td class='email'><a data-value='" . $row["email"] . "' href='mailto:" . $row["email"] . "'>" . $row["email"] . "</a></td>\n\t\t<td class='phone'>" . $row["phone"] . "</td>\n\t\t<td class='position'>" . positionFromEmail($row["email"]) . "</td>\n\t\t<td class='picture'><img data-value='" . $row['picture'] . "' src='" . $row["picture"] . "' /></td>\n\t\t<td class='sectional'>" . $row["sectional"] . "</td>\n\t\t<td class='registration'>" . ($row["registration"] == '0' ? '<span data-value="0" class="label">Club</span>' : '<span data-value="1" class="label label-info">Class</span>') . "</td>\n\t\t<td class='tie'>" . ($row["tie"] == '0' ? '<span data-value="0" class="label">No tie</span>' : '<span data-value="1" class="label label-warning">Has tie</span>') . "</td>\n\t\t<td class='tieNum'>" . ($row["tieNum"] == '-1' ? '<span data-value="-1" class="label label-warning">Thief</span>' : '<span data-value="' . $row['tieNum'] . '" class="label">' . $row['tieNum'] . '</span>') . "</td>\n\t\t<td class='passengers'><span data-value='" . $row['passengers'] . "' class='badge'>" . $row["passengers"] . "</span></td>\n\t\t<td class='onCampus'>" . ($row["onCampus"] == '0' ? '<span data-value="0" class="label">off campus</span>' : '<span data-value="1" class="label label">on campus</span>') . "</td>\n\t\t<td class='location'>" . $row["location"] . "</td>\n\t\t<td class='about'>" . $row["about"] . "</td>\n\t\t<td class='major'>" . $row["major"] . "</td>\n\t\t<td class='techYear'>" . $row["techYear"] . "</td>\n\t\t<td class='clubYear'>" . $row["clubYear"] . "</td>\n\t\t<td class='gChat'>" . $row["gChat"] . "</td>\n\t\t<td class='twitter'>" . $row["twitter"] . "</td>\n\t\t<td class='gatewayDrug'>" . $row["gatewayDrug"] . "</td>\n\t\t<td class='conflicts'>" . $row["conflicts"] . "</td>\n\t";
    $html .= "</tr>";
}
$html .= '</table>';
echo $html;