{source}
<?php
if ($_SERVER['DOCUMENT_ROOT']=="C:/xampp/htdocs") {
include $_SERVER['DOCUMENT_ROOT']. "/unstest/includes/unsvar.php";
$pfad = "/unstest/images/comprofiler/";
}
Else {
include $_SERVER['DOCUMENT_ROOT']."/includes/unsvar.php";
$pfad = "/images/comprofiler/";
}
$mysqli = new mysqli($dbhost, $dbusername, $dbpassword, $dbname);
if ($mysqli -> connect_error) {
echo "Fehler bei Verbindung: " . mysqli_connect_error();
exit();
}
if (!$mysqli -> set_charset("utf8")) {
echo "Fehler beim Laden von UTF8 " . $mysqli -> error;
}
$ergebnis = $mysqli -> query("SELECT
*
FROM
unsw_mimo AS mimo
LEFT JOIN unsw_comprofiler as prof ON (mimo.userid=prof.id)
ORDER BY zeitraum DESC");
echo "
<div style='width:100%;'>
<table style='width: auto; margin:0 auto;';>
<tbody>
<tr>
<th class='datenh dle'>Monat</th>
<th class='datenh dce'></th>
<th class='datenh dle'>Name</th>
<th class='datenh dle'>Grund</th>
</tr>";
$i=0;
while ($ausgabe = $ergebnis -> fetch_array()) {
if (substr($ausgabe['avatar'], 0, 7)=='gallery') $ausgabe['avatar']='fotolos.jpg';
if ($ausgabe['alternativ']==NULL){

$name = $ausgabe['lastname'] . " " . $ausgabe['firstname']; 
} else {

$name = $ausgabe['alternativ'];
}
echo "
<tr class='row_" . ($i % 2) . "'>
<td class='datenb dle hidden-phone' style='height:60px;'>" . $monate[date('n', strtotime($ausgabe['zeitraum']))] . " " . date('Y', strtotime($ausgabe['zeitraum'])) . "</td>
<td class='datenb dce hidden-tablet hidden-desktop' style='height:60px;'>" . date('m', strtotime($ausgabe['zeitraum'])) . "<br>" . date('Y', strtotime($ausgabe['zeitraum'])) . "</td>";
if ($ausgabe['alternativfoto']==NULL){
echo "<td class='datenb dce'><a href='" . $pfad . $ausgabe['avatar'] . "' target='_blank' data-mediabox='caption[" . $name . " - " . $monate[date('n', strtotime($ausgabe['zeitraum']))] . " " . date('Y', strtotime($ausgabe['zeitraum'])) . " - " . $ausgabe['grund'] . "]' class='jcepopup'><img style='width: 40px; margin: 5px; border: 1px solid #000000; vertical-align: top;' src='" . $pfad . "tn" . $ausgabe['avatar'] . "' alt='" . $name . "' /></a></td>";
} else {
$foto = implode("/", explode("\\",substr($ausgabe['alternativfoto'], 12, strpos($ausgabe['alternativfoto'], 'params') - 15)));
$tnfoto = substr($foto,0,14)."tn".substr($foto,14);
echo "<td class='datenb dce'><a href='$pfadalt/$foto' target='_blank' data-mediabox='caption[" . $name . " - " . $monate[date('n', strtotime($ausgabe['zeitraum']))] . " " . date('Y', strtotime($ausgabe['zeitraum'])) . " - " . $ausgabe['grund'] . "]' class='jcepopup'><img style='width: 40px; margin: 5px; border: 1px solid #000000; vertical-align: top;' src='$pfadalt/$tnfoto' alt='" . $ausgabe['lastname'] . "' /></a></td>";
}
echo "<td class='datenb dle'>" . $name . "</td>";
echo "<td class='datenb dle'>" . $ausgabe['grund'] . "</td>
</tr>";
$i++;
}
echo "
</tbody>
</table>
</div>";
$ergebnis -> close();
$mysqli -> close();
?>
{/source}
Home
Mitglied des Monats
Abgelaufen- Details
- Geschrieben von: geiss10
- Kategorie: Berichte
- Zugriffe: 11573