Beispiel #1
0
            ?>
        <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
          <a class="claroCmd" href="<?php 
            echo claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?post=' . $thisPost['post_id'] . '&amp;cmd=rqPost&amp;mode=edit'));
            ?>
">
            <img src="<?php 
            echo get_icon_url('edit');
            ?>
" alt="<?php 
            echo get_lang('Edit');
            ?>
" />
          </a>
          <?php 
            if (!is_first_post($this->topic_id, $thisPost['post_id'])) {
                ?>
          <a class="claroCmd" href="<?php 
                echo claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?post=' . $thisPost['post_id'] . '&amp;cmd=exDelete&amp;submit=submit'));
                ?>
" onclick="return confirmationDel('<?php 
                echo get_lang('this item');
                ?>
');" >
            <img src="<?php 
                echo get_icon_url('delete');
                ?>
" alt="<?php 
                echo get_lang('Delete');
                ?>
" />
Beispiel #2
0
         $cmd = 'show';
     }
 }
 if ('rqPost' == $cmd) {
     if ('edit' != $editMode || $is_allowedToEdit) {
         if ('quote' == $editMode && $postSettingList) {
             $identity = 'anonymous' == $postSettingList['poster_lastname'] ? get_lang('Anonymous contributor wrote :') : $postSettingList['poster_firstname'] . '&nbsp;' . $postSettingList['poster_lastname'] . '&nbsp;' . get_lang('wrote :');
             $quotedPost = preg_replace('#</textarea>#si', '&lt;/TEXTAREA&gt;', $postSettingList['post_text']);
             if (!isset($message) || empty($message)) {
                 $message = '<span style="margin-left:20px;font-weight:bold;">' . $identity . '</span><br/>';
                 $message .= '<div style="background-color:#F0F0EE;margin-left:20px;margin-right:20px;padding:5px;border:1px solid;">' . $quotedPost . '</div><br/>';
             }
             $subject = '';
         } elseif ('edit' == $editMode) {
             $message = isset($message) ? $message : preg_replace('#</textarea>#si', '&lt;/TEXTAREA&gt;', $postSettingList['post_text']);
             if (is_first_post($topicId, $postId)) {
                 $subject = isset($subject) ? $subject : $topicSettingList['topic_title'];
             } else {
                 $subject = '';
             }
         } elseif ('add' == $editMode || 'reply' == $editMode) {
             $subject = isset($subject) ? $subject : '';
             $message = isset($message) ? $message : '';
         }
         $form = new ModuleTemplate('CLFRM', 'forum_editpost.tpl.php');
         $form->assign('nextCommand', 'exSavePost');
         $form->assign('editMode', $editMode);
         $form->assign('forumId', $forumSettingList['forum_id']);
         $form->assign('topicId', $topicSettingList['topic_id']);
         $form->assign('postId', $postId);
         $form->assign('subject', $subject);
Beispiel #3
0
  Display Section
 =================================================================*/
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Forums'), 'index.php');
$noPHP_SELF = true;
$out = '';
// Forum Title
$out .= claro_html_tool_title(get_lang('Forums'), $is_allowedToEdit ? 'help_forum.php' : false);
if (!$allowed || !$is_allowedToEdit) {
    $out .= $dialogBox->render();
} else {
    if (isset($_REQUEST['submit']) && !$error) {
        if (!isset($_REQUEST['delete'])) {
            $out .= disp_confirmation_message(get_lang('Your message has been entered'), $forum_id, $topic_id);
        } else {
            $out .= disp_confirmation_message(get_lang('Your message has been deleted'), $forum_id);
        }
    } else {
        $first_post = is_first_post($topic_id, $post_id);
        if ($error) {
            $out .= $dialogBox->render();
        }
        $out .= disp_forum_breadcrumb($pagetype, $forum_id, $forum_name, $topic_id, $subject) . claro_html_menu_horizontal(disp_forum_toolbar($pagetype, $forum_id, $topic_id, 0)) . '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" >' . "\n" . claro_form_relay_context() . '<input type="hidden" name="post_id" value="' . $post_id . '" />' . "\n" . '<table border="0" width="100%" >' . "\n";
        if ($first_post) {
            $out .= '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<label for="subject">' . get_lang('Subject') . '</label> : ' . '</td>' . "\n" . '<td>' . "\n" . '<input type="text" name="subject" id="subject" size="50" maxlength="100" value="' . htmlspecialchars($subject) . '" />' . '</td>' . "\n" . '</tr>' . "\n";
        }
        $out .= '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<br />' . get_lang('Message body') . ' : ' . "\n" . '</td>' . "\n" . '<td>' . "\n" . claro_html_textarea_editor('message', $message) . '</td>' . "\n" . '</tr>' . "\n" . '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<label for="delete" >' . get_lang('Delete') . '</label>' . "\n" . ' : ' . "\n" . '</td>' . "\n" . '<td>' . "\n" . '<input type="checkbox" name="delete" id="delete" />' . "\n" . '</td>' . "\n" . '</tr>' . "\n" . '<tr>' . '<td>&nbsp;</td>' . "\n" . '<td>' . '<input type="submit" name="submit" value="' . get_lang('Ok') . '" />&nbsp; ' . '<input type="submit" name="cancel" value="' . get_lang('Cancel') . '" />' . '</td>' . "\n" . '</tr>' . "\n" . '</table>' . "\n" . '</form>' . "\n" . '<br />' . "\n" . '<center>' . '<a href="' . htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $topic_id)) . '" target="_blank">' . get_lang('Topic review') . '</a>' . '</center>' . '<br />' . "\n";
    }
    // end // else if ! isset submit
}
$claroline->display->body->appendContent($out);
echo $claroline->display->render();