From 190790845f3ef673a4f6779bbc1a46620a6151ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Sat, 21 Jan 2012 15:16:27 +0100 Subject: bug 1003: Move cron jobs into a separate folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Tänzer --- scripts/removedead.php | 86 -------------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100755 scripts/removedead.php (limited to 'scripts/removedead.php') diff --git a/scripts/removedead.php b/scripts/removedead.php deleted file mode 100755 index 7e47c7f..0000000 --- a/scripts/removedead.php +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/php -q -= 172800"; - $res = mysql_query($query); - while($row = mysql_fetch_assoc($res)) - { - mysql_query("delete from `email` where `memid`='".$row['id']."'"); - mysql_query("delete from `users` where `id`='".$row['id']."'"); - } - - $query = "delete from `domains` where `hash`!='' and - (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`created`)) >= 172800"; - mysql_query($query); - - $query = "delete from `email` where `hash`!='' and - (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`created`)) >= 172800"; - mysql_query($query); - - $query = "delete from `disputedomain` where `hash`!='' and - (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`created`)) >= 21600"; - mysql_query($query); - - $query = "delete from `disputeemail` where `hash`!='' and - (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`created`)) >= 21600"; - mysql_query($query); - - $query = "select * from `notary` where `expire`!=0 and `expire`= 150) - { - $query = "update `notary` set `expire`=0, `points`='0' where `to`='$row[to]' and `from`='$row[from]' and `expire`='$row[expire]'"; - } else { - $newpoints = 150 - $drow['points']; - $query = "update `notary` set `expire`=0, `points`='0' where `to`='$row[to]' and `from`='$row[from]' and `expire`='$row[expire]'"; - mysql_query($query); - $query = "insert into `notary` set `expire`=0, `points`='$newpoints', `to`='$row[to]', `from`='$row[from]', `when`=NOW(), `method`='Administrative Increase', `date`=NOW()"; - } - - $data = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[to]'")); - $body = sprintf("%s %s (%s) had a temporary increase, but this has just expired and they have been reduced to 150 points.", $data['fname'], $data['lname'], $data['email'])."\n\n"; - sendmail("cacert-board@lists.cacert.org", "[CAcert.org] Temporary Increase Expired.", $body, "website@cacert.org", "", "", "CAcert Website"); - - if($data['language'] != "") - { - $userlang = $data['language']; - putenv("LANG=".$userlang); - setlocale(LC_ALL, $userlang); - } - - $body = _("You are receiving this email because you had a temporary increase to 200 points. This has since expired and you have been reduced to 150 points.")."\n\n"; - $body = _("If you needed more time or any other extenuating circumstances you should contact us immediately so this situation can be dealt with immediately.")."\n\n"; - - $body .= _("Best regards")."\n"; - $body .= _("CAcert Support Team"); - - sendmail($data['email'], "[CAcert.org] "._("Temporary points increase has expired."), $body, "support@cacert.org", "", "", "CAcert Website"); - - mysql_query($query); - fix_assurer_flag($row[to]); - } -?> -- cgit v1.2.1