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)) |
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) |
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 |
|
|