本文整理汇总了PHP中CFileInput::bUseFileDialog方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileInput::bUseFileDialog方法的具体用法?PHP CFileInput::bUseFileDialog怎么用?PHP CFileInput::bUseFileDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileInput
的用法示例。
在下文中一共展示了CFileInput::bUseFileDialog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowMultiple
/**
* @param array $values
* @param string $inputNameTemplate
* @param bool|array $showInfo
* @param bool $maxCount
* @param array $inputs
* @return string
*/
public static function ShowMultiple($values = array(), $inputNameTemplate = "", $showInfo = false, $maxCount = false, $inputs = array())
{
CJSCore::Init('file_input');
ob_start();
global $USER;
self::Init($showInfo, $inputNameTemplate, $maxCount);
self::$bMultiple = true;
$arDescInput = is_array($inputs['description']) && isset($inputs['description']['VALUES']) && isset($inputs['description']['NAME_TEMPLATE']) ? $inputs['description'] : false;
$inputs = array('upload' => $inputs['upload'] === true, 'medialib' => $inputs['medialib'] === true && COption::GetOptionString('fileman', "use_medialib", "Y") != "N", 'file_dialog' => $inputs['file_dialog'] === true, 'cloud' => $inputs['cloud'] === true && $USER->CanDoOperation("clouds_browse") && CModule::IncludeModule("clouds") && CCloudStorage::HasActiveBuckets(), 'del' => $inputs['del'] !== false, 'description' => $inputs['description'] === true || $arDescInput);
self::$bUseUpload = $inputs['upload'];
self::$bUseMedialib = $inputs['medialib'];
self::$bUseFileDialog = $inputs['file_dialog'];
self::$bUseCloud = $inputs['cloud'];
self::$bShowDelInput = $inputs['del'];
self::$bShowDescInput = $inputs['description'];
self::$inputNameTemplate = $inputNameTemplate;
self::$bViewMode = self::IsViewMode();
if (self::$bViewMode) {
self::$bShowDelInput = false;
}
if (self::$bShowDelInput) {
self::$delInputName = self::GetInputName($inputNameTemplate, "_del");
}
if (self::$bShowDescInput) {
self::$descInputName = '';
if ($arDescInput) {
self::$descInputName = $arDescInput['NAME_TEMPLATE'];
}
if (empty(self::$descInputName)) {
self::$descInputName = self::GetInputName($inputNameTemplate, "_descr");
}
}
// $arFile - Array with current file or false if it's empty
self::$curFiles = array();
self::$bFileExists = false;
foreach ($values as $inputName => $fileId) {
if (strlen($fileId) <= 1 && intVal($fileId) === 0) {
continue;
}
self::$bFileExists = true;
if ($arFile = self::GetFile($fileId)) {
$arFile['FILE_NOT_FOUND'] = false;
$arFile['INPUT_NAME'] = $inputName;
$arFile['DEL_NAME'] = self::GetInputName($inputName, '_del');
$arFile['DESC_NAME'] = self::GetInputName($inputName, '_descr');
if ($arDescInput) {
list($descName, $descVal) = each($arDescInput['VALUES']);
$arFile['DESC_NAME'] = $descName;
$arFile['DESCRIPTION'] = $descVal;
}
} else {
$arFile = array('FILE_NOT_FOUND' => true, 'INPUT_NAME' => $inputName, 'DEL_NAME' => self::GetInputName($inputName, '_del'), 'DESC_NAME' => self::GetInputName($inputName, '_descr'));
}
self::$curFiles[] = $arFile;
}
self::DisplayControl($inputs);
$result = ob_get_contents();
ob_end_clean();
return $result;
}