Exemplo n.º 1
0
        }
        $tool_content .= "<td>$image <a href='$topiclink'><b>" . q($topic_title) . "</b></a>$pagination</td>";
        $tool_content .= "<td class='text-center'>$replies</td>";
        $tool_content .= "<td class='text-center'>" . q(uid_to_name($myrow->poster_id)) . "</td>";
        $tool_content .= "<td class='text-center'>$myrow->num_views</td>";
        $tool_content .= "<td class='text-center'>" . q(uid_to_name($myrow->poster_id)) . "<br />$last_post_datetime</td>";
        $sql = Database::get()->querySingle("SELECT notify_sent FROM forum_notify
			WHERE user_id = ?d AND topic_id = ?d AND course_id = ?d", $uid, $myrow->id, $course_id);
        if ($sql) {
            $topic_action_notify = $sql->notify_sent;
        }
        if (!isset($topic_action_notify)) {
            $topic_link_notify = FALSE;
            $topic_icon = '_off';
        } else {
            $topic_link_notify = toggle_link($topic_action_notify);
            $topic_icon = toggle_icon($topic_action_notify);
        }
        $tool_content .= "<td class='text-center option-btn-cell'>";

        $dyntools = (!$is_editor) ? array() : array(
            array('title' => $langModify,
                'url' => "forum_admin.php?course=$course_code&amp;forumtopicedit=yes&amp;topic_id=$myrow->id",
                'icon' => 'fa-edit'
            ),
            array('title' => $langDelete,
                'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&amp;forum=$forum_id&amp;topic_id=$myrow->id&amp;topicdel=yes",
                'icon' => 'fa-times',
                'class' => 'delete',
                'confirm' => $langConfirmDelete)
        );
Exemplo n.º 2
0
                            "</td>" .
                            "<td class='text-center'>$total_topics</td>" .
                            "<td class='text-center'>$total_posts</td>" .
                            "<td class='text-center'>";
                        if ($total_topics > 0 && $total_posts > 0) {
                            $tool_content .= "<span class='smaller'>" . q($last_user_post) . "&nbsp;" .
                                "<a href='viewtopic.php?course=$course_code&amp;topic=$last_post_topic_id&amp;forum=$forum_id'>" .
                                icon('fa-comment-o', $langLastPost) . "</a><br>$human_last_post_time</span></td>";
                        } else {
                            $tool_content .= "<div class='inactive'>$langNoPosts</div></td>";
                        }

                        if (!isset($forum_action_notify)) {
                            $forum_link_notify = false;
                        } else {
                            $forum_link_notify = toggle_link($forum_action_notify);
                        }
                        $tool_content .= "<td class='option-btn-cell'>";

                        $tool_content .= action_button(
                            array(
                            array(
                                'title' => $langEditChange,
                                'url' => "forum_admin.php?course=$course_code&amp;forumgoedit=yes&amp;forum_id=$forum_id&amp;cat_id=$catNum",
                                'icon' => 'fa-edit',
                                'show' => $is_editor),
                            array(
                                'title' => $forum_action_notify ? $langStopNotify : $langNotify,
                                'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&amp;forumnotify=$forum_link_notify&amp;forum_id=$forum_id",
                                'icon' => $action_notify ? 'fa-envelope-o' : 'fa-envelope'),
                            array(