echo '<table class="highlight" id="imageTable"><thead>'; echo '<tr><th class="imgthumb" ></th><th>' . i18n_r('FILE_NAME') . '</th>'; echo '<th class="file_size right">' . i18n_r('FILE_SIZE') . '</th>'; if ($showperms) { echo '<th class="file_perms right">' . i18n_r('PERMS') . '</th>'; } echo '<th class="file_date right">' . i18n_r('DATE') . '</th>'; echo '<th class="file_actions"><!-- actions --></th></tr>'; echo '</thead><tbody>'; if (count($dirsSorted) != 0) { $foldercount = 0; // show folders foreach ($dirsSorted as $upload) { # check to see if folder is empty $directory_delete = null; if (check_empty_folder($path . $upload['name']) && $allowdelete) { $directory_delete = '<a class="delconfirm" title="' . i18n_r('DELETE_FOLDER') . ': ' . rawurlencode($upload['name']) . '" href="deletefile.php?path=' . $urlPath . '&folder=' . rawurlencode($upload['name']) . '&nonce=' . get_nonce("delete", "deletefile.php") . '">×</a>'; } $directory_size = '<span>' . folder_items($path . $upload['name']) . ' ' . i18n_r('ITEMS') . '</span>'; echo '<tr class="all folder ' . $upload['name'] . '" >'; // echo '<td class="imgthumb"><i class="file ext- fa fa-3x fa-fw fa-folder-o"></i></td>'; echo '<td class="imgthumb"></td>'; $adm = getRelPath($path, GSDATAUPLOADPATH) . rawurlencode($upload['name']); $folderhref = 'upload.php?' . merge_queryString(array('path' => $adm)); echo '<td>' . getUploadIcon('.') . '</span><a href="' . $folderhref . '" ><strong>' . htmlspecialchars($upload['name']) . '</strong></a></td>'; echo '<td class="file_size right"><span>' . $directory_size . '</span></td>'; // get the file permissions. if ($showperms) { $filePerms = substr(sprintf('%o', fileperms($path . $upload['name'])), -4); if ($isUnixHost) { $fileOwner = function_exists('posix_getpwuid') ? posix_getpwuid(fileowner($path . $upload['name'])) : '';
<form action="upload.php"> <input type="hidden" name="path" value="' . $subPath . '" /><input type="hidden" name="nonce" value="' . get_nonce("createfolder") . '" /><input type="text" class="text" name="newfolder" id="foldername" /> <input type="submit" class="submit" value="' . i18n_r('CREATE_FOLDER') . '" /> <a href="#" class="cancel">' . i18n_r('CANCEL') . '</a></form> </div></div>'; echo '<table class="highlight" id="imageTable">'; echo '<tr><th class="imgthumb" ></th><th>' . i18n_r('FILE_NAME') . '</th>'; echo '<th style="text-align:right;">' . i18n_r('FILE_SIZE') . '</th>'; if (isDebug()) { echo '<th style="text-align:right;">' . i18n_r('PERMS') . '</th>'; } echo '<th style="text-align:right;">' . i18n_r('DATE') . '</th>'; echo '<th><!-- actions --></th></tr>'; if (count($dirsSorted) != 0) { $foldercount = 0; foreach ($dirsSorted as $upload) { # check to see if folder is empty $directory_delete = null; if (check_empty_folder($path . $upload['name'])) { $directory_delete = '<a class="delconfirm" title="' . i18n_r('DELETE_FOLDER') . ': ' . rawurlencode($upload['name']) . '" href="deletefile.php?path=' . $urlPath . '&folder=' . rawurlencode($upload['name']) . '&nonce=' . get_nonce("delete", "deletefile.php") . '">×</a>'; } $directory_size = '<span>' . folder_items($path . $upload['name']) . ' ' . i18n_r('ITEMS') . '</span>'; echo '<tr class="All folder ' . $upload['name'] . '" >'; echo '<td class="imgthumb" ></td><td>'; $adm = substr($path . rawurlencode($upload['name']), 16); echo '<img src="template/images/folder.png" width="11" /> <a href="upload.php?path=' . $adm . '" ><strong>' . htmlspecialchars($upload['name']) . '</strong></a></td>'; echo '<td style="width:80px;text-align:right;" ><span>' . $directory_size . '</span></td>'; // get the file permissions. if (isDebug()) { $filePerms = substr(sprintf('%o', fileperms($path . $upload['name'])), -4); if ($isUnixHost) { $fileOwner = function_exists('posix_getpwuid') ? posix_getpwuid(fileowner($path . $upload['name'])) : ''; $fileOwnerName = isset($fileOwner['name']) ? $fileOwner['name'] : ''; } else {