本文整理匯總了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 {
//.........這裏部分代碼省略.........