Exemplo n.º 1
0
                echo ' "> ' . $user_filename . ' </a>';
                echo '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span><br />';
                echo '</td></tr>';
            }
        }
        // The post has been displayed => it can be removed from the what's new array
        unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id']][$row['post_id']]);
        unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id']]);
        unset($_SESSION['whatsnew_post_info'][$current_forum['forum_id']][$current_thread['thread_id']][$row['post_id']]);
        unset($_SESSION['whatsnew_post_info'][$current_forum['forum_id']][$current_thread['thread_id']]);
        echo "</table></div>";
        $counter++;
    }
}
$userid = (int) $_GET['user_id'];
$userinf = api_get_user_info($userid);
$current_thread = get_thread_information($_GET['thread']);
$threadid = $current_thread['thread_id'];
$qualify = (int) $_POST['idtextqualify'];
//return Max qualify thread
$max_qualify = show_qualify('2', $userid, $threadid);
$current_qualify_thread = show_qualify('1', $userid, $threadid);
if (isset($_POST['idtextqualify'])) {
    store_theme_qualify($userid, $threadid, $qualify, $_SESSION['_user']['user_id'], date('Y-m-d H:i:s'), '');
}
$result = get_statistical_information($current_thread['thread_id'], $_GET['user_id'], $_GET['cidReq']);
if ($userinf['status'] != '1') {
    echo '<div class="forum-qualification-input-box">';
    require_once 'forumbody.inc.php';
    echo '</div>';
}
Exemplo n.º 2
0
    echo "</th>";
    echo "</tr>";
    echo '<span>' . prepare4display($current_thread['thread_comment']) . '</span>';
    echo "</table>";
    include_once 'viewpost.inc.php';
}
// if ($message<>'PostDeletedSpecial') // in this case the first and only post of the thread is removed
if ($allowed_to_edit) {
    $current_thread = get_thread_information($_GET['thread']);
    $threadid = $current_thread['thread_id'];
    //show current qualify in my form
    $qualify = current_qualify_of_thread($threadid, api_get_session_id());
    //show max qualify in my form
    $max_qualify = show_qualify('2', $user_id, $threadid);
    require_once 'forumbody.inc.php';
    $value_return = store_theme_qualify($user_id, $threadid, $_REQUEST['idtextqualify'], api_get_user_id(), date("Y-m-d H:i:s"), api_get_session_id());
    $url = 'cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;forum=' . Security::remove_XSS($_GET['forum']) . '&amp;thread=' . Security::remove_XSS($_GET['thread']) . '&amp;post=' . Security::remove_XSS($_GET['post']) . '&amp;origin=' . $origin . '&amp;user_id=' . Security::remove_XSS($_GET['user_id']);
    $current_qualify_thread = show_qualify('1', $user_id, $threadid);
    if ($value_return[0] != $_REQUEST['idtextqualify'] && $value_return[1] == 'update') {
        store_qualify_historical('1', '', $_GET['forum'], $user_id, $threadid, $_REQUEST['idtextqualify'], api_get_user_id());
    }
    if (!empty($_REQUEST['idtextqualify']) && $_REQUEST['idtextqualify'] > $max_qualify) {
        $return_message = get_lang('QualificationCanNotBeGreaterThanMaxScore');
        Display::display_error_message($return_message, false);
    }
    // show qualifications history
    $qualify_historic = get_historical_qualify($user_id, $threadid, $_GET['type']);
    $counter = count($qualify_historic);
    $act_qualify = $_REQUEST['idtextqualify'];
    if ($counter > 0) {
        if (isset($_GET['gradebook'])) {