2 Star 2 Fork 4

Tody_Guo/php_issue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mfgwo.php 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
jiahui.guo 提交于 2021-01-25 09:35 . update for netbeans error check
<?php
include 'inc/conn.php';
extract($_POST);
extract($_GET);
unset($_POST,$_GET);
if(isset($line) && isset($workorder) && isset($partnumber)){
$db = new mysql();
$db->query("SELECT * FROM `mfg_wo` WHERE WO='${workorder}' and LINE='${line}'");
$num = $db->db_num_rows();
if($num == 0){
echo "$workorder OK";
$to = "A-TFS-ENG-EE-TE@hd.tongfangpc.com";
//$to = "jiahui.guo@hd.tongfangpc.com";
$title = "【${line}】: $partnumber - $workorder";
$Message = "发现生产线【新的工单】,请提前<font color='red'>确认配置</font><br /><br />
<b>Line:</b> $line<br />
<b>WorkOrder:</b> $workorder<br />
<b>PartNumber:</b> $partnumber<br />";
$headers = "X-Mailer:PHP\n";
$headers.= "MIME-Version: 1.0\n";
$headers.= "Content-type:text/html;charset=utf-8\n";
$headers.= "X-Priority: 1\n";
$headers.= "From: MFG_WO<MFG_WO@hd.tongfangpc.com>\r\n";
$message = "<html><head><meta charset='utf-8'></head><body>${Message}</body></html>";
$subject = "${title}";
$message=wordwrap($message, 70);
if (mail($to, $subject, $message, $headers)) {
echo " - 邮件发送成功!";
$db->query("INSERT INTO `mfg_wo` (`PARTNUM`, `WO`, `LINE`) values ('${partnumber}','${workorder}','${line}')");
} else {
mail($to, $subject, $message, $headers);
}
}
$db->close();
}
// $fp=fopen("mfg_mon.txt","a+");
// fputs($fp, "[".date("Y-m-d H:i:s")."]: $line - $partnumber - $workorder\r\n");
// fclose($fp);
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/tody_guo/php_issue.git
git@gitee.com:tody_guo/php_issue.git
tody_guo
php_issue
php_issue
master

搜索帮助