Ebenfalls nciht

function getStructure($customerid, $folderid) {
global $db, $common, $customer;
$customerid = $customer->returnIntegerID($customerid);
$res = $db->query("SELECT `documentFolderID`, `documentFolderName`
FROM `documentFolder`
WHERE `documentFolderParent` = '".$folderid."'
AND `documentFolderCustomer` = '".$customerid."'");
$i = 0;
while($row = mysql_fetch_assoc($res)) {
$tmp[] = array("id" => $row["documentFolderID"], "type" => "folder", "name" => $row["documentFolderName"]);
}
$res = $db->query("SELECT `documentFileID`, `documentFileName`
FROM `documentFile`
WHERE `documentFileFolder` = '".$folderid."'
AND `documentFileCustomer` = '".$customerid."'");
while($row = mysql_fetch_assoc($res)) {
$tmp[] = array("id" => $row["documentFileID"], "type" => "file", "name" => $row["documentFileName"]);
}
$sortTmp = array();
foreach($tmp as $key => $value) {
$sortTmp[$key] = $value["name"];
}
usort($sortTmp, "cmp");
array_multisort($sortTmp, SORT_ASC, SORT_STRING, $tmp);
return $tmp;
}
array(5) { [0]=> string(9) "Dokumente" [1]=> string(13) "nokia_n95.jpg" [2]=> string(19) "nokia_n95_bild2.jpg" [3]=> string(24) "Vertragsbestaetigung.pdf" [4]=> string(8) "Verträge" }
return $sortTmp;
Kommentar