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.
37 lines
1.2 KiB
37 lines
1.2 KiB
<?php
|
|
require_once "database.php";
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
|
|
foreach ($_POST as $k => $v) {
|
|
$$k = htmlspecialchars(stripslashes(trim($v)));
|
|
}
|
|
|
|
$signrole=$_POST['signroles'];
|
|
$signer=$_POST['signers'];
|
|
$signresult=$_POST['signresult'];
|
|
$Contentdescription=$_POST['Contentdescription'];
|
|
$updatee_at=date('Y/m/d H:i:s');
|
|
$id= $_POST['id'];
|
|
|
|
$db_query = "update maintance_contract_review set ";
|
|
$db_query .= "signresult = '$signresult',";
|
|
$db_query .= "Contentdescription = '$Contentdescription',";
|
|
$db_query .= "updatee_at ='$updatee_at'";
|
|
$db_query .= "where maintance_contract_id = '$id' and signer = '$signer'";
|
|
if ($rs = mysqli_query($link, $db_query)) {
|
|
header("Location: review-action.php");
|
|
if (mysqli_affected_rows($link) > 0) {
|
|
echo "<script type ='text/JavaScript'>";
|
|
echo "alert('簽核成功')";
|
|
echo "</script>";
|
|
//header("Location: pricereview-index.php");
|
|
} else {
|
|
echo "<script type ='text/JavaScript'>";
|
|
echo "alert('簽核失敗,請重新操作[I]')";
|
|
echo "</script>";
|
|
}
|
|
|
|
}
|
|
mysqli_close($link);
|
|
}
|
|
?>
|