Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'menu':
- $sql="SELECT * FROM menu WHERE parent='0';";
- $ro=mysqli_query($link,$sql);
- $row=mysqli_fetch_array($ro);
- ?>
- <p class="t cent botli">選單管理</p>
- <form method="post" action="api.php?do=upMain">
- <table width="100%">
- <tr class="yel">
- <td width="35%">主選單名稱</td>
- <td width="35%">選單連結網址</td>
- <td width="10%">次選單數</td>
- <td width="5%">顯示</td>
- <td width="5%">刪除</td>
- <td width="10%"></td>
- </tr>
- <?
- do{
- ?>
- <tr>
- <td width="35%"><input type="text" name="text[]" value="<?=$row['text'];?>"/></td>
- <td width="35%"><input type="text" name="href[]" value="<?=$row['href'];?>"/></td>
- <td width="10%">
- <?=mysqli_num_rows(mysqli_query($link,"SELECT * FROM menu WHERE parent='".$row['seq']."';"));?>
- </td>
- <td width="5%">
- <input type="checkbox" name="show<?=$row['seq'];?>" value="<?=$row['seq'];?>" <?=($row['up']==1)?"checked":"";?>/>
- </td>
- <td width="5%">
- <input type="checkbox" name="del<?=$row['seq'];?>" value="<?=$row['seq'];?>"/>
- </td>
- <td width="10%">
- <input type="button" onclick="op('#cover','#cvr','view.php?do=editSub&seq=<?=$row['seq'];?>')" value="編輯次選單">
- </td>
- <input type="hidden" name="seq[]" value="<?=$row['seq'];?>"/>
- </tr>
- <?
- }while($row=mysqli_fetch_array($ro));
- ?>
- </table>
- <table style="margin-top:40px; width:70%;">
- <tr>
- <td width="200px">
- <input type="button" onclick="op('#cover','#cvr','view.php?do=menu')" value="新增主選單">
- </td>
- <td class="cent">
- <input type="hidden" name="table" value="menu">
- <input type="submit" value="修改確定">
- <input type="reset" value="重置">
- </td>
- </tr>
- </table>
- </form>
- <?
- break;
Add Comment
Please, Sign In to add comment