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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
#!/usr/bin/php -q <? // ¸ÞÀÏ º¸³»±â (ÆÄÀÏ ¿©·¯°³ ÷ºÎ °¡´É) // type : text=0, html=1, text+html=2 function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc="", $bcc="") { //global $config; //global $g4;
// ¸ÞÀÏ¹ß¼Û »ç¿ëÀ» ÇÏÁö ¾Ê´Â´Ù¸é //if (!$config[cf_email_use]) return;
$fname = "=?euc-kr?B?" . base64_encode($fname) . "?="; $subject = "=?euc-kr?B?" . base64_encode($subject) . "?="; //$g4[charset] = ($g4[charset] != "") ? "charset=$g4[charset]" : "";
$header = "Return-Path: <$fmail>\n"; $header .= "From: $fname <$fmail>\n"; $header .= "Reply-To: <$fmail>\n"; if ($cc) $header .= "Cc: $cc\n"; if ($bcc) $header .= "Bcc: $bcc\n"; $header .= "MIME-Version: 1.0\n"; //$header .= "X-Mailer: SIR Mailer 0.91 (sir.co.kr) : $_SERVER[SERVER_ADDR] : $_SERVER[REMOTE_ADDR] : $g4[url] : $_SERVER[PHP_SELF] : $_SERVER[HTTP_REFERER] \n"; // UTF-8 °ü·Ã ¼öÁ¤ $header .= "X-Mailer: SIR Mailer 0.92 (sir.co.kr) : $_SERVER[SERVER_ADDR] : $_SERVER[REMOTE_ADDR] : mijinsoft.co.kr : $_SERVER[PHP_SELF] : $_SERVER[HTTP_REFERER] \n";
if ($file != "") { $boundary = uniqid("http://mijinsoft.co.kr/");
$header .= "Content-type: MULTIPART/MIXED; BOUNDARY=\"$boundary\"\n\n"; $header .= "--$boundary\n"; }
if ($type) { $header .= "Content-Type: TEXT/HTML; charset=euc-kr\n"; if ($type == 2) $content = nl2br($content); } else { $header .= "Content-Type: TEXT/PLAIN; charset=euc-kr\n"; $content = stripslashes($content); } $header .= "Content-Transfer-Encoding: BASE64\n\n"; $header .= chunk_split(base64_encode($content)) . "\n";
if ($file != "") { foreach ($file as $f) { $header .= "\n--$boundary\n"; $header .= "Content-Type: APPLICATION/OCTET-STREAM; name=\"$f[name]\"\n"; $header .= "Content-Transfer-Encoding: BASE64\n"; $header .= "Content-Disposition: inline; filename=\"$f[name]\"\n";
$header .= "\n"; $header .= chunk_split(base64_encode($f[data])); $header .= "\n"; } $header .= "--$boundary--\n"; } @mail($to, $subject, "", $header); }
include("/home/mjc1/public_html/manage/category/common.php");
/******************************** ¹Ì¹ß¼Û ¼¼±Ý°è»ê¼¸¸ ¹ß¼Û(½ÂÀο©ºÎ:admission = 1 ¼ö½Å¿©ºÎ:isreceive = 0 Á¦¿Ü) ************************************/ $query = " SELECT p.idx, m.companyName mCompanyName, m.companyNum mCompanyNum, m.send_mail, p.companyName pCompanyName, p.receive_mail, replace(p.companynum,'-','') companynum, p.year, p.month, p.day, m.companytel, m.companyAddr mCompanyAddr, m.opt_1 mopt_1, m.opt_2 mopt_2, p.companyNum pcompanyNum, p.companyAddr pcompanyAddr, p.opt_1 popt_1, p.opt_2 popt_2, p.item_1 pitem_1, p.offerPrice pofferPrice, p.billPrice pbillPrice, p.totalPrice ptotalPrice "; $query .= " FROM bill_mijin m "; $query .= " INNER JOIN bill_publish p ON m.companyNum = p.from_companynum "; //$query .= " WHERE p.receive_mail <> '' AND p.ismailsend = 0 "; $query .= " WHERE p.idx = 18251 ";
$result = mysql_query($query);
if(mysql_num_rows($result) > 0){ While($row = mysql_fetch_array($result)) { $encode_num = "@$@QTRSFQ3YHQAWR-EHEQT3Q46TEGEWFRE34--634YWGHWHWRW2222-3SGAZEHWE2---".$row[companynum]; $encode_num = base64_encode($encode_num);
$encode_idx = "@$@QTRSFQ3YHQAWR-EHEQT3Q46TEGEWFRE34--634YWGHWHWRW2222-3SGAZEHWE2---".$row[idx]; $encode_idx = base64_encode($encode_idx);
$sOfferPrice = number_format($row[pofferPrice]); //°ø±Þ°¡¾× $sBillPrice = number_format($row[pbillPrice]); //ºÎ°¡¼¼ $sTotalPrice = number_format($row[ptotalPrice]); //ÅäÅ»±Ý¾×
// º¸³»´Â ¸ÞÀÏ $send_mail = "mj@mijinsoft.co.kr"; if($row[send_mail] != "") $send_mail = $row[send_mail];
// º»¹® $mail_content = $row[mCompanyName]."(À¸)·ÎºÎÅÍ ¼¼±Ý°è»ê¼°¡ µµÂøÇÏ¿´½À´Ï´Ù.<br> "; $mail_content = " <style> a:link { font-family:'verdana','µ¸¿ò'; font-size:9pt; text-decoration:none; color: #666666 } a:active { font-family:'verdana','µ¸¿ò'; font-size:9pt; text-decoration:none; color: #666666 }
a:hover { font-family:'verdana','µ¸¿ò'; font-size:9pt; text-decoration:none; color: #868686 } a:visited { font-family:'verdana','µ¸¿ò'; font-size:9pt; text-decoration:none; color: #868686 } table { font-color;#000000;font-size:9pt } </style>
<TABLE align='center' width='668' height='1000' background='http://www.mijinsoft.co.kr/img/etaxbg.gif'> <TR> <TD>
<TABLE><TR><TD height='120'></TD></TR></TABLE>
<TABLE width='500' border='0' align='center'> <TR> <TD height='40'><b>$row[mCompanyName]</b>¿¡¼ ±ÍÇϲ² ¹ß¼ÛÇÑ ¼¼±Ý°è»ê¼°¡ µµÂø ÇÏ¿´½À´Ï´Ù.</TD> </TR> <TR> <TD height='40'><b>[¼¼±Ý°è»ê¼ ¹Ù·Î°¡±â]</b> ¹öưÀ» Ŭ¸¯ÇÏ½Ã¸é ¼¼±Ý°è»ê¼¸¦ ¼¼¹ý¿¡ Á¤ÇÑ ¼¼±Ý°è»ê¼ ¾ç½ÄÇüÅ·ΠÀμâÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.</TD> </TR> <TR> <TD height='40'>¼¼±Ý°è»ê¼ ³»¿ë¿¡ ¹®Á¦°¡ ÀÖÀ» °æ¿ì¿¡´Â [¹Ý¼Û]¹öưÀ» ´©¸£½Å ÈÄ ¹ßÇàÀÚ(°Å·¡Ã³)¿¡°Ô ¿¬¶ôÇϼ¼¿ä.</TD> </TR> <TR> <TD height='40'><B><FONT COLOR='#0066FF'>ÀüÀÚ°è»ê¼ »ç¿ë ½Åû¹®ÀÇ : 1566-8680 (¹ÌÁø¼ÒÇÁÆ®)</FONT></B></TD> </TR> </TABLE>
<TABLE width='500' align='center'> <TR> <TD align='right' height='50'><a href='http://www.mijinsoft.co.kr/html/community_07_02.php?KeyCode=$encode_num' target='_blank'><IMG SRC='http://www.mijinsoft.co.kr/img/etaxprintgo.gif' BORDER='0'></a></TD> </TR> </TABLE>
<TABLE width='500' align='center'> <TR> <TD><IMG SRC='http://www.mijinsoft.co.kr/img/gonginfo.gif' BORDER='0'></TD> </TR> </TABLE>
<table width='500' align='center' cellpadding='5' cellspacing='1' border='0' style='color:#666666;background-color:#B1CBD6' class='txt03'> <tr bgcolor='#FFFFFF'> <td width='150' bgcolor='#FFFFCC'> <b>»óÈ£</b></td> <td width='350' align='center'>$row[mCompanyName]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>»ç¾÷ÀÚ µî·Ï¹øÈ£</b></td> <td align='center'>$row[mCompanyNum]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>»ç¾÷Àå ÁÖ¼Ò</b></td> <td align='center'>$row[mCompanyAddr]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>¾÷ÅÂ</b></td> <td align='center'>$row[mopt_1]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>¾÷Á¾</b></td> <td align='center'>$row[mopt_2]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>´ã´çÀÚ ÀüȹøÈ£</b></td> <td align='center'>$row[companytel]</td> </tr> </table>
<br>
<TABLE width='500' align='center'> <TR> <TD><IMG SRC='http://www.mijinsoft.co.kr/img/batinfo.gif' BORDER='0'></TD> </TR> </TABLE>
<table width='500' align='center' cellpadding='5' cellspacing='1' border='0' style='color:#666666;background-color:#B1CBD6' class='txt03'> <tr bgcolor='#FFFFFF'> <td width='150' bgcolor='#FFFFCC'> <b>»óÈ£</b></td> <td width='350' align='center'>$row[pCompanyName]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>»ç¾÷ÀÚ µî·Ï¹øÈ£</b></td> <td align='center'>$row[pcompanyNum]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>»ç¾÷Àå ÁÖ¼Ò</b></td> <td align='center'>$row[pcompanyAddr]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>¾÷ÅÂ</b></td> <td align='center'>$row[popt_1]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>¾÷Á¾</b></td> <td align='center'>$row[popt_2]</td> </tr> </table>
<br>
<TABLE width='500' align='center'> <TR> <TD><IMG SRC='http://www.mijinsoft.co.kr/img/saninfo.gif' BORDER='0'></TD> </TR> </TABLE>
<table width='500' align='center' cellpadding='5' cellspacing='1' border='0' style='color:#666666;background-color:#B1CBD6' class='txt03'> <tr bgcolor='#FFFFFF'> <td width='150' bgcolor='#FFFFCC'> <b>¹ßÇàÀÏÀÚ</b></td> <td width='350' align='center'>$row[year]-$row[month]-$row[day]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>ǰ¸ñ</b></td> <td align='center'>$row[pitem_1]</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>ÃÑ °ø±Þ°¡¾×</b></td> <td align='center'>$sOfferPrice ¿ø</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>ÃÑ ¼¼¾×</b></td> <td align='center'>$sBillPrice ¿ø</td> </tr> <tr bgcolor='#FFFFFF'> <td bgcolor='#FFFFCC'> <b>ÇÕ°è±Ý¾×</b></td> <td align='center'>$sTotalPrice ¿ø</td> </tr> </table>
<TABLE width='500' align='center'> <TR> <TD align='center' height='70'><a href='http://www.mijinsoft.co.kr/html/community_07_02.php?KeyCode=$encode_num' target='_blank'><IMG SRC='http://www.mijinsoft.co.kr/img/etaxprintgo.gif' BORDER='0'></a></TD> </TR> </TABLE>
</TD> </TR> </TABLE> "; mailer($row[mCompanyName], $send_mail, $row[receive_mail], $row[mCompanyName]."(À¸)·ÎºÎÅÍ ¼¼±Ý°è»ê¼°¡ µµÂøÇÏ¿´½À´Ï´Ù.", $mail_content,1); // ¹ß¼Û¿©ºÎ ¾÷µ¥ÀÌÆ® $query_update = " UPDATE bill_publish SET ismailsend = 1 WHERE idx = $row[idx]"; // °ø±Þ¹Þ´ÂÀÚ mysql_query($query_update); //Å×½ºÆ® ÈÄ ÇØÁ¦ÇÒ°Í echo $row[mCompanyName]; usleep(3000000); flush(); } } ?>
|