Location: PHPKode > projects > PHPExplorer > modules/renommer.php
<?
require_once("../include/varsfuncs.php");

if(!$flist&&!$ntype&&!$rval){
include("$instp/skins/$sk/_pl_rn_main.php");
}else{
if($dir&&$flist&&$rtyp&&$rto){
if(substr($dir,-1,1)!="/") $dir.="/"; chdir($dir);
for($u=0;$flist[$u];$u++){
  $d=$flist[$u];  rename($rtyp,$rto);
}
include("$instp/skins/$sk/msg_jump/_pl_err_rn.php");
exit();}

if($ext&&$flist&&$nbchars&&$dir){
$chars=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","-","2","3","4","5","6","7","8","9","0","1");
if(!$numbers){ $max=27; }else{ $max=count($chars); }
if(substr($dir,-1,1)!="/") $dir.="/";
chdir($dir);
for($u=0;$flist[$u];$u++){
  $d=$flist[$u]; $newn="";
  for($i=0;$i<$nbchars;$i++){
   $newn=$newn.$chars[rand(0,$max)];
  }
  $newn=$newn.$ext;
  rename("$d","$newn");}
include("$instp/skins/$sk/msg_jump/_pl_err_rn.php");
 exit();}

if($rval){
  @chdir($dir);
for($i=0;$rval[$i]&&$act[$i];$i++){
  @rename($act[$i],$rval[$i]);
  if(!file_exists($rval[$i])) $err=1;
}
include("$instp/skins/$sk/msg_jump/_pl_err_rn.php");
exit();}

if($ntype&&$dir&&$index){
 for($i=0;$flist[$i];$i++,$index++){
   $d=$flist[$i]; chdir($dir);
   rename($d,str_replace("*x*",$index,$ntype));
 }
include("$instp/skins/$sk/msg_jump/_pl_err_rn.php");
 exit();}

} ?>
Return current item: PHPExplorer