// Only list directories or PNG files. Do not list a directory if it // contains an .ignore file. if (is_dir($data['filedirectory'] . $item)) { if (file_exists($data['filedirectory'] . "/{$item}/.ignore")) { continue; } $data['directories'][] = $item; } else { if (strtolower(end(explode('.', $item))) == 'png') { $data['fileInfo'] = $dirdb->File_Fetch_ByFilename($item); if ($data['fileInfo'] && is_array($data['fileInfo'])) { $data['fileInfo']['filename'] = $item; $data['fileInfo']['filesize'] = nicefilesize(filesize($data['filedirectory'] . "/" . $item)); $data['files'][] = $data['fileInfo']; } else { $data['files'][] = array('filename' => $item, 'filesize' => nicefilesize(filesize($data['filedirectory'] . "/" . $item))); } } } } closedir($dir); unset($data['fileInfo']); // Sort the directories and files alphabetically sort($data['directories']); function sortFiles($a, $b) { return strcmp($a['filename'], $b['filename']); } usort($data['files'], 'sortFiles'); //header("Content-Type: text/plain"); //print_r($data);
<?php // English language file // Created by blast007 $lang = array(); $lang['home'] = "Home"; $lang['login'] = "******"; $lang['uploadimages'] = "Upload Images"; $lang['moderationqueue'] = "Moderation Queue"; $lang['logout'] = "Logout"; $lang['termsofservice'] = "Terms Of Service"; $lang['setlanguage'] = "Set Language"; $lang['uploadsupport'] = "Currently only PNG files are supported. There is a limit of " . nicefilesize($config['upload']['maxFileSize']) . " per file, and you may upload " . $config['upload']['maxFiles'] . " files at a time."; $lang['success'] = "Success"; $lang['successfulUpload'] = "The following files were successfully uploaded and are now awaiting moderation: "; $lang['fileinformation'] = "File Information"; $lang['filenamewas'] = "Filename of this file was"; $lang['imagefile'] = "Image File"; $lang['authorinformation'] = "Author Information"; $lang['authorname'] = "Author Name"; $lang['selectalicense'] = "Select a License"; $lang['licensename'] = "License Name"; $lang['view'] = "View"; $lang['specifylicenseurlortext'] = "Please specify a URL to the license and/or the license text itself."; $lang['licenseurl'] = "License URL"; $lang['licensetext'] = "License Text"; $lang['thisimagetos'] = "I confirm that this image does not violate the <a href=\"" . $config['paths']['baseURL'] . "tos.php\" onclick=\"javascript:return doPopup(this.href, 'tos');\">Terms Of Service</a>."; $lang['otherinformation'] = "Other Information"; $lang['uploaderinformation'] = "Uploader Information"; $lang['firstname'] = "First Name"; $lang['lastname'] = "Last Name";