/
ath.php
35 lines (35 loc) · 1.17 KB
/
ath.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
<a href="?redo=th">商品分類</a>/<a href="?redo=item">商品管理</a><br>
<form action="api.php?do=nc1" method="post">新增大類<input type="text" name="c1"><input type="submit"></form>
<form action="api.php?do=nc2" method="post">新增中類
<select name="c1">
<?php
$result = All("select * from cat where parent = 0");
foreach($result as $row)
{
?>
<option value="<?=$row["id"]?>"><?=$row["name"]?></option>
<?php
}
?>
</select>
<input type="text" name="c2"><input type="submit"></form>
<form action="api.php?do=ec" method="post">
<?php
$result = All("select * from cat where parent = 0");
foreach($result as $row)
{
echo "<input type='text' value='".$row["name"]."' name='text[]'>
<input type='hidden' value='".$row["id"]."' name='id[]'>
<input type='checkbox' value='".$row["id"]."' name='del[]'><br>";
$result2 = All("select * from cat where parent = '".$row["id"]."'");
foreach($result2 as $row2)
{
echo "<input type='text' value='".$row2["name"]."' name='text[]'>
<input type='hidden' value='".$row2["id"]."' name='id[]'>
<input type='checkbox' value='".$row2["id"]."' name='del[]'><br>";
}
echo "<hr>";
}
?>
<input type="submit">
</form>