ATE scripts

This commit is contained in:
Philipp Dunkel 2009-05-22 05:09:57 +00:00
parent f522b17554
commit 0934bad826
14 changed files with 1107 additions and 0 deletions

124
scripts/ate-bi-email.txt Normal file
View file

@ -0,0 +1,124 @@
CAcert auf der "mac at camp - on tour" in Bielefeld=0D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Im Rahmen des "mac at camp - on tour" Bielefeld, 1.-3. Mai 2009
mac at camp ist Europas groesstes Mac-User-Treffen
wird CAcert am Samstag, 2. Mai mit 2 Veranstaltungen dabei sein.
* CAcert Workshop "CAcert, Was ist das?" (13:00-14:00)
=20=20=20=20Speaker: Markus Hardt
* CAcert Workshop "Assurer Training Event" (19:30-21:30)
=20=20=20=20Speaker: Mario Lipinski, Dirk Astrath, Ulrich Schroeter
Im Rahmen der CAcert Weiterbildungsreihe "Assurer Training Events (ATE's)"
das in diesem Fruehjahr in vielen Deutschen und
Europaeischen Staedten stattfindet wird auch ein ebensolches
Assurer Training Event in Bielefeld angeboten.
Das Assurer Training Event findet am
Samstag, 2. Mai in der Zeit von 19:30 bis 21:30 statt.
Fuer Besucher des "mac at camp - on tour" sind
die Workshop und ATE Veranstaltungen im
Ticket-Preis eingeschlossen.
Fuer Nicht-Teilnehmer des "mac at camp - on tour" wird es einen
reduzierten Ticket-Preis nur fuer diese Abendveranstaltung
in Hoehe von 15,- Euro geben.
Es gibt dann dafuer auch ein offizielles ATE-Ticket.
Zielgruppe
----------
Primaere Zielgruppe sind Assurer mit oder ohne abgeschlossene
Assurer Challenge und solche die es noch werden wollen.
Auch "alte Hasen" sind explizit angesprochen, denn wer die Diskussionen
auf den Mailinglisten nicht dauernd mitverfolgen kann wird sicher viele
Informationen nicht mitbekommen haben.
Es hat sich viel getan im letzten Jahr. Eine ganze Reihe von bisher
eher "muendlich ueberlieferten" Regeln wurden in Policies gegossen.
Neue Prozeduren (z.B. die Assurer Challenge) und Verpflichtungen
(z.B. in der Community Agreement) wurden beschlossen. Die Assurer
Training Events wollen versuchen die ganzen Informationen "unter's
Volk" zu bringen.
Und natuerlich sind auch "Assurees" die lediglich Assurance Punkte
sammeln wollen gerne gesehen. Idealerweise welche mit ungewoehnlichen
Ausweispapieren.
Workshop "CAcert, Was ist das?"
-------------------------------
Die Veranstaltung um 13 Uhr ist fuer das breitere Publikum und als
Assurance Event bestimmt, um CAcert einer weiteren Oeffentlichkeit
Vorzustellen und Assurances durchzufuehren.
Interressierte sollten bitte einen gueltigen Lichtbilsausweis
(Ausweis, Reisepass) dabeihaben und am besten noch ein zweites
Amtliches Dokument (Fuehrerschein, EC Karte, Dienstausweis, Bahncard, etc.)
alles weitere wird dann gerne am Stand erklaert.
Siehe Veranstaltungs Seite:=0D
http://www.macatcamp.de/index.php?option=3Dcom_content&view=3Darticle&id=3D118&Itemid=3D93 (http://bit.ly/F2TBh)
Basis Informationen ATE:
------------------------
=20* Zeit: 19:30 - 21:30, Assurer Training Event - Bielefeld
=20* Datum: Samstag 2. Mai.
=20* Ort: Jugendgaestehaus und Bildungszentrum;
=20=20=20=20=20=20=20=20Carl-Schmidt-Straße 11;
=20=20=20=20=20=20=20=2033602 Bielefeld
=20* Web: "Jugendgaestehaus und Bildungszentrum;"=0D
=20=20=20http://www.macatcamp.de/index.php?option=3Dcom_content&view=3Darticle&id=3D74&Itemid=3D75 (http://bit.ly/7Qjsl)
=20* Web "Mac At Camp On Tour - Bielefeld"=0D
=20=20=20http://www.macatcamp.de/index.php?option=3Dcom_content&view=3Darticle&id=3D119&Itemid=3D73 (http://bit.ly/ReyVW)
Agenda
------
19:30 - 20:30, jeder Vortrag ca. 5 min.
- CAcert und das Audit
- Die Unterschiede zwischem "altem" und "neuem" CAP Formular
- Was verbirgt sich hinter der CCA?
- Koennen "alte" CAP Formulare akzeptiert werden?
- The Purpose of an Assurance
- Fremde Ausweise (Update)
- Wie sind Namens-Umschreibungen zu behandeln?
- Namen und die Praxis
- Unterschriften
- Wichtige Dokumente
- Dispute handling, Arbitration
- Organisations Assurances Ueberblick
20:30 - 21:30
- Diskussion
- Audited Assurances
Speakers (u.a.)
---------------
Mario Lipinski, Dirk Astrath, Ulrich Schroeter
Weitere Infos
-------------
Auf den CAcert Wiki Seiten
=20ATE-Bielefeld http://wiki.cacert.org/wiki/Events/20090503ATE-Bielefeld
=20ATE's Uebersicht http://wiki.cacert.org/wiki/Events/AssurerTrainingEvents
Im CAcert Blog=0A
=20http://blog.cacert.org/2009/04/382.html
Auf der mac at camp Veranstaltungsseite=0A
=20http://www.macatcamp.de/index.php?option=3Dcom_content&view=3Darticle&id=3D119&Itemid=3D73 (http://bit.ly/ReyVW)
Rueckmeldungen
--------------
Fuer die ungefaehre Eventplanung benoetigen wir von den Teilnehmern eine Rueckmeldung.
Unverbindliche Anmeldung:=0A
mailto:events@cacert.org?subject=3DATE-attend-BI&body=3DI%20will%20attend:%20Bielefeld
Das Veranstaltungs-Team freut sich schon auf Eure Teilnahme.
Allgemeiner Kontakt fuer Veranstaltungen: events@cacert.org

78
scripts/ate-bi-mail.php Normal file
View file

@ -0,0 +1,78 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-bi-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 200;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
$locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
// echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email`='cacert@astrath.de'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
// echo $row['pts']."..".$row['email']."...\n";
// uncomment next line to send mails ...
sendmail($row['email'], "[CAcert.org] ATE-Bielefeld 2.5.2009", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-Bielefeld 2.5.2009", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-Bielefeld Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
?>

127
scripts/ate-d-email.txt Normal file
View file

@ -0,0 +1,127 @@
CAcert Assurer Training Event Düsseldorf
::::::::::::::::::::::::::::::::::::::::
(Dutch and English version below)
Es hat sich viel getan im letzten Jahr. Eine ganze Reihe von bisher
eher "mündlich überlieferten" Regeln wurden in Policies gegossen.
Neue Prozeduren (z.B. die Assurer Challenge) und Verpflichtungen
(z.B. in dem CAcert Community Agreement) wurden beschlossen. Die Assurer
Training Events wollen versuchen, die ganzen Informationen "unter's
Volk" zu bringen:
- Wovor schützt die CCA jedes CAcert-Community-Mitglied und somit auch dich?
- Kannst du die 5 Statements der "Purpose of Assurance" aufzählen?
- Kannst du auf Anhieb 10 Sicherheitsmerkmale des deutschen/
niederländischen Personalausweises/IDcard aufzählen?
Antworten auf diese und weitere Fragen erhälst du bei den Assurer Training Events (ATE's).
Die kommenden Veranstaltungen finden statt:
- Hamburg, Donnerstag 7. Mai [http://wiki.cacert.org/wiki/Events/20090507ATE-Hamburg]
- Düsseldorf, Dienstag 12. Mai [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
- München, Samstag 16. Mai [http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Dienstag 26. Mai [http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
Die Termine für Frankfurt/M. und Berlin stehen noch nicht fest.
Die Teilnahme der Veranstaltungen ist kostenlos, Spenden werden aber gerne gesehen.
Düsseldorf:
-----------
Das ATE-Düsseldorf [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
findet statt am:
- Dienstag, 12. Mai in der Zeit von 20:00 bis 22:00
- im Gasthof Burchartz, Meerbusch [http://www.gasthof-burchartz.de/]
Das Veranstaltungs-Team freut sich schon auf Eure Teilnahme.
Anmeldung und Kontakt: events@cacert.org
CAcert Assurer Training Event Düsseldorf
::::::::::::::::::::::::::::::::::::::::
Er is het laatste jaar veel gebeurt. Een hele reeks van tot nu toe
veelal "mondeling overgedragen" regels, zijn in Policies gegoten.
Nieuwe Procedures (b.v. de Assurer Challenge) en verplichtingen
(b.v. in de CAcert Community Agreement) werden vastgesteld. De Assurer
Training Events trachten de volledige informatie "onder het volk"
te berengen.
- Waartegen beschermt de CCA ider CAcert-Community-Lid en dus ook jou?
- Kan je de 5 Statements van de "Purpose of Assurance" opnoemen?
- Kan je onmiddelijk 10 veiligheidskenmerken van het duitse/
nederlandse paspoort/identiteits kaart opnoemen?
Antwoorden op deze en verdere vragen krijg je bij de Assurer Taraining Events (ATE's)
De komende evenementen vinden plaats:
- Hamburg, Donderdag 7. Mei [http://wiki.cacert.org/wiki/Events/20090507ATE-Hamburg]
- Düsseldorf, Dinsdag 12. Mei [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
- München, Zaterdag 16. Mei [http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Dindtag 26. Mai [http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
De data voor Frankfurt/M. en Berlijn liggen nog niet vast.
De deelname aan de evenementen is gratis, bijdragen worden echter gaarne tegemoedgezien.
Düsseldorf:
-----------
De ATE-Düsseldorf [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
vindt plaats op:
- Dinstag, 12. Mei van 20:00 tot 22:00 uur.
- in Gasthof Burchartz, Meerbusch [http://www.gasthof-burchartz.de/]
Het evenementen-team veheugd zich al op jullie deelname.
Aanmelding en contact: events@cacert.org
CAcert Assurer Training Event Düsseldorf
::::::::::::::::::::::::::::::::::::::::
Much has happened during the past year. A list of up till now
mostly "orally transmitted" rules have been cast in policies.
New procedures (e.g. the Assurer Challenge) and obligations
(e.g. in the CAcert Community Agreement) have been decided. The
Assurer Training Events try to bring all this informations to "the
people":
- To what, does the CCA protect every CAcert-Community-Member and as such also you?
- Can you recount the 5 statements of the "Purpose of Assurance"?
- Can you at least recount 10 security marks of the German/Dutch
passport/Identity card?
Answers to these and following questions are given at the Assurer Training Events (ATE's).
The following events are planned:
- Hamburg, Thursday. May 7 [http://wiki.cacert.org/wiki/Events/20090507ATE-Hamburg]
- Düsseldorf, Tuesday. May 12 [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
- München, Saturday. May 16 [http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Tuesday. May 26 [http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
The dates for Frankfurt/M. and Berlin have not yet been fixed.
Participation in the events is free, Contributions are however appreciated.
Düsseldorf:
-----------
The ATE-Düsseldorf [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
takes place on:
- Tuesday,Mai 12 from 20:00 till 22:00
- at Gasthof Burchartz, Meerbusch [http://www.gasthof-burchartz.de/]
The Event-Team is already excited about your participation.
Registration and contact: events@cacert.org

View file

@ -0,0 +1,85 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-d-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 200;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
// $locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$locid = 520340; // Duesseldorf
$city = "Duesseldorf 12.5.2009";
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email` like 'cacerttest%'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
echo $row['pts']."..".$row['email']."...\n";
// uncomment next line to send mails ...
sendmail($row['email'], "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
?>

40
scripts/ate-f-email.txt Normal file
View file

@ -0,0 +1,40 @@
CAcert Assurer Training Event Frankfurt
:::::::::::::::::::::::::::::::::::::::
Es hat sich viel getan im letzten Jahr. Eine ganze Reihe von bisher eher "muendlich ueberlieferten" Regeln wurden in Policies gegossen. Neue Prozeduren (z.B. die Assurer Challenge) und Verpflichtungen (z.B. in dem CAcert Community Agreement) wurden beschlossen. Die Assurer Training Events wollen versuchen, die ganzen Informationen "unter's Volk" zu bringen:
- Wovor schuetzt die CCA jedes CAcert-Community-Mitglied und somit auch dich?
- Kannst du die 5 Statements der "Purpose of Assurance" aufzaehlen?
- Kannst du auf Anhieb 10 Sicherheitsmerkmale des deutschen
Personalausweises aufzaehlen?
Antworten auf diese und weitere Fragen erhaelst du bei den Assurer Training Events (ATEs).
Die kommenden Veranstaltungen finden statt:
- Muenchen, Samstag 16. Mai
[http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Dienstag 26. Mai
[http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
- Frankfurt, Donnerstag 28. Mai
[http://wiki.cacert.org/wiki/Events/20090528ATE-Frankfurt]
Der Termin fuer Berlin steht noch nicht fest.
Die Teilnahme an den Veranstaltungen ist kostenlos, Spenden werden aber gerne gesehen.
Frankfurt:
---------
Das ATE Frankfurt [http://wiki.cacert.org/wiki/Events/20090528ATE-Frankfurt] findet statt am
Donnerstag, den 28.Mai in der Zeit von 20:00 Uhr bis ca. 22:00 Uhr
im "Tower Cafe" am Alten Flugplatz in Frankfurt-Bonames.
[http://www.tower-cafe.de/]
Das Veranstaltungs-Team freut sich schon auf Eure Teilnahme.
Details zum Veranstaltungsort und Anfahrthinweise findet Ihr im Wiki, siehe der Link oben.
Unverbindliche Anmeldung und Registrierung: Rueckantwort mit 'Ich moechte teilnehmen'
Kontakt: events@cacert.org

View file

@ -0,0 +1,83 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-f-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 200;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
// $locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$locid = 606058; // Frankfurt
$city = "Frankfurt/M., 28.5.2009";
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email` like 'cacerttest%'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
// uncomment next line to send mails ...
sendmail($row['email'], "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
?>

40
scripts/ate-hh-email.txt Normal file
View file

@ -0,0 +1,40 @@
CAcert Assurer Training Event im Rahmen der GUUG Hamburg
---------------------------------------------------------
Es hat sich viel getan im letzten Jahr. Eine ganze Reihe von bisher
eher "mündlich überlieferten" Regeln wurden in Policies gegossen.
Neue Prozeduren (z.B. die Assurer Challenge) und Verpflichtungen
(z.B. in dem CAcert Community Agreement) wurden beschlossen. Die Assurer
Training Events wollen versuchen, die ganzen Informationen "unter's
Volk" zu bringen:
- Wovor schützt die CCA jedes CAcert-Community-Mitglied und somit auch dich?
- Kannst du die 5 Statements der "Purpose of Assurance" aufzählen?
- Kannst du auf Anhieb 10 Sicherheitsmerkmale des deutschen
Personalausweises aufzählen?
Antworten auf diese und weitere Fragen erhälst du bei den Assurer Training Events (ATE's).
Die kommenden Veranstaltungen finden statt:
- Hamburg, Donnerstag 7. Mai [http://wiki.cacert.org/wiki/Events/20090507ATE-Hamburg]
- Düsseldorf, Dienstag 12. Mai [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
- München, Samstag 16. Mai [http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Dienstag 26. Mai [http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
Die Termine für Frankfurt/M. und Berlin stehen noch nicht fest.
Die Teilnahme der Veranstaltungen ist kostenlos, Spenden werden aber gerne gesehen.
Hamburg:
--------
Im Rahmen der regelmässigen Veranstaltungsreihe der GUUG
(German Unix User Group) Hamburg [http://www.guug.de/lokal/hamburg/]
findet das ATE-Hamburg statt am:
- Donnerstag, 7. Mai in der Zeit von 20:00 bis 22:00
- in der Lehmanns Fachbuchhandlung, Kurze Mühren 6, Hamburg
Das Veranstaltungs-Team freut sich schon auf Eure Teilnahme.
Anmeldung und Kontakt: events@cacert.org

164
scripts/ate-hh-mail.php.txt Normal file
View file

@ -0,0 +1,164 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-hh-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 200;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
// $locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$locid = 715191; // Hamburg
$city = "Hamburg 7.5.2009";
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email` like 'cacerttest%'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
echo $row['pts']."..".$row['email']."...\n";
// uncomment next line to send mails ...
sendEmail($row['email'], "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendEmail("events@cacert.org", "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendEmail("events@cacert.org", "[CAcert.org] ATE-$city Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
function sendEmail($to, $subject, $message, $from, $replyto = "", $toname = "", $fromname = "", $errorsto = "returns@cacert.org", $extra="")
{
$lines = explode('\n', $message);
$message = "";
foreach($lines as $line)
{
$line = trim($line);
if($line == ".")
$message .= " .\n";
else
$message .= $line."\n";
}
if($fromname == "")
$fromname = $from;
$bits = explode(",", $from);
$from = addslashes($bits['0']);
$fromname = addslashes($fromname);
$smtp = fsockopen("localhost", 25);
if(!$smtp)
{
echo("Could not connect to mailserver at localhost:25\n");
return;
}
$InputBuffer = fgets($smtp, 1024);
fputs($smtp, "HELO hlin.cacert.org\r\n");
$InputBuffer = fgets($smtp, 1024);
fputs($smtp, "MAIL FROM: <returns@cacert.org>\r\n");
$InputBuffer = fgets($smtp, 1024);
$bits = explode(",", $to);
foreach($bits as $user)
fputs($smtp, "RCPT TO: <".trim($user).">\r\n");
$InputBuffer = fgets($smtp, 1024);
fputs($smtp, "DATA\r\n");
$InputBuffer = fgets($smtp, 1024);
fputs($smtp, "X-Mailer: CAcert.org Website\r\n");
fputs($smtp, "X-OriginatingIP: ".$_SERVER["REMOTE_ADDR"]."\r\n");
fputs($smtp, "Sender: $errorsto\r\n");
fputs($smtp, "Errors-To: $errorsto\r\n");
if($replyto != "")
fputs($smtp, "Reply-To: $replyto\r\n");
else
fputs($smtp, "Reply-To: $from\r\n");
fputs($smtp, "From: $from\r\n");
fputs($smtp, "To: $to\r\n");
if(preg_match("/[^a-zA-Z0-9 .-\[\]!_@]/",$subject))
{
fputs($smtp, "Subject: =?utf-8?B?".base64_encode( $subject)."?=\r\n");
// fputs($smtp, "Subject: =?utf-8?B?".base64_encode(recode("html..utf-8", $subject))."?=\r\n");
}
else
{
fputs($smtp, "Subject: $subject\r\n");
}
fputs($smtp, "Mime-Version: 1.0\r\n");
if($extra == "")
{
fputs($smtp, "Content-Type: text/plain; charset=\"utf-8\"\r\n");
// fputs($smtp, "Content-Transfer-Encoding: 8bit\r\n");
} else {
fputs($smtp, "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n");
// fputs($smtp, "Content-Transfer-Encoding: quoted-printable\r\n");
fputs($smtp, "Content-Disposition: inline\r\n");
}
fputs($smtp, "Content-Transfer-Encoding: BASE64\r\n");
fputs($smtp, "\r\n");
fputs($smtp, chunk_split(base64_encode($message))."\r\n.\r\n");
// fputs($smtp, chunk_split(base64_encode(recode("html..utf-8", $message)))."\r\n.\r\n");
// fputs($smtp, recode("html..utf-8", $message)."\r\n.\r\n");
// fputs($smtp, $message."\r\n.\r\n");
fputs($smtp, "QUIT\n");
$InputBuffer = fgets($smtp, 1024);
fclose($smtp);
}
?>

40
scripts/ate-l-email.txt Normal file
View file

@ -0,0 +1,40 @@
CAcert Assurer Training Event London
::::::::::::::::::::::::::::::::::::
Much has happened during the past year. A list of up till now
mostly "orally transmitted" rules have been cast in policies.
New procedures (e.g. the Assurer Challenge) and obligations
(e.g. in the CAcert Community Agreement) have been decided. The
Assurer Training Events try to bring all this informations to "the
people":
- To what, does the CCA protect every CAcert-Community-Member and as such also you?
- Can you recount the 5 statements of the "Purpose of Assurance"?
- Can you at least recount 10 security marks of your own passport/Identity card?
Answers to these and following questions are given at the Assurer Training Events (ATE's).
The following events are planned:
- London - Thursday, May 12 [http://wiki.cacert.org/wiki/Events/20090512London]
- Duesseldorf - Tuesday, May 12 [http://wiki.cacert.org/wiki/Events/20090514ATE-Duesseldorf]
- Muenchen - Saturday, May 16 [http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart - Tuesday, May 26 [http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
- Frankfurt - Thursday, May 28 [http://wiki.cacert.org/wiki/Events/20090528ATE-Frankfurt]
The date for Berlin have not yet been fixed.
Participation in the events is free, Contributions are however appreciated.
London:
-----------
The ATE-London [http://wiki.cacert.org/wiki/Events/20090512London]
takes place on:
- Tuesday, May 12 from 5:30pm till 7:30pm
- at the Red Lion's [http://www.fancyapint.com/pubs/pub2823.html]
Bank
8 Lombard Court, EC3V 9BJ
The Event-Team is already excited about your participation.
Registration: please reply 'I will attend: London'
Contact: events@cacert.org

View file

@ -0,0 +1,84 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-l-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 100;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
// $locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$locid = 1102495; // London
$city = "London, May 12th, 2009";
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email` like 'cacerttest%'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
// uncomment next line to send mails ...
sendmail($row['email'], "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
?>

36
scripts/ate-m-email.txt Normal file
View file

@ -0,0 +1,36 @@
CAcert Assurer Training Event Muenchen
::::::::::::::::::::::::::::::::::::::
Es hat sich viel getan im letzten Jahr. Eine ganze Reihe von bisher eher "muendlich ueberlieferten" Regeln wurden in Policies gegossen. Neue Prozeduren (z.B. die Assurer Challenge) und Verpflichtungen (z.B. in dem CAcert Community Agreement) wurden beschlossen. Die Assurer Training Events wollen versuchen, die ganzen Informationen "unter's Volk" zu bringen:
- Wovor schuetzt die CCA jedes CAcert-Community-Mitglied und somit auch dich?
- Kannst du die 5 Statements der "Purpose of Assurance" aufzaehlen?
- Kannst du auf Anhieb 10 Sicherheitsmerkmale des deutschen
Personalausweises aufzaehlen?
Antworten auf diese und weitere Fragen erhaelst du bei den Assurer Training Events (ATE's).
Die kommenden Veranstaltungen finden statt:
- Muenchen, Samstag 16. Mai
[http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Dienstag 26. Mai
[http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
- Frankfurt, Donnerstag 28. Mai
[http://wiki.cacert.org/wiki/Events/20090528ATE-Frankfurt]
Der Termin fuer Berlin steht noch nicht fest.
Die Teilnahme der Veranstaltungen ist kostenlos, Spenden werden aber gerne gesehen.
Muenchen:
---------
Das ATE-Muenchen [http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining] findet statt am:
- Samstag, 16. Mai in der Zeit von 13:00 bis ca. 16:00
- Leonrodstr. 68, bei der Fa. convey im Untergeschoss
Das Veranstaltungs-Team freut sich schon auf Eure Teilnahme.
Unverbindliche Anmeldung und Registrierung: Rueckantwort mit 'Ich moechte teilnehmen'
Kontakt: events@cacert.org

View file

@ -0,0 +1,83 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-m-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 200;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
// $locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$locid = 1260319; // Muenchen
$city = "Muenchen, 16.5.2009";
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email` like 'cacerttest%'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
// uncomment next line to send mails ...
sendmail($row['email'], "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
?>

40
scripts/ate-s-email.txt Normal file
View file

@ -0,0 +1,40 @@
CAcert Assurer Training Event Stuttgart
:::::::::::::::::::::::::::::::::::::::
Es hat sich viel getan im letzten Jahr. Eine ganze Reihe von bisher eher "muendlich ueberlieferten" Regeln wurden in Policies gegossen. Neue Prozeduren (z.B. die Assurer Challenge) und Verpflichtungen (z.B. in dem CAcert Community Agreement) wurden beschlossen. Die Assurer Training Events wollen versuchen, die ganzen Informationen "unter's Volk" zu bringen:
- Wovor schuetzt die CCA jedes CAcert-Community-Mitglied und somit auch dich?
- Kannst du die 5 Statements der "Purpose of Assurance" aufzaehlen?
- Kannst du auf Anhieb 10 Sicherheitsmerkmale des deutschen
Personalausweises aufzaehlen?
Antworten auf diese und weitere Fragen erhaelst du bei den Assurer Training Events (ATEs).
Die kommenden Veranstaltungen finden statt:
- Muenchen, Samstag 16. Mai
[http://wiki.cacert.org/wiki/Events/20090509muc_AssurerTraining]
- Stuttgart, Dienstag 26. Mai
[http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart]
- Frankfurt, Donnerstag 28. Mai
[http://wiki.cacert.org/wiki/Events/20090528ATE-Frankfurt]
Der Termin fuer Berlin steht noch nicht fest.
Die Teilnahme an den Veranstaltungen ist kostenlos, Spenden werden aber gerne gesehen.
Stuttgart:
---------
Das ATE Stuttgart [http://wiki.cacert.org/wiki/Events/20090526ATE-Stuttgart] findet statt am
Dienstag, den 26.Mai in der Zeit von 20:00 Uhr bis ca. 22:00 Uhr
in der "Troedlerburg" (Burgschenke) in Esslingen.
Das Veranstaltungs-Team freut sich schon auf Eure Teilnahme.
Details zum Veranstaltungsort und Anfahrthinweise findet Ihr im Wiki, siehe der Link oben.
Unverbindliche Anmeldung und Registrierung: Rueckantwort mit 'Ich moechte teilnehmen'
Kontakt: events@cacert.org

View file

@ -0,0 +1,83 @@
#!/usr/bin/php -q
<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
include_once("../includes/mysql.php");
$lines = "";
$fp = fopen("ate-s-email.txt", "r");
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
$lines .= wordwrap($line, 75, "\n")."\n";
}
fclose($fp);
// $locid = intval($_REQUEST['location']);
// $maxdist = intval($_REQUEST['maxdist']);
$maxdist = 200;
// location location.ID
// verified: 29.4.09 u.schroeter
// $locid = 7902857; // Paris
// $locid = 238568; // Bielefeld
// $locid = 715191; // Hamburg
// $locid = 1102495; // London
// $locid = 520340; // Duesseldorf
// $locid = 1260319; // Muenchen
// $locid = 606058; // Frankfurt
// $locid = 1775784; // Stuttgart
// $locid = 228950; // Berlin
$locid = 1775784; // Stuttgart
$city = "Stuttgart/Esslingen, 26.5.2009";
$query = "select * from `locations` where `id`='$locid'";
$loc = mysql_fetch_assoc(mysql_query($query));
$query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
(COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
COS(PI() * `locations`.`long` / 180 - PI() * $loc[long] / 180)))), -1) AS `distance`, sum(`points`) as pts, `users`.*
FROM `locations`
inner join `users` on `users`.`locid` = `locations`.`id`
inner join `alerts` on `users`.`id`=`alerts`.`memid`
inner join `notary` on `users`.`id`=`notary`.`to`
WHERE (`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1)
GROUP BY `users`.`id`
HAVING `distance` <= '$maxdist'
ORDER BY `distance` ";
echo $query;
// comment next line when starting to send mail not only to me
// $query = "select * from `users` where `email` like 'cacerttest%'";
$res = mysql_query($query);
$xrows = mysql_num_rows($res);
while($row = mysql_fetch_assoc($res))
{
// uncomment next line to send mails ...
sendmail($row['email'], "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
}
// 1x cc to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
// 1x mailing report to events.cacert.org
sendmail("events@cacert.org", "[CAcert.org] ATE-$city Report", "invitation sent to $xrows recipients.", "support@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
?>