if (isset($_POST['delete'])) {
$result = dbquery("DELETE FROM ".DB_GRIMS_BLOG_COMMENTS." WHERE comment_id='".$_POST['comment_id']."'");
$result1 = dbquery("UPDATE ".DB_GRIMS_BLOG_POST." SET comments=comments-1 WHERE post_id ='".$_GET['my_id']."'");
echo "<table align='center' width='100%' border='0' class='mytable'><tr>n";
echo "<td align='center'><b>".$locale['gb_131']."</b></td>n";
echo "</tr></table>n";
exit();
}
// Select comment to edit
echo "<div style='text-align:center'><h5><b>Select A Comment To Edit Or Delete</b></h5><br /><br /></div>n";
$editlist = ""; $sel = "";
$result = dbquery("SELECT * FROM ".DB_GRIMS_BLOG_COMMENTS." ORDER BY comment_id DESC");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$result1 = dbquery("SELECT post_id, post_title FROM ".DB_GRIMS_BLOG_POST." WHERE post_id='".$data['post_id']."'");
while ($stuff = dbarray($result1)) {
$my_id = $stuff['post_id'];
$post = $stuff['post_title'];
}
if (isset($_POST['comment_id']) && isnum($_POST['comment_id'])) {
$sel = ($_POST['comment_id'] == $data['comment_id'] ? " selected" : "");
}
$editlist .= "<option value='".$data['comment_id']."'$sel>".$data['name']." - $post - $my_id</option>n";
}
echo "<div style='text-align:center'>n";
echo "<form id='edit_select' name='edit_select' method='post' action='".FUSION_SELF."'>n";
echo "<b>Comment: </b><select id='comment_id' name='comment_id' class='textbox' style='width:350px;'>".$editlist."</select>n";
echo "<input class='button' type='submit' name='edit' value='".$locale['gb_161']."' />n";
echo "</form><br /><br />n";
echo "</div>n";
}
Category Forum
Modifications and Requests - 9Labels
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions