• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FileList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中FileList的典型用法代码示例。如果您正苦于以下问题:PHP FileList类的具体用法?PHP FileList怎么用?PHP FileList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了FileList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: view

 public function view()
 {
     $fs = FileSet::getByID($this->fsID);
     $fileList = new FileList();
     $fileList->filterBySet($fs);
     $fileList->filterByType(FileType::T_IMAGE);
     $fileList->sortByFileSetDisplayOrder();
     $images = $fileList->get(1000, 0);
     $this->set('images', $images);
     $this->set('picture', $this->getPicture());
 }
开发者ID:robchenski,项目名称:ids,代码行数:11,代码来源:controller.php


示例2: on_get_list

 /**
  * Вывод списка файлов.
  */
 public static function on_get_list(Context $ctx)
 {
     try {
         $options = array('#raw' => true, 'name' => 'list', 'title' => t('Файловый архив'), 'path' => os::webpath(MCMS_SITE_FOLDER, $ctx->config->get('modules/files/storage')), 'advsearch' => true, 'canedit' => true, 'mode' => $ctx->get('mode', 'table'), 'scope' => $ctx->get('scope'), 'type' => 'file');
         $tmp = new FileList($ctx, $options['scope']);
         return $tmp->getHTML('files', $options);
     } catch (TableNotFoundException $e) {
         if ($e->getTableName() != 'node__idx_filetype') {
             throw $e;
         }
         throw new Exception(t('Отсутствует индекс по полю filetype, <a href="@url">исправьте это</a> и возвращайтесь.', array('@url' => 'admin/structure/fields/edit?type=file&field=filetype&destination=' . urlencode(MCMS_REQUEST_URI))));
     }
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:16,代码来源:class.filelist.php


示例3: getList

 public function getList()
 {
     if ($this->xml) {
         return $this->document->saveXML();
     } else {
         $html = $this->document->saveHTML();
         if ($this->includefiles) {
             $filelist = new FileList(array(), array('class' => 'type'), $this->parent, false);
             $html .= $filelist->getList();
         }
         return $html;
     }
 }
开发者ID:ruffen,项目名称:Pixcel-CMS,代码行数:13,代码来源:folderlist.class.php


示例4: _prepare

 private function _prepare($fs)
 {
     $fl = new FileList();
     $fl->filterByExtension("js");
     $fl->filterBySet($fs);
     $files = $fl->get();
     $setFiles = array();
     foreach ($files as $f) {
         $fv = $f->getRecentVersion();
         $fn = $fv->getFileName();
         $this->_exists[$fn] = $f;
     }
 }
开发者ID:holyshared,项目名称:developer-package,代码行数:13,代码来源:importer.php


示例5: loadFileSet

	function loadFileSet(){
		if (intval($this->fsID) < 1) {
			return false;
		}
        Loader::helper('concrete/file');
		Loader::model('file_attributes');
		Loader::library('file/types');
		Loader::model('file_list');
		Loader::model('file_set');
		
		$ak = FileAttributeKey::getByHandle('height');

		$fs = FileSet::getByID($this->fsID);
		$fileList = new FileList();		
		$fileList->filterBySet($fs);
		$fileList->filterByType(FileType::T_IMAGE);	
		$fileList->sortByFileSetDisplayOrder();
		
		$files = $fileList->get(1000,0);
		
		
		$image = array();
		$image['duration'] = $this->duration;
		$image['fadeDuration'] = $this->fadeDuration;
		$image['groupSet'] = 0;
		$image['url'] = '';
		$images = array();
		$maxHeight = 0;
		foreach ($files as $f) {
			$fp = new Permissions($f);
			if(!$fp->canViewFile()) { continue; }
			$image['fID'] 			= $f->getFileID();
			$image['fileName'] 		= $f->getFileName();
			$image['fullFilePath'] 	= $f->getPath();
			$image['url']			= $f->getRelativePath();
			
			// find the max height of all the images so slideshow doesn't bounce around while rotating
			$vo = $f->getAttributeValueObject($ak);
			if (is_object($vo)) {
				$image['imgHeight'] = $vo->getValue('height');
			}
			if ($maxHeight == 0 || $image['imgHeight'] > $maxHeight) {
				$maxHeight = $image['imgHeight'];
			}
			$images[] = $image;
		}
		$this->images = $images;
	
	}
开发者ID:nveid,项目名称:concrete5,代码行数:49,代码来源:slideshow.php


示例6: getFileList

 static function getFileList($dir, $recurse = false)
 {
     // массив, хранящий возвращаемое значение
     $retval = array();
     // добавить конечный слеш, если его нет
     if (substr($dir, -1) != "/") {
         $dir .= "/";
     }
     // указание директории и считывание списка файлов
     $d = @dir($dir) or die("getFileList: Не удалось открыть каталог {$dir} для чтения");
     while (false !== ($entry = $d->read())) {
         // пропустить скрытые файлы
         if ($entry[0] == ".") {
             continue;
         }
         if (is_dir("{$dir}{$entry}")) {
             $retval[] = "{$dir}{$entry}";
             if ($recurse && is_readable("{$dir}{$entry}/")) {
                 $retval = array_merge($retval, FileList::getFileList("{$dir}{$entry}/", true));
             }
         } elseif (is_readable("{$dir}{$entry}")) {
             $retval[] = "{$dir}{$entry}";
         }
     }
     $d->close();
     return $retval;
 }
开发者ID:TzepART,项目名称:functionsAndClasses,代码行数:27,代码来源:FileList.php


示例7: getUnsortedPermittedFilesetImages

 public static function getUnsortedPermittedFilesetImages($fsID)
 {
     Loader::model('file_set');
     Loader::model('file_list');
     $fsHasDisplayOrder = version_compare(APP_VERSION, '5.4.1', '>=');
     $fs = FileSet::getByID($fsID);
     $fl = new FileList();
     $fl->filterBySet($fs);
     $fl->filterByType(FileType::T_IMAGE);
     if ($fsHasDisplayOrder) {
         $fl->sortByFileSetDisplayOrder();
     }
     $all_files = $fl->get();
     $permitted_files = array();
     foreach ($all_files as $f) {
         $fp = new Permissions($f);
         if ($fp->canRead()) {
             $permitted_files[] = $f;
         }
     }
     return $permitted_files;
 }
开发者ID:madmarker,项目名称:creatureslab,代码行数:22,代码来源:sortable_fancybox_gallery.php


示例8: getPermittedFilesetImages

 public static function getPermittedFilesetImages($fsID, $use_file_props_for_title_and_caption = false)
 {
     Loader::model('file_set');
     Loader::model('file_list');
     $fsHasDisplayOrder = version_compare(APP_VERSION, '5.4.1', '>=');
     $fs = FileSet::getByID($fsID);
     $fl = new FileList();
     $fl->filterBySet($fs);
     $fl->filterByType(FileType::T_IMAGE);
     if ($fsHasDisplayOrder) {
         $fl->sortByFileSetDisplayOrder();
     }
     $all_files = $fl->get();
     $permitted_files = array();
     foreach ($all_files as $f) {
         $fp = new Permissions($f);
         if ($fp->canRead()) {
             $fv = $f->getRecentVersion();
             $permitted_files[$f->fID] = array('file' => $f, 'fID' => $f->fID, 'position' => $fsHasDisplayOrder ? $f->fsDisplayOrder : 0, 'title' => $use_file_props_for_title_and_caption ? $fv->getTitle() : '', 'caption' => $use_file_props_for_title_and_caption ? $fv->getDescription() : '');
         }
     }
     return $permitted_files;
 }
开发者ID:robchenski,项目名称:ids,代码行数:23,代码来源:deluxe_image_gallery.php


示例9: getLastControllerModTime

 protected static function getLastControllerModTime(array $controllerDirs)
 {
     $controllerFiles = array();
     foreach ($controllerDirs as $dir) {
         $controllerFiles = array_merge($controllerFiles, FileList::getFilesRecursively($dir));
     }
     $lastTime = 0;
     foreach ($controllerFiles as $file) {
         $fileModTime = filemtime($file);
         if ($fileModTime > $lastTime) {
             $lastTime = $fileModTime;
         }
     }
     return $lastTime;
 }
开发者ID:miknatr,项目名称:routni,代码行数:15,代码来源:Router.php


示例10: getMootoolsPluginFiles

 public function getMootoolsPluginFiles($fs)
 {
     Loader::model('file_set');
     Loader::model('file_list');
     //		$u = new User();
     $fl = new FileList();
     $fl->filterByMootoolsPlugin(true);
     $fl->filterByExtension("js");
     //		$fl->filter('u.uID', $u->getUserID(), '=');
     $fl->sortByAttributeKey("ak_" . MOOTOOLS_PLUGIN_DISPLAY_ORDER);
     $fl->filterBySet($fs);
     $files = $fl->get();
     return $files;
 }
开发者ID:holyshared,项目名称:developer-package,代码行数:14,代码来源:plugin_list.php


示例11: start

 public function start()
 {
     global $projectTmpDir, $php_errormsg;
     $authenticator = new Auth();
     if ($authenticator->auth()) {
         ob_start();
         if (!empty($_GET['a'])) {
             $action = $_GET['a'];
             $interval = empty($_GET['delay']) ? 5 : (int) $_GET['delay'];
             $fileScanner = new FileList();
             $fileScanner->setInterval($interval);
             if ($action === 'cleanUp') {
                 $this->removeTempFiles();
                 print json_encode(array('type' => 'cleanUp', 'status' => 'ok', 'phpError' => $php_errormsg));
             } else {
                 if ($action === 'getFileList') {
                     echo $fileScanner->performScanning();
                 } else {
                     if ($action === 'getSignatureScanResult') {
                         $this->detector = new MalwareDetector();
                         $this->detector->setRequestDelay($interval);
                         print $this->detector->malwareScanRound();
                     } else {
                         if ($action === 'getWebsiteLog') {
                             //REPORTING
                             $xmlLog = $this->getXMLReport();
                             $logFilename = $projectTmpDir . '/scan_log.xml';
                             file_put_contents2($logFilename, $xmlLog);
                             print json_encode(array('type' => 'getWebsiteLog', 'status' => 'ok', 'phpError' => $php_errormsg));
                         }
                     }
                 }
             }
         } else {
             //GENERATE INTERFACE
             $fileScanner = new FileList();
             define('PS_ARCHIVE_DOWNLOAD_URL', $_SERVER['PHP_SELF'] . '?controller=download&f=report');
             $this->templateOutput($fileScanner->getInterval());
         }
     }
 }
开发者ID:backdorus,项目名称:manul,代码行数:41,代码来源:ScannerController.inc.php


示例12: mkdir

             if (!is_dir(dirname($CFG->INCLUDE_PATH . $value->Name))) {
                 mkdir(dirname($CFG->INCLUDE_PATH . $value->Name), 0775, true);
             }
             file_put_contents($CFG->INCLUDE_PATH . $value->Name, $tmp);
             echo $value->Name . " (" . $value->Size . " bytes): " . $value->MD5 . "\n";
         } else {
             echo "ERRORE di DOWNLOAD: " . $value->Name . " (" . $value->Size . " bytes): " . $value->MD5 . "\n";
         }
     } else {
         echo "ERRORE di DOWNLOAD: " . $value->Name . "\n";
     }
 }
 echo "</pre>";
 //Calcola Le differenze DA CANCELLARE
 //Gestisci Elenco Locale
 $tmp = new FileList("/");
 $tmp->IncludeFolders(true);
 $tmp->Load();
 $lFileList = $tmp->toArray();
 $NeedFile = array_udiff($lFileList, $rFileList, array("File", "compare"));
 usort($NeedFile, array("File", "compare"));
 echo "Cancellazione Files non utilizzati\n";
 echo "<pre>";
 foreach ($NeedFile as $value) {
     if (is_dir($CFG->INCLUDE_PATH . $value->Name)) {
         if (count(scandir($CFG->INCLUDE_PATH . $value->Name)) == 2) {
             rmdir($CFG->INCLUDE_PATH . $value->Name);
             echo "CARTELLA: " . $value->Name . "\n";
         }
     } else {
         if ($value->Name != "/Common/config.inc.php") {
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:update.php


示例13: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
$cp = FilePermissions::getGlobal();
if (!$cp->canAccessFileManager()) {
    die(t("Unable to access the file manager."));
}
Loader::model('file_list');
Loader::model('file_set');
$fileList = new FileList();
$fileList->enableStickySearchRequest();
$req = $fileList->getSearchRequest();
$form = Loader::helper('form');
$s1 = FileSet::getMySets();
if (count($s1) > 0) {
    ?>
		<div class="span4" style="width: 280px">
	<?php 
    echo $form->label('fsID', t('In Set(s)'));
    ?>
	<div class="input">
		<select multiple name="fsID[]" class="chosen-select">
			<?php 
    foreach ($s1 as $s) {
        ?>
				<option value="<?php 
        echo $s->getFileSetID();
        ?>
"><?php 
        echo $s->getFileSetName();
        ?>
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:31,代码来源:search_sets_reload.php


示例14: generateAffectedPaths

 private function generateAffectedPaths()
 {
     if ($this->isRawDiffSource()) {
         return array();
     }
     $repository_api = $this->getRepositoryAPI();
     if ($repository_api instanceof ArcanistSubversionAPI) {
         $file_list = new FileList($this->getArgument('paths', array()));
         $paths = $repository_api->getSVNStatus($externals = true);
         foreach ($paths as $path => $mask) {
             if (!$file_list->contains($repository_api->getPath($path), true)) {
                 unset($paths[$path]);
             }
         }
         $warn_externals = array();
         foreach ($paths as $path => $mask) {
             $any_mod = $mask & ArcanistRepositoryAPI::FLAG_ADDED || $mask & ArcanistRepositoryAPI::FLAG_MODIFIED || $mask & ArcanistRepositoryAPI::FLAG_DELETED;
             if ($mask & ArcanistRepositoryAPI::FLAG_EXTERNALS) {
                 unset($paths[$path]);
                 if ($any_mod) {
                     $warn_externals[] = $path;
                 }
             }
         }
         if ($warn_externals && !$this->hasWarnedExternals) {
             echo phutil_console_format("%s\n\n%s\n\n", pht("The working copy includes changes to '%s' paths. These " . "changes will not be included in the diff because SVN can not " . "commit 'svn:externals' changes alongside normal changes.", 'svn:externals'), pht("Modified '%s' files:", 'svn:externals'), phutil_console_wrap(implode("\n", $warn_externals), 8));
             $prompt = pht('Generate a diff (with just local changes) anyway?');
             if (!phutil_console_confirm($prompt)) {
                 throw new ArcanistUserAbortException();
             } else {
                 $this->hasWarnedExternals = true;
             }
         }
     } else {
         $paths = $repository_api->getWorkingCopyStatus();
     }
     foreach ($paths as $path => $mask) {
         if ($mask & ArcanistRepositoryAPI::FLAG_UNTRACKED) {
             unset($paths[$path]);
         }
     }
     return $paths;
 }
开发者ID:rmaz,项目名称:arcanist,代码行数:43,代码来源:ArcanistDiffWorkflow.php


示例15: getFilesetImages

 static function getFilesetImages($fsID, $randomize = false)
 {
     Loader::model('file_set');
     Loader::model('file_list');
     $fs = FileSet::getByID($fsID);
     $fl = new FileList();
     $fl->filterBySet($fs);
     $fl->filterByType(FileType::T_IMAGE);
     $fl->setPermissionLevel('canRead');
     if ($randomize) {
         $fl->sortBy('RAND()', 'asc');
     } else {
         $fl->sortByFileSetDisplayOrder();
         //Requires 5.4.1 or higher: version_compare(APP_VERSION, '5.4.1', '>=');
     }
     $files = $fl->get();
     return $files;
 }
开发者ID:robchenski,项目名称:ids,代码行数:18,代码来源:controller.php


示例16: exportArchive

 public static function exportArchive($archive)
 {
     $fl = new FileList();
     $files = $fl->get();
     $filestring = '';
     $fh = Loader::helper('file');
     $filenames = array();
     $filename = $fh->getTemporaryDirectory() . '/' . $archive . '.zip';
     if (count($files) > 0) {
         try {
             if (class_exists('ZipArchive', false)) {
                 $zip = new ZipArchive();
                 $res = $zip->open($filename, ZipArchive::CREATE);
                 if ($res === TRUE) {
                     foreach ($files as $f) {
                         $file = $f->getPath();
                         if (!in_array(basename($file), $filenames)) {
                             $filenames[] = basename($file);
                             $zip->addFile(addslashes($file), basename($file));
                         }
                     }
                     $zip->close();
                 } else {
                     throw new Exception(t('Could not open with ZipArchive::CREATE'));
                 }
             } else {
                 $filestring = "'" . addslashes($filename) . "' ";
                 foreach ($files as $f) {
                     $file = $f->getPath();
                     if (!in_array(basename($file), $filenames)) {
                         $filenames[] = basename($file);
                         $filestring .= "'" . addslashes($file) . "' ";
                     }
                 }
                 exec(DIR_FILES_BIN_ZIP . ' -j ' . $filestring);
             }
         } catch (Exception $e) {
             throw new Exception(t('Failed to create zip file as "%s": %s', $filename, $e->getMessage()));
         }
     }
 }
开发者ID:ronlobo,项目名称:concrete5,代码行数:41,代码来源:file_list.php


示例17: ob_start

<?php

ob_start();
define('PHPFOX', true);
define('PHPFOX_NO_SESSION', true);
define('PHPFOX_NO_USER_SESSION', true);
define('PHPFOX_DS', DIRECTORY_SEPARATOR);
define('PHPFOX_DIR', dirname(dirname(dirname(dirname(__FILE__)))) . PHPFOX_DS);
include PHPFOX_DIR . 'include' . PHPFOX_DS . 'init.inc.php';
$file_list = new FileList();
$_POST['dir'] = urldecode($_POST['dir']);
$root = '';
if (file_exists($root . $_POST['dir'])) {
    $files = scandir($root . $_POST['dir']);
    natcasesort($files);
    if (count($files) > 2) {
        /* The 2 accounts for . and .. */
        echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
        // All dirs
        foreach ($files as $file) {
            if (file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file)) {
                $full_path = htmlentities($root . $_POST['dir'] . $file) . "/";
                $file = htmlentities($file);
                $class = $file_list->is_checked_file($full_path) ? 'checked' : '';
                // var_dump($full_path);
                echo "<li class=\"directory collapsed\">\n                                            <a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a>\n                                            <a href='#' rel='{$full_path}' class='checkbox directory {$class}'></a>\n                                      </li>";
            }
        }
        // All files
        foreach ($files as $file) {
            if (file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_POST['dir'] . $file)) {
开发者ID:googlesky,项目名称:snsp.vn,代码行数:31,代码来源:jqueryFileTree.php


示例18: dirname

require_once dirname(dirname(__FILE__)) . '/config.php';
require_once 'Language/lib.php';
include 'Common/Templates/head.php';
// nothing to do here without data
if (!in_array(ProgramRelease, array('STABLE', 'FITARCO')) and empty($_POST['Email'])) {
    CD_redirect('/');
}
$URL = 'http://www.ianseo.net/Update.php';
//$URL='http://ianseonet.dellinux/Update.php';
include 'FileList.php';
@ob_end_flush();
echo str_repeat(' ', 1500);
flush();
// preparing list
do_flush('<div><br/>' . get_text('Prepare', 'Install') . ':... ');
$tmp = new FileList($CFG->INCLUDE_PATH);
$tmp->EscludeFiles('^(\\.)');
$tmp->ShowSize(true);
$tmp->ShowMD5(true);
if (!$tmp->Load()) {
    echo '</div><div><br/>' . get_text('NotUpdatable', 'Install', $CFG->INCLUDE_PATH) . '</div>';
    include 'Common/Templates/tail.php';
    die;
}
do_flush(get_text('Done', 'Install') . '</div>');
// sending request to ianseo
do_flush('<div><br/>' . get_text('Sending', 'Install') . ':... ');
$Old = $tmp->serialize();
$Query = array('Json' => gzcompress($Old));
if (!empty($_POST['Email'])) {
    $Query['Email'] = trim($_POST['Email']);
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:UpdateIanseo.php


示例19: getRequestedSearchResults

 public function getRequestedSearchResults()
 {
     $fileList = new FileList();
     $fileList->enableStickySearchRequest();
     Loader::model('file_set');
     if ($_REQUEST['submit_search']) {
         $fileList->resetSearchRequest();
     }
     $req = $fileList->getSearchRequest();
     // first thing, we check to see if a saved search is being used
     if (isset($_REQUEST['fssID'])) {
         $fs = FileSet::getByID($_REQUEST['fssID']);
         if ($fs->getFileSetType() == FileSet::TYPE_SAVED_SEARCH) {
             $req = $fs->getSavedSearchRequest();
             $columns = $fs->getSavedSearchColumns();
             $colsort = $columns->getDefaultSortColumn();
             $fileList->addToSearchRequest('ccm_order_dir', $colsort->getColumnDefaultSortDirection());
             $fileList->addToSearchRequest('ccm_order_by', $colsort->getColumnKey());
         }
     }
     if (!isset($columns)) {
         $columns = FileManagerColumnSet::getCurrent();
     }
     $this->set('searchRequest', $req);
     $this->set('columns', $columns);
     $col = $columns->getDefaultSortColumn();
     $fileList->sortBy($col->getColumnKey(), $col->getColumnDefaultSortDirection());
     $keywords = htmlentities($req['fKeywords'], ENT_QUOTES, APP_CHARSET);
     if ($keywords != '') {
         $fileList->filterByKeywords($keywords);
     }
     if ($req['numResults']) {
         $fileList->setItemsPerPage($req['numResults']);
     }
     if (isset($req['fsIDNone']) && $req['fsIDNone'] == 1 || is_array($req['fsID']) && in_array(-1, $req['fsID'])) {
         $fileList->filterBySet(false);
     } else {
         if (is_array($req['fsID'])) {
             foreach ($req['fsID'] as $fsID) {
                 $fs = FileSet::getByID($fsID);
                 $fileList->filterBySet($fs);
             }
         } else {
             if (isset($req['fsID']) && $req['fsID'] != '' && $req['fsID'] > 0) {
                 $set = $req['fsID'];
                 $fs = FileSet::getByID($set);
                 $fileList->filterBySet($fs);
             }
         }
     }
     if (isset($_GET['fType']) && $_GET['fType'] != '') {
         $type = $_GET['fType'];
         $fileList->filterByType($type);
     }
     if (isset($_GET['fExtension']) && $_GET['fExtension'] != '') {
         $ext = $_GET['fExtension'];
         $fileList->filterByExtension($ext);
     }
     $selectedSets = array();
     if (is_array($req['selectedSearchField'])) {
         foreach ($req['selectedSearchField'] as $i => $item) {
             // due to the way the form is setup, index will always be one more than the arrays
             if ($item != '') {
                 switch ($item) {
                     case "extension":
                         $extension = $req['extension'];
                         $fileList->filterByExtension($extension);
                         break;
                     case "type":
                         $type = $req['type'];
                         $fileList->filterByType($type);
                         break;
                     case "date_added":
                         $dateFrom = $req['date_from'];
                         $dateTo = $req['date_to'];
                         if ($dateFrom != '') {
                             $dateFrom = date('Y-m-d', strtotime($dateFrom));
                             $fileList->filterByDateAdded($dateFrom, '>=');
                             $dateFrom .= ' 00:00:00';
                         }
                         if ($dateTo != '') {
                             $dateTo = date('Y-m-d', strtotime($dateTo));
                             $dateTo .= ' 23:59:59';
                             $fileList->filterByDateAdded($dateTo, '<=');
                         }
                         break;
                     case 'added_to':
                         $ocID = $req['ocIDSearchField'];
                         if ($ocID > 0) {
                             $fileList->filterByOriginalPageID($ocID);
                         }
                         break;
                     case "size":
                         $from = $req['size_from'];
                         $to = $req['size_to'];
                         $fileList->filterBySize($from, $to);
                         break;
                     default:
                         Loader::model('file_attributes');
                         $akID = $item;
//.........这里部分代码省略.........
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:101,代码来源:search.php


示例20: exportArchive

 public static function exportArchive($archive)
 {
     $fl = new FileList();
     $files = $fl->get();
     $filestring = '';
     $fh = Loader::helper('file');
     $filenames = array();
     $filename = $fh->getTemporaryDirectory() . '/' . $archive . '.zip';
     if (count($files) > 0) {
         foreach ($files as $f) {
             if (!in_array(basename($f->getPath()), $filenames)) {
                 $filestring .= "'" . addslashes($f->getPath()) . "' ";
             }
             $filenames[] = basename($f->getPath());
         }
         exec(DIR_FILES_BIN_ZIP . ' -j \'' . addslashes($filename) . '\' ' . $filestring);
     }
 }
开发者ID:nveid,项目名称:concrete5,代码行数:18,代码来源:file_list.php



注:本文中的FileList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FileMaker类代码示例发布时间:2022-05-23
下一篇:
PHP FileHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap