svn: /web/php-master/trunk/scripts/ event-weekly-email
| From: | Philip Olson | Date: | Sun, 20 Feb 2011 23:56:10 +0000 |
| Subject: | svn: /web/php-master/trunk/scripts/ event-weekly-email | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-10553@lists.php.net to get a copy of this message | ||
philip Sun, 20 Feb 2011 23:56:10 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308516
Log:
Added script to check [weekly] for unapproved events.
Changed paths:
A web/php-master/trunk/scripts/event-weekly-email
Added: web/php-master/trunk/scripts/event-weekly-email
===================================================================
--- web/php-master/trunk/scripts/event-weekly-email (rev 0)
+++ web/php-master/trunk/scripts/event-weekly-email 2011-02-20 23:56:10 UTC (rev 308516)
@@ -0,0 +1,18 @@
+<?php
+/*
+ This checks for unapproved events, and emails php-webmaster@ if they exist.
+ It should be checked weekly (via cron).
+*/
+
+$query = 'SELECT COUNT(*) FROM phpcal WHERE NOT approved';
+$count = db_get_one($query);
+
+if ($count > 0) {
+
+ $subject = "Pending unapproved events notice";
+ $message = "Greetings PHP Webmasters,\r\n\r\nThere are roughly [$count] unapproved events
awaiting moderation. Please check the queue.\r\n";
+ $headers = "From: php-webmaster@lists.php.net";
+
+ mail('php-webmaster@lists.php.net', $subject, $message, $headers);
+
+}
Property changes on: web/php-master/trunk/scripts/event-weekly-email
___________________________________________________________________
Added: svn:executable
+ *