Newsletter for CeBIT
This commit is contained in:
parent
550cea3d47
commit
aeb69a0323
1 changed files with 44 additions and 0 deletions
44
scripts/newslettercebit.php
Executable file
44
scripts/newslettercebit.php
Executable file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/usr/bin/php -q
|
||||||
|
<? /*
|
||||||
|
Copyright (C) 2004 by Duane Groth <duane_at_CAcert_dot_org>
|
||||||
|
|
||||||
|
This file is part of CAcert.
|
||||||
|
|
||||||
|
CAcert has been released under a CAcert Source License
|
||||||
|
which can be found included with these source files or can
|
||||||
|
be downloaded from the internet from the following address:
|
||||||
|
http://www.cacert.org/src-lic.php
|
||||||
|
|
||||||
|
CAcert is distributed WITHOUT ANY WARRANTY; without even
|
||||||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the License for more details.
|
||||||
|
*/
|
||||||
|
include_once("../includes/mysql.php");
|
||||||
|
|
||||||
|
$lines = "";
|
||||||
|
$fp = fopen("email.txt", "r");
|
||||||
|
while(!feof($fp))
|
||||||
|
{
|
||||||
|
$line = trim(fgets($fp, 4096));
|
||||||
|
$lines .= wordwrap($line, 75, "\n")."\n";
|
||||||
|
}
|
||||||
|
fclose($fp);
|
||||||
|
|
||||||
|
$query = "select * from `users` where `id`='1'";
|
||||||
|
$query = "select * from `locations` where `id`='718475'";
|
||||||
|
$loc = mysql_fetch_assoc(mysql_query($query));
|
||||||
|
$query = "select `users`.* from `users`,`alerts`,`locations` where
|
||||||
|
((`lat` > ".$loc['lat']."-5 and `lat`<".$loc['lat']."+5 and `long`>".$loc['long']."-5 and `long`<".$loc['long']."+5) OR
|
||||||
|
`users`.`email` like '%.at' OR `users`.`email` like '%.fr' OR `users`.`email` like '%.de' OR
|
||||||
|
`users`.`email` like '%.nl' OR `users`.`email` like '%.be' OR `users`.`email` like '%.ch'
|
||||||
|
OR `users`.`email` like '%.es' OR `users`.`email` like '%.pt' OR `users`.`email` like '%.ee')and
|
||||||
|
(`alerts`.`general`=1 OR `alerts`.`country`=1 OR `alerts`.`regional`=1 OR `alerts`.`radius`=1) AND
|
||||||
|
`locations`.`id` = `users`.`locid` and `users`.`id`=`alerts`.`memid`";
|
||||||
|
// $query = "select * from `users` where `email`='eg@linuxkun.de'";
|
||||||
|
$res = mysql_query($query);
|
||||||
|
while($row = mysql_fetch_assoc($res))
|
||||||
|
{
|
||||||
|
sendmail($row['email'], "[CAcert.org] CeBIT 2006", $lines, "support@cacert.org", "", "", "CAcert Support", "returns@cacert.org", 1);
|
||||||
|
echo $row['email']."\n";
|
||||||
|
}
|
||||||
|
?>
|
Loading…
Reference in a new issue