示例#1
0
$result = $mysqli->query($query);
$arr = $result->fetch_all(MYSQLI_BOTH);
foreach ($arr as $row) {
    $f_title = $row['forum_title'];
    $f_id = $row['forum_id'];
    $f_order_title = $row['forum_order_title'];
    // If Admin or mod is logged in check to
    // see if categories are in order.
    // If not then fix it.
    forumCleanOrderCat($f_title);
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>";
    echo "<table width='100%' border='0'  class='forum_title_head'><tr><td>";
    //Display title or edit title field if mod and requested
    forumEditTitleCheck($f_title);
    // Display Forum Title Edit Funcs.
    if (userCheckForumAdmin() || userCheckForumMod()) {
        // Show admin feature if is admin
        // Display current order id
        echo "</td><td align='right'>";
        //echo "Order Id: $f_order_title ";
        echo "<table border='0'><tr><td width='140px' align='right'>";
        //Display Move Buttons
        forumMoveTitleOrder($f_order_title);
        echo "</td><td width='100px' align='right'>";
        //Display Edit/Delete Buttons
        forumEditTitle($f_title);
        echo "</td></tr></table>";
    }
    echo "</td></tr></table>";
    echo "</td></tr><tr><td>";
    $f_title_2 = addslashes($f_title);
function forumCatEdit($fot_id, $f_title, $cat_order_id, $f_cat, $f_des, $f_id2)
{
    if (userCheckForumAdmin() || userCheckForumMod()) {
        // Display Edit, Delete, and Move Buttons
        echo "</td></tr><tr><td colspan=2 align=right>";
        // Display Edit and Move buttons to mods and admins
        forumMoveCatOrder($fot_id, $f_title, $cat_order_id);
        // Display Edit and Delete buttons to mods and admins
        forumCatEditDelete($f_cat, $f_des, $f_id2);
    }
}