Beispiel #1
0
$rowQ1 = Q_Select("SELECT forum_name, forum_moderator, forum_type, forum_pass, forum_access, arbre FROM " . $NPDS_Prefix . "forums WHERE forum_id = '{$forum}'", 3600);
if (!$rowQ1) {
    forumerror('0001');
}
list(, $myrow) = each($rowQ1);
$forum_name = $myrow['forum_name'];
$mod = $myrow['forum_moderator'];
$forum_type = $myrow['forum_type'];
$forum_access = $myrow['forum_access'];
if ($forum_type == 1 and $Forum_passwd != $myrow['forum_pass']) {
    header("Location: forum.php");
}
if ($forum_type == 5 or $forum_type == 7) {
    $ok_affiche = false;
    $tab_groupe = valid_group($user);
    $ok_affiche = groupe_forum($myrow['forum_pass'], $tab_groupe);
    if (!$ok_affiche) {
        header("location: forum.php");
    }
}
if ($forum_type == 9 and !$user) {
    header("location: forum.php");
}
// Moderator
if (isset($user)) {
    $userX = base64_decode($user);
    $userdata = explode(':', $userX);
}
$moderator = get_moderator($mod);
$moderator = explode(' ', $moderator);
$Mmod = false;
Beispiel #2
0
function forum($rowQ1)
{
    global $user, $subscribe, $theme, $NPDS_Prefix, $admin, $adminforum;
    //==> droits des admin sur les forums (superadmin et admin avec droit gestion forum)
    $adminforum = false;
    if ($admin) {
        $adminX = base64_decode($admin);
        $adminR = explode(':', $adminX);
        $Q = sql_fetch_assoc(sql_query("SELECT * FROM " . $NPDS_Prefix . "authors WHERE aid='{$adminR['0']}' LIMIT 1"));
        if ($Q['radminsuper'] == 1) {
            $adminforum = 1;
        } else {
            $R = sql_query("SELECT fnom, fid, radminsuper FROM " . $NPDS_Prefix . "authors a LEFT JOIN " . $NPDS_Prefix . "droits d ON a.aid = d.d_aut_aid LEFT JOIN " . $NPDS_Prefix . "fonctions f ON d.d_fon_fid = f.fid WHERE a.aid='{$adminR['0']}' AND f.fid BETWEEN 13 AND 15");
            if (sql_num_rows($R) >= 1) {
                $adminforum = 1;
            }
        }
    }
    //<== droits des admin sur les forums (superadmin et admin avec droit gestion forum)
    if ($user) {
        $userX = base64_decode($user);
        $userR = explode(':', $userX);
        $tab_groupe = valid_group($user);
    }
    if ($ibid = theme_image("forum/icons/red_folder.gif")) {
        $imgtmpR = $ibid;
    } else {
        $imgtmpR = "images/forum/icons/red_folder.gif";
    }
    if ($ibid = theme_image("forum/icons/folder.gif")) {
        $imgtmp = $ibid;
    } else {
        $imgtmp = "images/forum/icons/folder.gif";
    }
    $linked = "onmouseover=\"this.className='lignb'; this.style.cursor='default';\" " . " onmouseout=\"this.className='ligna';\"";
    // preparation de la gestion des folders
    $result = sql_query("SELECT forum_id, COUNT(topic_id) AS total FROM " . $NPDS_Prefix . "forumtopics GROUP BY (forum_id)");
    while (list($forumid, $total) = sql_fetch_row($result)) {
        $tab_folder[$forumid][0] = $total;
        // Topic
    }
    $result = sql_query("SELECT forum_id, COUNT(DISTINCT topicid) AS total FROM " . $NPDS_Prefix . "forum_read WHERE uid='{$userR['0']}' AND topicid>'0' AND status!='0' GROUP BY (forum_id)");
    while (list($forumid, $total) = sql_fetch_row($result)) {
        $tab_folder[$forumid][1] = $total;
        // Folder
    }
    // préparation de la gestion des abonnements
    $result = sql_query("SELECT forumid FROM " . $NPDS_Prefix . "subscribe WHERE uid='{$userR['0']}'");
    while (list($forumid) = sql_fetch_row($result)) {
        $tab_subscribe[$forumid] = true;
    }
    // preparation du compteur total_post
    $rowQ0 = Q_Select("SELECT forum_id, COUNT(post_aff) AS total FROM " . $NPDS_Prefix . "posts GROUP BY forum_id", 600);
    while (list(, $row0) = each($rowQ0)) {
        $tab_total_post[$row0['forum_id']] = $row0['total'];
    }
    if ($subscribe and $user) {
        $colspanX = 7;
    } else {
        $colspanX = 6;
    }
    $ibid = '';
    if ($rowQ1) {
        while (list(, $row) = each($rowQ1)) {
            $title_aff = true;
            $rowQ2 = Q_Select("SELECT * FROM " . $NPDS_Prefix . "forums WHERE cat_id = '" . $row['cat_id'] . "' AND SUBSTRING(forum_name,1,3)!='<!>' ORDER BY forum_index,forum_id", 21600);
            if ($rowQ2) {
                while (list(, $myrow) = each($rowQ2)) {
                    // Gestion des Forums Cachés aux non-membres
                    if ($myrow['forum_type'] != "9" or $userR) {
                        // Gestion des Forums réservés à un groupe de membre
                        if ($myrow['forum_type'] == "7" or $myrow['forum_type'] == "5") {
                            $ok_affich = groupe_forum($myrow['forum_pass'], $tab_groupe);
                            if (isset($admin) and $adminforum == 1) {
                                $ok_affich = true;
                            }
                            // to see when admin mais pas assez precis
                        } else {
                            $ok_affich = true;
                        }
                        if ($ok_affich) {
                            if ($title_aff) {
                                $title = stripslashes($row['cat_title']);
                                if (file_exists("themes/{$theme}/html/forum-cat" . $row['cat_id'] . ".html") or file_exists("themes/default/html/forum-cat" . $row['cat_id'] . ".html")) {
                                    $ibid .= '
         <tr valign="top">
            <td colspan="' . $colspanX . '" class="lignb"><a href="forum.php?catid=' . $row['cat_id'] . '">' . $title . '</a></td>
         </tr>';
                                } else {
                                    $ibid .= '
         <tr valign="top">
            <td colspan="' . $colspanX . '" class="lignb">' . $title . '</td>
         </tr>';
                                }
                                $title_aff = false;
                            }
                            $forum_moderator = explode(" ", get_moderator($myrow['forum_moderator']));
                            $Mmod = false;
                            for ($i = 0; $i < count($forum_moderator); $i++) {
                                if ($userR[1] == $forum_moderator[$i]) {
                                    $Mmod = true;
                                }
                            }
                            $last_post = get_last_post($myrow['forum_id'], "forum", "infos", $Mmod);
                            $ibid .= '
         <tr align="left" valign="top">';
                            if ($tab_folder[$myrow['forum_id']][0] - $tab_folder[$myrow['forum_id']][1] > 0) {
                                $ibid .= '
            <td class="lignb" align="center" valign="middle" width="5%"><img src="' . $imgtmpR . '" border="" alt="" /></td>';
                            } else {
                                $ibid .= '
            <td class="lignb" align="center" valign="middle" width="5%"><img src="' . $imgtmp . '" border="" alt="" /></td>';
                            }
                            $name = stripslashes($myrow['forum_name']);
                            $redirect = false;
                            if (strstr(strtoupper($name), "<a HREF")) {
                                if ($colspanX == 7) {
                                    $ibid .= '
            <td width="40%" class="ligna" ' . $linked . '>' . $name;
                                } else {
                                    $ibid .= '
            <td width="45%" class="ligna" ' . $linked . '>' . $name;
                                }
                                $redirect = true;
                            } else {
                                if ($colspanX == 7) {
                                    $ibid .= '
            <td width="40%" class="ligna" ' . $linked . ' onclick=\'window.location.href="viewforum.php?forum=' . $myrow['forum_id'] . '"\'><a href="viewforum.php?forum=' . $myrow['forum_id'] . '" >' . $name . '</a>';
                                } else {
                                    $ibid .= '
            <td width="45%" class="ligna" ' . $linked . ' onclick=\'window.location.href="viewforum.php?forum=' . $myrow['forum_id'] . '"\'><a href="viewforum.php?forum=' . $myrow['forum_id'] . '" >' . $name . '</a>';
                                }
                            }
                            $desc = stripslashes(meta_lang($myrow['forum_desc']));
                            $ibid .= '<br />' . $desc . '</td>';
                            // Subscribe
                            if ($subscribe and $user) {
                                if (!$redirect) {
                                    if ($tab_subscribe[$myrow['forum_id']]) {
                                        $ibid .= '
            <td class="lignb" width="5%" align="center" valign="middle"><input type="checkbox" name="Subforumid[' . $myrow['forum_id'] . ']" checked="checked" /></td>';
                                    } else {
                                        $ibid .= '
            <td class="lignb" width="5%" align="center" valign="middle"><input type="checkbox" name="Subforumid[' . $myrow['forum_id'] . ']" /></td>';
                                    }
                                } else {
                                    $ibid .= '
            <td class="lignb" width="5%" align="center" valign="middle">&nbsp;</td>';
                                }
                            }
                            if (!$redirect) {
                                $ibid .= '
            <td width="15%" align="center" valign="middle" class="ligna">';
                                if ($myrow['forum_access'] == "0" && $myrow['forum_type'] == "0") {
                                    $ibid .= translate("Free for All");
                                }
                                if ($myrow['forum_type'] == "1") {
                                    $ibid .= translate("Private");
                                }
                                if ($myrow['forum_type'] == "5") {
                                    $ibid .= "PHP Script + " . translate("Group");
                                }
                                if ($myrow['forum_type'] == "6") {
                                    $ibid .= "PHP Script";
                                }
                                if ($myrow['forum_type'] == "7") {
                                    $ibid .= translate("Group");
                                }
                                if ($myrow['forum_type'] == "8") {
                                    $ibid .= translate("Extended Text");
                                }
                                if ($myrow['forum_type'] == "9") {
                                    $ibid .= translate("Hidden");
                                }
                                if ($myrow['forum_access'] == "1" && $myrow['forum_type'] == "0") {
                                    $ibid .= translate("Registered User");
                                }
                                if ($myrow['forum_access'] == "2" && $myrow['forum_type'] == "0") {
                                    $ibid .= translate("Moderator");
                                }
                                if ($myrow['forum_access'] == "9") {
                                    $ibid .= ' <strong>' . translate("Closed") . '</strong>';
                                }
                                $ibid .= '</td>
            <td width="10%" align="center" valign="middle" class="lignb">' . $tab_folder[$myrow['forum_id']][0] . '</td>
            <td width="10%" align="center" valign="middle" class="ligna">' . $tab_total_post[$myrow['forum_id']] . '</td>
            <td width="15%" align="center" valign="middle" class="lignb">' . $last_post . '</td>
         </tr>';
                            } else {
                                $ibid .= '
            <td width="15%" align="center" valign="middle" class="ligna">&nbsp;</td>
            <td width="10%" align="center" valign="middle" class="lignb">&nbsp;</td>
            <td width="10%" align="center" valign="middle" class="ligna">&nbsp;</td>
            <td width="15%" align="center" valign="middle" class="ligna">&nbsp;</td>
         </tr>';
                            }
                        }
                    }
                }
            }
        }
    }
    return $ibid;
}
Beispiel #3
0
    echo '
         <div class="alert alert-danger lead" role="alert">
            <i class="fa fa-exclamation-triangle fa-lg"></i>&nbsp;
            ' . translate("No records match that query. Please broaden your search.") . '
         </div>';
    $affiche = false;
}
if ($affiche) {
    $count = 0;
    echo '
         <table id="cherch_trouve" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons">';
    do {
        if ($row['forum_type'] == 5 or $row['forum_type'] == 7) {
            $ok_affich = false;
            $tab_groupe = valid_group($user);
            $ok_affich = groupe_forum($row['forum_pass'], $tab_groupe);
        } else {
            $ok_affich = true;
        }
        if ($ok_affich) {
            if ($count == 0) {
                echo '
         <thead>
            <tr>
               <th data-sortable="true">&nbsp;</th>
               <th data-sortable="true">' . translate("Forum") . '</th>
               <th data-sortable="true">' . translate("Topic") . '</th>
               <th data-sortable="true">' . translate("Author") . '</th>
               <th data-sortable="true">' . translate("Posted") . '</th>
            </tr>
         </thead>
Beispiel #4
0
function RecentForumPosts_fab($title, $maxforums, $maxtopics, $displayposter, $topicmaxchars, $hr)
{
    global $parse, $user;
    global $NPDS_Prefix;
    $topics = 0;
    settype($maxforums, "integer");
    if ($maxforums == 0) {
        $lim = "";
    } else {
        $lim = " LIMIT {$maxforums}";
    }
    if ($user) {
        $query = "SELECT * FROM " . $NPDS_Prefix . "forums ORDER BY cat_id,forum_index,forum_id" . $lim;
    } else {
        $query = "SELECT * FROM " . $NPDS_Prefix . "forums WHERE forum_type!='9' AND forum_type!='7' AND forum_type!='5' ORDER BY cat_id,forum_index,forum_id" . $lim;
    }
    $result = sql_query($query);
    if (!$result) {
        exit;
    }
    $premier = false;
    $boxstuff = "<ul>\n";
    while ($row = sql_fetch_row($result)) {
        if ($row[6] == "5" or $row[6] == "7") {
            $ok_affich = false;
            $tab_groupe = valid_group($user);
            $ok_affich = groupe_forum($row[7], $tab_groupe);
        } else {
            $ok_affich = true;
        }
        if ($ok_affich) {
            $forumid = $row[0];
            $forumname = $row[1];
            $forum_desc = $row[2];
            if ($hr) {
                $boxstuff .= "<hr class=\"titboxcont\" />";
            }
            if ($parse == 0) {
                $forumname = FixQuotes($forumname);
                $forum_desc = FixQuotes($forum_desc);
            } else {
                $forumname = stripslashes($forumname);
                $forum_desc = stripslashes($forum_desc);
            }
            $res = sql_query("SELECT * FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id = '{$forumid}' ORDER BY topic_time DESC");
            $ibidx = sql_num_rows($res);
            $boxstuff .= "<li><a href=\"viewforum.php?forum={$forumid}\" title=\"" . strip_tags($forum_desc) . "\">{$forumname}</a> ({$ibidx}) </li>\n";
            $topics = 0;
            while ($topics < $maxtopics && ($topicrow = sql_fetch_row($res))) {
                $topicid = $topicrow[0];
                $tt = $topictitle = $topicrow[1];
                $date = $topicrow[3];
                $replies = 0;
                $postquery = "SELECT COUNT(*) AS total FROM " . $NPDS_Prefix . "posts WHERE topic_id = '{$topicid}'";
                if ($pres = sql_query($postquery)) {
                    if ($myrow = sql_fetch_assoc($pres)) {
                        $replies = $myrow['total'];
                    }
                }
                if (strlen($topictitle) > $topicmaxchars) {
                    $topictitle = substr($topictitle, 0, $topicmaxchars);
                    $topictitle .= "..";
                }
                if ($displayposter) {
                    $posterid = $topicrow[2];
                    $RowQ1 = Q_Select("SELECT uname FROM " . $NPDS_Prefix . "users WHERE uid = '{$posterid}'", 3600);
                    list(, $myrow) = each($rowQ1);
                    $postername = $myrow['uname'];
                }
                if ($parse == 0) {
                    $tt = strip_tags(FixQuotes($tt));
                    $topictitle = FixQuotes($topictitle);
                } else {
                    $tt = strip_tags(stripslashes($tt));
                    $topictitle = stripslashes($topictitle);
                }
                $boxstuff .= "<a href=\"viewtopic.php?topic={$topicid}&amp;forum={$forumid}\" title=\"{$tt}\">\"{$topictitle}\"</a> ({$replies})";
                $boxstuff .= "</li>";
                if ($displayposter) {
                    $boxstuff .= "<br />&nbsp;&nbsp;- {$postername}";
                }
                $topics++;
            }
        }
    }
    $boxstuff .= "</ul>\n";
    return $boxstuff;
}
Beispiel #5
0
function forum($rowQ1)
{
    global $user, $subscribe, $theme, $NPDS_Prefix, $admin, $adminforum;
    //==> droits des admin sur les forums (superadmin et admin avec droit gestion forum)
    $adminforum = false;
    if ($admin) {
        $adminX = base64_decode($admin);
        $adminR = explode(':', $adminX);
        $Q = sql_fetch_assoc(sql_query("SELECT * FROM " . $NPDS_Prefix . "authors WHERE aid='{$adminR['0']}' LIMIT 1"));
        if ($Q['radminsuper'] == 1) {
            $adminforum = 1;
        } else {
            $R = sql_query("SELECT fnom, fid, radminsuper FROM " . $NPDS_Prefix . "authors a LEFT JOIN " . $NPDS_Prefix . "droits d ON a.aid = d.d_aut_aid LEFT JOIN " . $NPDS_Prefix . "fonctions f ON d.d_fon_fid = f.fid WHERE a.aid='{$adminR['0']}' AND f.fid BETWEEN 13 AND 15");
            if (sql_num_rows($R) >= 1) {
                $adminforum = 1;
            }
        }
    }
    //<== droits des admin sur les forums (superadmin et admin avec droit gestion forum)
    if ($user) {
        $userX = base64_decode($user);
        $userR = explode(':', $userX);
        $tab_groupe = valid_group($user);
    }
    if ($ibid = theme_image("forum/icons/red_folder.gif")) {
        $imgtmpR = $ibid;
    } else {
        $imgtmpR = "images/forum/icons/red_folder.gif";
    }
    if ($ibid = theme_image("forum/icons/folder.gif")) {
        $imgtmp = $ibid;
    } else {
        $imgtmp = "images/forum/icons/folder.gif";
    }
    // preparation de la gestion des folders
    $result = sql_query("SELECT forum_id, COUNT(topic_id) AS total FROM " . $NPDS_Prefix . "forumtopics GROUP BY (forum_id)");
    while (list($forumid, $total) = sql_fetch_row($result)) {
        $tab_folder[$forumid][0] = $total;
        // Topic
    }
    $result = sql_query("SELECT forum_id, COUNT(DISTINCT topicid) AS total FROM " . $NPDS_Prefix . "forum_read WHERE uid='{$userR['0']}' AND topicid>'0' AND status!='0' GROUP BY (forum_id)");
    while (list($forumid, $total) = sql_fetch_row($result)) {
        $tab_folder[$forumid][1] = $total;
        // Folder
    }
    // préparation de la gestion des abonnements
    $result = sql_query("SELECT forumid FROM " . $NPDS_Prefix . "subscribe WHERE uid='{$userR['0']}'");
    while (list($forumid) = sql_fetch_row($result)) {
        $tab_subscribe[$forumid] = true;
    }
    // preparation du compteur total_post
    $rowQ0 = Q_Select("SELECT forum_id, COUNT(post_aff) AS total FROM " . $NPDS_Prefix . "posts GROUP BY forum_id", 600);
    while (list(, $row0) = each($rowQ0)) {
        $tab_total_post[$row0['forum_id']] = $row0['total'];
    }
    $ibid = '';
    if ($rowQ1) {
        while (list(, $row) = each($rowQ1)) {
            $title_aff = true;
            $rowQ2 = Q_Select("SELECT * FROM " . $NPDS_Prefix . "forums WHERE cat_id = '" . $row['cat_id'] . "' AND SUBSTRING(forum_name,1,3)!='<!>' ORDER BY forum_index,forum_id", 21600);
            if ($rowQ2) {
                while (list(, $myrow) = each($rowQ2)) {
                    // Gestion des Forums Cachés aux non-membres
                    if ($myrow['forum_type'] != "9" or $userR) {
                        // Gestion des Forums réservés à un groupe de membre
                        if ($myrow['forum_type'] == "7" or $myrow['forum_type'] == "5") {
                            $ok_affich = groupe_forum($myrow['forum_pass'], $tab_groupe);
                            if (isset($admin) and $adminforum == 1) {
                                $ok_affich = true;
                            }
                            // to see when admin mais pas assez precis
                        } else {
                            $ok_affich = true;
                        }
                        if ($ok_affich) {
                            if ($title_aff) {
                                $title = stripslashes($row['cat_title']);
                                if (file_exists("themes/{$theme}/html/forum-cat" . $row['cat_id'] . ".html") or file_exists("themes/default/html/forum-cat" . $row['cat_id'] . ".html")) {
                                    $ibid .= '
                           <div class="list-group mt-1" id="catfo_' . $row['cat_id'] . '" >
                              <a class="list-group-item list-group-item-action active" href="forum.php?catid=' . $row['cat_id'] . '"><h5 class="list-group-item-heading" >' . $title . '</h5></a>';
                                } else {
                                    $ibid .= '
                           <div class="list-group mt-1" id="catfo_' . $row['cat_id'] . '">
                              <div class="list-group-item list-group-item-action active"><h5 class="list-group-item-heading" >' . $title . '</h5></div>';
                                }
                                $title_aff = false;
                            }
                            $forum_moderator = explode(' ', get_moderator($myrow['forum_moderator']));
                            $Mmod = false;
                            for ($i = 0; $i < count($forum_moderator); $i++) {
                                if ($userR[1] == $forum_moderator[$i]) {
                                    $Mmod = true;
                                }
                            }
                            $last_post = get_last_post($myrow['forum_id'], "forum", "infos", $Mmod);
                            $ibid .= '<p class="list-group-item list-group-item-action">';
                            if ($tab_folder[$myrow['forum_id']][0] - $tab_folder[$myrow['forum_id']][1] > 0) {
                                $ibid .= '<i class="fa fa-folder text-primary fa-lg" title="' . translate("New Posts since your last visit.") . '" data-toggle="tooltip" data-placement="right"></i>';
                            } else {
                                $ibid .= '<i class="fa fa-folder-o text-primary fa-lg" title="' . translate("No New Posts since your last visit.") . '" data-toggle="tooltip" data-placement="right"></i>';
                            }
                            $name = stripslashes($myrow['forum_name']);
                            $redirect = false;
                            if (strstr(strtoupper($name), "<a HREF")) {
                                $redirect = true;
                            } else {
                                $ibid .= '
                        <a href="viewforum.php?forum=' . $myrow['forum_id'] . '" >' . $name . '</a>';
                            }
                            if (!$redirect) {
                                $ibid .= ' 
            <span class="tag tag-default ml-1" style=" position: relative; float: right;" title="' . translate("Posts") . '" data-toggle="tooltip">' . $tab_total_post[$myrow['forum_id']] . '</span>
            <span class="tag tag-default " style=" position: relative; float: right;" title="' . translate("Topics") . '" data-toggle="tooltip">' . $tab_folder[$myrow['forum_id']][0] . '</span>';
                            }
                            $desc = stripslashes(meta_lang($myrow['forum_desc']));
                            if ($desc != '') {
                                $ibid .= '<br />' . $desc;
                            }
                            if (!$redirect) {
                                $ibid .= '<br />[ ';
                                if ($myrow['forum_access'] == "0" && $myrow['forum_type'] == "0") {
                                    $ibid .= translate("Free for All");
                                }
                                if ($myrow['forum_type'] == "1") {
                                    $ibid .= translate("Private");
                                }
                                if ($myrow['forum_type'] == "5") {
                                    $ibid .= "PHP Script + " . translate("Group");
                                }
                                if ($myrow['forum_type'] == "6") {
                                    $ibid .= "PHP Script";
                                }
                                if ($myrow['forum_type'] == "7") {
                                    $ibid .= translate("Group");
                                }
                                if ($myrow['forum_type'] == "8") {
                                    $ibid .= translate("Extended Text");
                                }
                                if ($myrow['forum_type'] == "9") {
                                    $ibid .= translate("Hidden");
                                }
                                if ($myrow['forum_access'] == "1" && $myrow['forum_type'] == "0") {
                                    $ibid .= translate("Registered User");
                                }
                                if ($myrow['forum_access'] == "2" && $myrow['forum_type'] == "0") {
                                    $ibid .= translate("Moderator");
                                }
                                if ($myrow['forum_access'] == "9") {
                                    $ibid .= ' <strong class="text-danger">' . translate("Closed") . '</strong>';
                                }
                                $ibid .= ' ]';
                                $ibid .= '<br />';
                                // Subscribe
                                if ($subscribe and $user) {
                                    if (!$redirect) {
                                        if ($tab_subscribe[$myrow['forum_id']]) {
                                            $ibid .= '<input class="n-ckbf" type="checkbox" name="Subforumid[' . $myrow['forum_id'] . ']" checked="checked" title="" data-toggle="tooltip" />';
                                        } else {
                                            $ibid .= '<input class="n-ckbf" type="checkbox" name="Subforumid[' . $myrow['forum_id'] . ']" title="' . translate("Check me and click on OK button to receive an Email when is a new submission in this forum.") . '" data-toggle="tooltip" data-placement="right" />';
                                        }
                                    }
                                }
                                $ibid .= '<span class="float-xs-right">' . $last_post . '</span><br />';
                            } else {
                                $ibid .= '';
                            }
                        }
                    }
                }
                if ($ok_affich) {
                    $ibid .= '
            </p>
         </div>';
                }
            }
        }
    }
    if ($subscribe and $user and $ok_affich) {
        $ibid .= '<input type="checkbox" id="ckball_f" />&nbsp;<span class=" text-muted" id="ckb_status_f">Tout cocher</span>';
    }
    return $ibid;
}