<?php
date_default_timezone_set('PRC');//时间段为北京时间
include("sql/conn.php"); 
session_start(); 
$iipp = $_SERVER["REMOTE_ADDR"];
$noww = time();

if (empty($_SESSION['name'])){
	header("Location: index.php");
	include("../sql/close.php");
    exit;
}

?>


<?php
if($_GET['s']=="ok")
{
    $result = mysql_query("SELECT * FROM webk WHERE id='".$_GET['id']."'");
    while($row = mysql_fetch_array($result))
    {
	    if($row['bz']==$_SESSION['name'])
		{
		mysql_query("DELETE FROM webk WHERE id='".$_GET['id']."'");////删除动作
		mysql_query("DELETE FROM key1 WHERE idid='".$row['idid']."'");////删除动作
		
        mysql_query("INSERT INTO text (name, time, ip, ing, f) 
        VALUES ('".$_SESSION['name']."', '".$noww."', '".$iipp."', '删除[".$row['name']."]', '0')");
		header("Location: my.php");
		}
	}
}
?>

<?php
if($_GET['sc']=="jlm")
{
    $result = mysql_query("SELECT * FROM key1 WHERE id='".$_GET['id']."'");
    while($row = mysql_fetch_array($result))
    {
	    if($row['user']==$_SESSION['name'])
		{
		mysql_query("DELETE FROM key1 WHERE id='".$_GET['id']."'");////删除动作
        mysql_query("INSERT INTO text (name, time, ip, ing, f) 
        VALUES ('".$_SESSION['name']."', '".$noww."', '".$iipp."', '删除[".$row['number']."]', '0')");
		header("Location: my.php");
		}
	}
}
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>网页游戏自助发布 <?php include("adm/all/gjz.txt"); ?> </title>
<meta name="description" content="网页游戏自助发布 <?php include("adm/all/description.txt"); ?> " />
<meta name="keywords" content="网页游戏自助发布 <?php include("adm/all/gjz.txt"); ?> " />
<link  href="css/css<?php include("adm/all/css.txt"); ?>.css" rel="stylesheet" type="text/css">

<style type="text/css">
#fbfbfb{
	color: #333333;
	font-size: 18px;
}
.fbtext{
	border: 1px solid #AFC2AF;
	background-color: #F4F8F3;
	color: #333333;
	height: 25px;
	width: 298px;
	font-weight: bold;
	font-size: 16px;
}
.fbselect{
	border: 1px solid #AFC2AF;
	background-color: #F4F8F3;
	color: #333333;
	height: 25px;
	width: 98px;
	font-weight: bold;
	font-size: 16px;
}
.input{
	border: 1px solid #AFC2AF;
	background-color: #F4F8F3;
	color: #333333;
	height: 25px;
	width: 98px;
	font-weight: bold;
	font-size: 16px;
}
.textbig{
	border: 1px solid #AFC2AF;
	background-color: #F4F8F3;
	color: #000000;
	height: 202px;
	width: 268px;
	font-weight: bold;
	font-size: 16px;
}

</style>

</head>




<body >
<div id="top">
<?php include("user.php");  ?>
</div>
<?php //// include("gh.php");  ?>
<div align="center">

<?php include("logo.php");  ?>

<div id="dh" ><?php 
 if(file_exists("dh1.php"))
 {
include("dh1.php"); 
 }
 else
 {
include("action/dh1.php"); 
 }
?></div>

</div>

<?php 
 if(file_exists("top.php"))
 {
include("top.php"); 
 }
 else
 {
include("action/top.php"); 
 }
?>

<div class="clear"></div>


<div align="center">

<div id="nr">

<div class="RoundedCorner">

<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>

<div align="left">
<h2 align="center">●网页游戏广告●</h2>
<hr>
<br />



<?php
echo "<TABLE  bgcolor=#CCCC00 align=center ><TBODY><TR ><b>";
echo "<TD >游戏类别</td><TD >名 称</td><TD >开服时间</td><TD >线 路</td>";
echo "<TD >运营商</td><TD >介 绍</td><TD >URL</td><TD>AD上架时间</td><TD>AD下架时间</td><TD>-</td><TD>-</td></b></TR>";

$result = mysql_query("SELECT * FROM webk WHERE bz='".$_SESSION['name']."'");

while($row = mysql_fetch_array($result))
  {
echo "<TR >";


echo "<form action=myx.php?k=webk&id=".$row['id']." method=post >";

echo "<TD >";
?>
<select name="ip" >
<option value=<?php echo $row['ip']; ?> ><?php echo $row['ip']; ?></option>
<option value=RPG游戏 >RPG游戏</option>
<option value=角色扮演 >角色扮演</option>
<option value=文字网页 >文字网页</option>
<option value=横版RPG >横版RPG</option>
<option value=回合RPG >回合RPG</option>
<option value=即时战斗 >即时战斗</option>
<option value=策略战争 >策略战争</option>
<option value=探险虚拟 >探险虚拟</option>
<option value=实时竞技 >实时竞技</option>
<option value=其它 >其它</option>
</select>
<?php
echo "</td>";

echo "<TD ><input  name=name  type=text size=8 value=".$row['name'] . " /></td>";
echo "<TD ><input  disabled  type=text size=18 value=".date("Y-m-d◇H:i:s", $row['time']) . " /></td>";
echo "<TD ><input  disabled  type=text size=8 value=".$row['len'] . " /></td>";
echo "<TD ><input  name=kf  type=text size=8 value=".$row['kf'] . " /></td>";
echo "<TD ><input  name=js  type=text size=8 value=".$row['js'] . " /></td>";
echo "<TD ><input disabled type=text size=16 value=".$row['url'] . " /></td>";
echo "<TD ><input disabled type=text size=18 value=".date("Y-m-d◇H:i:s", $row['ks']-7200) . " /></td>";

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

echo "<TD ><input disabled type=text size=18 value=[".date("Y-m-d◇H:i:s", $zltime) . "] /></td>";

echo "<td><INPUT name=提交 type=submit value=修改  ></td></form>";
echo "<td>　[<a href=?s=ok&id=".$row['id']." ";
  ?>onClick="return confirm('确实要删除这条广告！？')"<?php
echo ">删除</a>]　</td>";
echo "</TR>";


echo "<TR><TD colspan=11>";

$result2 = mysql_query("SELECT * FROM key1 WHERE idid='".$row['idid']."'");
while($row2 = mysql_fetch_array($result2))
{
     if ($row2['number']<>"")
     {
     echo "<p>礼包卡号 [".$row2['number']."]　[<a href=?sc=jlm&id=".$row2['id']." ";
       ?> onClick="return confirm('确实要删除这条奖励信息！？')" <?php
     echo ">删除</a>]</p>";
     }
}

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


  }

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

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

?>




<br />
<hr>
<br />
<br />
</div>




<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>

</div></div>







<div class="clear"></div>




<div align="center"><div id="nr">


<div class="RoundedCorner">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>

<?php include("ad/ad1.txt"); ?>

<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>


</div></div>


<div class="clear"></div>


<?php 
 if(file_exists("foot.php"))
 {
include("foot.php"); 
 }
 else
 {
include("action/foot.php"); 
 }
?>


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



if (empty($_SESSION['name']))
{
echo "<script>alert('您需要先登陆');</script>";
echo "<meta http-equiv=refresh content=1;url=index.php>";

header("Location: ../index.php");
$_GET['id'] = "";
}




?>


</body>


<script language="javascript">
function change_view(obj_name)
{
var aa=document.getElementById(obj_name);
if(aa.style.display=="")
{
aa.style.display="none";
}
else
{
aa.style.display="";
}
}
</script>

