コード例 #1
0
ファイル: filemanager.php プロジェクト: severnaya99/Sg-2010
		echo "<td align='left' class='filemantext'>".lastaccess($dirpath."/".$dirlist[$i], "E1")."</td>";
	    echo "<td align='center' class='filemantext' >".get_perms($dirpath."/".$dirlist[$i])."</td>";
		echo "<td align='left' class='filemantext'>";
		echo "<a href='".$urlpath."?action=delete&workpath=".$dirpath."&file=".$dirpath."/".$dirlist[$i]."'>$deleteimg</a>";        
		echo "<a href='".$urlpath."?action=rename&workpath=".$dirpath."&file=".$dirpath."/".$dirlist[$i]."'>$renameimg</a> ";
		//echo "<a href='".$urlpath."?rootpath=".$dirpath."/".$dirlist[$i]."'>ChDr</a> ";
		echo "</td></tr>";
	}
//Get file info and details
	for ($i=0;$i<Count($filelist);$i++) {
		echo "<tr>";
		$file = $dirpath."/".$filelist[$i];
		$icon = get_icon($dirpath."/".$filelist[$i]);
		echo "<td width='4%' align='center'><img src=$pathtoimages$icon></td>";
		echo "<td class='filemantext' style='white-space:nowrap' onmouseover='this.style.cursor=\"hand\";'><a href='".$rootURL."/$filelist[$i]'>".$filelist[$i]."</a></td>";
		echo "<td align='left' class='filemantext'>".myfilesize($file)."</td>";
		echo "<td align='left' class='filemantext'>".$mimetype->getType($file)."</td>";
		echo "<td align='left' class='filemantext'>".lastaccess($file, "E1")."</td>";
	    echo "<td align='center' class='filemantext' >".get_perms($file)."</td>";
		echo "<td align='left' class='filemantext' >";
		if (is_viewable_file($file)) 
			echo "<a href='".$rootURL."/".$filelist[$i]."' target='_blank' >$viewimg</a> ";
		if (is_editable_file($dirpath."/".$filelist[$i])) 
			echo "<a href='".$urlpath."?action=edit&workpath=".$dirpath."&file=".$filelist[$i]."'>$editimg</a> ";
        	echo "<a href='".$urlpath."?action=delete&workpath=".$dirpath."&file=".$dirpath."/".$filelist[$i]."'>$deleteimg</a> ";
   			echo "<a href='".$urlpath."?action=rename&workpath=".$dirpath."&file=".$dirpath."/".$filelist[$i]."'>$renameimg</a> ";
			echo "<a href='".$urlpath."?action=download&file=".$dirpath."/".$filelist[$i]."'>$downimg</a> ";
			echo "</tr>";
	}
			echo "<tr>";
			$diskfree = freespace($dirpath);
コード例 #2
0
ファイル: Get.php プロジェクト: Sywooch/dump
                        $farr[$i][1] = $dr . '/' . $el;
                    }
                }
            }
        }
        $i++;
        $el = readdir($d);
    }
    closedir($d);
    usort($dirarr, 'namesort');
    usort($farr, 'namesort');
    foreach ($dirarr as $direlem) {
        $ret2 .= "<tr><td class='w0'><a href='javascript:void(0);' onclick='showFileMenu(\\\"" . myconv(str_replace("'", "&#39;", "{$direlem[1]}")) . "\\\",event,1);'>[dir]</a></td><td><a href='javascript:void(0);' onclick='getDir(\\\"" . myconv(str_replace(array("'", '\\'), array("&#39;", '/'), $direlem[1])) . "\\\");'>" . cutlen(myconv(str_replace("'", "&#39;", $direlem[0]))) . "</a></td><td class='w1'>" . filestats($direlem[1]) . "</td><td class='w1'>-</td><td class='w1'>" . myfiletime($direlem[1]) . "</td></tr>";
    }
    foreach ($farr as $felem) {
        $ret .= "<tr><td class='w0'>&nbsp;</td><td><a href='javascript:void(0);' onclick='showFileMenu(\\\"" . myconv(str_replace("'", "&#39;", $felem[1])) . "\\\",event);'>" . cutlen(myconv(str_replace("'", "&#39;", $felem[0]))) . "</a></td><td class='w1'>" . filestats($felem[1]) . "</td><td class='w1'>" . myfilesize($felem[1]) . "</td><td class='w1'>" . myfiletime($felem[1]) . "</td></tr>";
    }
    ajax_die("set_files(\"{$xadd}<br><table class='ftable' cellpadding=1 cellspacing=1><tr class='hd' align=center><td>&nbsp;</td><td>Имя</td><td>Права</td><td>Размер</td><td>Изменён</td></tr>{$ret3}{$ret2}{$ret}</table>\",\"" . myconv($dr) . "\");");
}
if (isset($_POST['fileact']) && !is_array($_POST['fileact']) && isset($_POST['params']) && !is_array($_POST['params']) && isset($_POST['fl']) && !is_array($_POST['fl'])) {
    $p = $_POST['params'];
    if (get_magic_quotes_gpc()) {
        $p = stripslashes($p);
    }
    $fl = $_POST['fl'];
    if (get_magic_quotes_gpc()) {
        $fl = stripslashes($fl);
    }
    $p = myconv($p, 1);
    $fl = myconv($fl, 1);
    $fl = str_replace('\\', '/', $fl);