You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.5 KiB
40 lines
1.5 KiB
<?php
|
|
include "../header.php";
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
//print_r($_POST);exit;
|
|
foreach ($_POST as $k => $v) {
|
|
$$k = htmlspecialchars(stripslashes(trim($v)));
|
|
}
|
|
|
|
if ($assign_status == "F6") $pstatus = "B1";
|
|
elseif ($assign_status == "Y1") $pstatus = "X";
|
|
$tds = date("Y-m-d H:i:s");
|
|
|
|
// 更新狀態
|
|
$db_query = "update pricereview_repair_main set pstatus = '$pstatus', check_date = '$tds' ";
|
|
$db_query .= "where id = '$id'";
|
|
$result = mysqli_query($link, $db_query);
|
|
$affected = mysqli_affected_rows($link);
|
|
if ($affected > 0) {
|
|
// 更新待簽表
|
|
$sql = "update subflow set current_assigner = '00000', update_date = '$tds' where form_key = '$form_key'";
|
|
mysqli_query($link, $sql);
|
|
$sql = "update flow set flow_code = 'Z' where system_id = 'prm' and flow_id = 'prm03' and form_id = '$id' and form_key = '$form_key'";
|
|
mysqli_query($link, $sql);
|
|
}
|
|
|
|
mysqli_close($link);
|
|
if ($affected > 0) {
|
|
echo "<script type = 'text/JavaScript'>";
|
|
echo "alert('簽核完成');";
|
|
echo "location.href='pricereview_repair-index.php?function_name=pricereview_repair&".$token_link."';";
|
|
echo "</script>";
|
|
} else {
|
|
echo "<script type = 'text/JavaScript'>";
|
|
echo "alert('簽核失敗,請重新操作');";
|
|
echo "location.href='pricereview_repair-index.php?function_name=pricereview_repair&".$token_link."';";
|
|
echo "</script>";
|
|
}
|
|
}
|
|
?>
|