This repository was archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadd.php
More file actions
43 lines (43 loc) · 1.37 KB
/
add.php
File metadata and controls
43 lines (43 loc) · 1.37 KB
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
<?php
include './ui.inc'; // Common View Helper functions
include './add_c.inc'; // Controller
head();
?>
<div id="tItems" class="ta">
<table cellspacing="0" cellpadding="3" width="100%">
<?php foreach($items as $i=>$elem) {
$s = $i%2;
echo <<< EOB
<tr id="{$elem['id']}" class="it$s">
<td>{$elem['id']}</td>
<td>{$elem['sdesc']}</td>
<td>{$elem['cat']}</td>
<td align="right">\${$elem['fprice']}</td>
</tr>
EOB;
}
?>
</table>
</div><br />
<form name="fItem" action="javascript:postForm('add.php','fItem')">
<input type="hidden" name="formName" value="fItem">
<input type="hidden" name="id" id="f_id" value="">
<input type="text" class="f" id="f_sdesc" name="sdesc" size="39"
maxlength="128" value="Short Description">
<select class="f" name="cat" id="f_cat" size="1">
<option selected>Category</option>
<?php foreach($categories as $cat) echo <<< EOB
<option value="{$cat}">{$cat}</option>
EOB;
?>
</select>
<input type="text" class="f" id="f_price" name="price" size="8"
maxlength="128" value="Price"><br>
<textarea style="width: 100%" name="ldesc" class="f"
id="f_ldesc" rows="5" wrap="soft">Details</textarea><br>
<input name="f_submit" type="submit" value="Add Item">
<input type="reset" value="Clear">
</form>
<?php
foot();
?>