forked from server/landingpage
updated extras to mysqli
This commit is contained in:
parent
4e0af9ecd4
commit
4d378e9579
@ -1,6 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
header('Content-Type: text/html; charset=iso-8859-1');
|
header('Content-Type: text/html; charset=iso-8859-1');
|
||||||
|
|
||||||
$con = mysql_connect("localhost","extras","extrauser");
|
$mysqli = new mysqli("localhost","extras","extrauser","forum");
|
||||||
mysql_select_db("forum", $con);
|
if ($mysqli->connect_errno){
|
||||||
|
echo "Error: Failed to make a MySQL connection: \n";
|
||||||
|
echo "Errno: " . $mysqli->connect_errno . "\n";
|
||||||
|
echo "Error: " . $mysqli->connect_error . "\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -21,9 +21,9 @@ $abfrage = "SELECT u.username, u.email, u.userTitle, v.userOption45, v.userOptio
|
|||||||
INNER JOIN wcf1_user_option_value AS v ON u.userID = v.userID
|
INNER JOIN wcf1_user_option_value AS v ON u.userID = v.userID
|
||||||
WHERE g.groupName ='$fachschaft'
|
WHERE g.groupName ='$fachschaft'
|
||||||
ORDER BY v.userOption47";
|
ORDER BY v.userOption47";
|
||||||
$ergebnis = mysql_query($abfrage);
|
$ergebnis = $mysqli->query($abfrage);
|
||||||
|
|
||||||
while($data = mysql_fetch_array($ergebnis)){
|
while($data = $ergebnis->fetch_assoc()){
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>".$data['userOption47']."</td>";
|
echo "<td>".$data['userOption47']."</td>";
|
||||||
echo "<td>".$data['username']."</td>";
|
echo "<td>".$data['username']."</td>";
|
||||||
@ -33,16 +33,17 @@ while($data = mysql_fetch_array($ergebnis)){
|
|||||||
echo "<td>".$data['userOption28']."</td>";
|
echo "<td>".$data['userOption28']."</td>";
|
||||||
echo "<td>".$data['userOption12']."</td>";
|
echo "<td>".$data['userOption12']."</td>";
|
||||||
echo "<td>".$data['userOption15'];
|
echo "<td>".$data['userOption15'];
|
||||||
if ($data['userOption53'] == "1" || $data['userOption53'] == "Ja") {
|
if ($data['userOption53'] == "1" || $data['userOption53'] == "Ja") {
|
||||||
echo ", Schlüsselbesitzer";
|
echo ", Schlüsselbesitzer";
|
||||||
}
|
} else {
|
||||||
else {echo "";
|
echo "";
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_close($con);
|
$mysqli->free();
|
||||||
|
$mysqli->close();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -18,9 +18,9 @@ $abfrage = "SELECT v.userOption47, v.userOption53
|
|||||||
FROM wcf1_user AS u, wcf1_user_option_value AS v
|
FROM wcf1_user AS u, wcf1_user_option_value AS v
|
||||||
WHERE u.userID = v.userID AND u.userTitle LIKE '%SOWI%' AND not u.usertitle LIKE '%ex-SOWI%' AND not v.userOption53 LIKE 0 AND not v.userOption53 LIKE '%Nein%' AND not u.usertitle LIKE '%SOWI-extern%'
|
WHERE u.userID = v.userID AND u.userTitle LIKE '%SOWI%' AND not u.usertitle LIKE '%ex-SOWI%' AND not v.userOption53 LIKE 0 AND not v.userOption53 LIKE '%Nein%' AND not u.usertitle LIKE '%SOWI-extern%'
|
||||||
ORDER BY v.userOption47";
|
ORDER BY v.userOption47";
|
||||||
$ergebnis = mysql_query($abfrage);
|
$ergebnis = $mysqli->query($abfrage);
|
||||||
|
|
||||||
while($data = mysql_fetch_array($ergebnis)){
|
while($data = $ergebnis->fetch_assoc()){
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>".$data['userOption47']."</td>";
|
echo "<td>".$data['userOption47']."</td>";
|
||||||
echo "<td> X </td>";
|
echo "<td> X </td>";
|
||||||
@ -29,7 +29,8 @@ while($data = mysql_fetch_array($ergebnis)){
|
|||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_close($con);
|
$mysqli->free();
|
||||||
|
$mysqli->close();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -18,41 +18,39 @@ $abfrage = "SELECT u.username, u.email, u.userTitle, v.userOption45, v.userOptio
|
|||||||
FROM wcf1_user AS u, wcf1_user_option_value AS v
|
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%'
|
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";
|
ORDER BY v.amt DESC";
|
||||||
$ergebnis = mysql_query($abfrage);
|
$ergebnis = $mysqli->query($abfrage);
|
||||||
|
|
||||||
while($data = mysql_fetch_array($ergebnis)){
|
while($data = $ergebnis->fetch_assoc()){
|
||||||
echo "<tr><td>";
|
echo "<tr><td>";
|
||||||
if ($data['userOption47'] != NULL){
|
if ($data['userOption47'] != NULL){
|
||||||
echo $data['userOption47'];
|
echo $data['userOption47'];
|
||||||
}
|
} else {
|
||||||
else {
|
echo "USERNAME:";echo $data['username'];
|
||||||
echo "USERNAME:";echo $data['username'];
|
}
|
||||||
}
|
echo "</td><td>";
|
||||||
echo "</td><td>";
|
if ($data['amt'] == "10") {
|
||||||
if ($data['amt'] == "10") {
|
echo "Fachschaftssprecher";
|
||||||
echo "Fachschaftssprecher";
|
} elseif ($data['amt'] == "9") {
|
||||||
}
|
echo "stv. Fachschaftssprecher";
|
||||||
elseif ($data['amt'] == "9") {
|
} elseif ($data['amt'] == "3") {
|
||||||
echo "stv. Fachschaftssprecher";
|
echo "gewähltes Mitglied";
|
||||||
}
|
} else {
|
||||||
elseif ($data['amt'] == "3") {
|
echo "ehrenamtliches Mitglied";
|
||||||
echo "gewähltes Mitglied";
|
}
|
||||||
}
|
echo "</td>";
|
||||||
else {echo "ehrenamtliches Mitglied";
|
echo "<td>".$data['userOption15']."</td>";
|
||||||
}
|
echo "<td>";
|
||||||
echo "</td>";
|
if ($data['userOption53'] == "1" || $data['userOption53'] == "Ja" ) {
|
||||||
echo "<td>".$data['userOption15']."</td>";
|
echo "Schlüsselbesitzer";
|
||||||
echo "<td>";
|
} else {
|
||||||
if ($data['userOption53'] == "1" || $data['userOption53'] == "Ja" ) {
|
echo "";
|
||||||
echo "Schlüsselbesitzer";
|
}
|
||||||
}
|
echo "</td>";
|
||||||
else {echo "";
|
|
||||||
}
|
|
||||||
echo "</td>";
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_close($con);
|
$mysqli->free();
|
||||||
|
$mysqli->close();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -18,9 +18,9 @@ $abfrage = "SELECT v.userOption47, v.userOption53
|
|||||||
FROM wcf1_user AS u, wcf1_user_option_value AS v
|
FROM wcf1_user AS u, wcf1_user_option_value AS v
|
||||||
WHERE u.userID = v.userID AND u.userTitle LIKE '%WIAI%' AND not u.usertitle LIKE '%ex-WIAI%' AND not v.userOption53 LIKE 0 AND not v.userOption53 LIKE '%Nein%' AND not u.usertitle LIKE '%WIAI-extern%'
|
WHERE u.userID = v.userID AND u.userTitle LIKE '%WIAI%' AND not u.usertitle LIKE '%ex-WIAI%' AND not v.userOption53 LIKE 0 AND not v.userOption53 LIKE '%Nein%' AND not u.usertitle LIKE '%WIAI-extern%'
|
||||||
ORDER BY v.userOption47";
|
ORDER BY v.userOption47";
|
||||||
$ergebnis = mysql_query($abfrage);
|
$ergebnis = $mysqli->query($abfrage);
|
||||||
|
|
||||||
while($data = mysql_fetch_array($ergebnis)){
|
while($data = $ergebnis->fetch_assoc()){
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>".$data['userOption47']."</td>";
|
echo "<td>".$data['userOption47']."</td>";
|
||||||
echo "<td> X </td>";
|
echo "<td> X </td>";
|
||||||
@ -29,7 +29,8 @@ while($data = mysql_fetch_array($ergebnis)){
|
|||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_close($con);
|
$mysqli->free();
|
||||||
|
$mysqli->close();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user