📄 show_mation.php
字号:
<?php
require_once('libs/session.inc');
require_once('libs/config.inc');
require_once('libs/dbmanager.inc');
require_once('libs/function.inc');
$conn = DBManager::getConnection();
if($_GET[newsid] == "" && $_GET[annid] == "" && $_GET[shnid] == "" && $_GET[shannid] == ""){
die("错误的页面地址输入...");
}
?>
<?php
if($_GET[action] == news){
if($_COOKIE['shownews'] == ""){
setcookie("shownews",$_GET[newsid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."news SET `newshit`=`newshit`+1 WHERE newsid=".$_GET[newsid]);
}
else{
if($_COOKIE['shownews'] !== $_GET[newsid]){
setcookie("shownews",$_GET[newsid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."news SET `newshit`=`newshit`+1 WHERE newsid=".$_GET[newsid]);
}
}
}elseif($_GET[action] == ann){
if($_COOKIE['showann'] == ""){
setcookie("showann",$_GET[annid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."announce SET `annhit`=`annhit`+1 WHERE annid=".$_GET[annid]);
}
else{
if($_COOKIE['showann'] !== $_GET[annid]){
setcookie("showann",$_GET[annid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."announce SET `annhit`=`annhit`+1 WHERE annid=".$_GET[annid]);
}
}
}elseif($_GET[action] == shn){
if($_COOKIE['showshn'] == ""){
setcookie("showshn",$_GET[shnid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."shopnews SET `shnhit`=`shnhit`+1 WHERE shnid=".$_GET[shnid]);
}
else{
if($_COOKIE['showshn'] !== $_GET[shnid]){
setcookie("showshn",$_GET[shnid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."shopnews SET `shnhit`=`shnhit`+1 WHERE shnid=".$_GET[shnid]);
}
}
}elseif($_GET[action] == shann){
if($_COOKIE['showshann'] == ""){
setcookie("showshann",$_GET[shannid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."shopann SET `shannhit`=`shannhit`+1 WHERE shannid=".$_GET[shannid]);
}
else{
if($_COOKIE['showshann'] !== $_GET[shannid]){
setcookie("showshann",$_GET[shannid],time()+1800);
$alliow = true;
@include 'conn.php';
$addhit = $conn->query("UPDATE ".$tablepre."shopann SET `shannhit`=`shannhit`+1 WHERE shannid=".$_GET[shannid]);
}
}
}
if($_GET[action] == news){
$result = $conn->query("SELECT * FROM ".$tablepre."news WHERE newsid=".$_GET[newsid]);
$apr = $result->fetch_assoc();
$pagetitle = $apr[newstitle];
}elseif($_GET[action] == ann){
$result = $conn->query("SELECT * FROM ".$tablepre."announce WHERE annid=".$_GET[annid]);
$apr = $result->fetch_assoc();
$pagetitle = $apr[anntitle];
}elseif($_GET[action] == shn){
$result = $conn->query("SELECT * FROM ".$tablepre."shopnews WHERE shnid=".$_GET[shnid]);
$apr = $result->fetch_assoc();
$pagetitle = $apr[shntitle];
}elseif($_GET[action] == shann){
$result = $conn->query("SELECT * FROM ".$tablepre."shopann WHERE shannid=".$_GET[shannid]);
$apr = $result->fetch_assoc();
$pagetitle = $apr[shanntitle];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php echo $pagetitle; ?></title>
<link rel="stylesheet" type="text/css" href="skin/style.css" />
</head>
<script language="javascript" type="text/javascript" src="js/menu.js"></script>
<body>
<?php require_once('pagetag/page_top.html'); ?>
<table align="center" width="964" cellpadding="0" cellspacing="0">
<tr><Td height="10"></Td></tr>
<tr>
<Td width="203" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<Tr>
<td align="center" colspan="3" height="9" background="skin/line_top.gif"></td>
</Tr>
<tr>
<td width="1" class="line1"></td>
<td valign="top" width="201" align="center">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><img src="skin/search.gif"></td>
</tr>
<tr>
<td height="10" align="center"><img src="skin/m_m.gif" width="180" height="1"></td>
</tr>
</table>
<?php require_once('pagetag/search_page.php'); ?>
</td>
<Td width="1" class="line1"></Td>
</tr>
<tr>
<td colspan="3" height="11" background="skin/sch_bot.gif"></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
<table height="149" width="100%" cellpadding="0" cellspacing="0" background="skin/star_shopbak.gif">
<tr>
<td height="8"></td>
</tr>
<tr>
<td height="24" align="center"><img src="skin/s_b.gif"></td>
</tr>
<Tr>
<td align="center" valign="top"><?php require_once('pagetag/showtextstar.php'); ?></td>
</Tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<Tr>
<td height="10"></td>
</Tr>
<Tr>
<td align="center" colspan="3" height="9" background="skin/line_top.gif"></td>
</Tr>
<tr>
<td width="1" class="line1"></td>
<td valign="top" width="201" align="center">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><img src="skin/new.gif"></td>
</tr>
<tr>
<td height="10" align="center"><img src="skin/m_m.gif" width="180" height="1"></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php require_once('pagetag/new_user.html'); ?>
</td><Td width="15"></Td>
</tr>
</table>
</td>
<Td width="1" class="line1"></Td>
</tr>
<tr>
<td colspan="3" height="11" background="skin/sch_bot.gif"></td>
</tr>
</table>
</Td>
<td width="10"></td>
<td valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="40" background="skin/m_l.gif" width="8"></td>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" background="skin/m_m.gif" height="1"></td>
</tr>
<tr height="38">
<td width="40"><img src="skin/m_pic.gif"></td>
<td>
<span class="red"><a href="mation.php?action=news" target="_parent">网站新闻</a></span>
| <a href="mation.php?action=ann" target="_parent">网站公告</a>
| <span class="red"><a href="mation.php?action=shn" target="_parent">店铺新闻</a></span>
| <a href="mation.php?action=shann" target="_parent">店铺公告</a>
</td>
</tr>
<tr>
<td colspan="2" background="skin/m_m.gif" height="1"></td>
</tr>
</table>
</td>
<td background="skin/m_r.gif" width="8"></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
<?php
if($_GET[action] == news){
?>
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="4" cellspacing="0">
<tr><td height="5"></td></tr>
<tr>
<td colspan="2" class="mationtitle"><?php echo $apr[newsname]; ?></td>
</tr>
<tr>
<td> 发表时间:<?php echo $apr[newstime]; ?></td><td align="right">人气:<?php echo $apr[newshit]; ?> </td>
</tr>
<tr>
<td colspan="2" height="1" background="skin/line1.gif"></td>
</tr>
<tr>
<td colspan="2">
<br>
<?php echo $apr[newsnr]; ?>
</td>
</tr>
</table>
<?php
}elseif($_GET[action] == ann){
?>
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="4" cellspacing="0">
<tr><td height="5"></td></tr>
<tr>
<td colspan="2" class="mationtitle"><?php echo $apr[annname]; ?></td>
</tr>
<tr>
<td> 发表时间:<?php echo $apr[anntime]; ?></td><td align="right">人气:<?php echo $apr[annhit]; ?> </td>
</tr>
<tr>
<td colspan="2" height="1" background="skin/line1.gif"></td>
</tr>
<tr>
<td colspan="2">
<br>
<?php echo $apr[annnr]; ?>
</td>
</tr>
</table>
<?php
}elseif($_GET[action] == shn){
?>
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="4" cellspacing="0">
<tr><td height="5"></td></tr>
<tr>
<td colspan="2" class="mationtitle"><?php echo $apr[shntitle]; ?></td>
</tr>
<tr>
<td> <font color="#FF0000"><?php echo $apr[newsowner]; ?></font> 发表于:<?php echo $apr[shntime]; ?></td>
<td align="right">
<a href="show_shop.php?shopid=<?php echo checklei($apr[newsowner],$tablepre.shop,shopowner,shopid); ?>"
><img src="skin/smallpic/26.gif" border="0"> <?php echo checklei($apr[newsowner],$tablepre.shop,shopowner,shopname); ?>
</a>
人气:<?php echo $apr[shnhit]; ?> </td>
</tr>
<tr>
<td colspan="2" height="1" background="skin/line1.gif"></td>
</tr>
<tr>
<td colspan="2">
<br>
<?php echo $apr[shnnr]; ?>
</td>
</tr>
</table>
<?php
}elseif($_GET[action] == shann){
?>
<table width="100%" border="1" bordercolor="#F5EFEA" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="4" cellspacing="0">
<tr><td height="5"></td></tr>
<tr>
<td colspan="2" class="mationtitle"><?php echo $apr[shanntitle]; ?></td>
</tr>
<tr>
<td> <font color="#FF0000"><?php echo $apr[annowner]; ?></font> 发表于:<?php echo $apr[shanntime]; ?></td>
<td align="right">
<a href="show_shop.php?shopid=<?php echo checklei($apr[annowner],$tablepre.shop,shopowner,shopid); ?>"
><img src="skin/smallpic/26.gif" border="0"> <?php echo checklei($apr[annowner],$tablepre.shop,shopowner,shopname); ?>
</a>
人气:<?php echo $apr[shannhit]; ?> </td>
</tr>
<tr>
<td colspan="2" height="1" background="skin/line1.gif"></td>
</tr>
<tr>
<td colspan="2">
<br>
<?php echo $apr[shannnr]; ?>
</td>
</tr>
</table>
<?php
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" >
<Tr>
<td height="20"></td>
</Tr>
</table>
<?php
require_once('pagetag/bottommation.php');
$conn->close();
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -