Example #1
0
" />
                        <?php 
echo get_lang('Invisible');
?>
                    </label>
                </dt>
            </dl>
        </div>
    </fieldset>
    
    <fieldset>
        <legend><?php 
echo get_lang('Attached resources');
?>
</legend>
        
        <?php 
echo ResourceLinker::renderLinkerBlock();
?>
    </fieldset>
    
    <input type="submit" class="claroButton" name="submitEvent" value="<?php 
echo get_lang('Ok');
?>
" />
    <?php 
echo claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang('Cancel'));
?>
</form>

<hr />
Example #2
0
    $intro_dispCommand = false;
} else {
    $intro_dispDefault = true;
    $intro_dispForm = false;
    $intro_dispCommand = $intro_editAllowed;
}
/* Executes the display */
if ($intro_dispForm) {
    $introContent = isset($introSettingList['content']) ? $introSettingList['content'] : '';
    $introId = isset($introSettingList['id']) ? $introSettingList['id'] : false;
    $introEditorCmdValue = $introId ? 'exEd' : 'exAdd';
    $output .= '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid(time()) . '" />' . '<input type="hidden" name="introCmd" value="' . $introEditorCmdValue . '" />' . ($introId ? '<input type="hidden" name="introId" value="' . $introId . '" />' : '') . claro_form_relay_context() . claro_html_textarea_editor('intro_content', trim($introContent)) . '<br />' . "\n";
    if (isset($_REQUEST['introId'])) {
        ResourceLinker::setCurrentLocator(ResourceLinker::$Navigator->getCurrentLocator(array('id' => (int) $_REQUEST['introId'])));
    }
    $output .= ResourceLinker::renderLinkerBlock();
    $output .= '<input type="submit" class="claroButton" name="submitEvent" value="' . get_lang('Ok') . '" />&nbsp;' . "\n";
    $output .= claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . '<br />' . "\n" . '</form>' . "\n\n";
}
if ($intro_dispDefault) {
    $sql = "SELECT `id`, `rank`, `content`, `visibility`\n            FROM `" . $TBL_INTRODUCTION . "`\n            WHERE `tool_id` <= 0\n            ORDER BY rank ASC";
    $textIntroList = claro_sql_query_fetch_all($sql);
    $introListCount = count($textIntroList);
    if ($introListCount == 0 && $intro_editAllowed) {
        $output .= '<div class="HelpText">' . "\n" . get_block('blockIntroCourse') . "\n" . '</div>' . "\n";
    } else {
        foreach ($textIntroList as $thisIntroKey => $thisTextIntro) {
            $introId = $thisTextIntro['id'];
            $introVisibility = $thisTextIntro['visibility'];
            if ($introVisibility == 'SHOW' || $intro_editAllowed) {
                $cssClass = $introVisibility == 'HIDE' ? ' invisible' : '';