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

<?php
if ($_GET['s']=="ok")
{
mysql_query("DELETE FROM paty WHERE id='".$_GET['id']."'");

mysql_query("INSERT INTO text (name, time, ip, ing, f, bz) 
VALUES ('".$_SESSION['name']."', '".$noww."', '".$iipp."', '删会".$_GET['id']."', '0', '')");
?>
<script language="javascript">setTimeout(function (){location.href='<?php echo $llym; ?>';},2);</script>
<?
}

?>

<?php

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

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

?>


<?php
if($_GET['xg']=="xg")
{

$one = strip_tags ($_POST['one']); 
$js = strip_tags ($_POST['js']); 
$amdqq = strip_tags ($_POST['amdqq']); 
$qq = strip_tags ($_POST['qq']); 
$amdyy = strip_tags ($_POST['amdyy']); 
$yy = strip_tags ($_POST['yy']); 
$kh = strip_tags ($_POST['kh']); 
$hd = strip_tags ($_POST['hd']); 
$tjname = strip_tags ($_POST['tjname']); 
$tjurl = strip_tags ($_POST['tjurl']); 
$tjname1 = strip_tags ($_POST['tjname1']); 
$tjurl1 = strip_tags ($_POST['tjurl1']); 
$bj = $_POST['bj']; 
$zr = $_POST['zr']; 

mysql_query("UPDATE paty SET
 name = '".$_POST['name']."',
 amd = '".$_POST['amd']."',
 lasttime = '".time()."',
 one = '".$one."',
 js='".$js."',
 bj='".$bj."',
 zr='".$zr."',
 amdqq = '".$amdqq."',
 qq='".$qq."',
 amdyy = '".$amdyy."',
 yy='".$yy."',
 kh = '".$kh."',
 hd='".$hd."',
 tjname = '".$tjname."',
 tjurl='".$tjurl."',
 tjname1 = '".$tjname1."',
 tjurl1='".$tjurl1."'
 WHERE id = '".$_GET['id']."'");
 mysql_query("INSERT INTO text (name, time, ip, ing, f) 
 VALUES ('".$_SESSION['name']."', '".$noww."', '".$iipp."', '修改工会', '0')");

?>
<script language="javascript">setTimeout(function (){location.href='<?php echo $llym; ?>';},2);</script>
<?
 
}

?>
 
 <?php
echo "<TABLE ><TBODY><TR  bgcolor=#CCCC00 >";
echo "<b><TD >ID</td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=name >名称</a></td><TD ><a href=?ys=".$_GET['ys']."&px=one >创始人</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=amd >管理员</a></td><TD ><a href=?ys=".$_GET['ys']."&px=js >介绍</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=amdqq >会长Q</a></td><TD ><a href=?ys=".$_GET['ys']."&px=qq >QQ</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=amdyy >会长Y</a></td><TD ><a href=?ys=".$_GET['ys']."&px=yy >YY</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=kh >口号</a></td><TD ><a href=?ys=".$_GET['ys']."&px=hd >活动</a></td>";

echo "<TD ><a href=?ys=".$_GET['ys']."&px=tjname >推名</a></td><TD ><a href=?ys=".$_GET['ys']."&px=tjurl >URL</a></td>";
echo "<TD ><a href=?ys=".$_GET['ys']."&px=tjname1 >推名1</a></td><TD ><a href=?ys=".$_GET['ys']."&px=tjurl1 >URL1</a></td>";

echo "<TD >改</td><TD >删</td></b></TR>";

$result = mysql_query("SELECT * FROM paty ORDER  BY ".$px." DESC LIMIT ".$ys.",".$_SESSION['ts']);

while($row = mysql_fetch_array($result))
  {
echo "<TR ";
?> onmouseover="this.style.background='#FFF'; " onmouseout ="this.style.background=''; this.style.borderColor=''" <?php 
echo ">";


echo "<form action=paty.php?xg=xg&id=".$row['id']."  method=post>";
echo "<TD ><textarea rows=2 cols=2>".$row['id'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=name >".$row['name'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=one >".$row['one'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=amd >".$row['amd'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=js >".$row['js'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=amdqq >".$row['amdqq'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=qq >".$row['qq'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=amdyy >".$row['amdyy'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=yy >".$row['yy'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=kh >".$row['kh'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=hd >".$row['hd'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=tjname >".$row['tjname'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=tjurl >".$row['tjurl'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=tjname1 >".$row['tjname1'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=6 name=tjurl1 >".$row['tjurl1'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=2 name=bj >".$row['bj'] . "</textarea></td>";
echo "<TD ><textarea rows=2 cols=2 name=zr >".$row['zr'] . "</textarea></td>";
echo "<TD ><input type=submit value=改 /></td>";
echo "<TD ><a href='?id=".$row['id']."&s=ok'";
 ?>onClick="return confirm('删除要小心！？')"<?php
echo " >删</a></td>";
echo "</form>";

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

?>

 
<?php 

$result = mysql_query("SELECT * FROM paty");//查看总留言数并分页
$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>";

?> 
<hr>
<textarea cols="88" rows="3">分类将决定文章显示位置，
小提示显示在导航位置右侧的滚动字幕当中；文章、网页、网页１将显示在顶端和底端随机新闻当中；网页1为网摘内容。帮助内容为特定内容，
</textarea>


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