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


PHP DialogBox::warning方法代码示例

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


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

示例1: claro_disp_wiki_preview

/**
 * Generate html code of the wiki page preview
 * @param Wiki2xhtmlRenderer wikiRenderer rendering engine
 * @param string title page title
 * @param string content page content
 * @return string html code of the preview pannel
 */
function claro_disp_wiki_preview(&$wikiRenderer, $title, $content = '')
{
    $out = "<div id=\"preview\" class=\"wikiTitle\">\n";
    if ($title === '__MainPage__') {
        $title = get_lang("Main page");
    }
    $title = "<h1 class=\"wikiTitle\">" . get_lang('Preview :') . "{$title}</h1>\n";
    $out .= $title;
    $out .= '</div>' . "\n";
    $dialogBox = new DialogBox();
    $dialogBox->warning('<small>' . get_lang("WARNING: this page is a preview. Your modifications to the wiki has not been saved yet ! To save them do not forget to click on the 'save' button at the bottom of the page.") . '</small>');
    $out .= $dialogBox->render() . "\n";
    $out .= '<div class="wiki2xhtml">' . "\n";
    if ($content != '') {
        $out .= $wikiRenderer->render($content);
    } else {
        $out .= get_lang("This page is empty, click on 'Edit this page' to add a content");
    }
    $out .= "</div>\n";
    return $out;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:28,代码来源:lib.wikidisplay.php

示例2: isset

$addToURL = isset($_REQUEST['addToURL']) ? $_REQUEST['addToURL'] : '';
$dialogBox = new DialogBox();
//TABLES
//declare needed tables
// Deal with interbreadcrumbs
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$nameTools = get_lang('User list');
$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
//------------------------------------
// Execute COMMAND section
//------------------------------------
switch ($cmd) {
    case 'rqResetAllPasswords':
        $dialogBox->question(get_lang('Do you really want to reset all the passwords ?') . '<br />' . '<small>' . get_lang('The platform administrators and course creators password will remain unchanged') . '</small>' . '<br />');
        $dialogBox->form(' <form method="post" action="' . claro_htmlspecialchars($_SERVER['PHP_SELF']) . '">' . '<input type="hidden" name="cmd" value="exResetAllPasswords" />' . '<input id="sendEmail" type="checkbox" name="sendEmail" value="yes" checked="checked" />' . '<label for="sendEmail">' . get_lang('send new password by email') . '</label>' . '<br />' . '<small>' . get_lang('Only the users with a valid address will receive their password by email') . '</small>' . '<br />' . '<input type="submit" value="' . get_lang('Yes') . '" />' . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>');
        $dialogBox->warning('<em>' . get_lang('This may take some time, please wait until the end of the process...') . '</em>');
        break;
    case 'exResetAllPasswords':
        $userList = getAllStudentUserId();
        $failedMailList = array();
        $failedList = array();
        $sendEmail = isset($_REQUEST['sendEmail']) && $_REQUEST['sendEmail'] ? true : false;
        foreach ($userList as $user) {
            $mailSent = FALSE;
            $userInfo = user_get_properties($user['id']);
            if (!$userInfo['isPlatformAdmin'] && !$userInfo['isCourseCreator']) {
                $userInfo['password'] = mk_password(8);
                if (user_set_properties($user['id'], array('password' => $userInfo['password']))) {
                    if ($sendEmail && user_send_registration_mail($user['id'], $userInfo)) {
                        $mailSent = TRUE;
                    }
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:admin_users.php

示例3: elseif

         $validUserData = false;
     }
     if (in_array(get_lang('This official code is already used by another user.'), $errorMsgList)) {
         $userList = user_search(array('officialCode' => $userData['officialCode']), claro_get_current_course_id(), false, true, false);
         $dialogBox->error(get_lang('This official code is already used by another user.') . '<br />' . get_lang('Take one of these options') . ' : ' . '<ul>' . '<li>' . '<a href="#resultTable">' . get_lang('Click on the enrollment command beside the concerned user') . '</a>' . '</li>' . '<li>' . '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=cancel' . claro_url_relay_context('&') . '">' . get_lang('Cancel the operation') . '</a>' . '</li>' . '</ul>');
         $displayResultTable = true;
     } elseif (!$userData['confirmUserCreate'] && !(empty($userData['lastname']) && empty($userData['email']))) {
         $userList = user_search(array('lastname' => $userData['lastname'], 'email' => $userData['email']), claro_get_current_course_id(), false, true, false);
         if (count($userList) > 0) {
             // PREPARE THE URL command TO CONFIRM THE USER CREATION
             $confirmUserCreateUrl = array();
             foreach ($userData as $thisDataKey => $thisDataValue) {
                 $confirmUserCreateUrl[] = $thisDataKey . '=' . urlencode($thisDataValue);
             }
             $confirmUserCreateUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=registration&' . implode('&', $confirmUserCreateUrl) . '&confirmUserCreate=1');
             $dialogBox->warning(get_lang('Notice') . '. ' . get_lang('Users with similar settings exist on the system yet') . '<br />' . get_lang('Take one of these options') . ' : ' . '<ul>' . '<li>' . '<a href="#resultTable" onclick="highlight(\'resultTable\');">' . get_lang('Click on the enrollment command beside the concerned user') . '</a>' . '</li>' . '<li>' . '<a href="' . claro_htmlspecialchars($confirmUserCreateUrl) . '">' . get_lang('Confirm the creation of a new user') . '</a>' . '<br /><small>' . $userData['lastname'] . ' ' . $userData['firstname'] . $userData['officialCode'] . ' ' . $userData['email'] . '</small>' . '</li>' . '<li>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=cancel')) . '">' . get_lang('Cancel the operation') . '</a>' . '</li>' . '</ul>');
             $displayForm = false;
             $displayResultTable = true;
         }
     } else {
         $userList = array();
     }
     if (!empty($errorMsgList) && count($userList) == 0) {
         foreach ($errorMsgList as $errorMsg) {
             $dialogBox->error($errorMsg);
         }
     }
 }
 if (!$userId && $validUserData && count($userList) == 0) {
     $userData['language'] = null;
     $userId = user_create($userData);
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:user_add.php

示例4: dirname

             $subject .= $title;
         } else {
             $subject .= get_lang('Message from your lecturer');
         }
         $msgContent = $content;
         // Enclosed resource
         $body = $msgContent . "\n" . "\n" . ResourceLinker::renderLinkList($currentLocator, true);
         require_once dirname(__FILE__) . '/../messaging/lib/message/messagetosend.lib.php';
         require_once dirname(__FILE__) . '/../messaging/lib/recipient/courserecipient.lib.php';
         $courseRecipient = new CourseRecipient(claro_get_current_course_id());
         $message = new MessageToSend(claro_get_current_user_id(), $subject, $body);
         $message->setCourse(claro_get_current_course_id());
         $message->setTools('CLANN');
         $messageId = $courseRecipient->sendMessage($message);
         if ($failure = claro_failure::get_last_failure()) {
             $dialogBox->warning($failure);
         }
     }
     // end if $emailOption==1
 }
 // end if $submit Announcement
 if ($autoExportRefresh) {
     /**
      * in future, the 2 following calls would be pas by event manager.
      */
     // rss update
     /*if ( get_conf('enableRssInCourse',1))
       {
           require_once get_path('incRepositorySys') . '/lib/rss.write.lib.php';
           build_rss( array('course' => claro_get_current_course_id()));
       }*/
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:announcements.php

示例5: catch

             $form->assign('nextCommand', 'exMkForum');
             $form->assign('catId', 0);
             $form->assign('categoryList', $categoryList);
             $form->assign('anonymity_enabled', get_conf('clfrm_anonymity_enabled', true) ? true : false);
             $form->assign('anonymity', 'forbidden');
             $form->assign('is_postAllowed', true);
             $dialogBox->form($form->render());
         } catch (Exception $ex) {
             if (claro_debug_mode()) {
                 $dialogBox->error('<pre>' . $ex->__toString() . '</pre>');
             } else {
                 $dialogBox->error($ex->getMessage());
             }
         }
     } else {
         $dialogBox->warning(get_lang('There are currently no forum categories!') . '<br/>' . get_lang('Please create a category first'));
         $cmd = 'show';
     }
 }
 if ('exEdForum' == $cmd) {
     if (update_forum_settings($forumId, $forumName, $forumDesc, $forumPostAllowed, $catId, $anonymityType)) {
         $dialogBox->success(get_lang('Forum updated'));
     } else {
         $dialogBox->error(get_lang('Unable to update forum'));
         $cmd = 'rqEdForum';
     }
 }
 if ('rqEdForum' == $cmd) {
     $forumSettingList = get_forum_settings($forumId);
     $categoryList = get_category_list();
     if (count($categoryList) > 0) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:index.php

示例6: CsvExporter

                }
                $csvTab[] = $csvSubTab;
            }
            $csvExporter = new CsvExporter(';', '"');
            $fileName = get_lang('files_stats') . '_' . claro_date('d-m-Y') . '.csv';
            $stream = $csvExporter->export($csvTab);
            claro_send_stream($stream, $fileName, 'text/csv');
        }
    } else {
        $dialogBox->warning(get_lang('Statistics in progress, please don\'t refresh until further instructions ! ') . '<br />' . get_lang('Course actually treated : ') . $course['title'] . '<br />' . get_lang(' Number of course treated : ') . count($stats));
        $claroline->display->body->appendContent($dialogBox->render());
        echo $claroline->display->render();
    }
} else {
    $dialogBox = new DialogBox();
    $dialogBox->warning(get_lang('Caution: building files\' statistics is a pretty heavy work.  It might take a while and a lot of resources, depending of the size of your campus.'));
    if (!empty($extensions)) {
        $dialogBox->info(get_lang('You\'ve chosen to isolate the following extensions: %types.  If you wish to modify these extensions, check the advanced platform settings', array('%types' => implode(', ', $extensions))));
    } else {
        $dialogBox->info(get_lang('You don\'t have chosen any extension to isolate.  If you wish to isolate extensions in your statistics, check the advanced platform settings'));
    }
    $template = new CoreTemplate('admin_files_stats.tpl.php');
    $template->assign('dialogBox', $dialogBox);
    $template->assign('extensions', $extensions);
    $template->assign('formAction', $_SERVER['PHP_SELF']);
    $template->assign('cancelUrl', get_path('rootAdminWeb'));
    $claroline->display->body->appendContent($template->render());
    echo $claroline->display->render();
}
/**
 * Convert a size (Bytes) to KiB/MiB/GiB/TiB
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:files_stats.php

示例7: array

                $blockLoginInfo .= get_block('blockLoginInfo', array('%firstname' => $userAccount['firstname'], '%lastname' => $userAccount['lastname'], '%username' => $userAccount['username'], '%password' => $userAccount['password']));
            }
            $emailBody = get_block('blockLoginRequest', array('%siteName' => get_conf('siteName'), '%rootWeb' => get_path('rootWeb'), '%loginInfo' => $blockLoginInfo));
            // send message
            if (claro_mail_user($userList[0]['uid'], $emailBody, $emailSubject)) {
                $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') . '" />&nbsp; ' . claro_html_button(get_conf('urlAppend') . '/index.php', get_lang('Cancel')) . '</form>');
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:lostPassword.php

示例8: DialogBox

 $defaultLoginValue = '';
 $dialogBox = new DialogBox();
 if (isset($_SESSION['lastUserName'])) {
     $defaultLoginValue = strip_tags($_SESSION['lastUserName']);
     unset($_SESSION['lastUserName']);
 }
 if (get_conf('claro_displayLocalAuthForm', true) == true) {
     if ($claro_loginRequested && !$claro_loginSucceeded) {
         if (AuthManager::getFailureMessage()) {
             // need to use get_lang two times...
             $dialogBox->error(get_lang(AuthManager::getFailureMessage()));
         } else {
             $dialogBox->error(get_lang('Login failed.') . ' ' . get_lang('Please try again.'));
         }
         if (get_conf('allowSelfReg', false)) {
             $dialogBox->warning(get_lang('If you haven\'t a user account yet, use the <a href="%url">the account creation form</a>.', array('%url' => get_path('url') . '/claroline/auth/inscription.php')));
         } else {
             $dialogBox->error(get_lang('Contact your administrator.'));
         }
         $dialogBox->warning(get_lang('Warning the system distinguishes uppercase (capital) and lowercase (small) letters'));
     }
     if (get_conf('claro_secureLogin', false)) {
         $formAction = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
     } else {
         $formAction = $_SERVER['PHP_SELF'];
     }
 }
 // end if claro_dispLocalAuthForm
 $template = new CoreTemplate('auth_form.tpl.php');
 $template->assign('dialogBox', $dialogBox);
 $template->assign('formAction', $formAction);
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:login.php

示例9: array

            case Claro_CourseUserRegistration::STATUS_KEYVALIDATION_FAILED:
                $displayMode = DISPLAY_REGISTRATION_KEY_FORM;
                $dialogBox->error($courseRegistration->getErrorMessage());
                break;
            case Claro_CourseUserRegistration::STATUS_SYSTEM_ERROR:
                $displayMode = DISPLAY_MESSAGE_SCREEN;
                $dialogBox->error($courseRegistration->getErrorMessage());
                break;
            case Claro_CourseUserRegistration::STATUS_REGISTRATION_NOTAVAILABLE:
                $displayMode = DISPLAY_REGISTRATION_DISABLED_FORM;
                $dialogBox->error($courseRegistration->getErrorMessage());
                $dialogBox->info(get_lang('Please contact the course manager : %email', array('%email' => '<a href="mailto:' . $courseObj->email . '?body=' . $courseObj->officialCode . '&amp;subject=[' . rawurlencode(get_conf('siteName')) . ']' . '">' . claro_htmlspecialchars($courseObj->titular) . '</a>')));
                break;
            default:
                $displayMode = DISPLAY_MESSAGE_SCREEN;
                $dialogBox->warning($courseRegistration->getErrorMessage());
                break;
        }
    }
}
// end if ($cmd == 'exReg')
/*----------------------------------------------------------------------------
User course list to unregister
----------------------------------------------------------------------------*/
if ($cmd == 'rqUnreg') {
    $courseListView = CourseTreeNodeViewFactory::getUserCourseTreeView($userId);
    $unenrollUrl = Url::buildUrl($_SERVER['PHP_SELF'] . '?cmd=exUnreg', $urlParamList, null);
    $viewOptions = new CourseTreeViewOptions(false, true, null, $unenrollUrl->toUrl());
    $courseListView->setViewOptions($viewOptions);
    $displayMode = DISPLAY_USER_COURSES;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:courses.php

示例10:

            if ($is_allowedToEditThisWrk) {
                // the work can be edited
                $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?authId=' . $_REQUEST['authId'] . '&assigId=' . $assignmentId . '&cmd=rqEditWrk&wrkId=' . $work['id'])) . '">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Modify') . '" />' . '</a>' . "\n";
            }
            if ($is_allowedToEditAll) {
                $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?authId=' . $_REQUEST['authId'] . '&cmd=exRmWrk' . '&assigId=' . $assignmentId . '&wrkId=' . $work['id'])) . '" ' . 'onclick="return WORK.confirmationDel(\'' . clean_str_for_javascript($work['title']) . '\');">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . "\n";
                if ($work['visibility'] == "INVISIBLE") {
                    $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?authId=' . $_REQUEST['authId'] . '&cmd=exChVis&assigId=' . $assignmentId . '&wrkId=' . $work['id'] . '&vis=v')) . '">' . '<img src="' . get_icon_url('invisible') . '" alt="' . get_lang('Make visible') . '" />' . '</a>' . "\n";
                } else {
                    $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?authId=' . $_REQUEST['authId'] . '&cmd=exChVis' . '&assigId=' . $assignmentId . '&wrkId=' . $work['id'] . '&vis=i')) . '">' . '<img src="' . get_icon_url('visible') . '" alt="' . get_lang('Make invisible') . '" />' . '</a>' . "\n";
                }
                if (!$is_feedback) {
                    // if there is no correction yet show the link to add a correction if user is course admin
                    $out .= '&nbsp;' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?authId=' . $_REQUEST['authId'] . '&assigId=' . $assignmentId . '&cmd=rqGradeWrk&gradedWrkId=' . $work['id'])) . '">' . get_lang('Add feedback') . '</a>' . "\n";
                }
            }
            $i++;
            // end of cmdList div
            $out .= '</div>' . "\n";
            // end of content div
            $out .= '</div>' . "\n";
            // end of work div
            $out .= '</div>' . "\n";
        }
    } else {
        $dialogBox->warning(get_lang('No visible submission'));
        $out .= $dialogBox->render();
    }
}
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:user_work.php

示例11: CourseUserPrivileges

     }
 }
 // Validate a user (if this option is enable for the course)
 if ($cmd == 'validation' && $req['user_id']) {
     $courseUserPrivileges = new CourseUserPrivileges(claro_get_current_course_id(), $req['user_id']);
     $courseUserPrivileges->load();
     $courseObject = new Claro_Course(claro_get_current_course_id());
     $courseObject->load();
     $validation = new UserCourseEnrolmentValidation($courseObject, $courseUserPrivileges);
     $validationChange = isset($_REQUEST['validation']) ? $_REQUEST['validation'] : null;
     if ($validation->isModifiable()) {
         if ('grant' == $validationChange && $validation->isPending()) {
             if ($validation->grant()) {
                 $dialogBox->success(get_lang('This user account is now active in the course'));
             } else {
                 $dialogBox->warning(get_lang('No change'));
             }
         } elseif ('revoke' == $validationChange && !$validation->isPending()) {
             if ($validation->revoke()) {
                 $dialogBox->success(get_lang('This user account is not active anymore in this course'));
             } else {
                 $dialogBox->warning(get_lang('No change'));
             }
         } else {
             $dialogBox->warning(get_lang('No change'));
         }
     } else {
         $dialogBox->error(get_lang('The user activation cannot be changed'));
         if ($courseUserPrivileges->isCourseManager()) {
             $dialogBox->error(get_lang('You have to remove the course manager status first'));
         }
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:user.php

示例12: dirname

 * @package     internal_messaging
 */
$cidReset = true;
require_once dirname(__FILE__) . '/../../claroline/inc/claro_init_global.inc.php';
// manager of the admin message box
require_once dirname(__FILE__) . '/lib/messagebox/adminmessagebox.lib.php';
require_once dirname(__FILE__) . '/lib/tools.lib.php';
// move to kernel
$claroline = Claroline::getInstance();
// ------------- permission ---------------------------
if (!claro_is_user_authenticated()) {
    claro_disp_auth_form(false);
}
if (!claro_is_platform_admin()) {
    claro_die(get_lang('Not allowed'));
}
// -------------- business logic ----------------------
$content = "";
// ---- display
$warningMessage = get_lang('Warning: When you delete a message keep in mind that it will be deleted for every user.
        <br /><br />You cannot retrieve deleted messages!');
$dialogbox = new DialogBox();
$dialogbox->warning($warningMessage);
$content .= $dialogbox->render();
$content .= '' . '<h4>' . get_lang('Search') . '</h4>' . "\n" . '<ul>' . "\n" . '    <li><a href="admin_search.php?search=fromUser">' . get_lang('All messages from a user') . '</a></li>' . "\n" . '    <li><a href="admin_search.php?search=olderThan">' . get_lang('All messages older than') . '</a></li>' . "\n" . '    <li><a href="admin_search.php?search=timeInterval">' . get_lang('All messages in date interval') . '</a></li>' . "\n" . '    <li><a href="admin_search.php?search=platformMessage">' . get_lang('All platform messages') . '</a></li>' . "\n" . '</ul>' . "\n";
$content .= '<h4>' . get_lang('Delete') . '</h4>' . "\n" . '<ul>' . "\n" . '<li><a href="admin_delete.php?cmd=rqDeleteAll">' . get_lang('All messages') . '</a></li>' . "\n" . '<li><a href="admin_delete.php?cmd=rqFromUser">' . get_lang('All messages from a user') . '</a></li>' . "\n" . '<li><a href="admin_delete.php?cmd=rqOlderThan">' . get_lang('All messages older than') . '</a></li>' . "\n" . '<li><a href="admin_delete.php?cmd=rqPlatformMessage">' . get_lang('All platform messages') . '</a></li>' . "\n" . '</ul>' . "\n";
$claroline->display->banner->breadcrumbs->append(get_lang('Administration'), get_path('rootAdminWeb'));
$claroline->display->banner->breadcrumbs->append(get_lang('Internal messaging'), 'admin.php');
$claroline->display->body->appendContent(claro_html_tool_title(get_lang('Administration')));
$claroline->display->body->appendContent($content);
echo $claroline->display->render();
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:admin.php

示例13: DialogBox

"> </a>
                    <?php 
    echo $this->courseToolList->render();
    ?>
                </div>
            </div>
            
            <div id="courseRightContent">
<?php 
}
?>
                
<?php 
if (claro_is_current_user_enrolment_pending()) {
    $dialogBox = new DialogBox();
    $dialogBox->warning(get_lang('Your enrolment to this course has not been validated yet') . '<br />' . get_lang('You won\'t be able to access all this course\'s content and/or features until the course manager grants you the access.'));
    echo $dialogBox->render();
}
?>

<!-- Page content -->
<?php 
echo $this->content;
?>
<!-- End of Page Content -->

<?php 
if (claro_is_in_a_course() && $this->courseTitleAndTools) {
    ?>

            </div> <!-- rightContent -->
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:body.tpl.php

示例14: unset

         $editedCat_CanHaveCatChild = $editedCat_data['canHaveCatChild'];
         $editedCat_CanHaveCoursesChild = $editedCat_data['canHaveCoursesChild'];
         unset($editedCat_data);
     }
 } elseif ($cmd == 'exChange') {
     $noQUERY_STRING = true;
     // Search information
     if ($facultyEdit = get_cat_data($_REQUEST['id'])) {
         $doChange = true;
         // See if we try to set the categorie as a cat that can not have course
         // and that the cat already contain courses
         if (isset($_REQUEST['canHaveCoursesChild']) && $_REQUEST['canHaveCoursesChild'] == 0) {
             $sql_SearchCourses = " SELECT count(cours_id) num" . " FROM `" . $tbl_course . "`" . " WHERE faculte='" . claro_sql_escape($facultyEdit['code']) . "'";
             $res_SearchCourses = claro_sql_query_get_single_value($sql_SearchCourses);
             if ($res_SearchCourses > 0) {
                 $dialogBox->warning(get_lang('This category include some courses, you must delete or move them before'));
                 $doChange = false;
             }
         }
     } else {
         $dialogBox->error(get_lang('There is no category available !'));
         $doChange = false;
     }
     // Edit a category (don't move the category)
     $_REQUEST['nameCat'] = trim($_REQUEST['nameCat']);
     $_REQUEST['codeCat'] = trim($_REQUEST['codeCat']);
     if (!empty($_REQUEST['nameCat']) && !empty($_REQUEST['codeCat'])) {
         if (!isset($_REQUEST['fatherCat']) && $doChange) {
             $canHaveCoursesChild = $_REQUEST['canHaveCoursesChild'] == 1 ? 'TRUE' : 'FALSE';
             // If nothing is different
             if ($facultyEdit['name'] != $_REQUEST['nameCat'] && $facultyEdit['code'] != $_REQUEST['codeCat'] && $facultyEdit['canHaveCoursesChild'] != $canHaveCoursesChild) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:admincats.php

示例15: switch

 if (get_conf('can_install_local_module', false)) {
     $inputPackage[] = 'local';
 }
 if (get_conf('can_install_upload_module', true)) {
     $inputPackage[] = 'upload';
 }
 if (get_conf('can_install_curl_module', false)) {
     $inputPackage[] = 'curl';
 }
 if (in_array($_cleanInput['selectInput'], $inputPackage)) {
     $selectInput = $_cleanInput['selectInput'];
 } else {
     switch (count($inputPackage)) {
         case 0:
             // You can't add packages
             $dialogBox->warning(get_lang("You cannot add module. Change this in configuration.") . '<br />' . claro_html_button('../tool/config_edit.php?config_code=CLMAIN&section=ADVANCED', get_lang('Go to config')));
             break;
         case 1:
             //Direct display
             $_cleanInput['selectInput'] = $selectInput = $inputPackage[0];
             break;
         default:
             // SELECT ONE
             $dialogBox->form('<form action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . '<input name="cmd" type="hidden" value="rqInstall" />' . "\n" . get_lang('Where is your package ?') . '<br />' . "\n" . (get_conf('can_install_upload_module', true) ? '<input name="selectInput" value="upload"  id="zipOnYouComputerServer" type="radio" checked="checked" />' . '<label for="zipOnYouComputerServer" >' . get_lang('Package on your computer (zip only)') . '</label>' . '<br />' : '') . (get_conf('can_install_local_module', false) ? '<input name="selectInput"  value="local" id="packageOnServer" type="radio" />' . '<label for="packageOnServer" >' . get_lang('Package on server (zipped or not)') . '</label>' . '<br />' : '') . (get_conf('can_install_curl_module', false) ? '<input name="selectInput" value="curl" id="zipOnThirdServer" type="radio" />' . '<label for="zipOnThirdServer" >' . get_lang('Package on the net (zip only)') . '</label>' . '<br />' : '') . '<br />' . "\n" . '<br />' . "\n" . '<input value="' . get_lang('Next') . '" type="submit" />&nbsp;' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n");
     }
 }
 switch ($_cleanInput['selectInput']) {
     case 'upload':
         $dialogBox->warning('<p>' . "\n" . get_lang('Imported modules must consist of a zip file and be compatible with your Claroline version.') . '<br />' . "\n" . get_lang('Find more available modules on <a href="http://www.claroline.net/">Claroline.net</a>.') . '</p>' . "\n\n");
         $dialogBox->form('<form enctype="multipart/form-data" action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input name="cmd" type="hidden" value="exInstall" />' . "\n" . '<input name="uploadedModule" type="file" /><br />' . "\n" . '<input name="activateOnInstall" id="activateOnInstall" type="checkbox" />' . "\n" . '<label for="activateOnInstall" >' . get_lang('Activate module on install') . '</label>' . '<br />' . "\n" . '<fieldset>' . '<legend>' . get_lang('The following options will only work for course tool modules :') . '</legend>' . '<input name="notAutoActivateInCourses" id="autoActivateInCourses" type="checkbox" />' . "\n" . '<label for="notAutoActivateInCourses" >' . get_lang('This tool must be activated manualy in each course') . '</label>' . '<br />' . "\n" . '<input name="activableOnlyByPlatformAdmin" id="activableOnlyByPlatformAdmin" type="checkbox" />' . "\n" . '<label for="activableOnlyByPlatformAdmin" >' . get_lang('Make this tool activable only by the platform administrator <small>(available if the previous option is checked)</small>') . '</label>' . '<br />' . "\n" . '<input name="visibleOnInstall" id="visibleOnInstall" type="checkbox" />' . "\n" . '<label for="visibleOnInstall" >' . get_lang('Visible in all courses on install <small>(this can take some time depending on the number of courses in your campus)</small>') . '</label>' . '</fieldset>' . '<br />' . "\n" . '<br />' . "\n" . '<input value="' . get_lang('Upload and Install module') . '" type="submit" />&nbsp;' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '</form>' . "\n");
         break;
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:module_list.php


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