"SET lc_time_names = 'nl_NL'")); $sql = "SELECT ID , UserName , DATE_FORMAT(RegistrationDate, '%d %b %Y') RegistrationDate , DATEDIFF(CURDATE(), RegistrationDate) NrOfRegisteredDays , UI FROM User WHERE ID = " . $id . " ORDER BY UserName"; $stmt=$con->prepare($sql); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?>
'; echo 'Regel: '.$e->getLine(). '
'; echo 'Bestand: '.$e->getFile(). '
'; echo 'Foutmelding: '.$e->getMessage(); echo ''; } ?>

Crewgeschiedenis

"SET lc_time_names = 'nl_NL'")); $sql= "SELECT AllData.Subsite , Unit.ID UnitID , AllData.Unit , AllData.UnitEdition , AllData.UserName , AllData.UserID , AllData.Startdate SortDate , DATE_FORMAT(AllData.Startdate, '%d %b %Y') Startdate , CASE WHEN DATE_FORMAT(AllData.Enddate, '%d-%m-%Y') = '00-00-0000' THEN 'heden' ELSE DATE_FORMAT(AllData.Enddate, '%d %b %Y') END Enddate , AllData.StartURL , AllData.EndURL , AllData.NrOfDays FROM AllData LEFT JOIN (SELECT DISTINCT ID, Subsite, Name FROM Unit) Unit ON AllData.Unit = Unit.Name WHERE UserID = " . $id . " ORDER BY UserID, SortDate, Unit"; $stmt=$con->prepare($sql); $stmt->execute(); $t = 0; while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if($row['Enddate'] == 'heden' ) { echo ''; } else { echo ''; } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } } // Error handeling catch(PDOException $e) { echo '
';
							echo 'Regel: '.$e->getLine(). '
'; echo 'Bestand: '.$e->getFile(). '
'; echo 'Foutmelding: '.$e->getMessage(); echo '
'; } ?>
# Subsite Functie Duur Startdatum Einddatum
' . ++$t . '' . $row['Subsite'] . ''; // With Unit Edition if ($row['UnitEdition'] <> '0000') { // Active + forum-mod if($row['Unit'] <> 'Forum Admin' AND $row['Subsite'] == 'Forum' AND $row['Enddate'] == 'heden') { echo '' . $row['Unit'] . '-mod (' . $row['UnitEdition'] . ')'; } // Active elseif($row['Enddate'] == 'heden') { echo '' . $row['Unit'] . ' (' . $row['UnitEdition'] . ')'; } // Inactive + forum-mod elseif($row['Unit'] <> 'Forum Admin' AND $row['Subsite'] == 'Forum') { echo '' . $row['Unit'] . '-mod (' . $row['UnitEdition'] . ')'; } // Inactive else { echo $row['Unit'] . ' (' . $row['UnitEdition'] . ')'; } } // Without Unit Edition else { // Active + Forum Admin if($row['Unit'] == 'Forum Admin' AND $row['Subsite'] == 'Forum' AND $row['Enddate'] == 'heden') { echo '' . $row['Unit'] . ''; } // Active + forum-mod elseif($row['Unit'] <> 'Forum Admin' AND $row['Subsite'] == 'Forum' AND $row['Enddate'] == 'heden') { echo '' . $row['Unit'] . ' -mod'; } // Active elseif($row['Enddate'] == 'heden') { echo '' . $row['Unit'] . ''; } // Inactive + Forum Admin elseif($row['Unit'] == 'Forum Admin' AND $row['Subsite'] == 'Forum') { echo '' . $row['Unit'] . ''; } // Inactive + forum-mod elseif($row['Unit'] <> 'Forum Admin' AND $row['Subsite'] == 'Forum') { echo '' . $row['Unit'] . '-mod'; } // Inactive else { echo $row['Unit']; } } echo '' . $row['NrOfDays'] . ' dagen'; if ($row['StartURL'] <> "0") { echo '' . $row['Startdate'] . ''; } else { echo $row['Startdate']; } echo ''; if ($row['EndURL'] <> "0") { echo '' . $row['Enddate'] . ''; } else { echo $row['Enddate']; } echo '

Tijdlijn

'; $RowTimelineHeight = $TimelineHeight->fetch(PDO::FETCH_ASSOC); echo '
'; } // Error handeling catch(PDOException $e) { echo '
';
							echo 'Regel: '.$e->getLine(). '
'; echo 'Bestand: '.$e->getFile(). '
'; echo 'Foutmelding: '.$e->getMessage(); echo '
'; } ?>

Taartgrafiek

prepare($sql); // een closure functie, zodat $stmt automatisch beschikbaar is binnen de functie $fetchAll = function ($id, $subsite) use ($stmt) { $results = []; $stmt->execute(array($id, $subsite)); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $results[] = $row; } return $results; }; foreach (array('Forum', 'Frontpage', 'FOK!', 'Games', 'Sport') as $subsite) { //$results = $fetchAll(array($subsite,$id)); $results = $fetchAll($id, $subsite); $countRecord = 0; // ga door naar volgende subsite indien geen resultaten (lege array) if (!$results) { continue; } echo ''; echo '
'; } } // Error handeling catch(PDOException $e) { echo '
';
	echo 'Regel: '.$e->getLine(). '
'; echo 'Bestand: '.$e->getFile(). '
'; echo 'Foutmelding: '.$e->getMessage(); echo '
'; } ?>