查看文件: ad_browse.php
大小: 3.54 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php if(isset($_GET['del_id']) && ( $_GET['del_id']>0 )){ mysql_select_db($database_BE2, $BE2); $delete_SQL = sprintf("DELETE FROM adpic WHERE id='%s'",$_GET['del_id']); $Rt2 = mysql_query($delete_SQL, $BE2) or die(mysql_error()); } $bid=-1; if(isset($_GET['id'])){ $bid=$_GET['id']; } mysql_select_db($database_BE2, $BE2); //$query_Rt2 = sprintf("select a.*,b.* from left join adpic WHERE xid='%s'",$bid); $query_Rt2 = sprintf("select a.*,c.* from adpage as a,ap2 as b left join adpic as c on b.adid=c.xid WHERE a.pid=b.webid AND b.adid='%s'",$bid); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <h3><span class="ti2">< <a href="main.php?act=ad2&webid=<?= $row_Rt2['pid']; ?>"><?= $row_Rt2['pdoc']?></a> <a href="main.php?act=ad_browseadd&id=<?php echo $bid; ?>" style="color:#F00">新增廣告圖檔 ></a></span></h3> <? // if($myadmin){ echo $query_Rt2; }?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <th width="3%" nowrap="nowrap" class="font2">ID</th> <th width="18%" nowrap="nowrap" class="font2">圖片說明</th> <th width="21%" nowrap="nowrap" class="font2">連結</th> <th width="10%" nowrap="nowrap" class="font2">圖檔</th> <th width="10%" nowrap="nowrap" class="font2">圖檔</th> <th width="10%" nowrap="nowrap" class="font2">使用</th> <th width="9%" nowrap="nowrap" class="font2">排列序</th> <th width="11%" nowrap="nowrap" class="font2">啟用日期</th> <th width="11%" nowrap="nowrap" class="font2">截止日期</th> <th nowrap="nowrap" class="font2">刪除</th> </tr> <?php if($row_Rt2['id']<>""){ do { ?> <tr> <td align="center" class="font3"><a href="main.php?act=ad_browseedit&id=<?php echo $row_Rt2['id']; ?>"><img src="images/edit.png" alt="修改項目名稱" title="修改項目名稱" width="16" height="16" border="0" /></a></td> <td align="center" class="font3"><?php echo $row_Rt2['doc']; ?></td> <td align="center" class="font3"><?php echo $row_Rt2['link']; ?></td> <td align="center" class="font3"><img src="<?php //if($row_Rt2['raid']==14){ $img= 'images/youtube.png' ;}else{ $img= "/products/".$row_Rt2['img'].'.'.$row_Rt2['imgext']; // } echo $img ; ?>" alt="編輯圖檔元素" title="編輯圖檔元素" width="75" /></td> <td align="center" nowrap="nowrap" class="font3"><?= $row_Rt2['img'].'.'.$row_Rt2['imgext'] ?></td> <td align="center" class="font3"><?php echo $row_Rt2['flag']; ?></td> <td align="center" class="font3"><?php echo $row_Rt2['ind']; ?></td> <td align="center" class="font3"><?php echo $row_Rt2['sdate']; ?></td> <td align="center" class="font3"><?php echo $row_Rt2['edate']; ?></td> <td width="7%" align="center" class="font3"><a href="javascript:if(confirm('確實要刪除嗎?'))location='<? echo 'main.php?act=ad_browse&id='.$bid.'&del_id='.$row_Rt2['id'] ;?>'"><img src="images/del.png" alt="刪除項目" width="16" height="16" border="0"/></a></td> </tr> <?php } while ($row_Rt2 = mysql_fetch_assoc($Rt2)); } ?> <tr> <td colspan="11"></td> </tr> </table> <div id="back"><a href="javascript:history.back();"><img src="images/back.gif" alt="回上一頁" title="回上一頁" width="115" height="32" border="0"></a></div> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表