当前位置: 首页>>代码示例>>PHP>>正文


PHP Listing::performSearch方法代码示例

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


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

示例1: action


//.........这里部分代码省略.........
                                 } else {
                                     if ($this->replSpacesUpload || $fmReplSpaces) {
                                         $newFile = str_replace(' ', '_', $newFile);
                                     }
                                     if ($this->lowerCaseUpload || $fmLowerCase) {
                                         $newFile = strtolower($newFile);
                                     }
                                     if (!$this->Listing->upload($fmFile['tmp_name'][$i], $newFile)) {
                                         $errors[] = $msg['errSave'] . ": {$newFile}";
                                     } else {
                                         if ($this->defaultFilePermissions) {
                                             $Entry =& $this->Listing->getEntryByName($newFile);
                                             if (!$Entry || !$Entry->changePerms($this->defaultFilePermissions)) {
                                                 $errors[] = $msg['errPermChange'] . ": {$newFile}";
                                             }
                                         }
                                     }
                                 }
                             } else {
                                 if ($newFile != '') {
                                     $errors[] = $msg['error'] . ": {$newFile} = 0 B";
                                     $maxFileSize = ini_get('upload_max_filesize');
                                     $postMaxSize = ini_get('post_max_size');
                                     $info = "PHP settings: upload_max_filesize = {$maxFileSize}, ";
                                     $info .= "post_max_size = {$postMaxSize}";
                                     $error = "Could not upload {$newFile} ({$info})";
                                     $this->Listing->FileSystem->addMsg($error, 'error');
                                 }
                             }
                         }
                     }
                     $this->Listing->refresh();
                     if (count($errors) > 0) {
                         $this->error .= join('<br/>', $errors);
                     }
                 } else {
                     $this->Listing->view();
                 }
                 break;
             case 'refresh':
                 $this->Listing->refresh();
                 break;
             case 'permissions':
                 if ($this->enablePermissions && is_array($fmPerms) && $fmObject != '') {
                     if ($Entry =& $this->Listing->getEntry($fmObject)) {
                         $mode = '';
                         for ($i = 0; $i < 9; $i++) {
                             $mode .= $fmPerms[$i] ? 1 : 0;
                         }
                         if (!$Entry->changePerms(bindec($mode))) {
                             $this->error = $msg['errPermChange'] . ": {$Entry->name}";
                         }
                     }
                 }
                 if (!$this->error) {
                     $this->Listing->refresh();
                 }
                 break;
             case 'edit':
                 if ($this->enableEdit && $fmObject != '') {
                     if ($Entry =& $this->Listing->getEntry($fmObject)) {
                         $fmText = $_POST['fmText'];
                         if ($fmText != '') {
                             if (!$Entry->saveFile($fmText)) {
                                 $this->error = $msg['errSave'] . ": {$Entry->name}";
                             } else {
                                 $this->Listing->refresh();
                             }
                         } else {
                             $Editor = new Editor($this);
                             $Editor->view($Entry);
                         }
                     }
                 }
                 break;
             case 'search':
                 $this->Listing->performSearch($fmName);
                 break;
             case 'switchView':
                 $this->Listing =& $this->Listing->switchView();
                 $this->Listing->refresh();
                 break;
             default:
                 if (!$this->error) {
                     $this->Listing->view();
                 }
         }
         if ($this->ftpHost) {
             $this->Listing->FileSystem->ftpClose();
         }
         $this->cleanUp();
         $log = $this->Listing->FileSystem->getMessages();
     }
     if ($this->error != '') {
         print '{{fmERROR}}' . $this->error . '{{/fmERROR}}';
         $this->error = '';
     }
     print '{{fmLOG}}' . $log . '{{/fmLOG}}';
     $this->save();
 }
开发者ID:andreyvit,项目名称:retester,代码行数:101,代码来源:FileManager.php


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