/var/www/hkosl.com/oneMotorChunHing_delete20240201/html/customerpopup_20100617.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?
require("inc/configure.php");
require(
"inc/global.php");
require(
"inc/checklogin.php");
if (
$logged_in == 0) {
    
//echo 'Not logged in. <a href="login.php">Login</a>';
    
header('Window-target: _parent');
    
header('Location: login.php');
    exit();
}
?>
<?
$formname    
$_GET['formname'];
$fieldname    $_GET['fieldname'];
?>
<html>
<head>
<title><?=$systitle?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="main.css" type="text/css">

<SCRIPT LANGUAGE="javascript">
function data_popin(a)

    window.opener.<?=$formname?>.<?=$fieldname?>.value = a;
    window.opener.<?=$formname?>.submit();
    self.close() 

</SCRIPT>
</head>
<body bgcolor="#FFFFFF" leftmargin="10" topmargin="10" marginwidth="0" marginheight="0">
<center>
<p class="pageheader">Customer Search</p>
<table width="500" border='0' cellspacing='1' cellpadding='1' bgcolor='#111111'>
<tr><td class="content" width='80'  align="center" valign="top" bgcolor='#ffffff'>Customer no</td>
    <td class="content" width='150' align="center" valign="top" bgcolor='#ffffff'>Customer name</td>
    <td class="content" width='70' align="center" valign="top" bgcolor='#ffffff'>Phone no</td></tr>
<?
$sql 
"SELECT
a.custid,
a.custno,
a.catid,
a.custnameeng,
a.custnamechi,
a.telno,
a.faxno,
a.email,
a.billaddress,
a.shipaddress,
a.remarks,
a.`status`
from CM_CUSTOMER a
where a.status = 1
order by custnameeng
"
;
$result mysql_query($sql);
while (
$row mysql_fetch_array($result,MYSQL_ASSOC))

    
?>
    <tr><td class='content' bgcolor='#ffffff'><a href='#' onclick='data_popin("<?=$row{'custid'}?>")'>
    <b><i><?=$row{'prefix'}?><?=$row{'custno'}?></i></b></a></td>
    <?
    
echo "<td class='content' bgcolor='#ffffff'>".$row{'custnameeng'}."</td>";
    echo 
"<td class='content' bgcolor='#ffffff'>".$row{'telno'}."</td></tr>";
}
?>
<tr><td colspan="5" class="content" align="center" bgcolor='#ffffff'>--End--</td></tr>
</table>
</center>
</body>
</html>