Bij mijn medewerkerspagina stuit ik op de volgende error's:
Warning: array_multisort() [function.array-multisort]: Array sizes are inconsistent in /home/pbCVHNGELx/domains/taatusafe.com/public_html/leden/medewerkers.php on line 75
fantasy
Helderblauw
en
array_multisort() [function.array-multisort]: Array sizes are inconsistent in /home/pbCVHNGELx/domains/taatusafe.com/public_html/leden/medewerkers.php on line 112
fredje200
hellgast
In het volgende script :
<?php
// medewerkers.php
if(!defined("site")) {
echo "<center>Access denied!</center> \n";
} else {
echo $grootcontent1;
if(!isset($_SESSION[$exts."_Uid"])) {
echo $content1;
echo "Je bent niet ingelogd! \n";
echo $content2;
} else {
echo "<table border='0' align='center' width='100%'> \n";
echo "<tr> \n";
echo "<td align='center' valign='top' width='50%'> \n";
echo "<table border='0' align='center' width='100%'> \n";
echo "<tr> \n";
echo "<td align='center' class='top'><b>Administrators</b></td> \n";
echo "</tr> \n";
echo "<tr> \n";
echo "<td align='center' valign='top'> \n";
$administratorsql = mysql_query("SELECT * FROM medewerkers WHERE rank='Administrator'");
$administratorarray = array();
while($administrator = mysql_fetch_object($administratorsql)) {
$administratorarray[] = array("Uid" => $administrator->Uid, "username" => findusername($administrator->Uid));
}
if(count($administratorarray) == 0) {
echo "<i>Geen</i> \n";
} else {
foreach($administratorarray as $key => $row) {
$name[$key] = $row["username"];
}
array_multisort($name, SORT_ASC, $administratorarray);
foreach($administratorarray as $administrator) {
echo "<a ".findclass($administrator["Uid"])." href='?p=profiel&user=".$administrator["Uid"]."'>".$administrator["username"]."</a><br> \n";
}
}
echo "</td> \n";
echo "</tr> \n";
echo "</table> \n";
echo "<br> \n";
echo "<table border='0' align='center' width='100%'> \n";
echo "<tr> \n";
echo "<td align='center' class='top'><b>Moderators</b></td> \n";
echo "</tr> \n";
echo "<tr> \n";
echo "<td align='center' valign='top'> \n";
$moderatorsql = mysql_query("SELECT * FROM medewerkers WHERE rank='Moderator'");
$moderatorarray = array();
while($moderator = mysql_fetch_object($moderatorsql)) {
if(!is_crew("Administrator", $moderator->Uid)) {
$moderatorarray[] = array("Uid" => $moderator->Uid, "username" => findusername($moderator->Uid));
}
}
if(count($moderatorarray) == 0) {
echo "<i>Geen</i> \n";
} else {
foreach($moderatorarray as $key => $row) {
$name[$key] = $row["username"];
}
array_multisort($name, SORT_ASC, $moderatorarray);
foreach($moderatorarray as $moderator) {
echo "<a ".findclass($moderator["Uid"])." href='?p=profiel&user=".$moderator["Uid"]."'>".$moderator["username"]."</a><br> \n";
}
}
echo "</td> \n";
echo "</tr> \n";
echo "</table> \n";
echo "</td> \n";
echo "<td align='center' valign='top' width='50%'> \n";
echo "<table border='0' align='center' width='100%'> \n";
echo "<tr> \n";
echo "<td align='center' class='top'><b>T-reporters</b></td> \n";
echo "</tr> \n";
echo "<tr> \n";
echo "<td align='center' valign='top'> \n";
$treportersql = mysql_query("SELECT * FROM medewerkers WHERE rank='T-reporter'");
$treporterarray = array();
while($treporter = mysql_fetch_object($treportersql)) {
if(!is_crew("Administrator", $treporter->Uid)) {
$treporterarray[] = array("Uid" => $treporter->Uid, "username" => findusername($treporter->Uid));
}
}
if(count($treporterarray) == 0) {
echo "<i>Geen</i> \n";
} else {
foreach($treporterarray as $key => $row) {
$name[$key] = $row["username"];
}
array_multisort($name, SORT_ASC, $treporterarray);
foreach($treporterarray as $treporter) {
echo "<a ".findclass($treporter["Uid"])." href='?p=profiel&user=".$treporter["Uid"]."'>".$treporter["username"]."</a><br> \n";
}
}
echo "</td> \n";
echo "</tr> \n";
echo "</table> \n";
echo "</td> \n";
echo "</tr> \n";
echo "</table> \n";
}
echo $grootcontent2;
}
?>
Weet iemand soms raad ?
Groetjes