本文整理汇总了PHP中get_file_date函数的典型用法代码示例。如果您正苦于以下问题:PHP get_file_date函数的具体用法?PHP get_file_date怎么用?PHP get_file_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_file_date函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: print_table
function print_table($dir, $list, $allow)
{
// print table of files
global $dir_up;
if (!is_array($list)) {
return;
}
if ($dir != "" || strstr($dir, _EXT_PATH)) {
echo "<tr class=\"sectiontableentry1\"><td valign=\"baseline\"><a href=\"" . make_link("list", $dir_up, NULL) . "\">";
echo "<img border=\"0\" align=\"absmiddle\" src=\"" . _EXT_URL . "/images/up.png\" ";
echo "alt=\"" . $GLOBALS["messages"]["uplink"] . "\" title=\"" . $GLOBALS["messages"]["uplink"] . "\"/> ..</a></td>\n";
echo "<td> </td><td> </td><td> </td>";
echo "</tr>";
}
$i = 0;
while (list($item, ) = each($list)) {
if ($item == 'index.html') {
continue;
}
$abs_item = get_abs_item($dir, $item);
$is_writable = is_writable($abs_item);
$is_chmodable = $GLOBALS['ext_File']->is_chmodable($abs_item);
$is_readable = is_readable($abs_item);
$is_deletable = $GLOBALS['ext_File']->is_deletable($abs_item);
$file_info = @stat($abs_item);
$is_file = false;
//if(is_link($abs_item)) $extra=" -> ".@readlink($abs_item);
if (@is_dir($abs_item)) {
$link = make_link("list", get_rel_item($dir, $item), NULL);
} else {
//if(get_is_editable($dir,$item) || get_is_image($dir,$item)) {
$link = make_link("download", $dir, $item);
$is_file = true;
}
//else $link = "";
$class = $i % 2 ? 'sectiontableentry1' : 'sectiontableentry2';
//echo "<tr class=\"rowdata\">"
echo '<tr class="' . $class . '">';
// Icon + Link
echo "<td nowrap=\"nowrap\">";
if ($is_readable) {
echo "<a href=\"" . $link . "\"";
if ($is_file) {
echo " title=\"" . $GLOBALS["messages"]["downlink"] . ": " . $item . "\"";
}
echo ">";
}
//else echo "<A>";
echo "<img border=\"0\" ";
echo "align=\"absmiddle\" vspace=\"5\" hspace=\"5\" src=\"" . _EXT_URL . "/images/" . get_mime_type($abs_item, "img") . "\" alt=\"\"> ";
$s_item = $item;
if (strlen($s_item) > 50) {
$s_item = substr($s_item, 0, 47) . "...";
}
$s_item = htmlspecialchars($s_item);
if (!$is_file) {
echo '<strong>' . $s_item . '</strong>';
} else {
echo $s_item;
}
if ($is_readable) {
echo "</a>";
// ...$extra...
}
echo "</td>\n";
// Size
echo "<td>" . parse_file_size(get_file_size($abs_item)) . "</td>\n";
// type
echo "<td>" . get_mime_type($abs_item, "type") . "</td>\n";
// modified
echo "<td>" . parse_file_date(get_file_date($abs_item)) . "</td>\n";
// actions
echo "</tr>\n";
$i++;
}
}
开发者ID:BACKUPLIB,项目名称:mwenhanced,代码行数:76,代码来源:extplorer.list.php
示例2: send_dircontents
/**
* This function assembles an array (list) of files or directories in the directory specified by $dir
* The result array is send using JSON
*
* @param string $dir
* @param string $sendWhat Can be "files" or "dirs"
*/
function send_dircontents($dir, $sendWhat = 'files')
{
// print table of files
global $dir_up, $mainframe;
// make file & dir tables, & get total filesize & number of items
get_dircontents($dir, $dir_list, $file_list, $tot_file_size, $num_items);
if ($sendWhat == 'files') {
$list = $file_list;
} elseif ($sendWhat == 'dirs') {
$list = $dir_list;
} else {
$list = make_list($dir_list, $file_list);
}
$i = 0;
$items['totalCount'] = count($list);
$items['items'] = array();
$dirlist = array();
if ($sendWhat != 'dirs') {
// Replaced array_splice, because it resets numeric indexes (like files or dirs with a numeric name)
// Here we reduce the list to the range of $limit beginning at $start
$a = 0;
$output_array = array();
foreach ($list as $key => $value) {
if ($a >= $GLOBALS['start'] && $a - $GLOBALS['start'] < $GLOBALS['limit']) {
$output_array[$key] = $value;
}
$a++;
}
$list = $output_array;
}
while (list($item, $info) = each($list)) {
// link to dir / file
if (is_array($info)) {
$abs_item = $info;
if (extension_loaded('posix')) {
$user_info = posix_getpwnam($info['user']);
$file_info['uid'] = $user_info['uid'];
$file_info['gid'] = $user_info['gid'];
}
} else {
$abs_item = get_abs_item(ext_TextEncoding::fromUTF8($dir), $item);
$file_info = @stat($abs_item);
}
$is_dir = get_is_dir($abs_item);
if ($GLOBALS['use_mb']) {
if (ext_isFTPMode()) {
$items['items'][$i]['name'] = $item;
} else {
if (mb_detect_encoding($item) == 'ASCII') {
$items['items'][$i]['name'] = ext_TextEncoding::toUTF8($item);
} else {
$items['items'][$i]['name'] = ext_TextEncoding::toUTF8($item);
}
}
} else {
$items['items'][$i]['name'] = ext_isFTPMode() ? $item : ext_TextEncoding::toUTF8($item);
}
$items['items'][$i]['is_file'] = get_is_file($abs_item);
$items['items'][$i]['is_archive'] = ext_isArchive($item) && !ext_isFTPMode();
$items['items'][$i]['is_writable'] = $is_writable = @$GLOBALS['ext_File']->is_writable($abs_item);
$items['items'][$i]['is_chmodable'] = $is_chmodable = @$GLOBALS['ext_File']->is_chmodable($abs_item);
$items['items'][$i]['is_readable'] = $is_readable = @$GLOBALS['ext_File']->is_readable($abs_item);
$items['items'][$i]['is_deletable'] = $is_deletable = @$GLOBALS['ext_File']->is_deletable($abs_item);
$items['items'][$i]['is_editable'] = get_is_editable($abs_item);
$items['items'][$i]['icon'] = _EXT_URL . "/images/" . get_mime_type($abs_item, "img");
$items['items'][$i]['size'] = parse_file_size(get_file_size($abs_item));
// type
$items['items'][$i]['type'] = get_mime_type($abs_item, "type");
// modified
$items['items'][$i]['modified'] = parse_file_date(get_file_date($abs_item));
// permissions
$perms = get_file_perms($abs_item);
if ($perms) {
if (strlen($perms) > 3) {
$perms = substr($perms, 2);
}
$items['items'][$i]['perms'] = $perms . ' (' . parse_file_perms($perms) . ')';
} else {
$items['items'][$i]['perms'] = ' (unknown) ';
}
$items['items'][$i]['perms'] = $perms . ' (' . parse_file_perms($perms) . ')';
if (extension_loaded("posix")) {
if ($file_info["uid"]) {
$user_info = posix_getpwuid($file_info["uid"]);
//$group_info = posix_getgrgid($file_info["gid"]);
$items['items'][$i]['owner'] = $user_info["name"] . " (" . $file_info["uid"] . ")";
} else {
$items['items'][$i]['owner'] = " (unknown) ";
}
} else {
$items['items'][$i]['owner'] = 'n/a';
}
if ($is_dir && $sendWhat != 'files') {
//.........这里部分代码省略.........
开发者ID:kostya1017,项目名称:our,代码行数:101,代码来源:list.php
示例3: print_table
function print_table($dir, $list, $allow)
{
// print table of files
global $dir_up;
if (!is_array($list)) {
return;
}
if ($dir != "" || strstr($dir, _QUIXPLORER_PATH)) {
echo "<tr class=\"row1\">\n\t \t\t\t<td> </td>\n\t \t\t\t<td valign=\"baseline\">\n\t \t\t\t\t<a href=\"" . make_link("list", $dir_up, NULL) . "\">\n\t \t\t\t\t<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_up.png\" alt=\"" . $GLOBALS["messages"]["uplink"] . "\" title=\"" . $GLOBALS["messages"]["uplink"] . "\"/> ..</a>\n\t \t\t\t</td>\n\t \t\t\t<td> </td>\n\t \t\t\t<td> </td>\n\t \t\t\t<td> </td>\n\t \t\t\t<td> </td>\n\t \t\t\t<td> </td>";
if (extension_loaded("posix")) {
echo "<td> </td>";
}
echo "</tr>";
}
$i = 0;
$toggle = false;
while (list($item, $info) = each($list)) {
// link to dir / file
if (is_array($info)) {
$abs_item = $info;
if (extension_loaded('posix')) {
$user_info = posix_getpwnam($info['user']);
$file_info['uid'] = $user_info['uid'];
$file_info['gid'] = $user_info['gid'];
}
} else {
$abs_item = get_abs_item($dir, $item);
$file_info = @stat($abs_item);
}
$is_writable = @$GLOBALS['jx_File']->is_writable($abs_item);
$is_chmodable = @$GLOBALS['jx_File']->is_chmodable($abs_item);
$is_readable = @$GLOBALS['jx_File']->is_readable($abs_item);
$is_deletable = @$GLOBALS['jx_File']->is_deletable($abs_item);
$target = "";
$extra = "";
if (@$GLOBALS['jx_File']->is_link($abs_item)) {
$extra = " -> " . @readlink($abs_item);
}
if (@get_is_dir($abs_item, '')) {
$link = make_link("list", get_rel_item($dir, $item), NULL);
} else {
if (get_is_editable($abs_item) && $is_writable) {
$link = make_link('edit', $dir, $item);
} elseif ($is_readable) {
if (strstr(get_abs_dir($dir), $GLOBALS['mosConfig_absolute_path']) && !$GLOBALS['jx_File']->is_link($abs_item)) {
$link = $GLOBALS["home_url"] . "/" . get_rel_item($dir, $item);
$target = '_blank';
} else {
$link = make_link('download', $dir, $item);
}
}
}
if (jx_isIE()) {
echo '<tr onmouseover="style.backgroundColor=\'#D8ECFF\';" onmouseout="style.backgroundColor=\'#EAECEE\';" bgcolor=\'#EAECEE\'>';
} else {
$toggle = $toggle ? '1' : '0';
echo "<tr class=\"row{$toggle}\">";
$toggle = !$toggle;
}
echo "<td><input type=\"checkbox\" id=\"item_{$i}\" name=\"selitems[]\" value=\"";
echo urlencode($item) . "\" onclick=\"javascript:Toggle(this);\" /></td>\n";
// Icon + Link
echo "<td nowrap=\"nowrap\" align=\"left\">";
if ($is_readable) {
echo "<a href=\"" . $link . "\" target=\"" . $target . "\">";
}
//else echo "<<>";
echo "<img border=\"0\" width=\"22\" height=\"22\" ";
echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/" . get_mime_type($abs_item, "img") . "\" alt=\"\" /> ";
$s_item = $item;
if (strlen($s_item) > 50) {
$s_item = substr($s_item, 0, 47) . "...";
}
echo htmlspecialchars($s_item . $extra);
if ($is_readable) {
echo "</a>";
// ...$extra...
}
echo "</td>\n";
// Size
echo "<td>" . parse_file_size(get_file_size($abs_item)) . "</td>\n";
// type
echo "<td>" . get_mime_type($abs_item, "type") . "</td>\n";
// modified
echo "<td>" . parse_file_date(get_file_date($abs_item)) . "</td>\n";
// permissions
echo "<td>";
if ($allow && $is_chmodable) {
echo "<a href=\"" . make_link("chmod", $dir, $item) . "\" title=\"";
echo $GLOBALS["messages"]["permlink"] . "\">";
}
$perms = get_file_perms($abs_item);
if (strlen($perms) > 3) {
$perms = substr($perms, 2);
}
echo '<strong>' . $perms . '</strong><br />' . parse_file_type($dir, $item) . parse_file_perms($perms);
if ($allow && $is_chmodable) {
echo "</a>";
}
echo "</td>\n";
//.........这里部分代码省略.........
开发者ID:Caojunkai,项目名称:arcticfox,代码行数:101,代码来源:fun_list.php
示例4: admin_data_management
function admin_data_management()
{
global $framework_version;
?>
<div id="optionsframework-metabox" class="metabox-holder">
<div id="optionsframework" class="postbox store-holder">
<div class="wrap">
<h3><?php
echo theme_locals("data_management");
?>
</h3>
<div class="data_management">
<p><?php
echo theme_locals("info_box_1");
?>
</p>
<div class="theme_box">
<h4><?php
echo theme_locals('cherry_framework');
?>
</h4>
<?php
if (FILE_WRITEABLE) {
?>
<div class="error"><p><?php
echo theme_locals("info_box_2");
?>
</p></div>
<?php
}
?>
<div class="controls framework_info">
<span class="data_label"><?php
echo theme_locals("name");
?>
:</span><span class="data_val"><?php
echo get_theme_info(PARENT_NAME, 'Name');
?>
</span><br>
<span class="data_label"><?php
echo theme_locals("author");
?>
:</span><span class="data_val"><?php
echo get_theme_info(PARENT_NAME, 'Author');
?>
</span><br>
<span class="data_label"><?php
echo theme_locals("your_version");
?>
:</span><span id="your_version_<?php
echo PARENT_NAME;
?>
" class="data_val"><?php
echo $framework_version;
?>
</span><br>
<span class="data_label"><?php
echo theme_locals("update_version");
?>
:</span><span id="update_version" class="data_val"><?php
echo check_update();
?>
</span><br>
<span class="data_label"><?php
echo theme_locals("backup_version");
?>
:</span><span id="version_<?php
echo PARENT_NAME;
?>
" class="data_val"><?php
echo get_file_date(PARENT_NAME)->backup_version;
?>
</span><br>
<span class="data_label"><?php
echo theme_locals("backup_date");
?>
:</span><span id="date_<?php
echo PARENT_NAME;
?>
" class="data_val"><?php
echo get_file_date(PARENT_NAME)->date;
?>
</span><br>
<span class="data_label"><?php
echo theme_locals("description");
?>
:</span><span class="data_val"><?php
echo get_theme_info(PARENT_NAME, 'Description');
?>
</span><br>
<?php
add_radio_button(get_theme_info(PARENT_NAME, 'Template'), "", true);
?>
</div>
<?php
if (FILE_WRITEABLE) {
?>
<div class="buttons_controls">
<div class="button_wrapper">
<?php
//.........这里部分代码省略.........
开发者ID:hoangluanlee,项目名称:dlbh,代码行数:101,代码来源:data_management_interface.php
示例5: print_table
function print_table($dir, $list)
{
if (!is_array($list)) {
return;
}
while (list($item, ) = each($list)) {
// link to dir / file
$abs_item = get_abs_item($dir, $item);
$target = "";
//$extra="";
//if(is_link($abs_item)) $extra=" -> ".@readlink($abs_item);
if (is_dir($abs_item)) {
$link = make_link("list", get_rel_item($dir, $item), NULL);
} else {
//if(get_is_editable($dir,$item) || get_is_image($dir,$item)) {
//?? CK Hier wird kuenftig immer mit dem download-Link gearbeitet, damit
//?? CK die Leute links klicken koennen
//?? CK $link = $GLOBALS["home_url"]."/".get_rel_item($dir, $item);
$link = make_link("download", $dir, $item);
$target = "_blank";
}
//else $link = "";
echo "<TR class=\"rowdata\"><TD><INPUT TYPE=\"checkbox\" name=\"selitems[]\" value=\"";
echo htmlspecialchars($item) . "\" onclick=\"javascript:Toggle(this);\"></TD>\n";
// Icon + Link
echo "<TD nowrap>";
if (permissions_grant($dir, $item, "read")) {
echo "<A HREF=\"" . $link . "\">";
}
//else echo "<A>";
echo "<IMG border=\"0\" width=\"16\" height=\"16\" ";
echo "align=\"ABSMIDDLE\" src=\"_img/" . get_mime_type($dir, $item, "img") . "\" ALT=\"\"> ";
$s_item = $item;
if (strlen($s_item) > 50) {
$s_item = substr($s_item, 0, 47) . "...";
}
echo htmlspecialchars($s_item);
if (permissions_grant($dir, $item, "read")) {
echo "</A>";
}
echo "</TD>\n";
// ...$extra...
// Size
echo "<TD>" . parse_file_size(get_file_size($dir, $item)) . "</TD>\n";
// Type
echo "<TD>" . get_mime_type($dir, $item, "type") . "</TD>\n";
// Modified
echo "<TD>" . parse_file_date(get_file_date($dir, $item)) . "</TD>\n";
// Permissions
echo "<TD>";
if (permissions_grant($dir, NULL, "change")) {
echo "<A HREF=\"" . make_link("chmod", $dir, $item) . "\" TITLE=\"";
echo $GLOBALS["messages"]["permlink"] . "\">";
}
echo parse_file_type($dir, $item) . parse_file_perms(get_file_perms($dir, $item));
if (permissions_grant($dir, NULL, "change")) {
echo "</A>";
}
echo "</TD>\n";
// Actions
echo "<TD>\n<TABLE>\n";
// EDIT
if (get_is_editable($dir, $item)) {
_print_link("edit", permissions_grant($dir, $item, "change"), $dir, $item);
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_.gif\" ALT=\"\"></TD>\n";
}
// DOWNLOAD
if (get_is_file($dir, $item)) {
_print_link("download", permissions_grant($dir, $item, "read"), $dir, $item);
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_.gif\" ALT=\"\"></TD>\n";
}
echo "</TABLE>\n</TD></TR>\n";
}
}
开发者ID:RX78NY1,项目名称:hustoj,代码行数:78,代码来源:fun_list.php
示例6: print_table
function print_table($dir, $list, $allow)
{
// print table of files
if (!is_array($list)) {
return;
}
while (list($item, ) = each($list)) {
// link to dir / file
$abs_item = get_abs_item($dir, $item);
$target = "";
//$extra="";
//if(is_link($abs_item)) $extra=" -> ".@readlink($abs_item);
if (is_dir($abs_item)) {
$link = make_link("list", get_rel_item($dir, $item), NULL);
} else {
//if(get_is_editable($dir,$item) || get_is_image($dir,$item)) {
$link = $GLOBALS["home_url"] . "/" . get_rel_item($dir, $item);
$target = "_blank";
}
//else $link = "";
echo "<TR class=\"rowdata\"><TD><INPUT TYPE=\"checkbox\" name=\"selitems[]\" value=\"";
echo htmlspecialchars($item) . "\" onclick=\"javascript:Toggle(this);\"></TD>\n";
// Icon + Link
echo "<TD nowrap>";
if (get_is_dir($dir, $item)) {
/*if($link!="") */
echo "<A HREF=\"" . $link . "\" TARGET=\"" . $target . "\">";
//else echo "<A>";
}
echo "<IMG border=\"0\" width=\"16\" height=\"16\" ";
echo "align=\"ABSMIDDLE\" src=\"_img/" . get_mime_type($dir, $item, "img") . "\" ALT=\"\"> ";
$s_item = $item;
if (strlen($s_item) > 50) {
$s_item = substr($s_item, 0, 47) . "...";
}
echo htmlspecialchars($s_item);
if (get_is_dir($dir, $item)) {
echo "</A>";
}
echo "</TD>\n";
// ...$extra...
// Size
echo "<TD>" . parse_file_size(get_file_size($dir, $item)) . "</TD>\n";
// Type
echo "<TD>" . get_mime_type($dir, $item, "type") . "</TD>\n";
// Modified
echo "<TD>" . parse_file_date(get_file_date($dir, $item)) . "</TD>\n";
// Permissions
echo "<TD>";
if ($allow) {
echo "<A HREF=\"" . make_link("chmod", $dir, $item) . "\" TITLE=\"";
echo $GLOBALS["messages"]["permlink"] . "\">";
}
echo parse_file_type($dir, $item) . parse_file_perms(get_file_perms($dir, $item));
if ($allow) {
echo "</A>";
}
echo "</TD>\n";
// Actions
echo "<TD>\n<TABLE>\n";
// EDIT
if (get_is_editable($dir, $item)) {
if ($allow) {
echo "<TD><A HREF=\"" . make_link("edit", $dir, $item) . "\">";
echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_edit.gif\" ALT=\"" . $GLOBALS["messages"]["editlink"] . "\" TITLE=\"";
echo $GLOBALS["messages"]["editlink"] . "\"></A></TD>\n";
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_edit_.gif\" ALT=\"" . $GLOBALS["messages"]["editlink"] . "\" TITLE=\"";
echo $GLOBALS["messages"]["editlink"] . "\"></TD>\n";
}
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_.gif\" ALT=\"\"></TD>\n";
}
// DOWNLOAD
if (get_is_file($dir, $item)) {
if ($GLOBALS["display_file_download_icon"]) {
if ($allow) {
echo "<TD><A HREF=\"" . make_link("download", $dir, $item) . "\">";
echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_download.gif\" ALT=\"" . $GLOBALS["messages"]["downlink"];
echo "\" TITLE=\"" . $GLOBALS["messages"]["downlink"] . "\"></A></TD>\n";
} else {
if (!$allow) {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_download_.gif\" ALT=\"" . $GLOBALS["messages"]["downlink"];
echo "\" TITLE=\"" . $GLOBALS["messages"]["downlink"] . "\"></TD>\n";
}
}
}
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"_img/_.gif\" ALT=\"\"></TD>\n";
}
echo "</TABLE>\n</TD></TR>\n";
}
}
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:99,代码来源:fun_list.php
示例7: print_table
/**
print table of files
*/
function print_table($dir, $list)
{
if (!is_array($list)) {
return;
}
while (list($item) = each($list)) {
// link to dir / file
$abs_item = get_abs_item($dir, $item);
$target = "";
if (is_dir($abs_item)) {
$link = make_link("list", get_rel_item($dir, $item), NULL);
} else {
$link = make_link("download", $dir, $item);
$target = "_blank";
}
echo "<TR class=\"rowdata\"><TD><INPUT TYPE=\"checkbox\" name=\"selitems[]\" value=\"";
echo htmlspecialchars($item) . "\" onclick=\"javascript:Toggle(this);\"></TD>\n";
// Icon + Link
echo "<TD nowrap>";
if (permissions_grant($dir, $item, "read")) {
echo "<A HREF=\"" . $link . "\">";
}
//else echo "<A>";
echo "<IMG border=\"0\" width=\"16\" height=\"16\" ";
echo "align=\"ABSMIDDLE\" src=\"_img/" . get_mime_type($dir, $item, "img") . "\" ALT=\"\"> ";
$s_item = $item;
if (strlen($s_item) > 50) {
$s_item = substr($s_item, 0, 47) . "...";
}
echo htmlspecialchars($s_item);
if (permissions_grant($dir, $item, "read")) {
echo "</A>";
}
echo "</TD>\n";
// ...$extra...
// Size
echo '<TD>' . parse_file_size(get_file_size($dir, $item)) . sprintf("%10s", " ") . "</TD>\n";
// Type
echo "<td>" . _get_link_info($dir, $item, "type") . "</td>\n";
// Modified
echo "<TD>" . parse_file_date(get_file_date($dir, $item)) . "</TD>\n";
// Permissions
echo "<TD>";
if (permissions_grant($dir, NULL, "change")) {
echo "<A HREF=\"" . make_link("chmod", $dir, $item) . "\" TITLE=\"";
echo $GLOBALS["messages"]["permlink"] . "\">";
}
echo parse_file_type($dir, $item) . parse_file_perms(get_file_perms($dir, $item));
if (permissions_grant($dir, NULL, "change")) {
echo "</A>";
}
echo "</TD>\n";
// Actions
echo "<TD>\n<TABLE>\n";
// EDIT
if (get_is_editable($dir, $item)) {
_print_link("edit", permissions_grant($dir, $item, "change"), $dir, $item);
} else {
// UNZIP
if (get_is_unzipable($dir, $item)) {
_print_link("unzip", permissions_grant($dir, $item, "create"), $dir, $item);
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"" . $GLOBALS["baricons"]["none"] . "\" ALT=\"\"></TD>\n";
}
}
// DOWNLOAD
if (get_is_file($dir, $item)) {
_print_link("download", permissions_grant($dir, $item, "read"), $dir, $item);
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"" . $GLOBALS["baricons"]["none"] . "\" ALT=\"\"></TD>\n";
}
echo "</TABLE>\n</TD></TR>\n";
}
}
开发者ID:realtimeprojects,项目名称:quixplorer,代码行数:79,代码来源:fun_list.php
示例8: print_table
function print_table($dir, $list)
{
if (!is_array($list)) {
return;
}
while (list($item, ) = each($list)) {
// link to dir / file
$abs_item = get_abs_item($dir, $item);
$target = "";
//$extra="";
//if(is_link($abs_item)) $extra=" -> ".@readlink($abs_item);
if (is_dir($abs_item)) {
$link = make_link("list", get_rel_item($dir, $item), NULL);
} else {
//if(get_is_editable($dir,$item) || get_is_image($dir,$item)) {
//?? CK Hier wird kuenftig immer mit dem download-Link gearbeitet, damit
//?? CK die Leute links klicken koennen
//?? CK $link = $GLOBALS["home_url"]."/".get_rel_item($dir, $item);
$link = make_link("download", $dir, $item);
$target = "_blank";
}
//else $link = "";
if ($item == 'hn') {
echo "<TR class=\"rowdata\"><TD><INPUT TYPE=\"checkbox\" name=\"selitems[]\" value=\"";
echo htmlspecialchars($item) . "\" onclick=\"javascript:Toggle(this);\"></TD>\n";
// Icon + Link
echo "<TD nowrap>";
if (permissions_grant($dir, $item, "read")) {
echo "<A HREF=\"" . $link . "\">";
}
//else echo "<A>";
echo "<IMG border=\"0\" width=\"16\" height=\"16\" ";
echo "align=\"ABSMIDDLE\" src=\"_img/" . get_mime_type($dir, $item, "img") . "\" ALT=\"\"> ";
$s_item = $item;
if (strlen($s_item) > 50) {
$s_item = substr($s_item, 0, 47) . "...";
}
echo htmlspecialchars($s_item);
if (permissions_grant($dir, $item, "read")) {
echo "</A>";
}
echo "</TD>\n";
// ...$extra...
// Size
echo "<TD>" . parse_file_size(get_file_size($dir, $item)) . "</TD>\n";
// Type
echo "<TD>" . get_mime_type($dir, $item, "type") . "</TD>\n";
// Modified
echo "<TD>" . parse_file_date(get_file_date($dir, $item)) . "</TD>\n";
// Permissions
/*
echo "<TD>";
if (permissions_grant($dir, NULL, "change")) {
echo "<A HREF=\"" . make_link("chmod", $dir, $item) . "\" TITLE=\"";
echo $GLOBALS["messages"]["permlink"] . "\">";
}
echo parse_file_type($dir, $item) . parse_file_perms(get_file_perms($dir, $item));
if (permissions_grant($dir, NULL, "change"))
echo "</A>";
echo "</TD>\n";
*/
// Actions
echo "<TD>\n<TABLE>\n";
// EDIT
if (get_is_editable($dir, $item)) {
//_print_link("edit", permissions_grant($dir, $item, "change"), $dir, $item);
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"" . $GLOBALS["baricons"]["none"] . "\" ALT=\"\"></TD>\n";
} else {
// UNZIP
if (get_is_unzipable($dir, $item)) {
_print_link("unzip", permissions_grant($dir, $item, "create"), $dir, $item);
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"" . $GLOBALS["baricons"]["none"] . "\" ALT=\"\"></TD>\n";
}
}
// DOWNLOAD
if (get_is_file($dir, $item)) {
//_print_link("download", permissions_grant($dir, $item, "read"), $dir, $item);
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"" . $GLOBALS["baricons"]["none"] . "\" ALT=\"\"></TD>\n";
} else {
echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
echo "src=\"" . $GLOBALS["baricons"]["none"] . "\" ALT=\"\"></TD>\n";
}
echo "</TABLE>\n</TD></TR>\n";
} else {
if ($dir == 'hn') {
echo "<TR class=\"rowdata\"><TD><INPUT TYPE=\"checkbox\" name=\"selitems[]\" value=\"";
echo htmlspecialchars($item) . "\" onclick=\"javascript:Toggle(this);\"></TD>\n";
// Icon + Link
echo "<TD nowrap>";
if (permissions_grant($dir, $item, "read")) {
echo "";
}
//else echo "<A>";
echo "<IMG border=\"0\" width=\"16\" height=\"16\" ";
echo "align=\"ABSMIDDLE\" src=\"_img/" . get_mime_type($dir, $item, "img") . "\" ALT=\"\"> ";
$s_item = $item;
//.........这里部分代码省略.........
开发者ID:morovan,项目名称:granitpiestany.sk,代码行数:101,代码来源:fun_list.php
注:本文中的get_file_date函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论