<?
include("../config/conn.php");
include("../config/function.php");
sesCheck();
$bh=$_GET[bh];
$userid=returnuserid($_SESSION[SHOPUSER]);
while0("*","yjcode_pro where bh='".$bh."' and userid=".$userid);if(!$row=mysql_fetch_array($res)){php_toheader("./");}

if($_GET[control]=="update"){
 updatetable("yjcode_tp","xh=".$_GET[xh]." where id=".$_GET[id]);
 php_toheader("protp.php?t=suc&bh=".$bh);
}
?>
<!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="x-ua-compatible" content="ie=7" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户管理面板 - <?=webname?></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/personalCenter.css">
<link rel="stylesheet" type="text/css" href="css/global.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<!--<link rel="stylesheet" type="text/css" href="css/gameListStyle.css">
<link rel="stylesheet" type="text/css" href="css/oldstyle.css">-->
<link rel="stylesheet" type="text/css" href="css/layui.css">
<script language="javascript" src="../js/basic.js"></script>
<script language="javascript" src="js/index.js"></script>
<script language="javascript">
function xhonc(x){
location.href="protp.php?id="+x+"&bh=<?=$bh?>&control=update&xh="+document.getElementById("xh"+x).value;
}
</script>
</head>
<body style="background:#f7f7f7;">
<? include("top.php");?>



<div class="personal_center main_wrap clear">
<? include("left.php");?>
<div class="realName">
        <div class="rn_title">
            <span>图片管理</span>
        </div>

<!--RB-->
<div class="right">

 <? systs("恭喜您，操作成功!","protp.php?bh=".$bh)?>
 <ul class="protpcap">
 <li class="l1">图片</li>
 <li class="l2">排序</li>
 <li class="l3">最后更新</li>
 <li class="l4">操作</li>
 </ul>
 <ul class="listcap1">
 <li class="l1"><input name="C2" type="checkbox" onclick="xuan()" /> 全选</li>
 <li class="l2">
 <a href="javascript:void(0)" onclick="NcheckDEL(8,'yjcode_tp')" class="a2">删除</a>
 </li>
 <li class="l3"></li>
 </ul>
 <? while1("*","yjcode_tp where bh='".$bh."' and userid=".$userid." order by xh asc");while($row1=mysql_fetch_array($res1)){$tp="../".str_replace(".","-2.",$row1[tp]);?>
 <ul class="protplist">
 <li class="l1"><input name="C1" type="checkbox" value="<?=$row1[id]?>" /></li>
 <li class="l2"><a href="../<?=$row1[tp]?>" target="_blank"><img border="0" class="imgtp" src="<?=$tp?>" width="52" height="52" align="left" /></a></li>
 <li class="l3"><input type="text" value="<?=$row1[xh]?>" id="xh<?=$row1[id]?>" style="width:30px;margin:0 0 8px 0;text-align:center;" /><br><a href="javascript:void(0);" class="blue" onclick="xhonc(<?=$row1[id]?>)">【保存】</a></li>
 <li class="l4"><?=$row1[sj]?></li>
 <li class="l5"><a href="../<?=$row1[tp]?>" target="_blank">查看图片</a></li>
 </ul>
 <? }?>

</div> 
<!--RE-->

</div>
<? include("bottom.php");?>
</body>
</html>