<?php include("dh.php"); 
include("../sql/conn.php");
include("yz.php"); 
$llym = $_SERVER["HTTP_REFERER"];
?>



<?php

echo "<TABLE ><TBODY>";
////////////////////////////////
echo "<TR><TD >-</td><TD>-</td>";


////////////////////////////////////////////////////////////////////////
$file = fopen("tm.txt", "r") or exit("Unable to open file!");
while(!feof($file))
  {
$hang = fgets($file);
$res=explode("%%",$hang,20);
  }/////获得表格表头
///////////////////////////////////////////////////////////////////////////
echo "<TD colspan=13>";
echo "<form action='' method=get>搜游戏客服: <input name=gjc type=text id=gjc size=28 /><input type=submit value=搜索 /></form>";
echo "</td>";

echo "</TR>";
///////////////////////////////////

echo "<TR  bgcolor=#CCCC00 ><b>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=id >ID</a></td><TD>删</td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=name >".$res[1]."</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=name>".$res[2]."</a></td>";
echo "<TD >".$res[3]."</td><TD >".$res[4]."</td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=kf >".$res[5]."</a></td>";
echo "<TD >".$res[6]."</td><TD ><a href=?ys=".$_GET['ys']."&px=name >".$res[7]."</a></td>";
echo "<TD>".$res[8]."</td>";
echo "<TD>上架时间</td><TD>下架时间</td>";
echo "<TD><a href=?ys=".$_GET['ys']."&px=bz>用户</a></td>";
echo "<TD><a href=?ys=".$_GET['ys']."&px=zt>状态</a></td><TD>---</td></b></TR>";

if($_GET['ys'])
{
$ys = $_SESSION['ts']*($_GET['ys']-1);
}	 
else
{
$ys = 0;
}

if($_GET['px'])
{
$px = $_GET['px'];
}	 
else
{
$px = id;
}

if($_GET['gjc']!="")
{
echo "<tr bgcolor=#fff height=2 ><td colspan=13 ></td></tr>";

$result = mysql_query("SELECT * FROM webk WHERE kf like '%".$_GET['gjc']."%' OR name like '%".$_GET['gjc']."%'");


while($row = mysql_fetch_array($result))
  {
echo "<TR bgcolor=#fff>";
echo "<form action=../myx.php?k=webk&id=".$row['id']." method=post >";

echo "<TD ><input name=ip type=text size=2 value=".$row['id'] . " /></a></td>";
echo "<TD ><a ";
  ?>onClick="return confirm('删除要小心！？')"<?php
echo "href='del.php?k=webk&id=".$row['id']."'>删</a></td>";
echo "<TD ><input name=ip type=text size=5 value=".$row['ip'] . " /></a></td>";
echo "<TD ><input name=name type=text size=6 value=".$row['name'] . " /></td>";
echo "<TD ><input name=time type=text size=10 value=".$row['time']." /></td>";
echo "<TD ><input name=len type=text size=6 value=".$row['len'] . " /></td>";
echo "<TD ><textarea rows=1 name=kf cols=6 >".$row['kf']."</textarea></td>";
echo "<TD ><textarea rows=1 name=js cols=10 >".$row['js']."</textarea></td>";
echo "<TD ><input disabled type=text size=6 value=".$row['url'] . " /><a href=".$row['url'] . " target=_blank>审</a></td>";

echo "<td><select name=long1>";
$long1 = (int)($row['long1']/86400);
echo "<option value='".$row['long1']."'>".$long1."天</option><option value='2592000' >30天</option>";
echo "<option value='864000' >10天</option><option value='432000' >5天</option><option value='86400' >1天</option>";
echo "</select></td>";


echo "<TD ><input disabled type=text size=10 value=".date("md_H:i", $row['ks']-7200) . " /></td>";

$zltime = $row['ks'] + $row['long1'];///、//发布时间加上延续时间

echo "<TD ><input disabled type=text size=10 value=".date("md_H:i", $zltime)." /></td>";
echo "<TD ><input name=bz type=text size=6 value=".$row['bz'] . " /></td>";

echo "<td><select name=zt><option value='".$row['zt'] . "' >";
if($row['zt']=='2'){echo "置顶";}
elseif($row['zt']=='6'){echo "私服";}
elseif($row['zt']=='9'){echo "一般";}
else{echo $row['zt']; }
echo "</option><option value='9' >取消</option>";
echo "<option value='6' >私服</option><option value='2' >置顶</option></select></td>";

echo "<td><INPUT name=提交 type=submit value=改  ></td></form></TR>";
  }

echo "<tr bgcolor=#fff height=2 ><td colspan=13 ></td></tr>";
}


if($_GET['px']=="")
{
$result = mysql_query("SELECT * FROM webk ORDER  BY id desc LIMIT ".$ys.",".$_SESSION['ts']);
}else{
$result = mysql_query("SELECT * FROM webk ORDER BY ".$px." DESC LIMIT ".$ys.",".$_SESSION['ts']);
/////echo "SELECT * FROM webk ORDER  BY ".$px." LIMIT ".$ys.",".$_SESSION['ts'];
}


while($row = mysql_fetch_array($result))
  {
  echo "<tr";
?> onmouseover="this.style.background='#000'; " onmouseout ="this.style.background=''; this.style.borderColor=''" <?php 
  echo ">";
echo "<form action=../myx.php?k=webk&id=".$row['id']." method=post >";

echo "<TD ><input name=ip type=text size=2 value=".$row['id'] . " /></a></td>";
echo "<TD ><a ";
  ?>onClick="return confirm('删除要小心！？')"<?php
echo "href='del.php?k=webk&id=".$row['id']."'>删</a></td>";

echo "<TD ><input name=ip type=text size=5 value=".$row['ip'] . " /></a></td>";
echo "<TD ><input name=name type=text size=6 value=".$row['name'] . " /></td>";
echo "<TD ><input name=time type=text size=10 value=".$row['time']." /></td>";
echo "<TD ><input name=len type=text size=6 value=".$row['len'] . " /></td>";
echo "<TD ><textarea rows=1 name=kf cols=6 >".$row['kf']."</textarea></td>";
echo "<TD ><textarea rows=1 name=js cols=10 >".$row['js']."</textarea></td>";
echo "<TD ><input disabled type=text size=6 value=".$row['url'] . " /><a href=".$row['url'] . " target=_blank>审</a></td>";

echo "<td><select name=long1>";
$long1 = (int)($row['long1']/86400);
echo "<option value='".$row['long1']."'>".$long1."天</option><option value='2592000' >30天</option>";
echo "<option value='864000' >10天</option><option value='432000' >5天</option><option value='86400' >1天</option>";
echo "</select></td>";


echo "<TD ><input disabled type=text size=10 value=".date("md_H:i", $row['ks']-7200) . " /></td>";
$zltime = $row['ks'] + $row['long1'];///、//发布时间加上延续时间

echo "<TD ><input disabled type=text size=10 value=".date("md_H:i", $zltime)." /></td>";
echo "<TD ><input name=bz type=text size=6 value=".$row['bz'] . " /></td>";

echo "<td><select name=zt><option value='".$row['zt'] . "' >";
if($row['zt']=='2'){echo "置顶";}
elseif($row['zt']=='6'){echo "私服";}
elseif($row['zt']=='9'){echo "一般";}
else{echo $row['zt']; }
echo "</option><option value='9' >取消</option>";
echo "<option value='6' >私服</option><option value='2' >置顶</option></select></td>";
echo "<td><INPUT name=提交 type=submit value=改  ></td></form></TR>";

  }
echo "</TBODY></TABLE>";


echo "<p>";




$result = mysql_query("SELECT * FROM webk");//查看总留言数并分页
$num = mysql_num_rows($result);
echo "网页广告".$num." 个";
$ys = ceil($num/$_SESSION['ts']);

for ($i=1; $i<=$ys; $i++)
{
if ($_GET['ys']!=$i)
echo "〖<a href=?ys=".$i."&px=".$_GET['px'].">".$i."</a>〗";
else
echo "<strong>[".$i."]</strong>";

}

echo "</p>";
?> 
--
删[<a  href="delp.php?id=webk" onClick="return confirm('删除要小心！？')" >采集的网页游戏</a>]
--
<hr>

<textarea cols="88" rows="3">网页宣传广告管理
前六项是可以更改的，只要您重新输入然后点修改就可以了，网址是不可以修改的，为了防止有人填写违法站点信息。
修改过后可以在[修改注释用户可见]一栏当中写上为什么修改的记录。
删[网页游戏批量]，是指一下子把批量导入的网页删除掉。只剩下人工输入的广告。
</textarea>

<?php include("../sql/close.php"); ?>
