function forum_admin_subparent($parent)
{
    $result = dbquery("SELECT * FROM " . DB_FORUMS . " WHERE forum_parent='{$parent}' ORDER BY forum_order asc");
    $forumR = "";
    if (dbrows($result)) {
        $k = 1;
        while ($data = dbarray($result)) {
            $forumR .= forum_admin_parent($data, $result, $k);
            $k++;
            $forumR .= forum_admin_subparent($data['forum_id']);
        }
    }
    return $forumR;
}
Exemple #2
0
                    echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=md&amp;order={$down}&amp;forum_id=" . $data['forum_id'] . "&amp;t=cat'><img src='" . get_image("down") . "' alt='" . $locale['557'] . "' title='" . $locale['557'] . "' style='border:0px;' /></a>\n";
                } else {
                    echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=mu&amp;order={$up}&amp;forum_id=" . $data['forum_id'] . "&amp;t=cat'><img src='" . get_image("up") . "' alt='" . $locale['556'] . "' title='" . $locale['558'] . "' style='border:0px;' /></a>\n";
                }
            }
            $i++;
            echo "</td>\n";
            echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><a href='" . FUSION_SELF . $aidlink . "&amp;action=edit&amp;forum_id=" . $data['forum_id'] . "&amp;t=cat'>" . $locale['554'] . "</a> ::\n";
            echo "<a href='" . FUSION_SELF . $aidlink . "&amp;action=delete&amp;forum_id=" . $data['forum_id'] . "&amp;t=cat' onclick=\"return confirm('" . $locale['440'] . "');\">" . $locale['555'] . "</a></td>\n";
            echo "</tr>\n";
            //subforums begin
            $result2 = dbquery("SELECT * FROM " . DB_FORUMS . " WHERE forum_cat='" . $data['forum_id'] . "' AND forum_parent='0' ORDER BY forum_order");
            if (dbrows($result2)) {
                $k = 1;
                while ($data2 = dbarray($result2)) {
                    echo forum_admin_parent($data2, $result2, $k);
                    echo forum_admin_subparent($data2['forum_id']);
                    $k++;
                }
            }
            echo "</table><table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
        }
        //subforums end
        echo "<tr>\n<td align='center' colspan='5' class='tbl2'>[ <a href='" . FUSION_SELF . $aidlink . "&amp;action=refresh'>" . $locale['562'] . "</a> ]</td>\n</tr>\n";
    } else {
        echo "<tr>\n<td align='center' class='tbl1'>" . $locale['560'] . "</td>\n</tr>\n";
    }
    echo "</table>\n";
    closetable();
}
require_once THEMES . "templates/footer.php";