diff --git a/wms/account-index-submit.php b/wms/account-index-submit.php new file mode 100644 index 00000000..a00176f3 --- /dev/null +++ b/wms/account-index-submit.php @@ -0,0 +1,85 @@ +sendx($subject, $em_body, $sendlist, "永佳捷科技", "", $file); + echo json_encode([1, "信件發送成功"]); +} diff --git a/wms/account-index.php b/wms/account-index.php index ed0e9e1d..df0c2d3f 100644 --- a/wms/account-index.php +++ b/wms/account-index.php @@ -17,23 +17,23 @@ $sql_cmd = sql_myself($user_id); if ($user_department_id == "501" || $user_id == "M0105") $sql_cmd = ""; $sql = "SELECT * FROM account $sql_cmd ORDER BY id"; // 用mysqli_query方法執行(sql語法)將結果存在變數中 -$data = mysqli_query($link,$sql); +$data = mysqli_query($link, $sql); ?> - -
- - - -
+ ++ + + +
Please fill up the required field!"; } else { header("Location:account-index.php"); @@ -42,126 +42,151 @@ if($data): ?> - + } + + There is no record!"; endif; @@ -170,4 +195,4 @@ mysqli_close($link); include "footer.php"; -?> +?> \ No newline at end of file diff --git a/wms/class/Cmail.php b/wms/class/Cmail.php index 51ed924b..f2edd6a6 100644 --- a/wms/class/Cmail.php +++ b/wms/class/Cmail.php @@ -1,4 +1,5 @@ charset = "UTF-8"; $this->host = "mail.masada.com.tw"; @@ -23,8 +24,8 @@ class Cmail $this->smtp_user = "notice"; // 這裡填寫SMTP登入帳號, 例如 your.gmail.name@gmail.com 則填寫your.gmail.name $this->smtp_pwd = "90493119"; // 這裡填寫SMTP登入密碼 } - - function sendx($subject="", $em_body="", $sendlist=array(), $from="永佳捷科技", $bcc="", $files=array()) + + function sendx($subject = "", $em_body = "", $sendlist = array(), $from = "永佳捷科技", $bcc = "", $files = array()) { if (!$sendlist) return; $em_body = nl2br($em_body); @@ -52,11 +53,15 @@ class Cmail //$mail->addCC("personC@gmail.com", "person C"); //$mail->addBCC("personD@gmail.com", "person D"); //$mail->addAttachment("image1.jpg", "picture.jpg"); //設定附件, 對方會看到附件名稱為 picture.jpg + foreach ($files as $v) { + list($file, $file_name) = $v; + $mail->addAttachment($file, $file_name); + } //print_r($mail);exit; - if (!$mail->Send()){ + if (!$mail->Send()) { // echo "Mailer error: " . $mail->ErrorInfo; } else { //echo "Email sent"; } } -} \ No newline at end of file +} diff --git a/wms/public/file/永佳捷雲端空間使用設定方式.pdf b/wms/public/file/永佳捷雲端空間使用設定方式.pdf new file mode 100644 index 00000000..91a4e8e5 Binary files /dev/null and b/wms/public/file/永佳捷雲端空間使用設定方式.pdf differ