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.
64 lines
3.0 KiB
64 lines
3.0 KiB
<?php
|
|
require_once "database.php";
|
|
include "header.php";
|
|
$sql = "SELECT * FROM account where accounttype = 'G'"; # sql語法存在變數中
|
|
$data = mysqli_query($link, $sql); # 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$db_query = "select * from maintance_contract_review where id = '$id'";
|
|
$res = mysqli_query($link, $db_query);
|
|
|
|
|
|
foreach ($res as $data1) {
|
|
?>
|
|
<div class="container">
|
|
<form class="form-horizontal" method="post" action="review-record-update.php" enctype="multipart/form-data">
|
|
<input type="hidden" name="id" value="<?=$id;?>">
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="maintance_contract_id">價審單編號</label>
|
|
<input type="text" name="maintance_contract_id" id="maintance_contract_id" maxlength="20" value="<?=$data1['maintance_contract_id'] ?>">
|
|
</div>
|
|
</div>
|
|
<div id="review">
|
|
<div class="form-group">
|
|
<div class="col-md-6">
|
|
<label for="signrole">部門</label>
|
|
<select name="signrole" id="signrole" class="signrole" style="margin-top: 10px" value="<?=$data1['signrole'] ?>">
|
|
<option <?php if ($data1["signrole"]=="直屬主管(經理)") echo "selected"; ?> value="直屬主管(經理)">直屬主管(經理)</option>
|
|
<option <?php if ($data1["signrole"]=="直屬主管(總監)") echo "selected"; ?> value="直屬主管(總監)">直屬主管(總監)</option>
|
|
<option <?php if ($data1["signrole"]=="評估部門(管理部專人)") echo "selected"; ?> value="評估部門(管理部專人)">評估部門(管理部專人)</option>
|
|
<option <?php if ($data1["signrole"]=="總經理") echo "selected"; ?>value="總經理">總經理</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6" >
|
|
<label for="signer">簽核人員</label>
|
|
<select name="signer" id="choosesigner" class="signer" style="margin-top: 10px" value="<?=$data1['signer'] ?>" >
|
|
<?php
|
|
foreach($data as $k=>$data) :
|
|
?>
|
|
<option <?php if ($data1["signer"]==$data['accountid']) echo "selected"; ?> value="<?php echo $data['accountid']; ?>"><?php echo $data['name']; ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-12 ">
|
|
<button type="submit" name="submit" id="submit" class="btn btn-primary btn-lg" >點擊後提交合約審查</button>
|
|
</div>
|
|
<input type="hidden" name="signroles" id="signroles">
|
|
<input type="hidden" name="signers" id="signers">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<?php
|
|
}
|
|
mysqli_free_result($res);
|
|
mysqli_close($link);
|
|
include "footer.php";
|
|
?>
|