/[gnuheter]/gnuheter/admin.php
ViewVC logotype

Diff of /gnuheter/admin.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by aron, Sat Nov 30 17:27:09 2002 UTC revision 1.13 by aron, Sun Dec 1 00:01:47 2002 UTC
# Line 2032  function postAdminStory($subject, $intro Line 2032  function postAdminStory($subject, $intro
2032  function intRemoveComment($tid, $typ)  function intRemoveComment($tid, $typ)
2033  {  {
2034          $antal = 1;          $antal = 1;
2035          dbconnext();          dbconnect();
2036          mysql_query("DELETE FROM comments WHERE tid='$tid' AND typ='$typ'");          mysql_query("DELETE FROM comments WHERE tid='$tid' AND typ='$typ'");
2037          $resultat = mysql_query("SELECT tid FROM comments WHERE pid='$tid' AND typ='$typ'");          $resultat = mysql_query("SELECT tid FROM comments WHERE pid='$tid' AND typ='$typ'");
2038          while (list($a)=mysql_fetch_row($resultat))          while (list($a)=mysql_fetch_row($resultat))
# Line 2047  function intRemoveComment($tid, $typ) Line 2047  function intRemoveComment($tid, $typ)
2047  // Anyone, please help me to do this!  // Anyone, please help me to do this!
2048    
2049  function removeComment ($tid, $sid, $typ) {  function removeComment ($tid, $sid, $typ) {
     dbconnect();  
2050           $antal = intRemoveComment($tid, $typ);           $antal = intRemoveComment($tid, $typ);
2051    
2052           if ($typ==0)           if ($typ==0)
2053           {           {
2054                   mysql_query("update stories set comments=comments-'$antal' where sid='$sid'");              dbconnect();
2055                     mysql_query("update stories set comments=comments-$antal where sid='$sid'");
2056              header("Location: article.php?sid=$sid");              header("Location: article.php?sid=$sid");
2057           }           }
2058      elseif ($typ==1)      elseif ($typ==1)
# Line 2695  if($admintest) { Line 2695  if($admintest) {
2695                          break;                          break;
2696    
2697                  case "RemovePollComment":                  case "RemovePollComment":
2698                            $typ = 1;
2699                          removeComment($tid, $sid, $typ);                          removeComment($tid, $sid, $typ);
2700                          break;                          break;
2701    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26