本文整理汇总了PHP中Listing::view方法的典型用法代码示例。如果您正苦于以下问题:PHP Listing::view方法的具体用法?PHP Listing::view怎么用?PHP Listing::view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Listing
的用法示例。
在下文中一共展示了Listing::view方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
/**
* view listing
*/
function view()
{
$this->sortList();
$this->viewHeader();
$this->viewCaptions();
parent::view();
$this->viewFooter();
}
示例2: view
/**
* view listing
*/
function view()
{
$this->cellCnt = 0;
$this->sortList();
$this->viewHeader();
parent::view();
$this->viewFooter();
}
示例3: action
/**
* perform requested action
*/
function action()
{
global $msg;
$fmMode = $_REQUEST['fmMode'];
$fmName = $_REQUEST['fmName'];
$this->getLanguageFile();
if (!$this->ftpHost && $this->startDir == '') {
$this->error = "SECURITY ALERT:<br>Please set a start directory or an FTP server!";
$log = $this->error;
} else {
if ($fmMode == 'login' && $fmName == $this->loginPassword) {
$this->access = true;
$fmMode = 'refresh';
} else {
if ($this->loginPassword != '' && !$this->access) {
$this->viewLogin();
}
}
}
if (!$this->error && $this->access) {
$fmObject = $_REQUEST['fmObject'];
$fmPerms = $_REQUEST['fmPerms'];
$this->getListing();
switch ($fmMode) {
case 'sort':
list($this->Listing->sortField, $this->Listing->sortOrder) = explode(',', $fmName);
$this->Listing->view();
break;
case 'open':
if ($fmObject != '') {
if ($Entry =& $this->Listing->getEntry($fmObject)) {
if ($Entry->icon == 'dir') {
$this->Listing->prevDir = $this->Listing->curDir;
$this->Listing->curDir = $Entry->path;
$this->Listing->searchString = '';
$this->cleanUp($this->cacheDir);
}
}
}
if ($this->Listing->prevDir !== $this->Listing->curDir) {
$this->Listing->refresh();
} else {
$this->Listing->view();
}
break;
case 'getFile':
if ($this->enableDownload && $fmObject != '') {
if ($Entry =& $this->Listing->getEntry($fmObject)) {
if (!$Entry->sendFile()) {
$this->error = $msg['errOpen'] . ": {$Entry->name}";
}
}
}
if (!$this->error) {
print 'READY';
}
break;
case 'getThumbnail':
if ($fmObject != '') {
if ($Entry =& $this->Listing->getEntry($fmObject)) {
$Image = new Image($Entry->getImagePath(), $_REQUEST['width'], $_REQUEST['height']);
$Image->view();
}
}
break;
case 'parent':
$this->Listing->prevDir = $this->Listing->curDir;
$this->Listing->curDir = ereg_replace('/[^/]+$', '', $this->Listing->curDir);
$this->Listing->searchString = '';
$this->cleanUp($this->cacheDir);
$this->Listing->refresh();
break;
case 'rename':
if ($this->enableRename && $fmName != '' && $fmObject != '') {
if ($Entry =& $this->Listing->getEntry($fmObject)) {
$path = dirname($Entry->path);
if (get_magic_quotes_gpc()) {
$fmName = stripslashes($fmName);
}
$fmName = basename($fmName);
if (!$Entry->rename("{$path}/{$fmName}")) {
$this->error = $msg['errRename'] . ": {$Entry->name} » {$fmName}";
}
}
}
if (!$this->error) {
$this->Listing->refresh();
}
break;
case 'delete':
if ($this->enableDelete && $fmObject != '') {
if ($Entry =& $this->Listing->getEntry($fmObject)) {
if ($Entry->icon == 'dir') {
if (!$this->Listing->remDir($Entry->path)) {
$this->error = $msg['errDelete'] . ": {$Entry->name}";
}
} else {
//.........这里部分代码省略.........