1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?PHP echo "hallo"; $headers .="MIME-Version: 1.0 \n"; $headers .="From: admin.gridtip@mamweb.at \n"; $headers .="X-Mailer: WebMailer \n"; $headers .="X-Priority:3 \n"; $headers .="Content-Type: text/html; charset=iso-8859-1 \n";
require("dbconnect.php");
dbconnect();
$gp=mysql_query("SELECT g_id,g_name, g_datetime_q, g_datetime_s, g_datetime_r FROM gps where timediff(g_datetime_r,now())<time('72:00:00') and timediff(g_datetime_r,now()) > 0");
if ($erg_gp=mysql_fetch_array($gp)) { echo "erg_gp"; $gp_name=$erg_gp['g_name']; $gp_datetime_q=$erg_gp['g_datetime_q']; $gp_datetime_s=$erg_gp['g_datetime_s']; $gp_datetime_r=$erg_gp['g_datetime_r']; $users=mysql_query("SELECT u_id, u_name, u_email FROM users;");
while ($erg_user=mysql_fetch_array($users)) { echo "erg_user"; $message=" <html><head><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head> <body> <p><font face='Verdana, Arial, Helvetica, sans-serif' size='2'>Hello ".$erg_user['u_name'].",<BR><BR> remember to place your tips at <a href='http://gridtip.mamweb.at'><b>GRID TIP</b></a> for the upcoming grand prix of:<BR><BR> <b>".$gp_name." [start times in CE(S)T]</b><BR><BR> <i>Qualifying:</i> <BR> <b>".$gp_datetime_q."</b><BR><BR> <i>Sprint:</i> <BR> <b>".$gp_datetime_s."</b><BR><BR> <i>Race:</i> <BR> <b>".$gp_datetime_r."</b><BR><BR> Keep in mind that your tip has to be placed at latest until the beginning of the corresponding event.<BR><BR> Cheers,<BR><BR> Your <b>GRID TIP</b> Admin<BR><BR> <font size='1'>this is a no-reply address - do not reply to this email</font></font></p>";
$status= mail($erg_user['u_email'],"GRID TIP - email reminder",$message,$headers); echo "status:".$status; } } ?>
|