| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/innoutstorage/webadmin/ |
Upload File : |
<?php
require_once('check_login.php');
$customer_info = get_customer((int)$_GET["id"]);
$customer_type_info = get_master_type_code("CUSTOMER_TYPE");
$sql99 = "SELECT * FROM sys_cms_login WHERE cmsloginid=?";
$parameters99 = array((int)$customer_info{'lastupby'});
$row99 = bind_pdo($sql99, $parameters99, "selectone");
?>
<!DOCTYPE html>
<html>
<head>
<?php require_once('html_head.php'); ?>
<script type="text/javascript">
function _customer_type(customer_type){
if(customer_type == "PERSONAL"){
$("#companyname").hide();
}else{
$("#companyname").show();
}
}
$(function () {
_customer_type('<?=$customer_info["typeid"]?>');
if($("select[name='customer_type']").val() == "BUSINESS"){
_customer_type('BUSINESS');
}
})
</script>
<style>
table input[type='text'], table textarea {
width: 95%;
}
.need_delivery_service {
display: none;
}
</style>
</head>
<body>
<form action="customer_modify.php" method="post" name="customer_modify" enctype="multipart/form-data">
<input type="hidden" name="customer_id" value="<?=(int)$_GET["id"]?>" />
<input type="hidden" name="customer_type" value="<?=$customer_info["typeid"];?>" />
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="70" align="right" valign="middle" class="icontxt">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50" align="center" style="font-size: 12px;">
<input type="image" alt="submit" src="images/iconSave.png" width="32" height="32" border="0"><br>
儲存 </td>
<td width="50" align="center">
<a href="customer_index.php?<?php if (isset($_SESSION["index_url_parameter"])) echo $_SESSION["index_url_parameter"]; ?>&msg=取消"><img src="images/iconCancel.png" alt="Cancel" width="32" height="32" border="0"><br>
返回 </a></td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<span style="float:left;" class="pagetitletxt"> <b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>
修改 客戶
</b></span><span style="float:right;" class="msg">最近更新: <?= $row99{'cmsusername'} . ' ' . $customer_info{'lastupdate'}; ?></span>
</td>
</tr>
<tr>
<td align="left" valign="middle"><!-- Content -->
<table style="width: 100%; margin-left: 10px;">
<tr>
<td>
<p>客戶編號: </p>
</td>
<td>
<?= ($customer_info["code"]); ?>
</td>
</tr>
<tr>
<td style="width: 150px;">
<p class="required">客戶類型: </p>
</td>
<td style="min-width: 400px;">
<select name="customer_type" onchange="_customer_type($(this).val());">
<?php
foreach($customer_type_info as $customer_type){
if($customer_info["typeid"] == $customer_type["code"])
$selected = "selected";
else
$selected = "";
echo "<option value='".$customer_type["code"]."' $selected>".$customer_type["name_tc"]."</option>";
}
?>
</select>
<br>
<span class="msg">個人: 以身分證作認證 商業: 以商業登記證作認證 </span>
</td>
</tr>
<tr>
<td>
<p class="required">證明文件號碼: </p>
</td>
<td>
<?php
if ($customer_info["typeid"] == "BUSINESS")
echo '<input type="text" name="identity_id" value="'.rsa_crypt($customer_info["hkbr"], 2).'" '.(is_admin()?"":"readonly").' style="width: 150px; '.(is_admin()?"":"cursor: not-allowed; background: #cccccc;").'"/>';
if ($customer_info["typeid"] == "PERSONAL")
echo '<input type="text" name="identity_id" value="'.rsa_crypt($customer_info["hkid"], 2).'" '.(is_admin()?"":"readonly").' style="width: 150px; '.(is_admin()?"":"cursor: not-allowed; background: #cccccc;").'"/>';
?>
</td>
</tr>
<tr>
<td>
<p class="required">頭銜: </p>
</td>
<td>
<select name="title">
<option value="Mr" <?php if($customer_info["title"] == "Mr") echo "selected"; ?>>先生</option>
<option value="Mrs" <?php if($customer_info["title"] == "Mrs") echo "selected"; ?>>女士</option>
<option value="Ms" <?php if($customer_info["title"] == "Ms") echo "selected"; ?>>小姐</option>
</select>
</td>
</tr>
<tr>
<td>
<p class="required">姓氏: </p>
</td>
<td>
<input type="text" name="lastname" value="<?= rsa_crypt($customer_info["lastname"], 2); ?>" style="width: 300px;"/>
</td>
</tr>
<tr>
<td>
<p class="required">名字: </p>
</td>
<td>
<input type="text" name="firstname" value="<?= rsa_crypt($customer_info["firstname"], 2); ?>" style="width: 300px;"/>
</td>
</tr>
<tr id="companyname" style="display: none;">
<td>
<p class="required">公司名稱: </p>
</td>
<td>
<input type="text" name="companyname" value="<?= $customer_info["companyname"]; ?>" <?=is_admin()?"":"readonly"?> style="width: 600px; <?=is_admin()?"":"cursor: not-allowed; background: #cccccc;"?>"/>
</td>
</tr>
<tr>
<td>
<p class="">聯絡電郵: </p>
</td>
<td>
<input type="text" name="email" value="<?= rsa_crypt($customer_info["email"], 2); ?>" style="width: 300px;"/>
</td>
</tr>
<tr>
<td>
<p class="required">聯絡電話: </p>
</td>
<td>
<input type="text" name="tel" value="<?= rsa_crypt($customer_info["tel"], 2); ?>" style="width: 300px;"/>
</td>
</tr>
<tr>
<td>
<p class="required">聯絡地址: </p>
</td>
<td>
<input type="text" name="address" value="<?= rsa_crypt($customer_info["address"], 2); ?>" style="width: 600px;"/>
</td>
</tr>
<tr>
<td>
<p>註冊日期: </p>
</td>
<td>
<?= $customer_info["createdate"]; ?>
</td>
</tr>
<tr>
<td></td>
<td>
<p class="red">* 必須填寫</p>
</td>
</tr>
</table>
<br><br>
</td>
</tr>
</table>
</form>
</body>
</html>