<?php
require_once("../../global/checkuser1.php");
?>
<!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=utf-8" />
<title>频道设置</title>
<link rel="stylesheet" href="index.css" />
<script>
 function setCookie(sName,sValue,expireHours) {
  var cookieString = sName + "=" + escape(sValue);
  //;判断是否设置过期时间
  if (expireHours>0) {
    var date = new Date();
    date.setTime(date.getTime + expireHours * 3600 * 1000);
    cookieString = cookieString + "; expire=" + date.toGMTString();
  }
  document.cookie = cookieString+";path=/";
 }
</script>
</head>

<body>
<div class="bigdiv">
<table cellspacing="0" cellpadding="0" style="font-size:14px;"><tr><td style="text-align:left;border-left:none;">您的位置：<a href="index.php">系统配置</a>/<a href="index.php">频道设置</a></td><td style="border-left:none;text-align:right;"><a href="add.php">添加频道</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>
<div style="float:left;width:100%;border-bottom:2px solid #337abb;height:25px;font-size:14px;line-height:25px;"><ul>
<li style="float:left;width:100px;text-align:center;"><a href="../webset/index.php" onclick="setCookie('B','1')">网站设置</a></li>
<li style="float:left;width:100px;text-align:center;border-left:2px solid #337abb;"><a href="../typeset/index.php" onclick="setCookie('B','2')">外链类型设置</a></li>
<li style="float:left;width:100px;text-align:center;border-left:2px solid #337abb;"><a href="../userset/index.php" onclick="setCookie('B','3')">用户设置</a></li>
<li style="float:left;width:100px;text-align:center;border:2px solid #337abb;border-top:1px solid #337abb;border-bottom:none;background:#337abb;"><a style="color:#FFF;" href="../channel/index.php" onclick="setCookie('B','4')">频道设置</a></li>
<li style="float:left;width:100px;text-align:center;"><a href="../reportset/index.php" onclick="setCookie('B','5')">平媒报告设置</a></li>
<li style="float:left;width:100px;text-align:center;border-left:2px solid #337abb;"><a href="../negativeset/index.php" onclick="setCookie('B','6')">负面监控设置</a></li>
</ul></div>
<div class="list">
<table cellspacing="0" cellpadding="0"><tr style="background:#d3edf9;"><td style="border-left:none;">类型ID</td><td>频道名称</td><td class="g">操作</td></tr></table><table>
<?php
ob_start();
require_once("../../global/page.class.php");
require_once("../../global/connect.php");
$pageSize=15;
$total=mysql_num_rows(mysql_query("SELECT * FROM channel")); 
pageft($total,$pageSize,1,1,1,9,20,0);
$sql="SELECT * FROM  channel order by id DESC limit $firstcount,$pageSize";
$sql=mysql_query($sql);
if($sql){ob_end_clean();
while($row=mysql_fetch_array($sql)){
echo "<tr><td style='border-left:none;'>".$row["id"]."</td><td>".$row["name"]."</td><td class='g'><a href=\"function.php?mod=delete&id=$row[id]\">[删除]</a></td></tr>";
}}else
echo "<tr><td style='color:red;text-align:center;border:none;'>无记录!</td></tr>";
ob_end_flush();
?>
</table>
<div>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $pagenav;?></div>
<div style="width:100%;height:10px;"></div>
<div style="width:98%;margin:auto;overfollow:hidden;border:2px solid #ccc;line-height:25px;font-size:14px;">
&nbsp;&nbsp;&nbsp;&nbsp;功能使用帮助说明：<br />
&nbsp;&nbsp;1、此功能用于设置频道信息。<br />
&nbsp;&nbsp;2、系统所有涉及频道的数据中频道信息都是在这里设置。
</div>
</div>
</div>
</body>
</html>
