本文整理汇总了PHP中DialogBox::title方法的典型用法代码示例。如果您正苦于以下问题:PHP DialogBox::title方法的具体用法?PHP DialogBox::title怎么用?PHP DialogBox::title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DialogBox
的用法示例。
在下文中一共展示了DialogBox::title方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uniqid
} else {
/*
* Technical note: 'cmd=exUpload' is added into the 'action'
* attributes of the form, rather than simply put in a post
* hidden input. That way, this parameter is concatenated with
* the URL, and it guarantees than it will be received by the
* server. The reason of this trick, is because, sometimes,
* when file upload fails, no form data are received at all by
* the server. For example when the size of the sent file is so
* huge that its reception exceeds the max execution time
* allowed for the script. When no 'cmd' argument are sent it is
* impossible to manage this error gracefully. That's why,
* exceptionally, we pass 'cmd' in the 'action' attribute of
* the form.
*/
$dialogBox->title(get_lang('Upload file'));
$agreementText = claro_text_zone::get_content('textzone_upload_file_disclaimer');
if (!empty($agreementText)) {
$dialogBox->info($agreementText);
}
$form = '<form action="' . claro_htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" enctype="multipart/form-data">' . '<fieldset>' . claro_form_relay_context() . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input type="hidden" name="cmd" value="exUpload" />' . "\n" . '<input type="hidden" name="cwd" value="' . claro_htmlspecialchars($cwd) . '" />' . "\n" . '<dl>' . '<dt><label for="userFile">' . get_lang('File') . ' <span class="required">*</span></label>' . '</dt>' . "\n" . '<dd>' . '<input type="file" id="userFile" name="userFile" />' . "\n" . '<p class="notice">' . get_lang("Max file size") . ' : ' . format_file_size($maxUploadSize) . '</p>' . "\n" . '</dd>' . '<dt>' . get_lang("Disk space available") . '</dt>' . '<dd>' . claro_html_progress_bar($spaceAlreadyOccupied / $maxFilledSpace * 100, 1) . ' <span class="notice">' . format_file_size($remainingDiskSpace) . '</span>' . '</dd>' . "\n";
if ($is_allowedToUnzip) {
// uncompress
$form .= '<dt>' . "\n" . '<label for="uncompress"><img src="' . get_icon_url('mime/package-x-generic') . '" alt="" /> ' . get_lang('uncompress zipped (.zip) file on the server') . '</label>' . "\n" . '</dt>' . '<dd>' . '<input type="checkbox" id="uncompress" name="uncompress" value="1" />' . '</dd>' . "\n";
}
if ($courseContext) {
if (!isset($oldComment)) {
$oldComment = "";
}
// comment
$form .= '<dt>' . "\n" . '<label for="comment">' . get_lang('Comment') . '</label>' . '</dt>' . "\n" . '<dd>' . '<textarea rows=2 cols=50 id="comment" name="comment">' . claro_htmlspecialchars($oldComment) . '</textarea>' . "\n" . '</dd>' . "\n";
示例2: claro_html_tool_title
if (isset($_REQUEST['offset'])) {
$offset = $_REQUEST['offset'];
} else {
$offset = 0;
}
// start content
$dialogBox = new DialogBox();
$nameTools = 'Display different variables with the same content';
$urlSDK = $rootAdminWeb . 'xtra/sdk/';
$urlTranslation = $urlSDK . 'translation_index.php';
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Translation Tools'), $urlTranslation);
ClaroBreadCrumbs::getInstance()->prepend(get_lang('SDK'), $urlSDK);
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
include $includePath . "/claro_init_header.inc.php";
echo claro_html_tool_title($nameTools);
$dialogBox->title('Change language');
// start form
$form = "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"GET\">";
if (isset($_REQUEST['language'])) {
$language = $_REQUEST['language'];
} else {
$language = DEFAULT_LANGUAGE;
}
// display select box with language in the table
$sql = "SELECT DISTINCT language \n FROM " . $tbl_translation . "\n ORDER BY language ";
$results = claro_sql_query($sql);
$form .= "<select name=\"language\">";
while ($result = mysql_fetch_row($results)) {
if ($result[0] == $language) {
$form .= "<option value={$result['0']} selected=\"selected\">" . $result[0] . "</option>";
} else {
示例3: password
$dialogBox->success(get_lang('Your password has been emailed to') . ' : ' . $emailTo);
} else {
$dialogBox->error(get_lang('The system is unable to send you an e-mail.') . '<br />' . get_lang('Please contact') . ' : ' . '<a href="mailto:' . get_conf('administrator_email') . '?BODY=' . $emailTo . '">' . get_lang('Platform administrator') . '</a>');
}
}
} else {
$dialogBox->error(get_lang('There is no user account with this email address.'));
}
if ($extAuthPasswordCount > 0) {
if ($extAuthPasswordCount == count($userList)) {
$dialogBox->warning(get_lang('Your password(s) is (are) recorded in an external authentication system outside the platform.'));
} else {
$dialogBox->warning(get_lang('Passwords of some of your user account(s) are recorded an in external authentication system outside the platform.'));
}
$dialogBox->info(get_lang('For more information take contact with the platform administrator.'));
}
}
////////////////////////////////////////////////////
// display section
$out = '';
// display title
$out .= claro_html_tool_title($nameTools);
// display message box
if (!$passwordFound) {
$dialogBox->title(get_lang('Enter your email so we can send you your password.'));
$dialogBox->form('<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . '<input type="hidden" name="searchPassword" value="1" />' . '<label for="Femail">' . get_lang('Email') . ' : </label>' . '<br />' . '<input type="text" name="Femail" id="Femail" size="50" maxlength="100" value="' . claro_htmlspecialchars($emailTo) . '" />' . '<br /><br />' . '<input type="submit" name="retrieve" value="' . get_lang('Ok') . '" /> ' . claro_html_button(get_conf('urlAppend') . '/index.php', get_lang('Cancel')) . '</form>');
}
$out .= $dialogBox->render();
// display form
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例4: mktime
$assignment->setStartDate($unixStartDate);
$unixEndDate = mktime($_REQUEST['endHour'], $_REQUEST['endMinute'], '00', $_REQUEST['endMonth'], $_REQUEST['endDay'], $_REQUEST['endYear']);
$assignment->setEndDate($unixEndDate);
$assignment_data['start_date'] = $unixStartDate;
$assignment_data['end_date'] = $unixEndDate;
} else {
// create new assignment
// add date format used to pre fill the form
$assignment_data['start_date'] = $assignment->getStartDate();
$assignment_data['end_date'] = $assignment->getEndDate();
}
}
// Submission download requested
if ($is_allowedToEdit && $cmd == 'rqDownload' && (claro_is_platform_admin() || get_conf('allow_download_all_submissions'))) {
require_once $includePath . '/lib/form.lib.php';
$dialogBox->title(get_lang('Download'));
$dialogBox->form('<form action="' . get_module_url('CLWRK') . '/export.php" method="POST">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exDownload" />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_from" value="from" checked /><label for="downloadMode_from">' . get_lang('Submissions posted or modified after date :') . '</label><br />' . "\n" . claro_html_date_form('day', 'month', 'year', time(), 'long') . ' ' . claro_html_time_form('hour', 'minute', time() - fmod(time(), 86400) - 3600) . '<small>' . get_lang('(d/m/y hh:mm)') . '</small>' . '<br /><br />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_all" value="all" /><label for="downloadMode_all">' . get_lang('All submissions') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadOnlyCurrentMembers" id="downloadOnlyCurrentMembers_id" value="yes" checked="checked" /><label for="downloadOnlyCurrentMembers_id">' . get_lang('Download only submissions from current course members') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadScore" id="downloadScore_id" value="yes" checked="checked" /><label for="downloadScore_id">' . get_lang('Download score') . '</label><br /><br />' . "\n" . '<input type="submit" value="' . get_lang('OK') . '" /> ' . "\n" . claro_html_button('work.php', get_lang('Cancel')) . '</form>' . "\n");
}
if ($is_allowedToEdit) {
/*--------------------------------------------------------------------
CHANGE VISIBILITY
--------------------------------------------------------------------*/
// change visibility of an assignment
if ($cmd == 'exChVis') {
if (isset($_REQUEST['vis'])) {
$_REQUEST['vis'] == 'v' ? $visibility = 'VISIBLE' : ($visibility = 'INVISIBLE');
Assignment::updateAssignmentVisibility($assigId, $visibility);
// notify eventmanager
$eventNotifier->notifyCourseEvent('work_updated', claro_get_current_course_id(), claro_get_current_tool_id(), $assigId, claro_get_current_group_id(), '0');
if ($_REQUEST['vis'] == 'v') {
$eventNotifier->notifyCourseEvent('work_visible', claro_get_current_course_id(), claro_get_current_tool_id(), $assigId, claro_get_current_group_id(), '0');
示例5: pushClaroMessage
pushClaroMessage('No downloader found for module ' . strip_tags($moduleLabel), 'warning');
}
} else {
$downloader = new Claro_PlatformDocumentsDownloader();
}
if ($downloader && $downloader->isAllowedToDownload($requestUrl)) {
$pathInfo = $downloader->getFilePath($requestUrl);
// use slashes instead of backslashes in file path
if (claro_debug_mode()) {
pushClaroMessage('<p>File path : ' . $pathInfo . '</p>', 'pathInfo');
}
$pathInfo = secure_file_path($pathInfo);
// Check if path exists in course folder
if (!file_exists($pathInfo) || is_dir($pathInfo)) {
$isDownloadable = false;
$dialogBox->title(get_lang('Not found'));
$dialogBox->error(get_lang('The requested file <strong>%file</strong> was not found on the platform.', array('%file' => basename($pathInfo))));
}
} else {
$isDownloadable = false;
pushClaroMessage('downloader said no!', 'debug');
$dialogBox->title(get_lang('Not allowed'));
}
}
// Output section
if ($isDownloadable) {
// end session to avoid lock
session_write_close();
$extension = get_file_extension($pathInfo);
$mimeType = get_mime_on_ext($pathInfo);
// workaround for HTML files and Links
示例6: scormConfirmation
$htmlHeadXtra[] = '<script type="text/javascript">
function scormConfirmation (name)
{
if (confirm("' . clean_str_for_javascript(get_block('blockConfirmDeleteScorm')) . '\\n" + name ))
{return true;}
else
{return false;}
}
</script>' . "\n";
$nameTools = get_lang('Learning path list');
$cmd = isset($_REQUEST['cmd']) ? $_REQUEST['cmd'] : '';
if ($cmd == 'export') {
require_once 'include/scormExport.inc.php';
$scorm = new ScormExport($_REQUEST['path_id']);
if (!$scorm->export()) {
$dialogBox->title(get_lang('Error exporting SCORM package'));
foreach ($scorm->getError() as $error) {
$dialogBox->error($error);
}
}
}
// endif $cmd == export
// use viewMode
claro_set_display_mode_available(true);
// main page
$is_allowedToEdit = claro_is_allowed_to_edit();
$lpUid = claro_get_current_user_id();
// display introduction
$moduleId = claro_get_current_tool_id();
// Id of the Learning Path introduction Area
$helpAddIntroText = get_block('blockIntroLearningPath');
示例7: uniqid
}
/**
* prepare display
*/
$category_array = claro_get_cat_flat_list();
// If there is no current $category, add a fake option
// to prevent auto select the first in list
if (isset($category['id']) && is_array($category_array) && in_array($category['id'], $category_array)) {
$cat_preselect = $category['id'];
} else {
$cat_preselect = 'choose_one';
$category_array = array_merge(array('--' => 'choose_one'), $category_array);
}
switch ($display_form) {
case DISP_FORM_CREATE:
$dialogBox->title(get_lang('Create a category'));
$form = '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">' . "\n" . '<input type="hidden" name="cmd" value="exCreate" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<label for="nameCat"> ' . get_lang('Category name') . '<span class="required">*</span></label><br />' . "\n" . '<input type="texte" name="nameCat" id="nameCat" value="' . htmlspecialchars($editedCat_Name) . '" size="30" maxlength="100" /><br /><br />' . "\n" . '<label for="codeCat"> ' . get_lang('Category code') . '<span class="required">*</span></label><br />' . "\n" . '<input type="texte" name="codeCat" id="codeCat" value="' . htmlspecialchars($editedCat_Code) . '" size="30" maxlength="40" /><br /><br />' . "\n" . '<label for="canHaveCoursesChild">' . get_lang('Can have courses') . '<span class="required">*</span></label><br />' . "\n" . '<input type="radio" name="canHaveCoursesChild" id="canHaveCoursesChild_1" ' . (isset($editedCat_CanHaveCoursesChild) ? !strcmp($editedCat_CanHaveCoursesChild, "TRUE") ? 'checked' : '' : 'checked') . ' value="1">' . '<label for="canHaveCoursesChild_1">' . get_lang('Yes') . '</label>' . "\n" . '<input type="radio" name="canHaveCoursesChild" id="canHaveCoursesChild_0" ';
if (isset($editedCat_CanHaveCoursesChild)) {
$form .= !strcmp($editedCat_CanHaveCoursesChild, "FALSE") ? "checked" : "";
}
$form .= ' value="0" />' . "\n" . ' ' . "\n" . '<label for="canHaveCoursesChild_0">' . get_lang('No') . '</label>' . "\n" . '<br /><br />' . "\n" . '<label for="fatherCat"> ' . get_lang('Parent category') . ' </label>' . "\n" . '<select name="fatherCat" id="fatherCat">' . "\n" . '<option value="NULL" > ' . get_conf('siteName') . '</option>' . build_select_faculty($categories, null, null, '') . '</select>' . "\n" . '<br /><br />' . "\n" . '<span class="required">*</span> ' . get_lang('Denotes required fields') . '<br />' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" />' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n";
$dialogBox->form($form);
break;
case DISP_FORM_EDIT:
$dialogBox->title(get_lang('Edit a category'));
/**
* Display information to edit a category and the bom of categories
*/
$form = '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="cmd" value="exChange" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input type="hidden" name="id" value="' . $editedCat_Id . '" />' . "\n" . '<label for="nameCat"> ' . get_lang('Category name') . '<span class="required">*</span></label ><br />' . "\n" . '<input type="texte" name="nameCat" id="nameCat" value="' . htmlspecialchars($editedCat_Name) . '" size="30" maxlength="100" /><br /><br />' . "\n" . '<label for="codeCat"> ' . get_lang('Category code') . '<span class="required">*</span></label ><br />' . "\n" . '<input type="texte" name="codeCat" id="codeCat" value="' . htmlspecialchars($editedCat_Code) . '" size="30" maxlength="40" /><br /><br />' . "\n" . '<label for="canHaveCoursesChild"> ' . get_lang('Can have courses') . '<span class="required">*</span></label><br />' . "\n" . '<input type="radio" name="canHaveCoursesChild" id="canHaveCoursesChild_1"' . "\n";
if (isset($editedCat_CanHaveCoursesChild)) {
$form .= !strcmp($editedCat_CanHaveCoursesChild, 'TRUE') ? 'checked' : '';