查看文件: showmessage.php
大小: 7.28 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <? require('system/login.php'); ?> <?php if(isset($_GET['del_id']) && ( $_GET['del_id']>0 )){ mysql_select_db($database_BE2, $BE2); $delete_SQL = sprintf("UPDATE massage1 set flag='C' WHERE id='%s' ",$_GET['del_id'] ); $Rt2 = mysql_query($delete_SQL, $BE2) or die(mysql_error()); } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_Rt2 = 6; $pageNum_Rt2 = 0; if (isset($_GET['pageNum_Rt2'])) { $pageNum_Rt2 = $_GET['pageNum_Rt2']; } $startRow_Rt2 = $pageNum_Rt2 * $maxRows_Rt2; mysql_select_db($database_BE2, $BE2); $query_Rt2 = "SELECT a.*,b.* FROM massage1 as a left join cuser as b on a.cuid3=b.cuid where a.flag<>'C' ORDER BY a.id DESC" ; $query_limit_Rt2 = sprintf("%s LIMIT %d, %d", $query_Rt2, $startRow_Rt2, $maxRows_Rt2); $Rt2 = mysql_query($query_limit_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); if (isset($_GET['totalRows_Rt2'])) { $totalRows_Rt2 = $_GET['totalRows_Rt2']; } else { $all_Rt2 = mysql_query($query_Rt2); $totalRows_Rt2 = mysql_num_rows($all_Rt2); } $totalPages_Rt2 = ceil($totalRows_Rt2/$maxRows_Rt2)-1; $queryString_Rt2 = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Rt2") == false && stristr($param, "totalRows_Rt2") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Rt2 = "&" . htmlentities(implode("&", $newParams)); } } $queryString_Rt2 = sprintf("&totalRows_Rt2=%d%s", $totalRows_Rt2, $queryString_Rt2); ?> <?php if ($totalRows_Rt2 > 0) { // Show if recordset not empty ?> <table width="921" height="131" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="728"> </td> </tr> <tr> <td align="center"><?php do { ?> <table width="779" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="7"> </td> </tr> <tr> <td width="10" bordercolor="#66CC33"><img src="images/z_01.gif" width="9" height="8" alt="" /></td> <td colspan="5" bordercolor="#66CC33" background="images/z_02.gif"></td> <td width="9" bordercolor="#66CC33"><img src="images/z_03.gif" width="9" height="8" alt="" /></td> </tr> <tr> <td rowspan="5" background="images/z_04.gif"></td> <td align="left" valign="bottom"><a href="main.php?act=edit_message&id=<?php echo $row_Rt2['id']; ?>"><img src="images/icon_11.gif" alt="修改回覆留言" width="31" height="31" border="0" /></a></td> <td colspan="2" align="left" valign="bottom" bgcolor="#FFFFFF"><font color="#FF0000"><?php echo $row_Rt2['seljob']; ?></font></td> <td width="399" align="left" valign="bottom" bgcolor="#FFFFFF" class="font_blank_12x"><font color="#FF0000"><?= $row_Rt2['webname']?></font> <?= $row_Rt2['qdate']; ?></td> <td width="63" align="left" valign="bottom" bgcolor="#FFFFFF" class="font_blank_12x"><img src="images/<?= $row_Rt2['flag']; ?>.png" width="26" height="26" /></td> <td rowspan="5" background="images/z_06.gif" class="font_blank_14xb"></td> </tr> <tr> <td width="73" height="38" align="center"><a href="re_message.php?id=<?php echo $row_Rt2['id']; ?>"></a></td> <td colspan="2" align="left"><span class="font_blank_12xb"><?php echo $row_Rt2['name1']; ?></span></td> <td colspan="2" align="left"><span class="font_blank_12xb"><?php echo $row_Rt2['name2']; ?></span></td> </tr> <tr> <td height="32" align="center"> </td> <td colspan="4" align="left"><span style="font-size:16px"><?= nl2br($row_Rt2['doc']); ?></span></td> </tr> <tr > <td rowspan="2" align="left" class="font_blank_12xb"><a href="javascript:if(confirm('確實要刪除嗎?'))location='<? echo 'main.php?act=showmessage&del_id='.$row_Rt2['id'] ;?>'"><img src="images/icon_10.gif" alt="刪除留言" width="31" height="31" border="0" /></a></td> <td height="35" colspan="2" align="left" class="font_blank_12xb"><?php echo $row_Rt2['email']; ?></td> <td colspan="2" align="left" class="font_blank_12xb"><?php echo $row_Rt2['tel']; ?></td> </tr> <tr> <td colspan="4" align="left" ><span style="font-size:16px;color:#039">板主回覆 <?= nl2br($row_Rt2['master_doc']); ?></span></td> </tr> <tr> <td class="font_blank_12xb"><img src="images/z_07.gif" width="9" height="10" alt="" /></td> <td colspan="5" background="images/z_08.gif" class="font_blank_12xb"></td> <td class="font_blank_12xb"><img src="images/z_09.gif" width="9" height="10" alt="" /></td> </tr> <tr> <td colspan="7" class="font_blank_12xb"></td> </tr> <tr> <td colspan="7" background="../images/4.gif" class="font_blank_12xb"><img src="images/1.gif" width="500" height="10" /></td> </tr> <tr> <td colspan="7" class="font_blank_12xb"> </td> </tr> </table> <?php } while ($row_Rt2 = mysql_fetch_assoc($Rt2)); ?></td> </tr> <tr> <td> <table border="0" width="50%" align="center"> <tr> <td width="23%" align="center"><?php if ($pageNum_Rt2 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, 0, $queryString_Rt2); ?>"><img src="images/First.gif" width="18" height="13" border=0></a> <?php } // Show if not first page ?> </td> <td width="31%" align="center"><?php if ($pageNum_Rt2 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, max(0, $pageNum_Rt2 - 1), $queryString_Rt2); ?>"><img src="images/Previous.gif" width="14" height="13" border=0></a> <?php } // Show if not first page ?> </td> <td width="23%" align="center"><?php if ($pageNum_Rt2 < $totalPages_Rt2) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, min($totalPages_Rt2, $pageNum_Rt2 + 1), $queryString_Rt2); ?>"><img src="images/Next.gif" width="14" height="13" border=0></a> <?php } // Show if not last page ?> </td> <td width="23%" align="center"><?php if ($pageNum_Rt2 < $totalPages_Rt2) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, $totalPages_Rt2, $queryString_Rt2); ?>"><img src="images/Last.gif" width="18" height="13" border=0></a> <?php } // Show if not last page ?> </td> </tr> </table></td> </tr> </table> <?php } // Show if recordset not empty ?> <?php if ($totalRows_Rt2 == 0) { // Show if recordset empty ?> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td>尚無留言</td> </tr> </table> <?php } // Show if recordset empty ?> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表