note 61230 deleted from function.unlink by sp
| From: | sp@php.net | Date: | Sun, 29 Jan 2006 00:05:22 +0000 |
| Subject: | note 61230 deleted from function.unlink by sp | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102642@lists.php.net to get a copy of this message | ||
Note Submitter:
Reason: useless
----
<script language="JavaScript"><!--
function checkBox(theBox){
var aBox = theBox.form["list[]"];
var selAll = false;
var i;
for(i=0;i<aBox.length;i++){
if(aBox[i].checked==false) selAll=true;
}
if(theBox.name=="selall"){
for(i=0;i<aBox.length;i++){
aBox[i].checked = selAll;
}
selAll = !selAll;
}
//theBox.form.selall.checked = selAll;
}
function init(){
var theForm = document.f1;
var aBox = theForm["list[]"];
var selAll = false;
var i;
for(i=0;i<aBox.length;i++){
if(aBox[i].checked==false) selAll=true;
aBox[i].onclick = function(){checkBox(this)};
}
//theForm.selall.checked = selAll;
}
//--></script>
<?
session_cache_limiter('public');
if(!isset($_POST['list'][0]))
{
$dir=$_SERVER['DOCUMENT_ROOT'];
}
else
{
$dir=substr($_POST['list'][0],0,-1);
}
$d = dir($dir);
echo '
<form method="post">
<input style="width:70%"
type="text"value="'.$d->path.'/'.$entry.'"
name="list[]"/>
<input type="submit" Value="Go" />
</form>';
echo ' <form name="f1" method="post">';
while (false !== ($entry = $d->read()))
{
if(is_dir($d->path.'/'.$entry))
{
if($entry=='..')
{
$value=explode('/',$d->path.'/'.$entry);
for($i=0;$i<count($value)-2;$i++)
{
$value_in.=$value[$i].'/';
}
$valu_in=substr($value_in,0,-1);
$back=str_replace('..','Back',$entry);
echo '<input onClick="document.f1.action=\'looker.php\';
document.f1.submit();" type="radio" name="list[]" id="list[]"
value="'.trim($value_in).'" />';
echo $back.'<hr size="1" color="#CCCCCC"><br />';
}
else
{
echo '<input onClick="document.f1.action=\'looker.php\';
document.f1.submit();" type="radio" name="list[]" id="list[]"
value="'.$d->path.'/'.$entry.'/" />';
echo '<a style="font-weight:bold;" >'.$entry.'</a><br
/>';
}
}
else
{
echo '<input type="radio" name="list[]" id="list[]"
value="'.$entry.'" />';
echo $entry.'<br />';
}
}
echo '</form>';
$d->close();
?>