📄 affiche_admin.php
字号:
<?php
if (!empty ($_POST['hndelid']))
{
$sql = '' . 'delete from `message` where id=\'' . $_POST['hndelid'] . '\'';
$rs = mysql_query ($sql);
if ($rs)
{
fun_alert ('删除成功!');
}
else
{
fun_alert ('删除失败!');
}
fun_back ();
exit ();
}
if ($op == 'adser')
{
$title = '广告主公告';
$sql_stat = ' (username=\'<adser>\' and to_type=\'4\' or username=\'<all>\') and userid=\'0\'';
}
else
{
$op = 'web';
$title = '网站主公告';
$sql_stat = ' (username=\'<web>\' and to_type=\'2\' or username=\'<all>\') and userid=\'0\'';
}
if (!empty ($txt_search))
{
$andwhere = '' . ' and (username like \'%' . $txt_search . '%\' or id = \'' . $txt_search . '\' or time like \'%' . $txt_search . '%\' or s_name like \'%' . $txt_search . '%\' or tit like \'%' . $txt_search . '%\' or conn like \'%' . $txt_search . '%\') ';
}
$orderby = '';
if (!empty ($or_time))
{
$orderby = ($or_time == '1' ? ' time asc,' : ' time desc,');
}
$pagesize = $cfg_adminpagesize;
$list_count = '' . 'message where ' . $sql_stat . ' and s_id=\'0\' ' . $andwhere;
$sql = '' . 'select * from message where ' . $sql_stat . ' and s_id=\'0\' ' . $andwhere . ' order by ' . $orderby . ' id desc';
include '../public/pagehead.php';
$rs = mysql_query ($sql);
$str_disp = '';
if ($op == 'web')
{
$tnid = 54;
$enid = 37;
}
$enid = 40;
while (true)
{
if ($row = mysql_fetch_array ($rs))
{
$mes_type = $row[mes_type];
$tit = $row[tit];
$time = $row['time'];
$str_disp .= '' . '
<tr align=center class="listbody_admin">
<td>' . $cfg_messtype[$mes_type] . '</td>
<td align=left><a href=\'?tm=' . $tm . '&nid=' . $tnid . '&nm=affiche_view&op=' . $op . '&id=' . $row['id'] . '\'>' . $tit . '</a></td>
<td>' . $time . '</td>
<td><input name=edit type=button id=edit class=subbt2 value=\'编辑\' onClick="location=\'admin.php?tm=' . $tm . '&nid=' . $enid . '&nm=affiche_add&op=' . $op . '&edit_id=' . $row['id'] . '\'"><input name=delete type=button id=delete class=subbt2 value=\'删除\' onClick="del_sub(' . $row['id'] . ')"></td>
</tr>';
}
}
echo '<s';
echo 'tyle type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
';
echo '<s';
echo 'cript>
<!--
function del_sub(delid){
var psub=confirm("确认删除吗?");
if(psub){
document.hideform.hndelid.value=delid;
document.hideform.submit();
}else{
return false;
}
}
function order(obj,val){
var temp=eval("document.hideform."+obj);
temp.value=val;
document.hideform.submit();
}
-->
</script>
<table width="100%" border="1" cellpadding="2" cellspacing="0" bo';
echo 'rdercolor="#FFFFFF" bordercolorlight="#CCCCCC" bordercolordark="#ffffff" bgcolor="#CCCCCC" >
<tr bgcolor="F0F0F0">
<td width="100" height="25"><div align="center">
';
echo $title;
echo ' </div></td>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<form name="hideform" method="post" action="">
<tr>
<td width="40" align=right>搜索:</td>
<td><input name="txt_search" type="text" class="text" id="txt_search" value="';
echo $txt_search;
echo '" size="20" maxlength="50">
<input type="submit" name="Submit" value="提交" class=subbt2>
<input name="op" type="hidden" id="op" value="';
echo $op;
echo '">
<input name="hndelid" type="hidden" id="hndelid">
<input name="or_time" type="hidden" id="or_time">
</td>
<td><div align="right">
<input name="add" type="button" class=subbt id="add" value="发布新公告" onClick="location=\'';
echo '' . 'admin.php?tm=' . $tm . '&nid=' . $enid . '&nm=affiche_add&op=' . $op;
echo '\';">
</div></td>
</tr>
</form>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="listtable_admin">
<tr align="center" class="listbody_admin">
<td class="listtbhd_admin">类别</td>
<td class="listtbhd_admin">主题</td>
<td class="listtbhd_admin"><a href="#" onCli';
echo 'ck="order(\'or_time\',\'';
echo ($or_time == '2' ? '1' : '2');
echo '\')">';
echo '<s';
echo 'pan class="style1">时间</span></a>';
if (!empty ($or_time))
{
echo ($or_time == '1' ? '▲' : '▼');
}
echo '</td>
<td class="listtbhd_admin">管理</td>
</tr>
';
echo $str_disp;
echo ' </table>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
';
$pagestr = '' . '&tm=' . $tm . '&nid=' . $nid . '&nm=' . $nm . '&op=' . $op . '&or_time=' . $or_time . '&txt_search=' . $txt_search;
include '../public/pagefoot.php';
echo '</td>
</tr>
</table>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -