So, ich habe mir das nochmal angeschaut. Einfach mal die Datei "include.upl_files_overview.php" durch folgenden Code ersetzen:
Code: Alles auswählen
<?php
/*****************************************
* File : $RCSfile: include.upl_files_overview.php,v $
* Project : Contenido
* Descr : File manager
*
* Author : $Author: timo.hummel $
*
* Created : 29.12.2003
* Modified : $Date: 2005/12/14 14:55:47 $
*
* © four for business AG, www.4fb.de
*
* $Id: include.upl_files_overview.php,v 1.40 2005/10/24 10:03:16 timo.hummel Exp $
******************************************/
cInclude("classes", "class.ui.php");
cInclude("classes", "class.htmlelements.php");
cInclude("includes", "api/functions.frontend.list.php");
cInclude("classes", "class.properties.php");
cInclude("classes", "class.todo.php");
if (!is_array($browserparameters) && ($_GET["appendparameters"] != "imagebrowser" || $_GET["appendparameters"] != "filebrowser" || $_POST["appendparameters"] != "imagebrowser" || $_POST["appendparameters"] != "filebrowser"))
{
$browserparameters = array();
}
elseif ($_GET["appendparameters"] == "imagebrowser" || $_POST["appendparameters"] == "imagebrowser")
{
$appendparameters = "imagebrowser";
}
elseif ($_GET["appendparameters"] == "filebrowser" || $_POST["appendparameters"] == "filebrowser")
{
$appendparameters = "filebrowser";
}
$uploads = new UploadCollection;
$dbfs = new DBFSCollection;
if (is_dbfs($path))
{
$qpath = $path . "/";
} else {
$qpath = $path;
}
if ($action == "upl_modify_file")
{
/* Did the user upload a new file? */
if (count($_FILES) == 1 && ($_FILES["file"]["size"] > 0) && ($_FILES["file"]["name"] != ""))
{
if ($_FILES['file']['tmp_name'] != "")
{
$tmp_name = $_FILES['file']['tmp_name'];
$_cecIterator = $_cecRegistry->getIterator("Contenido.Upload.UploadPreprocess");
if ($_cecIterator->count() > 0)
{
/* Copy file to a temporary location */
move_uploaded_file($tmp_name, $cfg["path"]["contenido"] . $cfg["path"]["temp"].$file);
$tmp_name = $cfg["path"]["contenido"] . $cfg["path"]["temp"].$file;
while ($chainEntry = $_cecIterator->next())
{
$modified = $chainEntry->execute($tmp_name, $cfgClient[$client]['upl']['path'].$path.uplCreateFriendlyName($_FILES['file']['name'][$key]));
if ($modified !== false)
{
$tmp_name = $modified;
}
}
}
if (is_dbfs($path))
{
$dbfs->writeFromFile($tmp_name, $qpath.$file);
unlink($_FILES['file']['tmp_name']);
} else {
unlink($cfgClient[$client]['upl']['path'].$path.$file);
if (is_uploaded_file($tmp_name))
{
move_uploaded_file($tmp_name, $cfgClient[$client]['upl']['path'].$path.$file);
} else {
rename($tmp_name, $cfgClient[$client]['upl']['path'].$path.$file);
}
}
}
}
$uploads->select("idclient = '$client' AND dirname = '$qpath' AND filename='$file'");
$upload = $uploads->next();
$upload->set("description", stripslashes($description));
$upload->store();
$properties = new PropertyCollection;
$properties->setValue("upload", $qpath.$file, "file", "keywords", stripslashes($keywords));
$properties->setValue("upload", $qpath.$file, "file", "medianame", stripslashes($medianame));
$properties->setValue("upload", $qpath.$file, "file", "medianotes", stripslashes($medianotes));
$properties->setValue("upload", $qpath.$file, "file", "protected", stripslashes($protected));
}
if ($action == "upl_multidelete")
{
if (is_array($fdelete))
{
/* Check if it is in the upload table */
foreach ($fdelete as $file)
{
$uploads->select("idclient = '$client' AND dirname='$qpath' AND filename='$file'");
if ($uploads->next())
{
if (is_dbfs($qpath))
{
$dbfs->remove($qpath.$file);
} else {
unlink( $cfgClient[$client]['upl']['path'].$qpath.$file);
}
}
}
}
}
if ($action == "upl_delete")
{
$uploads->select("idclient = '$client' AND dirname='$qpath' AND filename='$file'");
if ($uploads->next())
{
if (is_dbfs($qpath))
{
$dbfs->remove($qpath.$file);
} else {
unlink( $cfgClient[$client]['upl']['path'].$qpath.$file);
}
}
}
if ($action == "upl_upload")
{
if (count($_FILES) == 1)
{
foreach ($_FILES['file']['name'] as $key => $value)
{
if (file_exists($_FILES['file']['tmp_name'][$key]))
{
$tmp_name = $_FILES['file']['tmp_name'][$key];
$_cecIterator = $_cecRegistry->getIterator("Contenido.Upload.UploadPreprocess");
if ($_cecIterator->count() > 0)
{
/* Copy file to a temporary location */
move_uploaded_file($tmp_name, $cfg["path"]["contenido"] . $cfg["path"]["temp"].$_FILES['file']['name'][$key]);
$tmp_name = $cfg["path"]["contenido"] . $cfg["path"]["temp"].$_FILES['file']['name'][$key];
while ($chainEntry = $_cecIterator->next())
{
$modified = $chainEntry->execute($tmp_name, $cfgClient[$client]['upl']['path'].$path.uplCreateFriendlyName($_FILES['file']['name'][$key]));
if ($modified !== false)
{
$tmp_name = $modified;
}
}
}
if (is_dbfs($qpath))
{
$dbfs->writeFromFile($tmp_name, $qpath.uplCreateFriendlyName($_FILES['file']['name'][$key]));
unlink($tmp_name);
} else {
if (is_uploaded_file($tmp_name))
{
move_uploaded_file($tmp_name, $cfgClient[$client]['upl']['path'].$path.uplCreateFriendlyName($_FILES['file']['name'][$key]));
} else {
rename($tmp_name, $cfgClient[$client]['upl']['path'].$path.uplCreateFriendlyName($_FILES['file']['name'][$key]));
}
}
}
}
}
}
if ($action == "upl_renamefile")
{
$newname = str_replace("/", "", $newname);
rename($cfgClient[$client]['upl']['path'].$path.$oldname, $cfgClient[$client]['upl']['path'].$path.$newname);
}
class UploadList extends FrontendList
{
var $dark;
var $size;
function convert ($field, $data)
{
global $cfg, $path, $sess, $cfgClient, $client, $appendparameters;
if ($field == 5)
{
return human_readable_size($data);
}
if ($field == 4)
{
if ($appendparameters == "imagebrowser" || $appendparameters == "filebrowser")
{
$mstr = '<a href="javascript://" onclick="javascript:parent.parent.frames[\'left\'].frames[\'left_top\'].document.getElementById(\'selectedfile\').value= \''.$cfgClient[$client]["upl"]["frontendpath"].$path.$data.'\'; window.returnValue=\''.$cfgClient[$client]["upl"]["frontendpath"].$path.$data.'\'; window.close();">'.$data.'</a>';
} else {
$tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_bottom',
$sess->url("main.php?area=upl_edit&frame=4&path=$path&file=$data&startpage=".$_REQUEST['startpage']."&sortby=".$_REQUEST['sortby']."&sortmode=".$_REQUEST['sortmode']."&thumbnailmode=".$_REQUEST['thumbnailmode']),
'right_top',
$sess->url("main.php?area=upl&frame=3&path=$path&file=$data"),
$data);
}
return $mstr;
}
if ($field == 6)
{
return uplGetFileTypeDescription($data);
}
if ($field == 3)
{
/* If this file is an image, try to open */
switch (getFileExtension($data))
{
case "png":
case "psd":
case "gif":
case "tiff":
case "bmp":
case "jpeg":
case "jpg":
case "bmp":
case "iff":
case "xbm":
case "wbmp":
if (is_dbfs($data))
{
return '<a href="JavaScript:iZoom(\''.$sess->url($cfgClient[$client]["path"]["htmlpath"]."dbfs.php?file=".$data).'\');"><img src="'.uplGetThumbnail($data, $this->size).'">';
} else {
return '<a href="JavaScript:iZoom(\''.$cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$data.'\');"><img src="'.uplGetThumbnail($data, $this->size).'">';
}
break;
default:
if (is_dbfs($data))
{
return '<a target="_blank" href="'.$sess->url($cfgClient[$client]["path"]["htmlpath"]."dbfs.php?file=".$data).'"><img src="'.uplGetThumbnail($data, $this->size).'"></a>';
} else {
return '<a target="_blank" href="'.$cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$data.'"><img src="'.uplGetThumbnail($data, $this->size).'"></a>';
}
}
}
if ($field == 1)
{
if ($this->dark)
{
$data = $cfg["color"]["table_dark"];
} else {
$data = $cfg["color"]["table_light"];
}
$this->dark = !$this->dark;
}
return $data;
}
}
function uplRender ($path, $sortby, $sortmode, $startpage = 1,$thumbnailmode)
{
global $cfg, $client, $cfgClient, $area, $frame, $sess, $browserparameters, $appendparameters, $perm, $auth;
if ($sortby == "")
{
$sortby = 3;
$sortmode = "ASC";
}
if ($startpage == "")
{
$startpage = 1;
}
$thisfile = $sess->url("main.php?idarea=$area&frame=$frame&path=$path&thumbnailmode=$thumbnailmode");
$scrollthisfile = $thisfile."&sortmode=$sortmode&sortby=$sortby&appendparameters=$appendparameters";
if ($sortby == 3 && $sortmode == "DESC")
{
$fnsort = '<a href="'.$thisfile. '&sortby=3&sortmode=ASC&startpage='.$startpage.'">'.i18n("Filename / Description").'<img src="images/sort_down.gif" border="0"></a>';
} else {
if ($sortby == 3)
{
$fnsort = '<a href="'.$thisfile. '&sortby=3&sortmode=DESC&startpage='.$startpage.'">'.i18n("Filename / Description").'<img src="images/sort_up.gif" border="0"></a>';
} else {
$fnsort = '<a href="'.$thisfile. '&sortby=3&sortmode=ASC&startpage='.$startpage.'">'.i18n("Filename / Description").'</a>';
}
}
if ($sortby == 5 && $sortmode == "DESC")
{
$sizesort = '<a href="'.$thisfile. '&sortby=5&sortmode=ASC&startpage='.$startpage.'">'.i18n("Size").'<img src="images/sort_down.gif" border="0"></a>';
} else {
if ($sortby == 5)
{
$sizesort = '<a href="'.$thisfile. '&sortby=5&sortmode=DESC&startpage='.$startpage.'">'.i18n("Size").'<img src="images/sort_up.gif" border="0"></a>';
} else {
$sizesort = '<a href="'.$thisfile. '&sortby=5&sortmode=ASC&startpage='.$startpage.'">'.i18n("Size")."</a>";
}
}
if ($sortby == 6 && $sortmode == "DESC")
{
$typesort = '<a href="'.$thisfile. '&sortby=6&sortmode=ASC&startpage='.$startpage.'">'.i18n("Type").'<img src="images/sort_down.gif" border="0"></a>';
} else {
if ($sortby == 6)
{
$typesort = '<a href="'.$thisfile. '&sortby=6&sortmode=DESC&startpage='.$startpage.'">'.i18n("Type").'<img src="images/sort_up.gif" border="0"></a>';
} else {
$typesort = '<a href="'.$thisfile. '&sortby=6&sortmode=ASC&startpage='.$startpage.'">'.i18n("Type")."</a>";
}
}
/* List wraps */
$startwrap = '<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td colspan="6">
<table border="0" cellspacing="2" padding="0" width="100%">
<tr>
<td width="25%" style="border: 0px;" nowrap="nowrap">-C-SCROLLLEFT-</td>
<td width="50%" align="center">-C-PAGE-</td>
<td width="25%" nowrap="nowrap" align="right">-C-SCROLLRIGHT-</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#a9aec2" style="border-color:#747488; border-style: solid;border-top: 1px;">
<td align="left" valign="top" class="text_medium" style="border: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.i18n("Mark").'</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-top: 1px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.i18n("Preview").'</td>
<td width="100%" align="left" valign="top" class="text_medium" style="border: 0px; border-top: 1px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.$fnsort.'</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-top: 1px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.$sizesort.'</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-top: 1px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.$typesort.'</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-top: 1px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.i18n("Actions").'</td>
</tr>';
$itemwrap = ' <tr bgcolor="%s">
<td align="center" valign="top" class="text_medium" style="border: 1px; border-top: 0px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">%s</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">%s</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" width="200" nowrap="nowrap">%s</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" width="60" nowrap="nowrap">%s</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" width="60" nowrap="nowrap">%s</td>
<td align="left" valign="top" class="text_medium" style="border: 0px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" width="75" nowrap="nowrap">%s</td>
</tr>';
$endwrap = '</table>';
/* Object initializing */
$page = new UI_Page;
$list2 = new UploadList($startwrap, $endwrap, $itemwrap);
$uploads = new UploadCollection;
/* Fetch data */
if (substr($path,strlen($path)-1,1) != "/")
{
if ($path != "")
{
$qpath = $path . "/";
}
} else {
$qpath = $path;
}
$uploads->select("idclient = '$client' AND dirname = '$qpath'");
$user = new User;
$user->loadUserByUserID($auth->auth["uid"]);
if ($thumbnailmode == '') {
#Get user setting for thumbnail mode of current folder
$current_mode = $user->getUserProperty('upload_folder_thumbnailmode', md5($path));
if ($current_mode != '') {
$thumbnailmode = $current_mode;
} else {
#Set thumbnail to defaultt
$thumbnailmode = getEffectiveSetting('backend','thumbnailmode',100);
}
}
switch ($thumbnailmode)
{
case -1: $numpics = 40; break;
case 25: $numpics = 20; break;
case 50: $numpics = 10; break;
case 100:$numpics = 5; break;
case 200:$numpics = 3; break;
break;
default: $thumbnailmode = 100;
$numpics = 5;
break;
}
#
$user->setUserProperty('upload_folder_thumbnailmode', md5($path), $thumbnailmode);
$list2->setResultsPerPage($numpics);
$list2->size = $thumbnailmode;
$rownum = 0;
$properties = new PropertyCollection;
while ($item = $uploads->next())
{
$filename = $item->get("filename");
$bAddFile = true;
if ($appendparameters == "imagebrowser")
{
$restrictvar = "restrict_".$appendparameters;
if (array_key_exists($restrictvar, $browserparameters))
{
$extension = getFileExtension($filename);
if (count($browserparameters[$restrictvar]) > 0)
{
$bAddFile = false;
if (in_array($extension, $browserparameters[$restrictvar]))
{
$bAddFile = true;
}
}
}
}
$dirname = $item->get("dirname");
$filesize = $item->get("size");
if ($filesize == 0)
{
if (file_exists($cfgClient[$client]["upl"]["path"].$dirname . $filename))
{
$filesize = filesize($cfgClient[$client]["upl"]["path"].$dirname . $filename);
}
}
$dark = !$dark;
if ($perm->have_perm_area_action("upl", "upl_delete"))
{
$actions = '<a href="javascript:deleteFile(\'{PATH}\', \'{FILE}\', {STARTPAGE});"><img style="margin-right: 2px;" src="images/delete.gif" alt="{DELETEALT}" title="{DELETEALT}"></a>';
$actions = str_replace("{RENAMEALT}", i18n("Rename file"), $actions);
$actions = str_replace("{DELETEALT}", i18n("Delete file"), $actions);
$actions = str_replace("{STARTPAGE}", intval($startpage), $actions);
$actions = str_replace("{PATH}", $path, $actions);
$actions = str_replace("{FILE}", $filename, $actions);
} else {
$actions = "";
}
$medianame = $properties->getValue ("upload", $path.$filename, "file", "medianame");
$medianotes = $properties->getValue ("upload", $path.$filename, "file", "medianotes");
$todo = new TODOLink("upload",$path.$file, "File $path$filename","");
$proptitle = i18n("Display properties");
if ($appendparameters == "imagebrowser" || $appendparameters == "filebrowser")
{
$mstr = "";
} else {
$tmp_mstr = '<a href="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
$mstr = sprintf($tmp_mstr, 'right_bottom',
$sess->url("main.php?area=upl_edit&frame=4&path=$path&file=$filename&startpage=$startpage&sortby=$sortby&sortmode=$sortmode&thumbnailmode=$thumbnailmode"),
'right_top',
$sess->url("main.php?area=upl&frame=3&path=$path&file=$filename"),
'<img style="margin-left: 2px; margin-right: 2px;" alt="'.$proptitle.'" title="'.$proptitle.'" src="images/but_art_conf2.gif">');
}
$actions = $mstr . $actions;
$showfilename = $filename;
$check = new cHTMLCheckbox("fdelete[]", $filename);
$mark = $check->toHTML(false);
if ($bAddFile == true)
{
$list2->setData($rownum, $bgColor,$mark, $dirname.$filename,
$showfilename,
$filesize,
getFileExtension($filename),
$todo->render().$actions);
$rownum++;
}
}
if ($rownum == 0)
{
$page->setContent(i18n("No files found"));
$page->render();
return;
}
if ($sortmode == "ASC")
{
$list2->sort($sortby, SORT_ASC);
} else {
$list2->sort($sortby, SORT_DESC);
}
if ($startpage < 1)
{
$startpage = 1;
}
if ($startpage > $list2->getNumPages())
{
$startpage = $list2->getNumPages();
}
$list2->setListStart($startpage);
/* Create scroller */
if ($list2->getCurrentPage() > 1)
{
$prevpage = '<a href="'.$scrollthisfile.'&startpage='.($list2->getCurrentPage()-1).'"><img align="middle" src="images/pfeil_links.gif">'.i18n("Previous Page").'</a>';
}
if ($list2->getCurrentPage() < $list2->getNumPages())
{
$nextpage = '<a href="'.$scrollthisfile.'&startpage='.($list2->getCurrentPage()+1).'">'.i18n("Next Page").'<img align="middle" src="images/pfeil_rechts.gif"></a>';
}
#$curpage = $list2->getCurrentPage() . " / ". $list2->getNumPages();
if ($list2->getNumPages()>1) {
$num_pages = $list2->getNumPages();
#$paging_form = "<form action ='".$sess->url("main.php")
$paging_form.="<script type=\"text/javascript\">
function jumpToPage() {
var pagenumber = document.forms['del'].elements['start_page'].selectedIndex + 1;
url = '".$sess->url('main.php')."';
document.location.href = url + '&area=con_upl&frame=4&path=$path&appendparameters=$appendparameters&sortmode=$sortmode&sortby=$sortby&thumbnailmode=$thumbnailmode&startpage=' + pagenumber;
}
</script>";
$paging_form.="<select name=\"start_page\" class=\"text_medium\" onChange=\"jumpToPage();\">";
for ($i=1;$i<=$num_pages;$i++) {
if ($i==$startpage) {
$selected = " selected";
} else {
$selected = "";
}
$paging_form.="<option value=\"$i\"$selected>$i</option>";
}
$paging_form.="</select>";
#$paging_form.= '</form>';
} else {
$paging_form="1";
}
$curpage = $paging_form . " / ". $list2->getNumPages();
$scroller = $prevpage . $nextpage;
$output = $list2->output(true);
$output = str_replace("-C-SCROLLLEFT-", $prevpage, $output);
$output = str_replace("-C-SCROLLRIGHT-", $nextpage, $output);
$output = str_replace("-C-PAGE-", i18n("Page")." ".$curpage, $output);
$form = new UI_Form("options");
$form->setVar("contenido", $sess->id);
$form->setVar("area", $area);
$form->setVar("frame", $frame);
$form->setVar("path", $path);
$form->setVar("sortmode", $sortmode);
$form->setVar("sortby", $sortby);
$form->setVar("startpage", $startpage);
$form->setVar("appendparameters", $appendparameters);
$select = new cHTMLSelectElement("thumbnailmode");
$values = Array(-1 => i18n("No thumbnails"),
25 => "25x25",
50 => "50x50",
100 => "100x100",
200 => "200x200");
foreach ($values as $key => $value)
{
$option = new cHTMLOptionElement($value, $key);
$select->addOptionElement($key, $option);
}
$select->setDefault($thumbnailmode);
if (is_dbfs($path))
{
$mpath = $path."/";
} else {
$mpath = "upload:/".$path;
}
$topbar = '<table cellspacing="0" cellpadding="2" border="0">
<tr bgcolor="'.$cfg["color"]["table_light"].'" style="border-color:#747488; border-style: solid;border-top: 1px;">
<td colspan="3" align="left" valign="middle" class="text_medium" style="border: 0px; border-left: 1px; border-top: 1px; border-bottom: 1px; border-right: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.i18n("Path:")." ". $mpath.'</td>
</tr>
<tr bgcolor="'.$cfg["color"]["table_light"].'" style="border-color:#747488; border-style: solid;border-top: 1px;">
<td align="left" valign="middle" class="text_medium" style="border: 0px; border-left: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.i18n("Thumbnail size:").'</td>
<td align="left" valign="middle" class="text_medium" style="border: 0px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap">'.$select->render().'</td>
<td align="left" valign="middle" class="text_medium" style="border: 0px; border-right: 1px; border-bottom: 1px; border-color: #747488; border-style: solid; white-space:nowrap;" nowrap="nowrap"><input type="image" src="images/submit.gif"></td>
</tr></table>';
$form->add("select", $topbar);
$script = '<script type="text/javascript">
/* Session-ID */
var sid = "{SID}";
/* Function for deleting
modules */
function deleteFile(path, file, page) {
url = \'main.php?area=upl\';
url += \'&action=upl_delete\';
url += \'&frame=4\';
url += \'&path=\' + path;
url += \'&file=\' + file;
url += \'&startpage=\' + page;
url += \'&contenido=\' + sid;
url += \'&appendparameters='.$appendparameters.'\';
window.location.href = url;
}
function renameFile (oldname, path, page)
{
var newname;
var url;
newname = prompt("{RENAME}",oldname);
if (newname)
{
url = \'main.php?area=upl\';
url += \'&action=upl_renamefile\';
url += \'&frame=4\';
url += \'&newname=\' + newname;
url += \'&oldname=\' + oldname;
url += \'&startpage=\' + page;
url += \'&path=\' + path;
url += \'&contenido=\' + sid;
window.location.href = url;
}
}
</script>';
$script = str_replace('{SID}', $sess->id, $script);
$script = str_replace('{RENAME}', i18n("Enter new filename"), $script);
$page->addScript("script", $script);
$markSubItem = markSubMenuItem(0, true);
$delform = new UI_Form("del");
$delform->setVar("area", $area);
$delform->setVar("action", "upl_multidelete");
$delform->setVar("startpage", $startpage);
$delform->setVar("thumbnailmode", $thumbnailmode);
$delform->setVar("sortmode" , $sortmode);
$delform->setVar("sortby", $sortby);
$delform->setVar("path", $path);
$delform->setVar("frame", 4);
$delform->add("list", $output);
$delform->add("delbutton", '<table border="0"><tr><td>'.i18n("With selected:").'</td><td><input type="image" src="images/delete.gif"></tr></table>');
$page->addScript("iZoom", '<script type="text/javascript" src="'.$sess->url("scripts/iZoom.js.php").'"></script>');
$page->setContent($form->render()."<br>".$delform->render().$markSubItem);
$page->render();
}
uplSyncDirectory($path);
uplRender($path, $sortby, $sortmode, $startpage, $thumbnailmode);
?>