/var/www/enzatesting.onesolution.hk/master_supplier_index.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php require_once "inc/configure.php";

search_miscField($_REQUEST['act'], $_REQUEST['customer']);

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ENZA</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<?php require_once "inc/jsheader.php"?>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" class="top"><?php require"mod_webhead.php"?></td>
  </tr>
  <tr>
    <td><table width="1000" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" valign="top" class="menu_bg"><?php require"mod_menu.php"?></td>
        <td valign="top" class="padding1"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr></tr>
          <tr>
            <td class="c1_bg">
            <form action="master_supplier_index.php" method="post">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="search">
              <tr>
                <td width="120" valign="top" ><?=SEARCH_CRITERIA?>:<br />
                  <span class="stext1"><?=SUPPLIER?>:</span></td>
                <td valign="top">                
                
                <table>
                <tr>
                <td class="stext2"><?=SUPPLIER?></td>
                <td class="stext2"><input type="text" name="customer" value="<?=$_REQUEST['customer']?>" /></td>
                </tr>
                </table>
</td>
                <td align="right" valign="top"><input type="image" src="image/btn_search.jpg" width="64" height="20" />&nbsp; <a href="master_supplier_addform.php" ><img src="image/btn_new.jpg" width="52" height="20" /></a>&nbsp;<a href="<?=basename($_SERVER['PHP_SELF'])?>"><img src="image/icon_close.jpg" width="20" height="20" align="top" alt="<?=CLEAR?>" /></a></td>
              </tr>
<!--              <tr>
                <td height="25" colspan="3" valign="bottom" class="stext2">        </td>
                </tr>-->
            </table>
</form></td>
          </tr>
          <tr>
            <td valign="top" class="c2_bg"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tablelist">
                  <tr>
                        <th><?=SUPPLIER?><?=WS?><?=CODE?></th>
                        <th><?=SUPPLIER?><?=WS?><?=NAME?></th>
                        <th><?=COMPANY?><?=WS?><?=NAME?></th>
                        <!--<th><?=SUPPLIER?><?=WS?><?=GROUP?></th>-->
                        <!--<th><?=SUPPLIER?><?=WS?><?=VENDOR?></th>-->
                        <!--<th>Delete</th>-->
                    </tr>
<?php

if( !empty($_REQUEST['customer']) ){
    
$customer $_REQUEST['customer'];
    
$sql_clause .= 'WHERE (companyname_en LIKE :companyname_en OR companyname_sc LIKE :companyname_sc OR master_supplier.code LIKE :custcode) ';
    
$sql_param[':companyname_en'] = "%$customer%";
    
$sql_param[':companyname_sc'] = "%$customer%";
    
$sql_param[':custcode'] = "%$customer%";            
}

    
$sql "SELECT
master_supplier.*
FROM
master_supplier
$sql_clause
ORDER BY
code ASC"
;        
//echo $sql;    

    
$sth $dbh->prepare($sql);
    
$sth->execute$sql_param );
//echo $sth->getSQL( $sql_param ) . HTML_EOL;
                            
    
while($row $sth->fetch()) {
    
?>
                  <tr>
                    <td class="code"><a href="master_supplier_modifyform.php?refid=<?=$row['refid']?>"><?=$row['code']?></a></td>
                    <td><?=$row['suppliername_'.SYS_LANG]?></td>
                    <td><?=$row['companyname_'.SYS_LANG]?></td>
                    <!--<td><?=$row['custvendor']?></td>-->
                  </tr>
<?php ?>
                </table></td>
<!--                <td width="150" valign="top" class="product_image"><img src="image/image2.jpg" width="150" height="150" /></td>-->
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>