Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinymce4Configuration
  • cTinyMCE4Editor
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TODOBackendList
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • addArtspec
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageCheckImageEditingPossibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUniqueArticleUrlname
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsArticleUrlnameUnique
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeInlineScript
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSetStartArticle
  • consoleLog
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParentAreaId
  • getRightsList
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckAlias
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: /**
  4:  * This file contains the backend page for displaying files of a directory in upload section.
  5:  *
  6:  * @package          Core
  7:  * @subpackage       Backend
  8:  * @author           Timo Hummel
  9:  * @copyright        four for business AG <www.4fb.de>
 10:  * @license          http://www.contenido.org/license/LIZENZ.txt
 11:  * @link             http://www.4fb.de
 12:  * @link             http://www.contenido.org
 13:  */
 14: 
 15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 16: 
 17: $backendPath = cRegistry::getBackendPath();
 18: 
 19: cInclude('includes', 'api/functions.frontend.list.php');
 20: cInclude('includes', 'functions.file.php');
 21: 
 22: $page = new cGuiPage('upl_files_overview', '', 0);
 23: 
 24: // display critical error if no valid client is selected
 25: if ((int) $client < 1) {
 26:     $page->displayCriticalError(i18n("No Client selected"));
 27:     $page->render();
 28:     return;
 29: }
 30: 
 31: $appendparameters = !empty($_REQUEST['appendparameters']) ? $_REQUEST['appendparameters'] : '';
 32: $file = !empty($_REQUEST['file']) ? basename(cSecurity::escapeString($_REQUEST['file'])) : '';
 33: $startpage = !empty($_REQUEST['startpage']) ? cSecurity::toInteger($_REQUEST['startpage']) : 1;
 34: $sortby = !empty($_REQUEST['sortby']) ? cSecurity::escapeString($_REQUEST['sortby']) : '';
 35: $sortmode = !empty($_REQUEST['sortmode']) ? cSecurity::escapeString($_REQUEST['sortmode']) : '';
 36: $thumbnailmode = !empty($_REQUEST['thumbnailmode']) ? cSecurity::escapeString($_REQUEST['thumbnailmode']) : '';
 37: 
 38: if ((empty($browserparameters) || !is_array($browserparameters)) && ($appendparameters != 'imagebrowser' || $appendparameters != 'filebrowser')) {
 39:     $browserparameters = array();
 40: }
 41: 
 42: if (!$sess->isRegistered('upl_last_path')) {
 43:     // register last path (upl_last_path) in session
 44:     $sess->register('upl_last_path');
 45: } elseif (!isset($path)) {
 46:     // if no path is given the last path is used
 47:     $path = $upl_last_path;
 48: }
 49: 
 50: // if path doesn't exist use root path
 51: // this might happen when the last path is that of another client or deleted outside CONTENIDO
 52: if (empty($path) || (!cApiDbfs::isDbfs($path) && !cFileHandler::exists($cfgClient[$client]['upl']['path'] . $path))) {
 53:     $path = '';
 54: }
 55: // remember current path as last path
 56: $upl_last_path = $path;
 57: 
 58: $uploads = new cApiUploadCollection();
 59: 
 60: $dbfs = new cApiDbfsCollection();
 61: 
 62: if (cApiDbfs::isDbfs($path)) {
 63:     $qpath = $path . '/';
 64: } else {
 65:     $qpath = $path;
 66: }
 67: 
 68: if ((is_writable($cfgClient[$client]['upl']['path'] . $path) || cApiDbfs::isDbfs($path)) && (int) $client > 0) {
 69:     $bDirectoryIsWritable = true;
 70: } else {
 71:     $bDirectoryIsWritable = false;
 72: }
 73: 
 74: if ($action === 'upl_modify_file' && !empty($file)) {
 75: 
 76:     $extractFolder = NULL;
 77:     $uplPath = $cfgClient[$client]['upl']['path'];
 78: 
 79:     if (isset($_REQUEST['path']) && $_REQUEST['path'] != NULL) {
 80:         $uplPath .= cSecurity::escapeString($_REQUEST['path']);
 81:     }
 82: 
 83:     if (isset($_REQUEST['efolder']) && $_REQUEST['efolder'] != NULL) {
 84:         $extractFolder = cSecurity::escapeString($_REQUEST['efolder']);
 85:     }
 86: 
 87:     if (isset($_REQUEST['extractZip']) && !isset($_REQUEST['overwrite'])) {
 88:         $zipFile = $uplPath . cSecurity::escapeString($_REQUEST['file']);
 89:         cZipArchive::extract($zipFile, $uplPath, $extractFolder);
 90:     }
 91:     if (isset($_REQUEST['extractZip']) && isset($_REQUEST['overwrite'])) {
 92:         $zipFile = $uplPath . cSecurity::escapeString($_REQUEST['file']);
 93:         cZipArchive::extractOverRide($zipFile, $uplPath, $extractFolder);
 94:     }
 95:     // Did the user upload a new file?
 96:     if ($bDirectoryIsWritable == true && count($_FILES) == 1 && ($_FILES['file']['size'] > 0) && ($_FILES['file']['name'] != '')) {
 97:         if ($_FILES['file']['tmp_name'] != '') {
 98:             $tmp_name = $_FILES['file']['tmp_name'];
 99:             $_cecIterator = $_cecRegistry->getIterator('Contenido.Upload.UploadPreprocess');
100: 
101:             if ($_cecIterator->count() > 0) {
102:                 // Copy file to a temporary location
103:                 move_uploaded_file($tmp_name, $backendPath . $cfg['path']['temp'] . $file);
104:                 $tmp_name = $backendPath . $cfg['path']['temp'] . $file;
105: 
106:                 while ($chainEntry = $_cecIterator->next()) {
107:                     if (cApiDbfs::isDbfs($path)) {
108:                         $sPathPrepend = '';
109:                         $sPathAppend = '/';
110:                     } else {
111:                         $sPathPrepend = $cfgClient[$client]['upl']['path'];
112:                         $sPathAppend = '';
113:                     }
114: 
115:                     $modified = $chainEntry->execute($tmp_name, $sPathPrepend . $path . $sPathAppend . uplCreateFriendlyName($_FILES['file']['name']));
116: 
117:                     if ($modified !== false) {
118:                         $tmp_name = $modified;
119:                     }
120:                 }
121:             }
122: 
123:             if (cApiDbfs::isDbfs($path)) {
124:                 $dbfs->writeFromFile($tmp_name, $qpath . $file);
125:                 unlink($_FILES['file']['tmp_name']);
126:             } else {
127:                 unlink($cfgClient[$client]['upl']['path'] . $path . $file);
128: 
129:                 if (is_uploaded_file($tmp_name)) {
130:                     move_uploaded_file($tmp_name, $cfgClient[$client]['upl']['path'] . $path . $file);
131:                 } else {
132:                     rename($tmp_name, $cfgClient[$client]['upl']['path'] . $path . $file);
133:                 }
134:             }
135:         }
136:     }
137: 
138:     $uploads->select("idclient = '$client' AND dirname='" . $uploads->escape($qpath) . "' AND filename='" . $uploads->escape($file) . "'");
139:     $upload = $uploads->next();
140:     if ($upload) {
141:         // $upload->set('description', stripslashes($description));
142:         $upload->store();
143:     }
144: 
145:     $protected = !empty($_REQUEST['protected']) && $_REQUEST['protected'] === '1' ? '1' : '';
146:     $properties = new cApiPropertyCollection();
147:     $properties->setValue('upload', $qpath . $file, 'file', 'protected', $protected);
148: 
149:     $timeMgmt = !empty($_REQUEST['timemgmt']) && $_REQUEST['timemgmt'] === '1' ? '1' : '';
150:     $properties->setValue('upload', $qpath . $file, 'file', 'timemgmt', $timeMgmt);
151:     if ($timeMgmt) {
152:         $dateStart = !empty($_REQUEST['datestart']) ? cSecurity::escapeString($_REQUEST['datestart']) : '';
153:         $dateEnd = !empty($_REQUEST['dateend']) ? cSecurity::escapeString($_REQUEST['dateend']) : '';
154:         $properties->setValue('upload', $qpath . $file, 'file', 'datestart', $dateStart);
155:         $properties->setValue('upload', $qpath . $file, 'file', 'dateend', $dateEnd);
156:     }
157: 
158:     $author = $auth->auth['uid'];
159:     $created = date('Y-m-d H:i:s');
160: 
161:     $iIdupl = is_object($upload) ? $upload->get('idupl') : 0;
162:     if (!empty($iIdupl) && $iIdupl > 0) {
163:         // check for new entry:
164:         $oUploadMeta = new cApiUploadMeta((int) $iIdupl);
165:         if ($oUploadMeta->loadByUploadIdAndLanguageId($iIdupl, $lang)) {
166:             // Update existing entry
167:             $oUploadMeta->set('medianame', $medianame);
168:             $oUploadMeta->set('description', $description);
169:             $oUploadMeta->set('keywords', $keywords);
170:             $oUploadMeta->set('internal_notice', $medianotes);
171:             $oUploadMeta->set('copyright', $copyright);
172:             $oUploadMeta->set('modified', $created);
173:             $oUploadMeta->set('modifiedby', $author);
174:             $oUploadMeta->store();
175:         } else {
176:             // Create new entry
177:             $oUploadMetaColl = new cApiUploadMetaCollection();
178:             $oUploadMeta = $oUploadMetaColl->create($iIdupl, $lang, $medianame, $description, $keywords, $medianotes, $copyright, $author, $created, $created, $author);
179:         }
180:     }
181: }
182: 
183: if ($action === 'upl_multidelete' && $perm->have_perm_area_action($area, $action) && $bDirectoryIsWritable === true) {
184:     if (is_array($fdelete)) {
185:         // array of cApiUpload objects to be passed to chain function
186:         $uploadObjects = array();
187: 
188:         // Check if it is in the upload table
189:         foreach ($fdelete as $fileNameToDelete) {
190:             $fileNameToDelete = basename(cSecurity::escapeString($fileNameToDelete));
191:             $uploads->select("idclient = '$client' AND dirname='" . $uploads->escape($qpath) . "' AND filename='" . $uploads->escape($fileNameToDelete) . "'");
192:             if (false !== $item = $uploads->next()) {
193:                 if (cApiDbfs::isDbfs($qpath)) {
194:                     $dbfs->remove($qpath . $fileNameToDelete);
195: 
196:                     // call chain once for each deleted file
197:                     $_cecIterator = cRegistry::getCecRegistry()->getIterator('Contenido.Upl_edit.Delete');
198:                     if ($_cecIterator->count() > 0) {
199:                         while (false !== $chainEntry = $_cecIterator->next()) {
200:                             $chainEntry->execute($item->get('idupl'), $qpath, $fileNameToDelete);
201:                         }
202:                     }
203:                 } else {
204:                     $uploads->delete($item->get('idupl'));
205:                 }
206: 
207:                 // add current upload object to array in order to be processed
208:                 array_push($uploadObjects, $item);
209:             }
210:         }
211: 
212:         // call chain once for all deleted files
213:         $_cecIterator = cRegistry::getCecRegistry()->getIterator('Contenido.Upl_edit.DeleteBatch');
214:         if ($_cecIterator->count() > 0) {
215:             while (false !== $chainEntry = $_cecIterator->next()) {
216:                 $chainEntry->execute($uploadObjects);
217:             }
218:         }
219:     }
220: }
221: 
222: if ($action === 'upl_delete' && !empty($file) && $perm->have_perm_area_action($area, $action) && $bDirectoryIsWritable === true) {
223:     // array of cApiUpload objects to be passed to chain function
224:     $uploadObjects = array();
225: 
226:     $uploads->select("idclient = '$client' AND dirname='" . $uploads->escape($qpath) . "' AND filename='" . $uploads->escape($file) . "'");
227:     // FIXME Code is similar/redundant to cApiUploadCollection->delete(), in
228:     // previous version from UploadCollection->delete() too
229:     if (false !== $item = $uploads->next()) {
230:         if (cApiDbfs::isDbfs($qpath)) {
231:             $dbfs->remove($qpath . $file);
232:         } else {
233:             unlink($cfgClient[$client]['upl']['path'] . $qpath . $file);
234:         }
235: 
236:         // call chain for deleted file
237:         $_cecIterator = cRegistry::getCecRegistry()->getIterator('Contenido.Upl_edit.Delete');
238:         if ($_cecIterator->count() > 0) {
239:             while (false !== $chainEntry = $_cecIterator->next()) {
240:                 $chainEntry->execute($uploads->f('idupl'), $qpath, $file);
241: 
242:                 // add current upload object to array in order to be processed
243:                 array_push($uploadObjects, $item);
244:             }
245:         }
246: 
247:         // call chain once for all deleted files
248:         $_cecIterator = cRegistry::getCecRegistry()->getIterator('Contenido.Upl_edit.DeleteBatch');
249:         if ($_cecIterator->count() > 0) {
250:             while (false !== $chainEntry = $_cecIterator->next()) {
251:                 $chainEntry->execute($uploadObjects);
252:             }
253:         }
254:     }
255: }
256: 
257: if ($action === 'upl_upload' && $bDirectoryIsWritable === true) {
258:     if ($perm->have_perm_area_action($area, 'upl_upload')) {
259:         if (count($_FILES) == 1) {
260:             foreach ($_FILES['file']['name'] as $key => $value) {
261:                 if ($_FILES['file']['tmp_name'][$key] != '') {
262:                     $tmp_name = $_FILES['file']['tmp_name'][$key];
263:                     $_cecIterator = $_cecRegistry->getIterator('Contenido.Upload.UploadPreprocess');
264: 
265:                     if ($_cecIterator->count() > 0) {
266:                         // Copy file to a temporary location
267:                         move_uploaded_file($tmp_name, $backendPath . $cfg['path']['temp'] . $_FILES['file']['name'][$key]);
268:                         $tmp_name = $backendPath . $cfg['path']['temp'] . $_FILES['file']['name'][$key];
269: 
270:                         while (false !== $chainEntry = $_cecIterator->next()) {
271:                             if (cApiDbfs::isDbfs($path)) {
272:                                 $sPathPrepend = '';
273:                                 $sPathAppend = '/';
274:                             } else {
275:                                 $sPathPrepend = $cfgClient[$client]['upl']['path'];
276:                                 $sPathAppend = '';
277:                             }
278: 
279:                             $modified = $chainEntry->execute($tmp_name, $sPathPrepend . $path . $sPathAppend . uplCreateFriendlyName($_FILES['file']['name'][$key]));
280:                             if ($modified !== false) {
281:                                 $tmp_name = $modified;
282:                             }
283:                         }
284:                     }
285: 
286:                     if (cApiDbfs::isDbfs($qpath)) {
287:                         $dbfs->writeFromFile($tmp_name, $qpath . uplCreateFriendlyName($_FILES['file']['name'][$key]));
288:                         unlink($tmp_name);
289:                     } else {
290:                         if (is_uploaded_file($tmp_name)) {
291:                             $final_filename = $cfgClient[$client]['upl']['path'] . $path . uplCreateFriendlyName($_FILES['file']['name'][$key]);
292: 
293:                             move_uploaded_file($tmp_name, $final_filename);
294: 
295:                             $iterator = $_cecRegistry->getIterator('Contenido.Upload.UploadPostprocess');
296:                             while ($chainEntry = $iterator->next()) {
297:                                 $chainEntry->execute($final_filename);
298:                             }
299:                         } else {
300:                             rename($tmp_name, $cfgClient[$client]['upl']['path'] . $path . uplCreateFriendlyName($_FILES['file']['name'][$key]));
301:                         }
302:                     }
303:                 }
304:             }
305:         }
306:     } else {
307:         $page->displayError(i18n("Permission denied"));
308:         $page->render();
309:         die();
310:     }
311: }
312: 
313: if ($action === 'upl_renamefile' && $bDirectoryIsWritable === true) {
314:     $oldname = basename(cSecurity::escapeString($oldname));
315:     $newname = basename(cSecurity::escapeString($newname));
316:     rename($cfgClient[$client]['upl']['path'] . $path . $oldname, $cfgClient[$client]['upl']['path'] . $path . $newname);
317: }
318: 
319: /**
320:  *
321:  * @author unknown
322:  */
323: class UploadList extends FrontendList {
324: 
325:     /**
326:      *
327:      * @var string
328:      */
329:     protected $_dark;
330: 
331:     /**
332:      *
333:      * @var int
334:      */
335:     protected $_size;
336: 
337:     /**
338:      * @var int
339:      */
340:     protected $_data_count = 0;
341: 
342:     /**
343:      * Field converting facility.
344:      *
345:      * @see FrontendList::convert()
346:      *
347:      * @param int   $field
348:      *         Field index
349:      * @param mixed $data
350:      *         Field value
351:      *
352:      * @return mixed
353:      *
354:      * @throws cDbException
355:      * @throws cException
356:      * @throws cInvalidArgumentException
357:      */
358:     public function convert($field, $data) {
359:         global $path, $appendparameters, $startpage, $sortby, $sortmode, $thumbnailmode;
360: 
361:         $cfg = cRegistry::getConfig();
362:         $sess = cRegistry::getSession();
363:         $client = cRegistry::getClientId();
364:         $cfgClient = cRegistry::getClientConfig();
365:         $backendUrl = cRegistry::getBackendUrl();
366: 
367:         if ($field == 4) {
368:             return humanReadableSize($data);
369:         }
370: 
371:         if ($field == 3) {
372:             if ($appendparameters == 'imagebrowser' || $appendparameters == 'filebrowser') {
373:                 // fix for IE11 popup:
374:                 // selecting link with tiny out of popup does not work with Con.getFrame in IE11
375:                 // reverting to the old call solves this problem
376:                 if (cApiDbfs::isDbfs($path . '/' . $data)) {
377:                     $mstr = '<a href="javascript://" onclick="parent.parent.frames[\'left\'].frames[\'left_top\'].document.getElementById(\'selectedfile\').value= \'' . $cfgClient[$client]['htmlpath']['frontend'] . 'dbfs.php?file=' . $path . '/' . $data . '\'; window.returnValue=\'' . $cfgClient[$client]['htmlpath']['frontend'] . 'dbfs.php?file=' . $path . '/' . $data . '\'; window.close();"><img alt="" src="' . $backendUrl . $cfg['path']['images'] . 'but_ok.gif" title="' . i18n("Use file") . '">&nbsp;' . $data . '</a>';
378:                 } else {
379:                     $mstr = '<a href="javascript://" onclick="parent.parent.frames[\'left\'].frames[\'left_top\'].document.getElementById(\'selectedfile\').value= \'' . $cfgClient[$client]['htmlpath']['frontend'] . $cfgClient[$client]['upl']['frontendpath'] . $path . $data . '\'; window.returnValue=\'' . $cfgClient[$client]['htmlpath']['frontend'] . $cfgClient[$client]['upl']['frontendpath'] . $path . $data . '\'; window.close();"><img alt="" src="' . $backendUrl . $cfg['path']['images'] . 'but_ok.gif" title="' . i18n("Use file") . '">&nbsp;' . $data . '</a>';
380:                 }
381:             } else {
382:                 $tmp_mstr = '<a onmouseover="this.style.cursor=\'pointer\'" href="javascript:Con.multiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
383:                 $mstr = sprintf($tmp_mstr, 'right_bottom', $sess->url("main.php?area=upl_edit&frame=4&path=$path&file=$data&appendparameters=$appendparameters&startpage=" . $startpage . "&sortby=" . $sortby . "&sortmode=" . $sortmode . "&thumbnailmode=" . $thumbnailmode), 'right_top', $sess->url("main.php?area=upl&frame=3&path=$path&file=$data"), $data);
384:             }
385:             return $mstr;
386:         }
387: 
388:         if ($field == 5) {
389:             return uplGetFileTypeDescription($data);
390:         }
391: 
392:         if ($field == 2) {
393:             // If this file is an image, try to open
394:             $fileType = cString::toLowerCase(cFileHandler::getExtension($data));
395:             switch ($fileType) {
396:                 case 'png':
397:                 case 'gif':
398:                 case 'tiff':
399:                 case 'bmp':
400:                 case 'jpeg':
401:                 case 'jpg':
402:                 case 'iff':
403:                 case 'xbm':
404:                 case 'wbmp':
405:                     $frontendURL = cRegistry::getFrontendUrl();
406: 
407:                     $sCacheThumbnail = uplGetThumbnail($data, 150);
408:                     $sCacheName = basename($sCacheThumbnail);
409:                     $sFullPath = $cfgClient[$client]['cache']['path'] . $sCacheName;
410:                     if (cFileHandler::isFile($sFullPath)) {
411:                         $aDimensions = getimagesize($sFullPath);
412:                         $iWidth = $aDimensions[0];
413:                         $iHeight = $aDimensions[1];
414:                     } else {
415:                         $iWidth = 0;
416:                         $iHeight = 0;
417:                     }
418: 
419:                     if (cApiDbfs::isDbfs($data)) {
420:                         $href = $frontendURL . 'dbfs.php?file=' . $data;
421:                     } else {
422:                         $href = $frontendURL . $cfgClient[$client]['upload'] . $data;
423:                     }
424:                     $retValue = '<a class="jsZoom" href="' . $href . '">
425:                            <img class="hover" name="smallImage" alt="" src="' . $sCacheThumbnail . '" data-width="' . $iWidth . '" data-height="' . $iHeight . '">
426:                            <img class="preview" name="prevImage" alt="" src="' . $sCacheThumbnail . '">
427:                        </a>';
428:                     return $retValue;
429:                     break;
430:                 default:
431:                     $sCacheThumbnail = uplGetThumbnail($data, 150);
432:                     return '<img class="hover_none" name="smallImage" alt="" src="' . $sCacheThumbnail . '">';
433:             }
434:         }
435: 
436:         return $data;
437:     }
438: 
439:     /**
440:      * @return int $size
441:      */
442:     public function getSize() {
443:         return $this->_size;
444:     }
445: 
446:     /**
447:      * @param int $size
448:      */
449:     public function setSize($size) {
450:         $this->_size = $size;
451:     }
452: 
453:     /**
454:      * Sets the total count of data entries. This is needed for calculating the pages.
455:      * @param int $totalUploadsCount
456:      */
457:     public function setDataCount($totalUploadsCount) {
458:         $this->_data_count = $totalUploadsCount;
459:     }
460: 
461:     /**
462:      * Returns the number of pages.
463:      * If the data count variable is set it will be used instead counting the data array.
464:      * @return float|int
465:      */
466:     public function getNumPages() {
467:         if ($this->_data_count > 0) {
468:             return ceil($this->_data_count / $this->_resultsPerPage);
469:         }
470: 
471:         return parent::getNumPages();
472:     }
473: 
474:     /**
475:      * Outputs or optionally returns
476:      *
477:      * @param bool $return
478:      *         if true, returns the list
479:      *
480:      * @return string
481:      *
482:      * @throws cDbException
483:      * @throws cException
484:      * @throws cInvalidArgumentException
485:      */
486:     public function output($return = false) {
487:         // if the data count variable is not set, proceed with the previous logic
488:         if ($this->_data_count === 0) {
489:             return parent::output($return);
490:         }
491: 
492:         // if the data count variable is set, display all contents from data array
493: 
494:         $output = $this->_startwrap;
495: 
496:         $count = count($this->_data);
497: 
498:         for ($i = 1; $i <= $count; $i++) {
499:             if (is_array($this->_data[$i - 1])) {
500:                 $items = "";
501:                 foreach ($this->_data[$i - 1] as $key => $value) {
502:                     $items .= ", '" . addslashes($this->convert($key, $value)) . "'";
503:                 }
504: 
505:                 $execute = '$output .= sprintf($this->_itemwrap ' . $items . ');';
506:                 eval($execute);
507:             }
508:         }
509: 
510:         $output .= $this->_endwrap;
511: 
512:         $output = stripslashes($output);
513: 
514:         if ($return == true) {
515:             return $output;
516:         } else {
517:             echo $output;
518:         }
519:     }
520: 
521: }
522: 
523: uplSyncDirectory($path);
524: 
525: if ($sortby == '') {
526:     $sortby = 3;
527:     $sortmode = 'ASC';
528: }
529: 
530: if ($startpage == '') {
531:     $startpage = 1;
532: }
533: 
534: $thisfile = $sess->url("main.php?idarea=$area&frame=$frame&path=$path&thumbnailmode=$thumbnailmode&appendparameters=$appendparameters");
535: $scrollthisfile = $thisfile . "&sortmode=$sortmode&sortby=$sortby&appendparameters=$appendparameters";
536: 
537: if ($sortby == 3 && $sortmode == 'DESC') {
538:     $fnsort = '<a class="gray" href="' . $thisfile . '&sortby=3&sortmode=ASC&startpage=' . $startpage . '">' . i18n("Filename / Description") . '<img src="images/sort_down.gif" alt="" border="0"></a>';
539: } else {
540:     if ($sortby == 3) {
541:         $fnsort = '<a class="gray" href="' . $thisfile . '&sortby=3&sortmode=DESC&startpage=' . $startpage . '">' . i18n("Filename / Description") . '<img src="images/sort_up.gif" alt="" border="0"></a>';
542:     } else {
543:         $fnsort = '<a class="gray" href="' . $thisfile . '&sortby=3&sortmode=ASC&startpage=' . $startpage . '">' . i18n("Filename / Description") . '</a>';
544:     }
545: }
546: 
547: if ($sortby == 4 && $sortmode == 'DESC') {
548:     $sizesort = '<a class="gray" href="' . $thisfile . '&sortby=4&sortmode=ASC&startpage=' . $startpage . '">' . i18n("Size") . '<img src="images/sort_down.gif" alt="" border="0"></a>';
549: } else {
550:     if ($sortby == 4) {
551:         $sizesort = '<a class="gray" href="' . $thisfile . '&sortby=4&sortmode=DESC&startpage=' . $startpage . '">' . i18n("Size") . '<img src="images/sort_up.gif" alt="" border="0"></a>';
552:     } else {
553:         $sizesort = '<a class="gray" href="' . $thisfile . '&sortby=4&sortmode=ASC&startpage=' . $startpage . '">' . i18n("Size") . "</a>";
554:     }
555: }
556: 
557: if ($sortby == 5 && $sortmode == 'DESC') {
558:     $typesort = '<a class="gray" href="' . $thisfile . '&sortby=5&sortmode=ASC&startpage=' . $startpage . '">' . i18n("Type") . '<img src="images/sort_down.gif" alt="" border="0"></a>';
559: } else {
560:     if ($sortby == 5) {
561:         $typesort = '<a class="gray" class="gray" href="' . $thisfile . '&sortby=5&sortmode=DESC&startpage=' . $startpage . '">' . i18n("Type") . '<img src="images/sort_up.gif" alt="" border="0"></a>';
562:     } else {
563:         $typesort = '<a class="gray" href="' . $thisfile . '&sortby=5&sortmode=ASC&startpage=' . $startpage . '">' . i18n("Type") . "</a>";
564:     }
565: }
566: 
567: // Multiple deletes at top of table
568: if ($perm->have_perm_area_action('upl', 'upl_multidelete') && $bDirectoryIsWritable == true) {
569:     $sConfirmation = "Con.showConfirmation('" . i18n('Are you sure you want to delete the selected files?') . "', function() { document.del.action.value = \'upl_multidelete\'; document.del.submit(); });return false;";
570:     $sDelete = '<a class="tableElement vAlignMiddle" href="javascript:void(0)" onclick="' . $sConfirmation . '"><img class="tableElement vAlignMiddle" src="images/delete.gif" title="' . i18n("Delete selected files") . '" alt="' . i18n("Delete selected files") . '" onmouseover="this.style.cursor=\'pointer\'"><span class="tableElement">' . i18n("Delete selected files") . '</span></a>';
571: } else {
572:     $sDelete = '';
573: }
574: 
575: if (cApiDbfs::isDbfs($path)) {
576:     $mpath = $path . '/';
577: } else {
578:     $mpath = 'upload/' . $path;
579: }
580: 
581: $sDisplayPath = generateDisplayFilePath($mpath, 85);
582: 
583: $sToolsRow = '<tr>
584:                <th colspan="6" id="cat_navbar">
585:                    <a class="tableElement vAlignMiddle" href="javascript:invertSelection();"><img class="tableElement vAlignMiddle" src="images/but_invert_selection.gif" title="' . i18n("Flip Selection") . '" alt="' . i18n("Flip Selection") . '" onmouseover="this.style.cursor=\'pointer\'"> ' . i18n("Flip Selection") . '</a>
586:                        ' . $sDelete . '
587:                    <div class="toolsRight">
588:                    ' . i18n("Path:") . " " . $sDisplayPath . '
589:                    </div>
590:                </th>
591:            </tr>';
592: $sSpacedRow = '<tr height="10">
593:                    <td colspan="6" class="emptyCell"></td>
594:               </tr>';
595: 
596: // List wraps
597: 
598: $pagerwrap = '<tr>
599:                <th colspan="6" id="cat_navbar">
600:                    <div class="toolsRight">
601:                        <div class="vAlignMiddle">-C-SCROLLLEFT-</div>
602:                        <div class="vAlignMiddle">-C-PAGE-</div>
603:                        <div class="vAlignMiddle">-C-SCROLLRIGHT-</div>
604:                    </div>
605:                    <span class="vAlignMiddle">' . i18n("Files per Page") . ' -C-FILESPERPAGE-</span>
606:                </th>
607:            </tr>';
608: 
609: $startwrap = '<table class="hoverbox generic" cellspacing="0" cellpadding="2" border="0">
610:                ' . $pagerwrap . $sSpacedRow . $sToolsRow . $sSpacedRow . '
611:               <tr>
612:                    <th>' . i18n("Mark") . '</th>
613:                    <th>' . i18n("Preview") . '</th>
614:                    <th width="100%">' . $fnsort . '</th>
615:                    <th>' . $sizesort . '</th>
616:                    <th>' . $typesort . '</th>
617:                    <th>' . i18n("Actions") . '</th>
618:                </tr>';
619: $itemwrap = '<tr>
620:                    <td align="center">%s</td>
621:                    <td align="center">%s</td>
622:                    <td class="vAlignTop nowrap">%s</td>
623:                    <td class="vAlignTop nowrap">%s</td>
624:                    <td class="vAlignTop nowrap">%s</td>
625:                    <td class="vAlignTop nowrap">%s</td>
626:                </tr>';
627: $endwrap = $sSpacedRow . $sToolsRow . $sSpacedRow . $pagerwrap . '</table>';
628: 
629: // Object initializing
630: $list2 = new UploadList($startwrap, $endwrap, $itemwrap);
631: 
632: $uploads = new cApiUploadCollection();
633: 
634: // Fetch data
635: if (cString::getPartOfString($path, cString::getStringLength($path) - 1, 1) != "/") {
636:     if ($path != "") {
637:         $qpath = $path . "/";
638:     } else {
639:         // view the root folder
640:         $qpath = "";
641:     }
642: } else {
643:     $qpath = $path;
644: }
645: 
646: $uploads->select("idclient = '$client' AND dirname = '$qpath'");
647: 
648: $user = new cApiUser($auth->auth['uid']);
649: 
650: if ($thumbnailmode == '') {
651:     $current_mode = $user->getUserProperty('upload_folder_thumbnailmode', md5($path));
652:     if ($current_mode != '') {
653:         $thumbnailmode = $current_mode;
654:     } else {
655:         $thumbnailmode = getEffectiveSetting('backend', 'thumbnailmode', 100);
656:     }
657: }
658: 
659: switch ($thumbnailmode) {
660:     case 10:
661:         $numpics = 10;
662:         break;
663:     case 25:
664:         $numpics = 25;
665:         break;
666:     case 50:
667:         $numpics = 50;
668:         break;
669:     case 100:
670:         $numpics = 100;
671:         break;
672:     case 200:
673:         $numpics = 200;
674:         break;
675:     default:
676:         $thumbnailmode = 100;
677:         $numpics = 15;
678:         break;
679: }
680: 
681: $user->setUserProperty('upload_folder_thumbnailmode', md5($path), $thumbnailmode);
682: 
683: $list2->setResultsPerPage($numpics);
684: $list2->setSize($thumbnailmode);
685: 
686: $totalUploadsCount = $uploads->count();
687: $list2->setDataCount($totalUploadsCount);
688: 
689: if ($startpage > $list2->getNumPages()) {
690:     $startpage = $list2->getNumPages();
691: }
692: 
693: if ($startpage < 1) {
694:     $startpage = 1;
695: }
696: 
697: $uploads->resetQuery();
698: $uploads->select("idclient = '$client' AND dirname = '$qpath'", '', '', $numpics * ($startpage - 1) . ", " .  $numpics);
699: 
700: $rownum = 0;
701: 
702: $properties = new cApiPropertyCollection();
703: 
704: while ($item = $uploads->next()) {
705: 
706:     // Get name of directory, filename and size of file
707:     $dirname = $item->get('dirname');
708:     $filename = $item->get('filename');
709:     $filesize = $item->get('size');
710: 
711:     // Do not display directories and "filenames" begin with a dot
712:     if (true === cDirHandler::exists($cfgClient[$client]['upl']['path'] . $dirname . $filename) || cString::findFirstPos($filename, ".") === 0) {
713:         continue;
714:     }
715: 
716:     $bAddFile = true;
717: 
718:     if ($appendparameters == 'imagebrowser') {
719:         $restrictvar = 'restrict_' . $appendparameters;
720:         if (array_key_exists($restrictvar, $browserparameters)) {
721:             $fileType = cString::toLowerCase(cFileHandler::getExtension($filename));
722:             if (count($browserparameters[$restrictvar]) > 0) {
723:                 $bAddFile = false;
724:                 if (in_array($fileType, $browserparameters[$restrictvar])) {
725:                     $bAddFile = true;
726:                 }
727:             }
728:         }
729:     }
730: 
731:     if ($filesize == 0) {
732:         if (cFileHandler::exists($cfgClient[$client]['upl']['path'] . $dirname . $filename)) {
733:             $filesize = filesize($cfgClient[$client]['upl']['path'] . $dirname . $filename);
734:         }
735:     }
736: 
737:     $actions = '';
738: 
739:     $medianame = $properties->getValue('upload', $path . $filename, 'file', 'medianame');
740:     $medianotes = $properties->getValue('upload', $path . $filename, 'file', 'medianotes');
741: 
742:     $todo = new TODOLink('upload', $path . $filename, "File $path$filename", '');
743: 
744:     $proptitle = i18n("Display properties");
745: 
746:     if ($appendparameters == 'imagebrowser' || $appendparameters == 'filebrowser') {
747:         $mstr = '';
748:     } else {
749:         $tmp_mstr = '<a href="javascript:Con.multiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';
750:         $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 class="vAlignMiddle tableElement" alt="' . $proptitle . '" title="' . $proptitle . '" src="images/but_art_conf2.gif" onmouseover="this.style.cursor=\'pointer\'">');
751:     }
752: 
753:     $actions = $mstr . $actions;
754: 
755:     $showfilename = $filename;
756: 
757:     $check = new cHTMLCheckbox('fdelete[]', $filename);
758: 
759:     $mark = $check->toHtml(false);
760: 
761:     if ($bAddFile == true) {
762:         // 'bgcolor' is just a placeholder...
763:         $list2->setData($rownum, $mark, $dirname . $filename, $showfilename, $filesize, cString::toLowerCase(cFileHandler::getExtension($filename)), $todo->render() . $actions);
764:         $rownum++;
765:     }
766: }
767: 
768: if ($rownum == 0) {
769:     header('Location: ' . cRegistry::getBackendUrl() . 'main.php?area=upl_upload&frame=4&path=' . $path . '&contenido=' . $contenido . '&appendparameters=' . $appendparameters);
770: }
771: 
772: if ($sortmode == 'ASC') {
773:     $list2->sort($sortby, SORT_ASC);
774: } else {
775:     $list2->sort($sortby, SORT_DESC);
776: }
777: 
778: $list2->setListStart($startpage);
779: 
780: // Create scroller
781: if ($list2->getCurrentPage() > 1) {
782:     $prevpage = '<a href="' . $scrollthisfile . '&startpage=' . ($list2->getCurrentPage() - 1) . '" class="invert_hover">' . i18n("Previous Page") . '</a>';
783: } else {
784:     $prevpage = '&nbsp;';
785: }
786: 
787: if ($list2->getCurrentPage() < $list2->getNumPages()) {
788:     $nextpage = '<a href="' . $scrollthisfile . '&startpage=' . ($list2->getCurrentPage() + 1) . '" class="invert_hover">' . i18n("Next Page") . '</a>';
789: } else {
790:     $nextpage = '&nbsp;';
791: }
792: 
793: // curpage = $list2->getCurrentPage() . " / ". $list2->getNumPages();
794: 
795: if ($list2->getNumPages() > 1) {
796:     $num_pages = $list2->getNumPages();
797: 
798:     $paging_form .= "<script type=\"text/javascript\">
799:        function jumpToPage(select) {
800:            var pagenumber = select.selectedIndex + 1;
801:            url = '" . $sess->url('main.php') . "';
802:            document.location.href = url + '&area=upl&frame=4&appendparameters=$appendparameters&path=$path&sortmode=$sortmode&sortby=$sortby&thumbnailmode=$thumbnailmode&startpage=' + pagenumber;
803:        }
804:    </script>";
805:     $paging_form .= "<select name=\"start_page\" class=\"text_medium\" onChange=\"jumpToPage(this);\">";
806:     for ($i = 1; $i <= $num_pages; $i++) {
807:         if ($i == $startpage) {
808:             $selected = ' selected';
809:         } else {
810:             $selected = '';
811:         }
812:         $paging_form .= "<option value=\"$i\"$selected>$i</option>";
813:     }
814: 
815:     $paging_form .= '</select>';
816: } else {
817:     $paging_form = '1';
818: }
819: $curpage = $paging_form . ' / ' . $list2->getNumPages();
820: 
821: $scroller = $prevpage . $nextpage;
822: $output = $list2->output(true);
823: $output = str_replace('-C-SCROLLLEFT-', $prevpage, $output);
824: $output = str_replace('-C-SCROLLRIGHT-', $nextpage, $output);
825: $output = str_replace('-C-PAGE-', i18n("Page") . ' ' . $curpage, $output);
826: 
827: $select = new cHTMLSelectElement('thumbnailmode');
828: 
829: $values = array(
830:     10 => '10',
831:     25 => '25',
832:     50 => '50',
833:     100 => '100',
834:     200 => '200'
835: );
836: 
837: $select->autoFill($values);
838: 
839: $select->setDefault($thumbnailmode);
840: $select->setEvent('change', "if (document.del.thumbnailmode[0] != 'undefined') document.del.thumbnailmode[0].value = this.value; if (document.del.thumbnailmode[1] != 'undefined') document.del.thumbnailmode[1].value = this.value; if (document.del.thumbnailmode[2] != 'undefined') document.del.thumbnailmode[2].value = this.value;");
841: 
842: $topbar = $select->render() . '<input class="vAlignMiddle tableElement" type="image" onmouseover="this.style.cursor=\'pointer\'" src="images/submit.gif">';
843: 
844: $output = str_replace('-C-FILESPERPAGE-', $topbar, $output);
845: 
846: $delform = new cHTMLForm('del');
847: $delform->setVar('area', $area);
848: $delform->setVar('action', '');
849: $delform->setVar('startpage', $startpage);
850: $delform->setVar('thumbnailmode', $thumbnailmode);
851: $delform->setVar('sortmode', $sortmode);
852: $delform->setVar('sortby', $sortby);
853: $delform->setVar('appendparameters', $appendparameters);
854: $delform->setVar('path', $path);
855: $delform->setVar('frame', 4);
856: // Table with (preview) images
857: $delform->appendContent($output);
858: 
859: $page->addScript($sess->url('iZoom.js.php'));
860: 
861: if ($bDirectoryIsWritable == false) {
862:     $page->displayError(i18n("Directory not writable") . ' (' . $cfgClient[$client]['upl']['path'] . $path . ')');
863: }
864: 
865: $page->setContent(array(
866:     $delform
867: ));
868: 
869: $page->render();
870: 
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0