entry=$idx->input['entry'];
if(!isset($idx->input['fselect']))
{
$std->print_error("You have not yet select any file");
exit;
}
else
{
$this->files=$idx->input['fselect'];
$this->count=count($this->files);
$this->success=0;
$this->fail=0;
}
}
function rem_it()
{
$ret='';
foreach($this->files as $id => $fname)
{
$full_name=$this->entry.'/'.$fname;
$status='OK';
$ok=@chmod($full_name,0777);
if(!$ok)
{
$status='chmod fails';
$this->fail++;
}
else
{
$ok=@unlink($full_name);
if(!$ok)
{
$status='unlink fails';
$this->fail++;
}
else
$this->success++;
}
$ret.='
'.$fname.' | '.$status.' |
'.END;
}
return $ret;
}
function ret_url()
{
global $idx;
$page=$idx->number('page',1,5946,1)-1;
$nitems=$idx->number('nitems',20,2048,20);
$sort=$idx->number('sort',0,3,0);
$url="./index.php?action=0&page=0&sort={$sort}&nitems={$nitems}&cmd_action=3&entry={$this->entry}";
return $url;
}
}//of class
$rm=new my_remove;
$html='./template/remove.htm';
$content='';
if(file_exists($html))
{
$content=$std->get_contents($html);
$RM_ENTRY_NAME=$rm->entry;
$RM_DBG_TIME=$dbg->end_timer();
$RM_CONTENT=$rm->rem_it();
$RM_COUNT=$rm->count;
$RM_SUCCESS=$rm->success;
$RM_FAIL=$rm->fail;
$RM_RET_URL=$rm->ret_url();
$text="echo <<