| 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/onesupportdemo.onesolution.hk/customer/ |
Upload File : |
<?php
require_once(__DIR__ . '/../checkuser.php');
function view($id) {
global $dbh;
$sql = "SELECT * FROM v_cm_customer_support V_CM_CUSTOMER_SUPPORT WHERE cust_id = ?";
$parameters = array($id);
if (!($sth = $dbh->prepare($sql))) {
throw new Exception("sql prepare statement failure: $sql");
}
$sth->setFetchMode(PDO::FETCH_ASSOC);
if (!$sth->execute($parameters)) {
throw new Exception("sql execute statement failure: $sql");
}
$customer = $sth->fetch(PDO::FETCH_ASSOC);
if (empty($customer)) {
throw new Exception('Customer not found!');
}
return array(
'customer' => $customer,
);
}
extract(view($_GET['id']));
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php require(__DIR__ . '/../inc/_head_meta.php'); ?>
<?php require(__DIR__ . '/../inc/_head_css.php'); ?>
<style type="text/css">
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
padding-bottom: 40px;
}
</style>
<?php require(__DIR__ . '/../inc/_head_script.php'); ?>
</head>
<body>
<?php require(__DIR__ . '/../inc/_navbar.php'); ?>
<div class="container">
<table class="table table-striped">
<caption class="text-left"><h2>Teacher Detail</h2></caption>
<tbody>
<tr>
<td>Number:</td>
<td><?=h($customer['cust_id'])?></td>
</tr>
<tr>
<td>Name:</td>
<td><?=h($customer['company_name'])?></td>
</tr>
<tr>
<td>Address:</td>
<td><address><?=h($customer['billaddress'])?></address></td>
</tr>
<tr class="hidden">
<td>Contact Person:</td>
<td><?=h($customer['contact_person'])?></td>
</tr>
<tr>
<td>Tel no.:</td>
<td><?=h($customer['tel_no'])?></td>
</tr>
<tr>
<td>E-mail:</td>
<td><?=h($customer['email'])?></td>
</tr>
<tr class="hidden">
<td>Support E-mail:</td>
<td><?=h($customer['email_support'])?></td>
</tr>
<tr>
<td>Status:</td>
<td><?=$customer['enable'] == 1 ? 'Enable' : 'Disable'?></td>
</tr>
</tbody>
</table>
<div class="control-group">
<div class="controls">
<button type="button" class="btn btn-default" onClick="history.go(-1);">Back</button>
</div>
</div>
<?php require(__DIR__ . '/../inc/_footer.php'); ?>
</div> <!-- /container -->
</body>
</html>