<?php
require_once("../check.php");
require_once("../../config.php");
isset($_GET['danhao'])?$danhao=$_GET['danhao']:$danhao=null;
isset($_GET['id'])?$id=$_GET['id']:$id=null;
$dansql = "select * from dunling_renwu_log where id = '$id' and username='$username'";
$gao = mysql_query($dansql,$config);
$g = mysql_fetch_array($gao);
mysql_close($config);
?>
<!DOCTYPE HTML>
<html>
<head>
<title>任务审核</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="../js/jquery-1.11.1.min.js"></script>
</head>
<body>

<script type="text/javascript">
$(function(){
   $(".form").click(function(){
    var id = $("#idz").val();
    var shenhe = $(this).attr("id");
    if(shenhe=="1"){
    var conok = confirm('确认审核通过并发放拥金给用户?');
    }else{
    var conok = confirm('确认此稿件不符合任务要求并给予拒绝?');
    }
   if(conok){
    $.post("php/shenhe1.php",{
        id:id,
        shenhe:shenhe
    },function(aa,bb){
        if(aa=="ok"){
            var fh = confirm('审核结果已保存,是否返回审核列表!');
            if(fh){
                location.href='shengao.php';
                return false;
            }else{
               window.location.reload();
               return false;
            }
        }
        
    });
    
    
    
    
    
    
   }
    
   
});

$("#leftfh").click(function(){
location.href='shengao.php';
});
});
</script>
<style>
#renwu{
    margin-bottom:100px;
    display:none;
    margin-top:15px;
    width:1000px;
    height:auto;
    display:table;
    margin-left:auto;
    margin-right:auto;
    font-family:微软雅黑;
    border:1px solid #616161;
    border-radius: 5px;
    padding-bottom:25px;
}

#renwu .title{
    width:1000px;
    height:40px;
    line-height:40px;
    text-align:center;
    font-size:18px;
    background-color:#616161;
    color:#FFF;
}
#renwu .W100{
    width:100px;
    height:40px;
    line-height:40px;
    text-align:center;
}
#renwu .W880{
    width:880px;
    height:auto;
    line-height:30px;
    text-align:left;
    color: #4D4D4D;
}
#renwu input.button{
    width:200px;
    height:30px;
    line-height:30px;
}
#beizhu{
    width:650px;
    height:90px;
    resize:none;
    font-size:16px;
    line-height:30px;
    color: #4D4D4D;
}
img{
    max-width:550px;
}
#leftfh{
    width:50px;
    height:250px;
    background-image: url("../images/history.png");
    position: fixed;
    left:0;
    top:150px;
}

</style>

<div id="leftfh"></div>
<div id="renwu">
<div class="title">任务编号:<?php echo $g['danhao'];?></div>

<input id="idz" value="<?php echo $g['id'];?>" type="hidden" />
<table>
<tr><td class="W100">任务编号:</td><td class="W880"><?php echo $g['danhao'];?></td></tr>
<tr><td class="W100">审核状态:</td><td class="W880"><?php if($g['shenhe']=="1"){
    echo '<span style="color:green;">已审核通过</span>';
}elseif(($g['shenhe']=="0")){
    echo '<span style="color:red;">未审核</span>&nbsp;&nbsp;';
    echo '<input type="button" value="通过" class="form" id="1" >&nbsp;<input type="button" value="拒绝" class="form" id="2" >';
}elseif($g['shenhe']=="2"){
    echo '<span style="color:red;">已拒绝</span>&nbsp;&nbsp;';
}?></td></tr>
<tr><td class="W100">交稿账号:</td><td class="W880"><?php echo $g['user'];?></td></tr>
<tr><td class="W100">交稿时间:</td><td class="W880"><?php echo date("Y-m-d H:i:s",$g['datetime']);?></td></tr>
<tr><td class="W100">任务标题:</td><td class="W880"><?php echo $g['title'];?></td></tr>
<tr><td class="W100">任务拥金:</td><td class="W880"><span style="color: #00C431;font-size:24px;"><?php echo $g['danjia'];?></span><span style="font-size: 12px;">金币</span></td></tr>
<tr><td class="W100" style="vertical-align:top;line-height:30px;">任务说明:</td><td class="W880"><?php echo $g['content'];?></td></tr>
<tr><td class="W100" style="vertical-align:top;line-height:30px;">交稿备注:</td><td class="W880" style="color:#FF0000;"><?php echo $g['beizhu'];?></td></tr>
<tr><td class="W100" style="vertical-align:top;line-height:30px;">任务截图:</td><td><img src="<?php echo $g['img'];?>"/></td></tr>
<tr><td class="W100"></td><td class="W880"></td></tr>
</table>

</div>


</body>
</html>