iBrowser

By Gex on Feb 08, 2008

Script: iBrowser v1.0

Author: Gex

Description: iBrowser is a script which browser the server it lies on for files and folders and show them to you with the capability of interactive browsing with your mouse click, it may be simple but i find it useful :) i hope it helps.

Notes: u will need the images links, you can find em' here and you need to place them in the script directory: Download Icons Here

Demo: iBrowser v1.0

<style type="text/css">
<!--
body {
font-family:Corbel,Verdana;
font-size:15px;
margin-left:12px;
margin-bottom:30px;
background-color:#252525;
color:#66FF00;

}
.x {
text-decoration:none;
color:#66FF00;
}
filesize {
margin-left:400px;
margin-bottom:30px;
background-color:#252525;
color:#66FF00;
font-family:Corbel,Verdana;
font-size:15px;
}
</style>
<?php
echo "<title>iBrowser&#8482;</title><div align="center">
<form name="form1"  action="iBrowser.php" method="get">
<input size=100 style="background-color:#F9F9F9;color:#252525;border:thin;" type="text" name="directory" value=".getcwd()."><input type="submit" name="submit" value="Go!">
</form></div><hr>";
function listfiles($d) {
if ($d != null) {
chdir($d);
$contents =  scandir($d);
} else { $contents = scandir(getcwd()); }
$num = count($contents);
$x = 0;
while ($num > $x) {
if ($contents[$x] != "."  &&  $contents[$x] != "..") {
if(is_file($d."/".$contents[$x]) || is_file($contents[$x])) {
$files[count($files)] = $contents[$x];
    }
else {
$dir[count($dir)] = $contents[$x];
    } 
}
$x++;
}
$arr = explode("/",getcwd());
$updir = str_replace($arr[(count($arr))-1],"",getcwd());
echo "<img src="back.gif">  <a class=x href="".$_SERVER['PHP_SELF']."?directory=".$updir."">Up One Directory</a><br><br><font color=#CCCCCC>File/Folder:</font><hr>";
$x=0;
$num=count($dir);
while ($x < $num ) {
echo "<img src="folder.gif">  <a class=x href="".$_SERVER['PHP_SELF']."?directory=".getcwd()."/".$dir[$x]."">".$dir[$x]."</a><br>";
$x++;
}
$x = 0;
$num=count($files);
$pathparts = pathinfo($_SERVER['SCRIPT_FILENAME']);
while ($x < $num ) {
echo "<img src="file.gif">    <a class=x href="".str_replace($pathparts['dirname'],"",getcwd())."/".$files[$x]."">".$files[$x]."</a><br>"; 
$x++;
}
$cdir = getcwd();
//$cdir = str_replace("","",$cdir);
echo "<script language="javascript">
document.form1.directory.value = "".$cdir."";
</script><hr><br><div align="center">All copyrights reserved &copy;2007-2008<br>Developed By <font color=#CCCCCC>Gex</font></div>";
}
listfiles($_GET['directory']);
?>

Comments

Sign in to comment.
Gex   -  Feb 12, 2008

i know that it may hold security risks but thats a reason to keep it open for anyone to use...the good and the bad guy can use this script as a shell or as a filebrowser...i wont security lock it =).

 Respond  
Hawkee   -  Feb 11, 2008

With anything of this nature, security is a concern. Always be sure to password protect scripts like this so malicious activity is kept at a minimum.

 Respond  
Gex   -  Feb 10, 2008

maybe that will give it lil more efficiency but it will turn to a bug in case the images didnt load due to server problems or sth.thanks for sugg. =)

 Respond  
F*U*R*B*Y*   -  Feb 09, 2008

perhaps make the images open up the file/folder instead of just the name :)

 Respond  
Gex   -  Feb 09, 2008

no comments or ratings...cmon guyz rate the script. I want suggestions

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.