blog owner can delete blog comments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    blog owner can delete blog comments

    welcome. i need code - delete comments by blog owner.
    you can convert it? please

    $id = cleanQuery($_GET["id"]);

    echo "<head>";
    echo "<title>Delete Comment</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";

    echo "<p align=\"center\">";

    $res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id ='".$id."'");
    if($res)
    {
    mysql_query("INSERT INTO ibwf_mlog SET action='Blogcomment', details='<b>".getnick_uid(getuid_sid($sid))."</b> Deleted a Blog Comment', actdt='".time()."'");
    echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Comment deleted";
    }else{
    echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
    }
    echo "<br/><br/>";


    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p></body>";

    #2
    not enough Sql shown to code it :P

    Comment


      #3
      Replace
      PHP Code:
      $res mysql_query("DELETE FROM ibwf_blogcomment WHERE id ='".$id."'"); 
      with
      PHP Code:
      $uid=getuid_sid($sid);
      $res mysql_query("DELETE FROM ibwf_blogcomment WHERE id ='".$id."', uid='".$uid."'"); 
      whatmp3.name - search mp3 on mobile

      Comment

      Working...
      X