<?php
session_start();
header("content-type:text/html;charset=utf-8");
error_reporting(0);
date_default_timezone_set("PRC");
if(!file_exists("sql.php")){header("location:../install/index.php");exit;} 
if(isset($_SESSION['admin_name'])){$admin_name=$_SESSION['admin_name'];}else{header("location:admin/admin.php");exit;}
require "sql.php";
$ye=isset($_GET['ye'])?$_GET['ye']:1;
$admin_logo_sql="select * from admin_logo";
$admin_logo_row=mysql_fetch_assoc(mysql_query($admin_logo_sql));
$admin_dibu_sql="select * from admin_dibu";
$admin_dibu_row=mysql_fetch_assoc(mysql_query($admin_dibu_sql));
$tishi_sql="select count(*) from tixian_shenhe where shifoutongguo=0";
$tishi_row=mysql_fetch_row(mysql_query($tishi_sql));
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7"><!– IE7 mode –>
<link href="../favicon.ico" type="image/x-icon" rel="icon"/>
	<title>诗龙分享传播推广系统</title>
    <script src="../jquery.js"></script>
    <style>
    *{
        margin:0px;
        padding:0px;
        font-family: 微软雅黑;
    }
    a{
        text-decoration: none;
    }
    li{
        list-style-type: none;
    }
    .main{
        width: 1280px;
        height:auto;
        margin: 0 auto;
    }
    .topp{
        width:1280px;
        height: 80px;
        background:#F9F9F9;
            }
    .top{
        width:1280px;
        height:200px;
    }
    .top img{
        vertical-align: middle;
    }
    .top span{
        font-weight: bold;
        font-size: 30px;
        color:#888872;
    }
    .top2{
        margin-top: 10px;
        width: 1280px;
        height:50px;
        background:#FDFDFD;
    }
    .top2 ul li{
        float:left;
        list-style: none;
        padding-left:50px;
        line-height:50px;
    }

    .daohang{
        width: 1280px;
        height:50px;
        background: #009999;

    }
    .daohang p{
        line-height:50px;
    }
    .daohang a{
        font-weight: bold;
        color:#fff;
        font-size:18px;
        padding: 14px 30px 14px 30px;
    }
    .buttom{
        width: 1280px;
        height:1000px;
        
    }
    .butleft{
        width:200px;
        height:970px;
        background:#F9F9F9;
        float:left;
        text-align: center;
        margin-top:30px;
    }
    .butleft ul li a{
        color:#009999;
    }
    .butleft li{
        list-style:none;
        line-height: 30px;
    }
    .leftcaidan{
        background:#009999;
        color:#fff;
        font-size:18px;
        cursor: pointer;
    }

    .butright{
        width:1080px;
        height:1000px;
        float: left;
        text-align: center;
    }
    .dibu{
        width:1280px;
        height: 300px;
        background: #333438;
        clear: both;
        text-align:center;
        font-size:15px;
        color:#888872;
    }

    </style>
</head>
<body>
<div class="beijing" style="display:none;width: 100%;height:2000px;position:absolute;top: 0px;left: 0px;background:#787878;opacity:0.3;filter: alpha(opacity=30);"></div>
<div id="ceng" style="display: none;box-shadow:3px 3px 3px 3px #333438;background:#fff;width:700px;height:620px;text-align: center;border:1px solid #3D95D5;position: absolute;top:50%;left:50%;margin-top:-310px;margin-left:-350px;">
<p style="background: #3D95D5;padding:5px 0px 5px 0px;font-size: 18px;color:#fff;">
推广图文修改<img id="guanbi" style="position: absolute;top: 5px;left:650px;" src="image/guanbi.png"/>
</p>
<div class="renwu">
<center>
<form id="xg_form" action="renwu/neirong_xg.php" method="post" enctype="multipart/form-data">
<table cellspacing="10">
<tr>
<td>
<span>ID:</span>
</td>
<td>
<span id="xg_id"></span>
</td>
</tr>
<tr>
<td>
<span>图文标题:</span>
</td>
<td>
<input id="xg_biaoti" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="biaoti"/>
</td>
</tr>
<tr>
<td>
<span>跳转网址:</span>
</td>
<td>
<input id="xg_wangzhi" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="wangzhi"/>
</td>
</tr>
<tr>
<td>
<span>跳转时间:</span>
</td>
<td>
<input id="xg_shijian" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="shijian"/>
</td>
<td>
秒
</td>
</tr>
<tr>
<td>
<span>上传图片:</span>
</td>
<td>
<input id="xg_img" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="file" name="tupian"/>
</td>
<td>
<img style="width:40px;height:40px;" id="xg_src" src="">
</td>
</tr>
<tr>
<td>
<span>图文内容:</span>
</td>
<td>
<textarea id="xg_neirong" style="resize:none;height:120px; width:350px;padding: 5px 0px 5px 0px;" name="neirong"></textarea>
</td>
<td>

</td>
</tr>

<tr>
<td>
<span>推广价格：</span>
</td>
<td>
<input id="xg_jiage" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="jiage"/>
</td>
</tr>
<tr>
<td>
<span>每个价格:</span>
</td>
<td>
<input id="xg_meige" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_meige"/>
</td>
<td>
上下价格必须整除
</td>
</tr>
<tr>
<td>
<span>投放区域:</span>
</td>
<td>
<select id="xg_jilian" style='width:350px;font-size:20px;color:#676767;' name="xg_jilian" >
<option value="全国">全国</option>
<option value="北京市">北京市</option>
<option value="上海市">上海市</option>
<option value="天津市">天津市</option>
<option value="重庆市">重庆市</option>
<option value="河北省">河北省</option>
<option value="山西省">山西省</option>
<option value="辽宁省">辽宁省</option>
<option value="吉林省">吉林省</option>
<option value="黑龙江省">黑龙江省</option>
<option value="江苏省">江苏省</option>
<option value="浙江省">浙江省</option>
<option value="安徽省">安徽省</option>
<option value="福建省">福建省</option>
<option value="江西省">江西省</option>
<option value="山东省">山东省</option>
<option value="河南省">河南省</option>
<option value="湖北省">湖北省</option>
<option value="湖南省">湖南省</option>
<option value="广东省">广东省</option>
<option value="海南省">海南省</option>
<option value="四川省">四川省</option>
<option value="贵州省">贵州省</option>
<option value="云南省">云南省</option>
<option value="陕西省">陕西省</option>
<option value="甘肃省">甘肃省</option>
<option value="青海省">青海省</option>
<option value="内蒙古自治区">内蒙古自治区</option>
<option value="广西壮族自治区">广西壮族自治区</option>
<option value="西藏自治区">西藏自治区</option>
<option value="宁夏回族自治区">宁夏回族自治区</option>
<option value="新疆维吾尔自治区">新疆维吾尔自治区</option>
<option value="台湾">台湾</option>
<option value="香港">香港</option>
<option value="澳门">澳门</option>
</select>
</td>
</tr>
<tr>
<td>
<span>任务结束:</span>
</td>
<td>
<input id="jieshu1" style="margin-left: 10px;height:20px;" type="radio" name="jieshu" value="0"/>否
<input id="jieshu2" style="margin-left: 10px;height:20px;" type="radio" name="jieshu" value="1"/>是
</td>
</tr>
<tr>
<td>
</td>
<td>
<input id="subid" style="width:60px;" type="button" value="修改"/>
<input style="width:60px;" type="reset" value="重置"/>
</td>
</tr>
</table>
<input id="xg_image" type="hidden" name="xg_image">
<input id="xg_geshu" type="hidden" name="xg_geshu">
<input id="xg_id2" type="hidden" name="xg_id2">
</form>
</center>
</div>
</div>
 

<div id="xg_user_ceng" style="display: none;box-shadow:3px 3px 3px 3px #333438;background:#fff;width:700px;height:620px;text-align: center;border:1px solid #3D95D5;position: absolute;top:50%;left:50%;margin-top:-310px;margin-left:-350px;">
<p style="background: #3D95D5;padding:5px 0px 5px 0px;font-size: 18px;color:#fff;">
用户修改<img id="xg_user_guanbi" style="position: absolute;top: 5px;left:650px;" src="image/guanbi.png"/>
</p>
<div class="xg_user_div">
<center>
<form id="xg_user_form" action="user/xg_user.php" method="post">
<table cellspacing="20">
<tr>
<td>
<span>当前ID:</span>
</td>
<td>
<span id="xg_user_id"></span>
</td>
</tr>
<tr>
<td>
<span>会员名称:</span>
</td>
<td>
<input id="xg_user_username" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_user_username"/>
</td>
</tr>
<tr>
<td>
<span>QQ账号:</span>
</td>
<td>
<input id="xg_user_qq" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_user_qq"/>
</td>
</tr>
<tr>
<td>
<span>支付宝账号:</span>
</td>
<td>
<input id="xg_user_zhifubaozhanghao" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_user_zhifubaozhanghao"/>
</td>
</tr>
<tr>
<td>
<span>支付宝姓名:</span>
</td>
<td>
<input id="xg_user_zhifubaoxingming" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_user_zhifubaoxingming"/>
</td>
</tr>
<tr>
<td>
<span>用户状态:</span>
</td>
<td>
<input id="xg_user_zanting1" type="radio" name="xg_user_zanting" value="0"/>正常
<input id="xg_user_zanting2" type="radio" name="xg_user_zanting" value="1"/>停止
</td>
</tr>
<tr>
<td>
</td>
<td>
<input id="xg_user_submit" style="width:60px;" type="submit" value="修改"/>
<input style="width:60px;" type="reset" value="重置"/>
</td>
</tr>
</table>
<input id="xg_user_hid" type="hidden" name="xg_user_hid">
</form>
</center>
</div>
</div>


<div id="xg_tixian_ceng" style="display: none;box-shadow:3px 3px 3px 3px #333438;background:#fff;width:700px;height:620px;text-align: center;border:1px solid #3D95D5;position: absolute;top:50%;left:50%;margin-top:-310px;margin-left:-350px;">
<p style="background: #3D95D5;padding:5px 0px 5px 0px;font-size: 18px;color:#fff;">
提现修改<img id="xg_tixian_guanbi" style="position: absolute;top: 5px;left:650px;" src="image/guanbi.png"/>
</p>
<div class="xg_tixian_div">
<center>
<form id="xg_tixian_form" action="tixian/user_tixian_xg.php" method="post">
<table cellspacing="20">
<tr>
<td>
<span>当前ID:</span>
</td>
<td>
<span id="xg_tixian_id"></span>
</td>
</tr>
<tr>
<td>
<span>会员名称:</span>
</td>
<td>
<input id="xg_tixian_username" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_tixian_username"/>
</td>
</tr>
<tr>
<td>
<span>用户总额:</span>
</td>
<td>
<input id="xg_tixian_zonger" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_tixian_zonger"/>
</td>
<td>
元
</td>
</tr>
<tr>
<td>
<span>提现金额:</span>
</td>
<td>
<input id="xg_tixian_jiner" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_tixian_jiner"/>
</td>
<td>
元
</td>
</tr>
<tr>
<td>
<span>账户余额:</span>
</td>
<td>
<input id="xg_tixian_yuer" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_tixian_yuer"/>
</td>
<td>
元
</td>
</tr>
<tr>
<td>
<span>审核状态:</span>
</td>
<td>
<input id="xg_tixian_shenhe1" type="radio" name="xg_tixian_shenhe" value="0"/>审核中
<input id="xg_tixian_shenhe2" type="radio" name="xg_tixian_shenhe" value="1"/>通过
<input id="xg_tixian_shenhe3" type="radio" name="xg_tixian_shenhe" value="2"/>未过
</td>
</tr>
<tr>
<td>
<span>支付状态:</span>
</td>
<td>
<input id="xg_tixian_zhifu1" type="radio" name="xg_tixian_zhifu" value="0"/>未支付
<input id="xg_tixian_zhifu2" type="radio" name="xg_tixian_zhifu" value="1"/>已支付
</td>
</tr>
<tr>
<td>
</td>
<td>
<input id="xg_tixian_submit" style="width:60px;" type="submit" value="修改"/>
<input style="width:60px;" type="reset" value="重置"/>
</td>
</tr>
</table>
<input id="xg_tixian_hid" type="hidden" name="xg_tixian_hid">
</form>
</center>
</div>
</div>

<div id="xg_zonger_ceng" style="display: none;box-shadow:3px 3px 3px 3px #333438;background:#fff;width:700px;height:620px;text-align: center;border:1px solid #3D95D5;position: absolute;top:50%;left:50%;margin-top:-310px;margin-left:-350px;">
<p style="background: #3D95D5;padding:5px 0px 5px 0px;font-size: 18px;color:#fff;">
会员账户修改<img id="xg_zonger_guanbi" style="position: absolute;top: 5px;left:650px;" src="image/guanbi.png"/>
</p>
<div class="xg_zonger_div">
<center>
<form id="xg_zonger_form" action="tixian/xg_zonger_add.php" method="post">
<table cellspacing="20">
<tr>
<td>
<span>当前ID:</span>
</td>
<td>
<span id="xg_zonger_id"></span>
</td>
</tr>
<tr>
<td>
<span>会员名称:</span>
</td>
<td>
<input id="xg_zonger_username" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_zonger_username"/>
</td>
</tr>
<tr>
<td>
<span>账户总额:</span>
</td>
<td>
<input id="xg_zonger_jiage" style="height:25px; width:350px;padding: 5px 0px 5px 0px;" type="text" name="xg_zonger_jiage"/>
</td>
<td>元
</td>
</tr>
<tr>
<td>
</td>
<td>
<input id="xg_zonger_submit" style="width:60px;" type="submit" value="修改"/>
<input style="width:60px;" type="reset" value="重置"/>
</td>
</tr>
</table>
<input id="xg_zonger_hid" type="hidden" name="xg_zonger_hid">
</form>
</center>
</div>
</div>


<div class="main">
<div class="topp">
<p style="line-height:80px;">
<span>&nbsp;&nbsp;欢迎：</span><span style="color: blue;"><?php echo $admin_name;?></span><a href="admin/loginout.php"style="margin-left: 1000px;">退出后台</a>
</p>
</div>
<div class="top">
<p style="line-height:200px;"><img style="width:100px;height: 100px;" src="image/<?php echo $admin_logo_row['image'];?>"/><span>&nbsp;<?php echo $admin_logo_row['logo'];?></span>
</p>
</div>
<div class="daohang">
<p>
<a href="index.php?ye=tuwenrenwu">任务发布
</a>
<a href="index.php?ye=caiwu_mingxi">财务明细
</a>
<a href="index.php?ye=user_index">用户管理
</a>
<a href="index.php?ye=xiaoxi_fabu">发布消息
</a>
<a href="index.php?ye=zhinan">使用指南
</a>
<a href="index.php?ye=guanfang">联系我们
</a>
<a href="../index.php" target="_blank">前台首页
</a>
<a href="index.php?ye=ss">系统授权
</a>
<a href="http://www.shilongkeji.com/demo1/index.php">演示
</a>
</p>
</div>
<div class="top2">
<ul>
<?php
$onlinecount="select count(id) onid from user";
$onlinecountrst=mysql_query($onlinecount);
if($onlinecountrow=mysql_fetch_assoc($onlinecountrst)){
    echo "<li>会员总数：<span style='color: red;'>{$onlinecountrow['onid']}</span>人</li>"; 
}
$jinricount="select count(id) ip,sum(jiage) jg  from user_mingxi where time2=".date("Ymd",time())." group by time2";
$jinricountrst=mysql_query($jinricount);
if($jinricountrow=mysql_fetch_assoc($jinricountrst)){
    echo "<li>今日推广金额：<span style='color: red;'>".round($jinricountrow['jg'],3)."</span>元</li>";
    echo "<li>今日ip量：<span style='color: red;'>{$jinricountrow['ip']}</span>个</li>";
}else{
    echo "<li>今日推广金额：<span style='color: red;'>0</span>元</li>";
    echo "<li>今日ip量：<span style='color: red;'>0</span>个</li>";
}
echo "<li>";
if($tishi_row[0]>0){
    echo "<a href='index.php?ye=yonghutixian' style='color: red;'>你有{$tishi_row[0]}条提现消息。</a>";
}else{echo "";}
echo "</li>";


?>

</ul>
</div>
<div class="buttom">
<div class="butleft">
<ul>
<li class="leftcaidan" id="leftcaidan1">推广列表</li>
<li class="caidan1 caidan_mouse"><a href="index.php?ye=tuwenrenwu">点击推广发布</a></li>
<li class="caidan1 caidan_mouse"><a href="index.php?ye=neirongguanli">点击推广管理</a></li>
<li class="leftcaidan" id="leftcaidan3">财务列表</li>
<li class="caidan3 caidan_mouse"><a href="index.php?ye=yonghutixian">用户提现审核</a></li>
<li class="caidan3 caidan_mouse"><a href="index.php?ye=caiwu_mingxi">收入明细列表</a></li>
<li class="caidan3 caidan_mouse"><a href="index.php?ye=user_zonger">用户账户总额</a></li>
<li class="leftcaidan" id="leftcaidan2">用户列表</li>
<li class="caidan2 caidan_mouse"><a href="index.php?ye=user_index">会员管理列表</a></li>
<li class="caidan2 caidan_mouse"><a href="index.php?ye=search">搜索用户资料</a></li>
<li class="leftcaidan" id="leftcaidan5">系统设置</li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=admin_pass">管理员密码修改</a></li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=xg_qq">管理员QQ修改</a></li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=xiaoxi_fabu">系统的消息修改</a></li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=admin_dibu">前后台底部修改</a></li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=admin_logo">前后台logo修改</a></li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=xg_gundong_image">前端滚动图修改</a></li>
<li class="caidan5 caidan_mouse"><a href="index.php?ye=zuogundong">前端左滚动修改</a></li>
</ul>
</div>
<div class="butright">
<?php 
switch($ye){
    case "neirongguanli":
        require "renwu/neirongguanli.php";
        break;
    case "tuwenrenwu":
        require "renwu/fabu_dianji.php";
        break;  
    case "tianjiacaiwu":
        require "caiwumingxi/tianjiacaiwu.php";
        break;  
    case "tj_data":
        require "ip/tj_data.php";
        break;
    case "user_index":
        require "user/user_index.php";
        break;
    case "search":
        require "renwu/search.php";
        break;
    case "search_data":
        require "renwu/search_data.php";
        break;
    case "user_zonger":
        require "tixian/user_zonger.php";
        break;
    case "yonghutixian":
       if(file_exists("admin/ne.php")){
      
            require "tixian/user_tixian.php";
        }else{
            echo "<br><span style='color:red;'>没有授权无此功能！</span>";
        }
        break;
    case "caiwu_mingxi":
       if(file_exists("admin/ne.php")){
            require "tixian/caiwu_mingxi.php";
       }else{
            echo "<br><span style='color:red;'>没有授权无此功能！</span>";
        }
        break;
    case "admin_pass":
        require "xitong/admin_pass.php";
        break;
    case "xiaoxi_fabu":
        require "xitong/xiaoxi_fabu.php";
        break;
    case "zuogundong":
        require "xitong/zuogundong.php";
        break;
    case "admin_logo":
        require "xitong/admin_logo.php";
        break;
    case "admin_dibu":
        require "xitong/admin_dibu.php";
        break;
    case "xg_gundong_image":
        require "xitong/xg_gundong_image.php";
        break;
    case "xg_qq":
        require "xitong/xg_qq.php";
        break;
    case "zhinan":
        require "xitong/zhinan.php";
        break;
    case "guanfang":
        require "xitong/guanfang.php";
        break;
    case "ss":
        require "xitong/ss.php";
        break;
    case 1:
        require "renwu/neirongguanli.php";
        break;
}
?>
</div>
<div class="dibu">
<br>
<?php
     $dibu=str_replace("@",";",$admin_dibu_row['dibu']);
     echo htmlspecialchars_decode($dibu); 
    
?>
<br>
<p><img src="../image/qq.png"/>&nbsp;<img src="../image/360.jpg"/></p>
</div>
</div>

</div>
</body>
<script>
var ua=navigator.userAgent;
var chromeid=ua.search(/chrome/i);

$("#xg_zonger_guanbi").click(function(){$(".beijing").css({"display":"none"});$("#xg_zonger_ceng").css({"display":"none"});})
$(".xg_zonger_class").click(function(){

   if(chromeid>=0){
       var gundong=document.body.scrollTop=0;
   }else{
       var gundong=document.documentElement.scrollTop=0;
   }
    $(".beijing").css({"display":"block"});
    $("#xg_zonger_ceng").css({"display":"block"});
    xg_zonger_id2=$(this).attr("xg_zonger_data");
    $.post("tixian/xg_zonger_ajax.php",{"xg_zonger_id":xg_zonger_id2},function(data){
        $("#xg_zonger_id").html(data.id);
        $("#xg_zonger_username").attr("value",data.username);
        $("#xg_zonger_jiage").attr("value",data.zonger);
        $("#xg_zonger_hid").attr("value",data.id);
    },"json");
    return false;
})



$("#xg_tixian_guanbi").click(function(){$(".beijing").css({"display":"none"});$("#xg_tixian_ceng").css({"display":"none"});})
$(".xg_tixian_class").click(function(){

   if(chromeid>=0){
       var gundong=document.body.scrollTop=0;
   }else{
       var gundong=document.documentElement.scrollTop=0;
   }
    $(".beijing").css({"display":"block"});
    $("#xg_tixian_ceng").css({"display":"block"});
    xg_tixian_id2=$(this).attr("xg_tixian_data");
    $.post("tixian/xg_tixian_ajax.php",{"xg_tixian_id":xg_tixian_id2},function(data){
        $("#xg_tixian_id").html(data.id);
        $("#xg_tixian_username").attr("value",data.username);
        $("#xg_tixian_zonger").attr("value",data.zonger);
        $("#xg_tixian_jiner").attr("value",data.tixianjiner);
        $("#xg_tixian_yuer").attr("value",data.tixian_yuer);
        if(data.shifoutongguo==0){$("#xg_tixian_shenhe1").attr("checked","true");}
        if(data.shifoutongguo==1){$("#xg_tixian_shenhe2").attr("checked","true");}
        if(data.shifoutongguo==2){$("#xg_tixian_shenhe3").attr("checked","true");}
        if(data.shifouzhifu==0){$("#xg_tixian_zhifu1").attr("checked","true");}else{$("#xg_tixian_zhifu2").attr("checked","true");}
        $("#xg_tixian_hid").attr("value",data.id);
    },"json");
    return false;
})

$("#xg_user_guanbi").click(function(){$(".beijing").css({"display":"none"});$("#xg_user_ceng").css({"display":"none"});})
$(".xg_user_class").click(function(){

   if(chromeid>=0){
       var gundong=document.body.scrollTop=0;
   }else{
       var gundong=document.documentElement.scrollTop=0;
   }
    $(".beijing").css({"display":"block"});
    $("#xg_user_ceng").css({"display":"block"});
    xg_user_id2=$(this).attr("xg_user_data");
    $.post("user/xg_user_ajax.php",{"xg_user_id":xg_user_id2},function(data){
        $("#xg_user_id").html(data.id);
        $("#xg_user_username").attr("value",data.username);
        $("#xg_user_qq").attr("value",data.qq);
        $("#xg_user_zhifubaozhanghao").attr("value",data.zhifubao);
        $("#xg_user_zhifubaoxingming").attr("value",data.xingming);
        if(data.zanting==0){$("#xg_user_zanting1").attr("checked","true");}else{$("#xg_user_zanting2").attr("checked","true")}
        $("#xg_user_hid").attr("value",data.id)
    },"json");
    return false;
})
$(".update1").click(function(){
       if(chromeid>=0){
       var gundong=document.body.scrollTop=0;
   }else{
       var gundong=document.documentElement.scrollTop=0;
   }
    $(".beijing").css({"display":"block"});
    $("#ceng").css({"display":"block"});
    ajax_userid2=$(this).attr("userid");
    $.post("renwu/xg_ajax.php",{"xgajax_id":ajax_userid2},function(data){
        $("#xg_id").html(data.id);
        $("#xg_biaoti").attr("value",data.biaoti);
        $("#xg_wangzhi").attr("value",data.wangzhi);
        $("#xg_shijian").attr("value",data.tiaozhuan);
        $("#xg_src").attr("src","../image/wenzhangimage/"+data.image);
        $("#xg_neirong").attr("value",data.neirong);
        $("#xg_jiage").attr("value",data.jiner);
        $("#xg_image").attr("value",data.image);
        $("#xg_meige").attr("value",data.meijian);
        $("#xg_jilian").attr("value",data.jilian);
        $("#xg_geshu").attr("value",data.jianshu);
        $("#xg_id2").attr("value",data.id);
        if(data.jieshu==0){
            $("#jieshu1").attr("checked","true");
        }else{
            $("#jieshu2").attr("checked","true");
        }

    },"json");
    return false;
})




$("#xg_jiage").keyup(function(){
    shurujiner=$(this).val();
if(!$.isNumeric(shurujiner)){
    $(this).val("");
    }

if($(this).val()==""){
    $("#xg_meige").val("");
    $("#xg_geshu").val("");
       
}
})



$("#xg_meige").blur(function(){
var shurujiner1=$.trim($("#xg_jiage").val());
var meigejiage=$.trim($(this).val());
if(!$.isNumeric(meigejiage)){$(this).val("");}
var zhengchu=(shurujiner1*1000)/(meigejiage*1000);
    if((/^(\+|-)?\d+$/.test(zhengchu))){  
           if(shurujiner1!="" && meigejiage!=""){
            $("#xg_geshu").val(zhengchu);}
        return true;  
    }else{  
        $(this).val("");  
        return false;
         
    }


})

$("#subid").click(function(){
    $("#xg_meige").blur();
    if($("#xg_jiage").val() && $("#xg_meige").val()){
        $("#xg_form").submit()
    }else{
        alert("价格为空或不能整除")
    }
})  


$("#guanbi").click(function(){$(".beijing").css({"display":"none"});$("#ceng").css({"display":"none"});})
$("#leftcaidan1").click(function(){$(".caidan1").toggle();});
$("#leftcaidan2").click(function(){$(".caidan2").toggle();});
$("#leftcaidan3").click(function(){$(".caidan3").toggle();});
$("#leftcaidan4").click(function(){$(".caidan4").toggle();});
$("#leftcaidan5").click(function(){$(".caidan5").toggle();});

$(".daohang a").mouseenter(function(){
    $(this).css({"background":"#00CECE","padding":"11px 30px 11px 30px"});

});
$(".daohang a").mouseleave(function(){
    $(this).css({"background":"#009999","padding":"11px 30px 11px 30px"});
});

$(".caidan_mouse").mouseenter(function(){
    $(this).css({"background":"#00DBDB"});
    $(this).children().css({"color":"#fff"});

});
$(".caidan_mouse").mouseleave(function(){
    $(this).css({"background":"#F9F9F9"});
    $(this).children().css({"color":"#009999"});
});


$("#imgid").click(function(){$("#xiugai").css({"display":"none"});$("#beijing").css({"display":"none"});});


$("#url").focus(function(){
    $(this).val("");
})

$("#sq_btn").click(function(){
    if($("#url").val()=="" || $("#xlh").val()==""){
        alert("不能为空！");return false;
    }else{
        var aurl=$.trim($("#url").val());
        var axlh=$.trim($("#xlh").val());
        $.ajax({
            type:"get",
            async:false,
            url:"http://www.shilongkeji.com/mobile/ssyz.php?ajaxurl="+aurl+"&ajaxxlh="+axlh+"&callback=?",
            dataType:"jsonp",
            jsonp:"callback",
            jsonpCallback:"arr",
            success:function(json){
                if(json.name=="yes"){
                    $.post("admin/file.php",{"filename":aurl});
                    alert("授权成功！");
                    location="index.php?ye=ss";
                }else{alert("域名或序列号有误。");}
            },
            error:function(){
                alert("失败");
            }
        
        })
    }  
})
</script>
</html>
