Ejemplo n.º 1
0
                   $file_image = "ico_php.png";
               }
               if ($extension == 'htm' || $extension == 'HTM' || $extension == 'html' || $extension == 'HTML') {
                   $file_image = "ico_html.png";
               }
               if ($extension == 'jpg' || $extension == 'JPG' || $extension == 'jpeg' || $extension == 'JPEG' || $extension == 'gif' || $extension == 'GIF' || $extension == 'png' || $extension == 'PNG') {
                   $file_image = "ico_picture.png";
               }
               $last_updated_time = date("Y.m.d H:i:s", filemtime($current_folder . $v));
               $file_size = roundsize(filesize($current_folder . $v));
               if ($extension == 'txt' || $extension == 'inc' || $extension == 'sh' || $extension == 'js' || $extension == 'xml' || $extension == 'conf' || $extension == 'config' || $extension == 'ini' || $extension == 'php' || $extension == 'php3' || $extension == 'htm' || $extension == 'HTM' || $extension == 'html' || $extension == 'HTML' || $extension == 'css' || $extension == 'CSS') {
                   $edit_file_content = "<a href=\"file_manager.php?p=" . urlencode($current_folder) . "&amp;f=" . urlencode($v) . "&amp;do=edit#file_edit\"><img width=\"16\" height=\"16\" src=\"rbfmimg/ico_script_edit.png\" alt=\"Edit\" title=\"View/Edit\" border=\"0\" /></a>";
               } else {
                   $edit_file_content = "&nbsp;";
               }
               $fileperms = GetFilePerms($current_folder . $v);
               if ($url_path) {
                   $browser = "<a href=\"{$url_path}{$v}\" target=\"_blank\"><img src=\"rbfmimg/ico_open_as_web.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"W\" title=\"Open as web page\" /></a>";
                   if ($url_field) {
                       $use_url = "<img src=\"rbfmimg/ico_use_file.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL ({$url_path}{$v})\" onclick=\"window.opener.document.getElementById('{$url_field}').value='{$url_path}{$v}'; window.close()\" style=\"cursor: pointer\" />";
                   } else {
                       $use_url = "<img src=\"rbfmimg/ico_use_file_inactive.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL (Inactive!!!)\" />";
                   }
               } else {
                   $browser = "&nbsp;";
                   $use_url = "<img src=\"rbfmimg/ico_use_file_inactive.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL (Inactive!!!)\" />";
               }
               $cfe = urlencode($current_folder);
               $vfe = urlencode($v);
               $container .= <<<EOF
t<tr>
Ejemplo n.º 2
0
function getRightsAndExport($folderparent, $folder)
{
    global $zbp;
    $s = GetFilePerms($zbp->path . $folderparent . $folder);
    $o = GetFilePermsOct($zbp->path . $folderparent . $folder);
    $GLOBALS['CheckResult'][$folder][0] = $s . ' | ' . $o;
    if (substr($s, 0, 1) == '-') {
        $GLOBALS['CheckResult'][$folder][1] = substr($s, 1, 1) == 'r' && substr($s, 2, 1) == 'w' && substr($s, 4, 1) == 'r' && substr($s, 7, 1) == 'r' ? bingo : error;
    } else {
        $GLOBALS['CheckResult'][$folder][1] = substr($s, 1, 1) == 'r' && substr($s, 2, 1) == 'w' && substr($s, 3, 1) == 'x' && substr($s, 4, 1) == 'r' && substr($s, 7, 1) == 'r' && substr($s, 6, 1) == 'x' && substr($s, 9, 1) == 'x' ? bingo : error;
    }
}