Ver Mensaje Individual
  #20 (permalink)  
Antiguo 25/03/2002, 21:07
Tomillo
 
Fecha de Ingreso: febrero-2002
Mensajes: 503
Antigüedad: 22 años, 9 meses
Puntos: 0
Re: Los Mejores Scripts de lo que sea

PHP:Una herramienta de administración
Calificacion: 9
<?
//rmdir("d:\\Inetpub\\wwwroot\\IE\\management\\ del")
//rename("d:\\Inetpub\\wwwroot\\IE\\management\ \txt", "d:\\Inetpub\\wwwroot\\IE\\management\\del&qu ot;);

if($doit == "upload")
{
$dirtmp = $dir;
$pos = strrpos($userfile , "\\");
$filefull = substr($userfile, ($pos+1), 200);
if($dirtmp != "")
{
$a = 0;
$putstr = "";
$check = "GO";
$pos1 = strpos($dirtmp, "/");
$dirtmp = substr($dirtmp, ($pos1+1), 200);
$check1 = "/";
$check2 = "\\";
$putstr = ereg_replace("$check1", "$check2", $dir);
$dest = "d:\\Inetpub\\wwwroot\\IE\\$putstr\\$filefull ";
copy($userfile, $dest);
}
else
{
$dest = "d:\\Inetpub\\wwwroot\\IE\\$filefull" ;
copy($userfile, $dest);
}
$doit = "make";
}

if($doit == "make")
{
if($type == "dir")
{
mkdir("..$dir/$name", 7777);
}

if($type == "file")
{

if($extension != "")
{
$name .= $extension;
}

$myFile = fopen("..$dir/$name", "w");
if(!(myFile))
{
print("file could not be saved");
exit;
}

fputs($myFile, " ");
fclose($myFile);
}

$tmp = $dir;
$dir = "..";
$dir .= $tmp;
}
?>

<html>
<body>
<style TYPE="text/css">
A:link, A:visited, A:active
{
text-decoration: none;
color: black;
}
</style>
<font face='Verdana' size='1'>
<?
////////////////////////////////////////////////////////////////////////////////////////////////////////////
if($dir == "")
{
$dir = "..";
$level = 0;
}

$dirr = $dir;
$myDir = dir("$dir");
$count = 0;
while($entryName = $myDir->read())
{
if($count > 1)
{
$tmp = strrpos($entryName , ".");
if($tmp != "")
{
$files[] = $entryName;
}
if($tmp == "")
{
$dirs[] = $entryName;
}
}
$count++;
}
$myDir->close();

Sigue....Abajo