print "</TD>\n"; } else { print "<TD> </TD>\n"; } } print "<TD>{$user}</TD>\n"; print "<TD><A HREF=mailto:{$email}>{$email}</A></TD>\n"; print "</TR>\n"; } print "</TABLE>\n"; print "</BODY>\n</HTML>\n"; exit; } if ($action == 'delete') { $email = $_GET['email']; $blognum = $_GET['blog']; print "<CENTER>\n"; $blog_name = GetBlogName($blognum); $query = "DELETE FROM inform WHERE email='{$email}' AND blognum='{$blognum}'"; $result = mysql_query($query); if (!$result) { echo mysql_error(); exit; } print "הכתובת: "; print "{$email}<BR>\n"; print "נמחקה מרשימת התפוצה לבלוג: "; print "<A HREF=blogs.php?blog={$blognum}>{$blog_name}</A><BR>"; print "</BODY>\n</HTML>\n"; exit; }
function InformList($blognum, $str) { global $scriptsurl; $blog_name = GetBlogName($blognum); $query = "SELECT * FROM inform WHERE blognum='{$blognum}'"; $result = mysql_query($query); if (!$result) { echo mysql_error(); exit; } // print "Inform list query: $query<BR>\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $email = $line['email']; $user = $line['name']; print "Mail to: {$email}<BR>\n"; $body = "בלוג: "; $body .= $blog_name; $body .= "\r\n{$str}\r\n"; $body .= "{$scriptsurl}/blogs.php?blog={$blognum}\r\n"; $body .= "\r\nלהסרה מרשימת התפוצה: \r\n"; $body .= "{$scriptsurl}/blogmail.php?action=delete&blog={$blogname}&email={$email}\r\n"; mail($email, "FAKT blogs system blog update", $body); } }