/var/www/enzatesting.onesolution.hk/inv_material_addform.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?php require_once "inc/configure.php";

$row null;

 
?><!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><?=$system_var['COMPANY_NAME']?></title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<?php require_once "inc/jsheader.php"?>
</head>
<body>

<form action="inv_material_add.php" id="myform" method="post">
<input type="hidden" name="action" value="material_addform" />
<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="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td 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="c3_bg"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="20" class="separator"><input type="image" src="image/icon_save.jpg" width="20" height="20" class="pressnhide2" /></td>
                <td width="20" class="separator"><a href="<?=basename($_SERVER['REQUEST_URI'])?>"><img src="image/icon_undo.jpg" width="20" height="20" /></a></td>
                <!--<td width="20" class="separator"><img src="image/icon_redo.jpg" width="20" height="20" /></td>
                <td width="20" class="separator"><img src="image/icon_delete.jpg" width="20" height="20" /></td>-->
                <td class="separator stext1"><?=MATERIAL?> - <span><?=ADD?></span></td>
                <td class="separator etext1"><?=$row['itemno']?> - <span><?=$row['name']?></span></td>
                <!--<td width="200" align="right" class="separator etext2">Last Modified: <?=$row['lastupdate']?></td>-->
                <td width="80" align="right" class="separator etext2"><a href="inv_material_index.php?act=resume" onclick="return ConfirmSave('myform')" class="closebtn"><?=CLOSE?></a>
                <input type="hidden" name="godest" id="godest" />
                <input type="hidden" name="formdest" value="inv_material_index.php?act=resume" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td valign="top" class="c2_bg">
            <!--main form-->
            

    <div id="tabs" class="ui-tabs">
    <ul>
        <li><a href="#tabs-2"><?=GENERAL?></a></li>
        <li><a href="#tabs-3"><?=SEGMENTS?></a></li>
        <!--<li><a href="#tabs-4"><?=MATERIAL?><?=WS?><?=BOM?></a></li>-->
        <!--
<li><a href="#tabs-5"><?=SUPPLIER?></a></li>
-->
    </ul>
    <div id="scontent">
        <div id="tabs-2">
        <p><table width="100%" border="0">
    <tr>
        <td width="60px"><?=ITEMNO?></td>
        <td><?=$row['itemno']?><input type="hidden" name="itemno_gen" value="<?=$row['itemno']?>" id="itemno_gen" readonly /></td>
        <td width="60px"><?=NAME?></td>
        <td><input type="text" name="name" value="<?=$row['name']?>" id="name" size="40" /></td>
    </tr>
    <tr>        
        <td>&nbsp;</td>
        <td>&nbsp;</td>    
        <td><?=NAMESC?></td>
        <td><input type="text" name="cname" value="<?=$row['cname']?>" id="cname" size="40" /></td>
    </tr>
    <tr>        
        <td><?=ITEMGP?></td>
        <td><select name="itemgp"><?=master_option("ITEMGP"$row['itemgp'], true)?></select></td>    
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
</table></p>
    </div>
    
    
    <div id="tabs-3">
        <p><table width="100%" border="0">
    <tr>        
        <td width="120px"><?=MATTYPE?></td>
        <td><select name="mattype"><?=master_option("MATTYPE"$row['mattype'], true)?></select></td>    
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><?=MATCOLOR?></td>
        <td><select name="matcolor"><?=master_option("MATCOLOR"$row['matcolor'], true)?></select></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
<!--    <tr>
        <td>Finishing</td>
        <td><select name="finishing"><?=master_option("FINISHING"$row['finishing'], true)?></select></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>-->
    <tr><td><?=VERIFIED?></td>
        <td><select name="verified"><?=master_option("VERIFIED"$row['verified'], true)?></select></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
</table><!--<input type="submit" name="submit" value="Save"/>&nbsp;--></p>
    </div>
<!--<div id="tabs-4">
        <p>Material BOM</p>
    </div>-->    
    <!--
<div id="tabs-5">
        <p><table width="100%" border="0">
    <tr>
        <td width="150">Maintenance</td>
        <td width="150">&nbsp;</td>    
        <td width="150">&nbsp;</td>
        <td width="150">&nbsp;</td>
    </tr>
    <tr>
        <td>Supplier Code:</td>
        <td><select mmTranslatedValueHiliteColor="HILITECOLOR=%22No Color%22" name="owner"><?=supplier_option($row['owner'])?></select></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>        
        <td>Comment:</td>
        <td colspan="3"><input type="text" name="supplier_comment" value="" id="supplier_comment" size="50" /></td>    
    </tr>
    <tr>        
        <td>&nbsp;</td>
        <td><input type="checkbox" name="default_supplier"  />Default</td>    
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td><button onclick='return false;' class="uibutton">+ Add</button></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td colspan="4">
        <table border="1">
        <tr>
            <th>Supplier Code</th>
            <th>Supplier Name</th>
            <th>Comment</th>
            <th>Default</th>
            <th>Delete</th>
        </tr>    
<?php
    $sql 
"SELECT DISTINCT
            supplier.`code`,
            supplier.companyname,
            supplier.suppliername
            from supplier
            ORDER BY code ASC"
;
            
    if (
defined("MSSQL")) {
        
$sql "SELECT DISTINCT
            supplier.code,
            supplier.companyname,
            supplier.suppliername
            from supplier
            ORDER BY code ASC"
;
    }
    
$sth2 $dbh->prepare($sql);
    
$sth2->execute();
    while(
$row1 $sth2->fetch()) { ?>
        <tr>
            <td><?=$row1['code']?></td>
            <td><?=$row1['suppliername']?></td>
            <td>Comment</td>
            <td>N</td>
            <td><button onclick='return false;' class="uibutton">X Delete</button></td>
        </tr>
<?php ?>
        </table>
        </td>
    </tr>

</table></p>
    </div>
-->
    </div><!--end scontent-->
<input type="hidden" name="refid" value="<?=$refid?>" /><!--&nbsp;<input type="button" name="Close" value="Close" onclick="fbox_close(); location.href='stone_index.php?msg=Cancel'" style="float:right"/>-->
</div>

            <!-- end of mainform-->
            </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>