更新圖片功能
modal/upload.php
在步驟6時,我們建立了一個更新圖片的彈出視窗檔案,同時在步10時,我們也預先建立了一個更新圖片的api,接下來我們把會用到更新圖片的三個功能的頁面給完成;
/view/modal/upload_title.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <h3 class="cent">更新網站標題圖片</h3> <hr> <form action="./api/upload.php" method='post' enctype="multipart/form-data"> <table style="width:70%;margin:auto"> <tr> <td>標題區圖片:</td> <td><input type="file" name="img" ></td> </tr> </table> <div class="cent"> <!--附上傳遞過來的table,才會知道要更新的圖片是那一張資料表--> <input type="hidden" name="table" value="<?=$_GET['table'];?>">
<!--附上傳遞過來的id,才會知道要更新的圖片是那一筆資料--> <input type="hidden" name="id" value="<?=$_GET['id'];?>"> <input type="submit" value="更新"> <input type="reset" value="重置"> </div> </form>
|

/view/modal/upload_mvim.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <h3 class="cent">更新動畫圖片</h3> <hr> <form action="./api/upload.php" method='post' enctype="multipart/form-data"> <table style="width:70%;margin:auto"> <tr> <td>動畫圖片:</td> <td><input type="file" name="img" ></td> </tr> </table> <div class="cent"> <!--附上傳遞過來的table,才會知道要更新的圖片是那一張資料表--> <input type="hidden" name="table" value="<?=$_GET['table'];?>">
<!--附上傳遞過來的id,才會知道要更新的圖片是那一筆資料--> <input type="hidden" name="id" value="<?=$_GET['id'];?>"> <input type="submit" value="更新"> <input type="reset" value="重置"> </div> </form>
|
/view/modal/upload_image.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <h3 class="cent">更新校園映像圖片</h3> <hr> <form action="./api/upload.php" method='post' enctype="multipart/form-data"> <table style="width:70%;margin:auto"> <tr> <td>校園映像圖片:</td> <td><input type="file" name="img" ></td> </tr> </table> <div class="cent"> <!--附上傳遞過來的table,才會知道要更新的圖片是那一張資料表--> <input type="hidden" name="table" value="<?=$_GET['table'];?>">
<!--附上傳遞過來的id,才會知道要更新的圖片是那一筆資料--> <input type="hidden" name="id" value="<?=$_GET['id'];?>"> <input type="submit" value="更新"> <input type="reset" value="重置"> </div> </form>
|