1 | 2 | simandl | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | | | <html> |
3 | | | <head> |
4 | | | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> |
5 | | | <style type="text/css" media="screen"> @import "style.css"; </style> |
6 | | | <title>db.jablonka.cz mail</title> |
7 | | | </head> |
8 | | | <link rel="stylesheet" type="text/css" href="style.css"> |
9 | | | </head> |
10 | | | <body topmargin=0 leftmargin=10> |
11 | | | <? |
12 | | | include("header.htm"); |
13 | | | include ("fce.php"); |
14 | | | require('grab_globals.lib.php'); |
15 | | | $spojeni = MySQL_Connect($db_host, $db_user, $db_pass); |
16 | | | MySQL_Select_DB($db_name); |
17 | | | |
18 | | | $test=MySQL_Query("SELECT MAX(id) FROM cleni"); |
19 | | | $test=MySQL_Fetch_Array($test); |
20 | | | $maxid=$test["MAX(id)"]; |
21 | | | |
22 | | | $to=id_to_email(0); |
23 | | | $from=$to; |
24 | | | $bcc=$to; |
25 | | | for ($i=0;$i<=$maxid;$i++) { |
26 | | | if(@$_POST["to$i"]) $bcc.=",".$_POST["to$i"]; |
27 | | | } |
28 | | | echo ' |
29 | | | |
30 | | | <b>Odeslání mailu:</b><br> |
31 | | | |
32 | | | <form action="mail.php?action=sendmail" method=POST> |
33 | | | <table> |
34 | | | <tr> |
35 | | | <td class=text>From:</td><td><input class=field name="from" type="text" value="'.@$from.'" size=25></td> |
36 | | | <td class=text>To:</td><td><input class=field name="to" type="text" value="'.@$to.'" size=45></td> |
37 | | | </tr> |
38 | | | <tr> |
39 | | | <td class=text>Bcc:</td><td colspan=3><input class=field name="bcc" type="text" value="'.@$bcc.'" size=65></td> |
40 | | | </tr> |
41 | | | <tr> |
42 | | | <td class=text>Subj:</td><td colspan=3><input class=field name="subj" type="text" value="'.@$subj.'" size=55></td> |
43 | | | </tr> |
44 | | | <tr><td colspan=4 class=text>text<br> |
45 | | | <textarea class=fieldthin name="text" rows=10 cols=65>'.@$text.'</textarea> |
46 | | | </td> |
47 | | | </tr> |
48 | | | <tr> |
49 | | | <td class="text" colspan=3> |
50 | | | '; |
51 | | | $from="info@jablonka.cz"; |
52 | | | $subject = "jablonka.cz"; |
53 | | | $text = "Zdravím, |
54 | | | dík |
55 | | | Síma |
56 | | | \n"; |
57 | | | $text = str_replace(" ","%20",$text); |
58 | | | $text = str_replace("\n","%0d",$text); |
59 | | | echo ' |
60 | | | <a href="mailto:'.$to.'?subject='.$subject.'&bcc='.$bcc.'&body='.$text.'">Pošli pomocí externího programu</a> |
61 | | | </td> |
62 | | | <td> |
63 | | | <input class=field type="submit" name="OK" value=" pošli mail "> |
64 | | | </td> |
65 | | | |
66 | | | </tr> |
67 | | | </table> |
68 | | | </form> |
69 | | | '; |
70 | | | MySQL_Close($spojeni); |
71 | | | ?> |
72 | | | </body> |
73 | | | </html> |