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
|
<?php // check verify code session_start(); $ara = explode("|", $_SESSION['vCode']); if ($ara[0] == $_POST['verify_code_field']) { //ini_set('display_errors', 1); //error_reporting(E_ALL); require("../webadmin/configure.php"); require("../mail/class.phpmailer.php"); $to = htmlspecialchars($_POST["mailto"], ENT_QUOTES); $address = htmlspecialchars($_POST["Address"], ENT_QUOTES); $birthDate = htmlspecialchars($_POST["BirthDate"], ENT_QUOTES); $eduction = nl2br(htmlspecialchars($_POST["Eduction"], ENT_QUOTES)); $email = htmlspecialchars($_POST["Email"], ENT_QUOTES); $linkman = htmlspecialchars($_POST["Linkman"], ENT_QUOTES); $marriage = htmlspecialchars($_POST["Marriage"], ENT_QUOTES); $mobile = htmlspecialchars($_POST["Mobile"], ENT_QUOTES); $nation = htmlspecialchars($_POST["Nation"], ENT_QUOTES); $position = htmlspecialchars($_POST["Position"], ENT_QUOTES); $sex = htmlspecialchars($_POST["Sex"], ENT_QUOTES); $telephone = htmlspecialchars($_POST["Telephone"], ENT_QUOTES); $workExperience = nl2br(htmlspecialchars($_POST["WorkExperience"], ENT_QUOTES)); $zipCode = htmlspecialchars($_POST["ZipCode"], ENT_QUOTES); $height = htmlspecialchars($_POST["hight"], ENT_QUOTES); $body = <<<EOT <HTML> <HEAD> <TITLE></TITLE> <META http-equiv=Content-Type content=text/html; charset=UTF-8> </HEAD> <BODY LINK="#0000ff" VLINK="#800080" bgcolor="#FFFFFF" leftMargin="10" topMargin="20" marginheight="0" marginwidth="0"> <p style="font-family:Arial;font-size=12"> <table width=660 border=0 cellpadding=5 cellspacing=0> <tr><td height="25" align="center" bgcolor="#CCCCCC" class="txt"><strong>Career Application Information</strong></td></tr> <tr> <td align="left" bgcolor="#F5F5F5" class="txt" style="padding-left:12px"> <p><b>职位名称: </b>$position</p> <p><b>姓 名: </b>$sex $linkman</p> <p><b>出生日期: </b>$birthDate</p> <p><b>婚姻状况: </b>$marriage</p> <p><b>身 高: </b>$height cm</p> <p><b>户口地址: </b>$nation</p> <p><b>教育经历: </b>$eduction</p> <p><b>工作经历: </b>$workExperience</p> <p><b>地 址: </b>$address</p> <p><b>邮 编: </b>$zipCode</p> <p><b>电 话: </b>$telephone</p> <p><b>移动电话: </b>$mobile</p> <p><b>电子邮箱: </b>$email</p> </td> </tr> </table> </p> </BODY> </HTML> EOT; $title = "Career Application Form"; $x_mail = new PHPMailer(); $x_mail->IsSMTP(); //$x_mail->Host = "localhost"; $x_mail->Host = "192.168.11.99"; //$x_mail->SMTPAuth = true; $x_mail->CharSet = "UTF-8"; $x_mail->From = $email; $x_mail->FromName = $linkman; $x_mail->AddAddress($to); $x_mail->WordWrap = 50; $x_mail->IsHTML(true); $x_mail->Subject = $title; $x_mail->Body = $body; $x_mail->Send(); header("Location: index.php"); } else { ?> <script language="javascript"> alert("Code not valid!"); history.back(); </script> <?php } ?>
|