<?php // UserApplePie // www.thedavar.net // Forum Delete Stuff // To Do // When a user wants to delete a title or category ask // if they would like to move to another location or // delete everything within that title or category // Only Admins can delete stuff if (userCheckForumAdmin()) { global $mysqli, $db_table_prefix, $load_page_dir, $session_token_num, $websiteUrl, $site_forum_title; //echo "You Are Admin and Can Delete Stuff"; // Get Data from Post Header to see what user is wanting to do if (isset($_POST['DeleteTitle'])) { $DeleteTitle = $_POST['DeleteTitle']; } else { $DeleteTitle = "FALSE"; } if (isset($_POST['DeleteTitleYes'])) { $DeleteTitleYes = $_POST['DeleteTitleYes']; } else { $DeleteTitleYes = "FALSE"; } if (isset($_POST['forum_title'])) { $forum_title = $_POST['forum_title']; } else { $forum_title = ""; } if (isset($_POST['DeleteCat'])) { $DeleteCat = $_POST['DeleteCat'];
$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); } }