landingpage/extras/tasks.php
2016-05-31 12:44:44 +02:00

61 lines
1.8 KiB
PHP

date_default_timezone_set('Europe/Berlin');
ini_set('date.timezone', 'Europe/Berlin');
<html>
<head>
<title>Aufgaben in der Fachschaft <?php echo $fachschaft; ?> </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<link rel="stylesheet" type="text/css" href="tasks.css" />
</head>
<body>
<h1>Aufgaben in der Fachschaft <?php echo $fachschaft; ?> - Stand <?php
echo date(DATE_RFC822)
?></h1>
<table>
<tr><th>Name</th><th>Amt</th><th width="50px">Weitere Aufgaben</th><th>Sonstiges</th></tr>
<?php
include 'include.php';
$abfrage = "SELECT u.username, u.email, u.userTitle, v.userOption45, v.userOption46, v.userOption47, v.userOption28, v.userOption12, v.userOption15, v.userOption53, v.amt
FROM wcf1_user AS u, wcf1_user_option_value AS v
WHERE u.userID = v.userID AND u.userTitle LIKE '%$fachschaft%' AND not u.usertitle LIKE '%ex-$fachschaft%' AND not u.usertitle LIKE '%$fachschaft-extern%'
ORDER BY v.amt DESC";
$ergebnis = $mysqli->query($abfrage);
while($data = $ergebnis->fetch_assoc()){
echo "<tr><td>";
if ($data['userOption47'] != NULL){
echo $data['userOption47'];
} else {
echo "USERNAME:";echo $data['username'];
}
echo "</td><td>";
if ($data['amt'] == "10") {
echo "Fachschaftssprecher";
} elseif ($data['amt'] == "9") {
echo "stv. Fachschaftssprecher";
} elseif ($data['amt'] == "3") {
echo "gew&auml;hltes Mitglied";
} else {
echo "ehrenamtliches Mitglied";
}
echo "</td>";
echo "<td>".$data['userOption15']."</td>";
echo "<td>";
if ($data['userOption53'] == "1" || $data['userOption53'] == "Ja" ) {
echo "Schl&uuml;sselbesitzer";
} else {
echo "";
}
echo "</td>";
echo "</tr>";
}
$mysqli->free();
$mysqli->close();
?>
</table>
</body>
</html>