首页 > 代码库 > 羽恒梦工厂所有后台的操作页面

羽恒梦工厂所有后台的操作页面

caozuorizhi.php

<?php
session_start();

include("../DBDA.class.php");
$db = new DBDA();
if(empty($_SESSION["htuid"])){
    header("location:loginhoutai.php");
    }
?>
<!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="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-1.11.2.min.js"></script>
<title>无标题文档</title>
<link href="dingdancss.css" rel="stylesheet" type="text/css" />


<style>
#gly{  width:248px; height:41px}
#glysj{  width:248px; height:41px}
#glycz{ width:600px; height:41px}

</style>
</head>

<body>
<!--顶部导航-->
<div id="top">
    <div id="dlxx">
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="htdhl_wai">
    <?php
        $dhlb = "select * from htleibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==2?"htdhl htright":"htdhl" ;
            $color = $k==2?"#faa66a":"#000";
            $bsh =  $k==2?"1":"0";
            echo "<div id=‘dhml{$k}‘ bsh=‘{$bsh}‘ class=‘{$class}‘ style=‘ color:{$color}‘>{$v[1]}</div>";
            }
        
    ?>
    </div>
</div>
<!--中间图片-->

<!--付款记录部分-->
<div id="Paymentrecords" style=" background-image:url(../yuheng/img/51Q58PICvCP_1024.jpg)">
    <div id="htrecords_wai">
        <div id="huiyuanshh">操作日志</div>
        <div style=" float:left; position:relative; left:700px; height:20px; width:60px">用户名</div><div style=" float:left; position:relative; left:700px"><input id="ss_name" class="bianshen"  type="text" /></div> <div style="position:relative; left:700px; float:left; width:80px; height:20px">操作内容</div> <div style=" float:left; position:relative; left:700px"> <input id="ss_fenlei" class="bianshen"   type="text" /></div>
  <div style="clear:both"></div>
  <div style="height:10px; width:1349px"></div>
            <div id="htrecords_form">
                <div id="htrecords_tou">
                    <div style=" width:248px; height:46px" class="htheader htheader1">管理员姓名</div>
                    <div style=" width:600px; height:46px" class="htheader htheader2">操作内容</div>
                    <div style=" width:248px; height:46px" class="htheader htheader3">操作时间</div>
                   
                    
                    
                
                </div>
                <div id="htrecords_nr">
                    
                </div>
                <!--分页开始-->
                <center>
                <div id="fyh">
                <ul class="pagination" id="fy_list">
                   
                </ul>
                </div>
                <input type="hidden" value="1" id="fy_n" />
                </center>
                <!--分页结束-->
                
            </div>
    </div>
</div>
<!--尾部-->
<div id="bottom" >
    <div id="bottomlogo"><img src="img/bottomlogo.png" /></div>
    <div id="contact">
        <div id="tell">联系电话:13738482570</div>
        <div id="qq">QQ号: 3157945123</div>
        <div id="jszc">技术支持:天启网络</div>
    </div>
</div>
</body>
<script type="text/javascript">

$(document).ready(function(e){
    dldjtz();
    JiaZai();
    
    
    //确定总页数的变量
    var zys = 0;
    //查询数据
       
    });

//加载数据方法
    function JiaZai()
    {
        var n = $("#fy_n").val();
        
        $.ajax({
                url:"rizhichuli.php",
                async:false,
                data:{n:n,type:1},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        var s ="";
                        var hang = data.split("|");
                        var strs = "";
                        for(var i=0;i<hang.length;i++)
                        {
                            var lie = hang[i].split("^");
                        
                            
                            strs+="<div class=‘htcontent htcontent1‘ id=‘gly‘>"+lie[1]+"</div><div id=‘glycz‘ class=‘htcontent htcontent2‘>"+lie[2]+"</div><div id=‘glysj‘ class=‘htcontent htcontent3‘>"+lie[3]+"</div>";
                            
                        }
                        $("#htrecords_nr").html(strs);
                        
                        
                    }
            });
            dchaxun();
        
        //获取分页数(列表)
        $.ajax({
                url:"rizhichuli.php",
                data:{type:2},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        //总页数
                        var ys = Math.ceil(data/10); 
                        zys = ys;
                        var cd = zys*48;
                        if(zys<5){
                            $("#fyh").css("width",cd+"px");
                            
                            }else{
                            $("#fyh").css("width","235px");
                            }
                        
                        var s = "";
                        //var s = "<li><a id=‘fy_shang‘>&laquo;</a></li>";
                        var dangqian = parseInt($("#fy_n").val()); //当前页数
                        
                        if(dangqian==1){
                            for(var i=dangqian;i<=dangqian+4;i++){
                                    if(i>0 && i<=ys)
                                    {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==2){
                                for(var i=dangqian-1;i<=dangqian+3;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘  style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==zys){
                                for(var i=dangqian-4;i<=dangqian;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                }else if(dangqian==zys-1){
                                    for(var i=dangqian-3;i<=dangqian+1;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                    
                                    }else{
                                for(var i=dangqian-2;i<=dangqian+2;i++){
                                    if(i>0 && i<=ys)
                                    {
                                    if(dangqian==i)
                                    {
                                    s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                    }
                                    else
                                    {
                                        s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                    }
                                    }
                                }
                            }
                        //s += "<li><a id=‘fy_xia‘>&raquo;</a></li>";
                        $("#fy_list").html(s);
                        
                           //给分页列表加事件
                        JiaShiJian();
                    }
                })
    }
    //给分页列表加事件的方法
    function JiaShiJian()
    {

        $(".fy_zhong").click(function(){
                var n = $(this).text();
                $("#fy_n").val(n);
                //加载数据
                JiaZai();
            })
            
    }
    
        
        

function dldjtz(){
    $("#dhml0").click(function(){
        window.location.href="htshh.php";
        });
    $("#dhml1").click(function(){
        window.location.href="houtaishipin.php";
        });
    $("#dhml2").click(function(){
        window.location.href="caozuorizhi.php";
        });
    $("#dhml3").click(function(){
        window.location.href="guanlishipin.php";
        });
    
    }
function dchaxun(){
$(".bianshen").keyup(function(){
    
    
    var n = $("#fy_n").val();
    var ss_name = $("#ss_name").val();
    var ss_fenlei = $("#ss_fenlei").val();
    
    $.ajax({
        url:"rizhichuli.php",
        data:{n:n,ss_name:ss_name,ss_fenlei:ss_fenlei,type:1},
        dataType:"TEXT",
        type:"POST",
        success: function(data){
        
            if(data=="kong"){
                $("#htrecords_nr").html("");
                }else{
                        var s ="";
                        var hang = data.split("|");
                        var strs = "";
                        for(var i=0;i<hang.length;i++)
                        {
                            var lie = hang[i].split("^");
                                                
                            strs+="<div class=‘htcontent htcontent1‘ id=‘gly‘>"+lie[1]+"</div><div id=‘glycz‘ class=‘htcontent htcontent2‘>"+lie[2]+"</div><div id=‘glysj‘ class=‘htcontent htcontent3‘>"+lie[3]+"</div>";
                            
                        }
                        $("#htrecords_nr").html(strs);
        }
        }
        });
    $.ajax({
                url:"rizhichuli.php",
                data:{type:2,ss_name:ss_name,ss_fenlei:ss_fenlei},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        //总页数
                        var ys = Math.ceil(data/10); 
                        zys = ys;
                        var cd = zys*48;
                        if(zys<5){
                            $("#fyh").css("width",cd+"px");
                            
                            }else{
                            $("#fyh").css("width","235px");
                            }
                        
                        var s = "";
                        //var s = "<li><a id=‘fy_shang‘>&laquo;</a></li>";
                        var dangqian = parseInt($("#fy_n").val()); //当前页数
                        
                        if(dangqian==1){
                            for(var i=dangqian;i<=dangqian+4;i++){
                                    if(i>0 && i<=ys)
                                    {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==2){
                                for(var i=dangqian-1;i<=dangqian+3;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘  style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==zys){
                                for(var i=dangqian-4;i<=dangqian;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                }else if(dangqian==zys-1){
                                    for(var i=dangqian-3;i<=dangqian+1;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                    
                                    }else{
                                for(var i=dangqian-2;i<=dangqian+2;i++){
                                    if(i>0 && i<=ys)
                                    {
                                    if(dangqian==i)
                                    {
                                    s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                    }
                                    else
                                    {
                                        s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                    }
                                    }
                                }
                            }
                        //s += "<li><a id=‘fy_xia‘>&raquo;</a></li>";
                        $("#fy_list").html(s);
                        
                           //给分页列表加事件
                        JiaShiJian();
                    }
                })
    
})
}

$(".htdhl").mouseover(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    $(this).css("color","#faa66a");
    });
$(".htdhl").mouseout(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    
    });

</script>
</html>

 

duotianjian.php

<?php
include("../DBDA.class.php");
$db = new DBDA();
$tp = $_POST["tp"];
    $xxm = "";
    $mz="";
    $tj = " 1=1 ";
    $tj2 = " 1=1 ";
    if(!empty($_POST["ss_name"]))
    {
        $xxm = $_POST["ss_name"];
        $tj = " main_name like ‘%{$xxm}%‘  ";
    }
    if(!empty($_POST["ss_fenlei"]))
    {
        $mz = $_POST["ss_fenlei"];
        $tj2 = " main_xiangqing like  ‘%{$mz}%‘  ";
    }

switch($tp){
    case 1:
        $n = $_POST["n"];
        $tg = ($n-1)*10;
        
        $sql2 = "select * from main where {$tj}  and {$tj2} limit {$tg},10 " ;

        $xs=$db->StrQuery($sql2);
        if($xs!=""){
            echo $xs;
            }else{
                echo "kong";
            }
        break;
    case 2:
        $sql3 = "select count(*) from main where {$tj}  and {$tj2}";
        
        echo $db->StrQuery($sql3);
        break;
    
    }

 

?>

glloginchuli.php

<?php
session_start();
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
include("../DBDA.class.php");
$db = new DBDA();
$sql = "select pwd from loginhoutai where uid=‘{$uid}‘";
$mm = $db->StrQuery($sql);
if($mm == $pwd && $pwd!="")
{
    $_SESSION["htuid"]=$uid;
    echo "OK";
}
else
{
    echo "NO";
}
?>

guanlishipin.php

<?php
session_start();

include("../DBDA.class.php");
$db = new DBDA();
if(empty($_SESSION["htuid"])){
    header("location:loginhoutai.php");
    }
?>
<!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="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="login.css" rel="stylesheet" type="text/css" />
<script src="../jquery-1.11.2.min.js"></script>
<style>
#top{ background-image:url(../yuheng/images/header.png); background-repeat:no-repeat; background-position:center; height:158px; width:100%; min-width:1347px; max-width:1920px;}
#dlxx{ margin:0 0 0 auto; text-align:right; height:20px; position:relative; top:10px}
#logo{margin:0 auto; text-align:center;width:290px; height:80px; position:relative; top:36px;}
#htdhl_wai{margin:0 auto; text-align:center; width:1100px; height:35px; position:relative; top:-25px}
.htdhl{ float:left; font-size:26px; width:120px; margin:0 33px; height:30px}
.htright{ margin-left:383px}
#second{background-image:url(img/banner.png); background-repeat:no-repeat; background-position:center; height:308px; width:100%; min-width:1347px; max-width:1920px}
.htdhl:hover{ cursor:pointer}
</style>
<link href="../yuheng/dingdancss.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--导航-->
<div id="top">
    <div id="dlxx">
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="htdhl_wai">
    <?php
        $dhlb = "select * from htleibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==2?"htdhl htright":"htdhl" ;
            $color = $k==3?"#faa66a":"#000";
            $bsh =  $k==3?"1":"0";
            echo "<div id=‘dhml{$k}‘ bsh=‘{$bsh}‘ class=‘{$class}‘ style=‘ color:{$color}‘>{$v[1]}</div>";
            }
        
    ?>
    </div>
</div>
<div style="clear:both"></div>

<!--中间图-->



<div style="clear:both"></div>    
<div style="height:30px; width:1366px"></div>

<div style="height:400px; width:400px">

<form id="sc" action="shangchuan.php" target="hidden_frame" method="post" enctype="multipart/form-data">
    <div id="yl" style="margin-left:0px; width:144px; height:170px; background-size:144px 170px; background-image:url(images/20A58PICnZK_1024.jpg)">
        <input type="file" name="file" style="width:144px; height:170px; float:left; opacity:0;" width="146" onchange="document.getElementById(‘sc‘).submit()"/>
       
    </div>
    <input type="button" value="保存"/>
</form>
<iframe style="display:none;" name="hidden_frame" id="hidden_frame">
</iframe>
<div>



<div id="buju22">
    <form enctype="multipart/form-data" action="scchuli.php" method="POST">
    <div id="sc" style=" height:155px; width:400px">
    <div class="yangshi1">视频名称:<input type="text" name="sp_name" /></div>
    <div class="yangshi1">视频详情:<input type="text" name="sp_xiangqing" /></div>
    <div class="yangshi1">视频观看价格:<input type="text" name="sp_jiage1" /></div>
    <div class="yangshi1">视频下载价格:<input type="text" name="sp_jiage2" /></div>
    <div class="yangshi1">视频分类:
    <select name="sp_leibie" id="xiala">
           
                
    </select></div>
   <div class="yangshi1"> 
选择上传视频:<input type="file" name="file" />
<input style="position:relative; top:60px; left:-280px; height:30px; width:60px" type="submit" id="btn" value="上传" />
</form>
  </div>  
</div>
<div id="bottom" style="position:relative; left:-500px; top:200px">
    <div id="bottomlogo"><img src="img/bottomlogo.png" /></div>
    <div id="contact">
        <div id="tell">联系电话:13738482570</div>
        <div id="qq">QQ号: 3157945123</div>
        <div id="jszc">技术支持:天启网络</div>
    </div>
</div>
</body>
<script type="text/javascript">
//回调函数
function showimg(aa)
{
    var l = document.getElementById("yl");
    l.style.backgroundImage = "url("+aa+")";
}

$(document).ready(function(e) {
    dldjtz();
    $.ajax({
            url:"xiaochuli.php",
            dataType:"TEXT",
            success: function(data){
                
var hang=data.split("|");
    var str="";        
        for(var i=0;i<hang.length;i++){
            var lie = hang[i].split("^");
            str+="<option name=‘"+lie[1]+"‘>"+lie[2]+"</option>";
            
            }
            $("#xiala").html(str);    
            }
            
                
        });
    
    
    $.ajax({
            url:"dhchuli.php",
            dataType:"TEXT",
            success: function(data){
            
                    var hang=data.split("|");

                    var str="";
                    for(var i=0;i<5;i++){
                        if(i==3){
                            var lie=hang[i].split("^");
                                
                                    str+="<a href=http://www.mamicode.com/‘buju.php?code="+lie[1]+"‘><div class=‘daohang_1‘>"+lie[2]+"</div></a>";
                                }else{
                                var lie=hang[i].split("^");
                            str+="<a href=http://www.mamicode.com/‘buju.php?code="+lie[1]+"‘><div class=‘daohang_2‘ code=‘"+lie[1]+"‘>"+lie[2]+"</div></a>";
                                }
                }
                $("#dh_jieshou").html(str);
                }
                
        });
        });

function dldjtz(){
    $("#dhml0").click(function(){
        window.location.href="htshh.php";
        });
    $("#dhml1").click(function(){
        window.location.href="houtaishipin.php";
        });
    $("#dhml2").click(function(){
        window.location.href="caozuorizhi.php";
        });
    $("#dhml3").click(function(){
        window.location.href="guanlishipin.php";
        });
    
    }

$(".htdhl").mouseover(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    $(this).css("color","#faa66a");
    });
$(".htdhl").mouseout(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    
    });


</script>
</html>

houtaishipin.php

<?php
session_start();

include("../DBDA.class.php");
$db = new DBDA();
if(empty($_SESSION["htuid"])){
    header("location:loginhoutai.php");
    }
?>

<!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="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="login.css" rel="stylesheet" type="text/css" />
<script src="../jquery-1.11.2.min.js"></script>
<style>
#top{ background-image:url(../yuheng/images/header.png); background-repeat:no-repeat; background-position:center; height:158px; width:100%; min-width:1347px; max-width:1920px;}
#dlxx{ margin:0 0 0 auto; text-align:right; height:20px; position:relative; top:10px}
#logo{margin:0 auto; text-align:center;width:290px; height:80px; position:relative; top:36px;}
#htdhl_wai{margin:0 auto; text-align:center; width:1100px; height:35px; position:relative; top:-25px}
.htdhl{ float:left; font-size:26px; width:120px; margin:0 33px; height:30px}
.htright{ margin-left:383px}
#second{background-image:url(img/banner.png); background-repeat:no-repeat; background-position:center; height:308px; width:100%; min-width:1347px; max-width:1920px}
.htdhl:hover{ cursor:pointer}
.dh_ht{ width:150px; border-left:0px solid #EEEEEE; background-color:#EEEEEE; height:46px}
#tab{width:1100px;border:1px solid #EEEEEE; text-align:center}
#tab tr td{width:50px;border:1px solid #EEEEEE;border-bottom-width: thin;border-right-style:none;border-left-style:none;border-top-style: none;text-align:center; vertical-align:middle; height:41px}
</style>
<link href="dingdancss.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--导航-->
<div id="top">
    <div id="dlxx">
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="htdhl_wai">
    <?php
        $dhlb = "select * from htleibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==2?"htdhl htright":"htdhl" ;
            $color = $k==1?"#faa66a":"#000";
            $bsh =  $k==1?"1":"0";
            echo "<div id=‘dhml{$k}‘ bsh=‘{$bsh}‘ class=‘{$class}‘ style=‘ color:{$color}‘>{$v[1]}</div>";
            }
        
    ?>
    </div>
</div>
<div style="clear:both"></div>

<!--中间图-->    


<div style="clear:both"></div>    

<!--主页界面-->
<div id="buju" style=" background-image:url(../51Q58PICvCP_1024.jpg)">
<div style="height:40px; width:150px; font-size:26px; position: relative; top:42px; left:20px">视频管理</div>
<div style="height:30px; width:1366px;"></div>
        <div style=" position:relative; top:25px;">
  <!--<form action="piliangshanchu.php" method="post">-->
  
  <!--多条件查询-->
  <div style=" float:left; position:relative; left:800px; top:-20px; height:20px; width:40px">名称</div><div style=" float:left; position:relative; top:-20px; left:800px"><input id="ss_name" class="bianshen"  type="text" /></div> <div style="position:relative; left:800px; top:-20px; float:left; width:40px; height:20px">详情</div> <div style=" float:left; position:relative; top:-20px; left:800px"> <input id="ss_fenlei" class="bianshen"   type="text" /></div>
  <div style="clear:both"></div>
  <div style="height:10px; width:1349px"></div>
       <table id="tab" width="1100px" border="1" cellpadding="0" cellspacing="0";>
        <tr>
            <td class="dh_ht" style="width:150px">视频名称</td>
            <td class="dh_ht" style="width:300px">视频详情</td>
            <td class="dh_ht" style="width:100px">观看价格</td>
            <td class="dh_ht" style="width:100px">下载价格</td>
            <td class="dh_ht" style="width:100px">视频分类</td>
            <td class="dh_ht" style="width:350px">操作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;全选&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="qx" /></td>
        </tr>
    <tbody style="width:164px; border-left:1px solid #EEEEEE" id="fangxinxi"></tbody>
    </div>
    
     <!--
        $sql = "select * from main";
        $attr = $db->Query($sql);
        
        foreach($attr as $v)
        {
            echo "<tr><td>{$v[5]}</td>
            <td>{$v[6]}</td>
            <td>{$v[0]}</td>
            <td>{$v[7]}</td>
            
            <td><a href=http://www.mamicode.com/‘xiugai2.php?code={$v[0]}‘>修改  删除";
        }
    
-->
</table> 

<div style="height:60px; width:80px; position:relative; left:480px; top:10px"><input type="submit" value="批量删除" onclick="return confirm(‘确定删除么‘)" id="bt" /></div>
<div>
<a><img id="td" /></a>
</div>
                <!--分页开始-->
                <center>
                <div id="fyh">
                <ul class="pagination" id="fy_list">
                   
                </ul>
                </div>
                <input type="hidden" value="1" id="fy_n" />
                </center>
                <!--分页结束-->
    </div>

    
 
    
<!--最下面-->

<div id="bottom" >
    <div id="bottomlogo"><img src="img/bottomlogo.png" /></div>
    <div id="contact">
        <div id="tell">联系电话:13738482570</div>
        <div id="qq">QQ号: 3157945123</div>
        <div id="jszc">技术支持:天启网络</div>
    </div>
</div>

</div>
<!--</form>-->
<script type="text/javascript">
$(document).ready(function(e) {
    chaxun();
    dldjtz();
    
    
    
    
    
});


    //给分页列表加事件的方法
    function JiaShiJian()
    {

        $(".fy_zhong").click(function(){
                var n = $(this).text();
                $("#fy_n").val(n);
                //加载数据
                chaxun();
            })
            
    }

function chaxun(){
    
    var n = $("#fy_n").val();
    $.ajax({
        url:"duotiaojian.php",
        data:{n:n,tp:1},
        dataType:"TEXT",
        type:"POST",
        success: function(data){
        var hang=data.split("|");
        var str="";
        for(var i=0;i<hang.length;i++)
            {
                var lie=hang[i].split("^");
                str+="<tr><td>"+lie[5]+"</td><td>"+lie[6]+"</td><td>"+lie[0]+"</td><td>"+lie[7]+"</td><td>"+lie[1]+"</td><td><a href=http://www.mamicode.com/‘xiugai2.php?code="+lie[4]+"‘>修改</a>&nbsp;&nbsp;<a href=http://www.mamicode.com/‘shancu2.php?code="+lie[4]+"‘ onclick=\"return confirm(‘确定删除么?‘)\">删除</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class=‘ck‘ type=‘checkbox‘ value=http://www.mamicode.com/‘"+lie[0]+"‘ bs=‘"+lie[4]+"‘ ></td></tr>";
            
                
            }
            
                $("#fangxinxi").html(str);
            }
            
        });
        $.ajax({
                url:"duotiaojian.php",
                data:{tp:2},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        //总页数
                        var ys = Math.ceil(data/10); 
                        zys = ys;
                        var cd = zys*48;
                        if(zys<5){
                            $("#fyh").css("width",cd+"px");
                            
                            }else{
                            $("#fyh").css("width","235px");
                            }
                        
                        var s = "";
                        //var s = "<li><a id=‘fy_shang‘>&laquo;</a></li>";
                        var dangqian = parseInt($("#fy_n").val()); //当前页数
                        
                        if(dangqian==1){
                            for(var i=dangqian;i<=dangqian+4;i++){
                                    if(i>0 && i<=ys)
                                    {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==2){
                                for(var i=dangqian-1;i<=dangqian+3;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘  style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==zys){
                                for(var i=dangqian-4;i<=dangqian;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                }else if(dangqian==zys-1){
                                    for(var i=dangqian-3;i<=dangqian+1;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                    
                                    }else{
                                for(var i=dangqian-2;i<=dangqian+2;i++){
                                    if(i>0 && i<=ys)
                                    {
                                    if(dangqian==i)
                                    {
                                    s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                    }
                                    else
                                    {
                                        s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                    }
                                    }
                                }
                            }
                        //s += "<li><a id=‘fy_xia‘>&raquo;</a></li>";
                        $("#fy_list").html(s);
                        
                           //给分页列表加事件
                        JiaShiJian();
                    }
                })
    
$(".bianshen").keyup(function(){
    
    
    var n = $("#fy_n").val();
    var ss_name = $("#ss_name").val();
    var ss_fenlei = $("#ss_fenlei").val();
    
    $.ajax({
        url:"duotiaojian.php",
        data:{n:n,ss_name:ss_name,ss_fenlei:ss_fenlei,tp:1},
        dataType:"TEXT",
        type:"POST",
        success: function(data){
            if(data=="kong"){
                $("#fangxinxi").html("");
                }else{
        var hang=data.split("|");
        var str="";
        for(var i=0;i<hang.length;i++)
            {
                var lie=hang[i].split("^");
                str+="<tr><td>"+lie[5]+"</td><td>"+lie[6]+"</td><td>"+lie[0]+"</td><td>"+lie[7]+"</td><td>"+lie[1]+"</td><td><a href=http://www.mamicode.com/‘xiugai2.php?code="+lie[4]+"‘>修改</a>&nbsp;&nbsp;<a href=http://www.mamicode.com/‘shancu2.php?code="+lie[4]+"‘ onclick=\"return confirm(‘确定删除么?‘)\">删除</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class=‘ck‘ type=‘checkbox‘ value=http://www.mamicode.com/‘"+lie[0]+"‘ bs=‘"+lie[4]+"‘ ></td></tr>";
            
                
            }
            
                $("#fangxinxi").html(str);
            }
        }
        });
        
    $.ajax({
                url:"duotiaojian.php",
                data:{tp:2,ss_name:ss_name,ss_fenlei:ss_fenlei},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        //总页数
                        var ys = Math.ceil(data/10); 
                        zys = ys;
                        var cd = zys*48;
                        if(zys<5){
                            $("#fyh").css("width",cd+"px");
                            
                            }else{
                            $("#fyh").css("width","235px");
                            }
                        
                        var s = "";
                        //var s = "<li><a id=‘fy_shang‘>&laquo;</a></li>";
                        var dangqian = parseInt($("#fy_n").val()); //当前页数
                        
                        if(dangqian==1){
                            for(var i=dangqian;i<=dangqian+4;i++){
                                    if(i>0 && i<=ys)
                                    {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==2){
                                for(var i=dangqian-1;i<=dangqian+3;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘  style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==zys){
                                for(var i=dangqian-4;i<=dangqian;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                }else if(dangqian==zys-1){
                                    for(var i=dangqian-3;i<=dangqian+1;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                    
                                    }else{
                                for(var i=dangqian-2;i<=dangqian+2;i++){
                                    if(i>0 && i<=ys)
                                    {
                                    if(dangqian==i)
                                    {
                                    s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                    }
                                    else
                                    {
                                        s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                    }
                                    }
                                }
                            }
                        //s += "<li><a id=‘fy_xia‘>&raquo;</a></li>";
                        $("#fy_list").html(s);
                        
                           //给分页列表加事件
                        JiaShiJian();
                    }
                })
    
})
}

//全选
$("#qx").click(function(){
        var xz = $(this).prop("checked");
        var ck = $(".ck").prop("checked",xz);    
        })
$("#bt").click(function(){
        var attr = new Array();//建立一个数组
        $(".ck").each(function() {//each循环遍历
           if($(this).prop("checked")) //判断被循环的.ck是否被选中
           {
                attr.push($(this).attr("bs")); //去bs的属性取到lie[0],扔到数组attr里面
           }
        });
        var stra = attr.join("‘,‘");//把attr数组里的lie[0]用  ‘,‘  拆分
        
         
        $.ajax({
            url:"piliangshanchu.php",
            data:{stra:stra},
            type:"POST",
            dataType:"TEXT",
            success: function(data){
                window.location.href="houtaishipin.php";
            }
            });
        })
        



//导航
$(document).ready(function(e) {
    $.ajax({
            url:"dhchuli.php",
            dataType:"TEXT",
            success: function(data){
                
                    var hang=data.split("|");

                    var str="";
                    for(var i=0;i<5;i++){
                        if(i==3){
                            var lie=hang[i].split("^");
                                
                                    str+="<a href=http://www.mamicode.com/‘buju.php?code="+lie[1]+"‘><div class=‘daohang_1‘>"+lie[2]+"</div></a>";
                                }else{
                                var lie=hang[i].split("^");
                            str+="<a href=http://www.mamicode.com/‘buju.php?code="+lie[1]+"‘><div class=‘daohang_2‘ code=‘"+lie[1]+"‘>"+lie[2]+"</div></a>";
                                }
                }
                $("#dh_jieshou").html(str);
                }
                
        });
        });

function dldjtz(){
    $("#dhml0").click(function(){
        window.location.href="htshh.php";
        });
    $("#dhml1").click(function(){
        window.location.href="houtaishipin.php";
        });
    $("#dhml2").click(function(){
        window.location.href="caozuorizhi.php";
        });
    $("#dhml3").click(function(){
        window.location.href="guanlishipin.php";
        });
    
    
    
    
    }
        
$(".htdhl").mouseover(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    $(this).css("color","#faa66a");
    });
$(".htdhl").mouseout(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    
    });


</script>

</body>
</html>

houtaizhuce.php

<?php
include("../DBDA.class.php");
$db = new DBDA();

?>
<!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="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="login.css" rel="stylesheet" type="text/css" />
<script src="../jquery-1.11.2.min.js"></script>
<style>
#top{ background-image:url(../yuheng/images/header.png); background-repeat:no-repeat; background-position:center; height:158px; width:100%; min-width:1347px; max-width:1920px;}
#dlxx{ margin:0 0 0 auto; text-align:right; height:20px; position:relative; top:10px}
#logo{margin:0 auto; text-align:center;width:290px; height:80px; position:relative; top:36px;}
#htdhl_wai{margin:0 auto; text-align:center; width:1100px; height:35px; position:relative; top:-25px}
.htdhl{ float:left; font-size:26px; width:120px; margin:0 33px; height:30px}
.htright{ margin-left:383px}
#second{background-image:url(img/banner.png); background-repeat:no-repeat; background-position:center; height:308px; width:100%; min-width:1347px; max-width:1920px}
.htdhl:hover{ cursor:pointer}
</style>
</head>

<body>

<!--导航-->
<div id="top">
    <div id="dlxx">
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="htdhl_wai">
    <?php
        $dhlb = "select * from htleibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==2?"htdhl htright":"htdhl" ;
            echo "<div id=‘dhml{$k}‘ class=‘{$class}‘>{$v[1]}</div>";
            }
        
    ?>
    </div>
</div>
<div style="clear:both"></div>

<!--中间图-->    
<div id="login_tu"></div>
<div style="clear:both"></div>    


<!--登录界面-->
<div id="login_dlb">
<div id="login_dl2">
    
    <div style="height:30px" id="ts"></div>
    <div id="login_uid2">注册新用户名&nbsp;&nbsp;<input type="text" style="height:25px; width:250px" id="zc_uid" /></div>(请输4-10位英文和数字组合的字符)
    <div style="height:20px"></div> 
    <div id="login_pwd2">请输入你密码&nbsp;&nbsp;<input type="password" style="height:25px; width:250px" id="zc_pwd"  /></div>(请输入4-10位英文和数字组合的字符)
    <div style="height:20px"></div>   
    <div id="login_pwd22">再次输入密码&nbsp;&nbsp;<input type="password" style="height:25px; width:250px" id="zc_pwd2"  /></div> (请再次输入您的密码) 
    <div style="position:relative; left:150px; top:20px">
        
    <div style=" float:left; width:40px; height:25px"></div>
    <div style=" float:left"> <input style="width:127px; height:35px; background-color: #C90; border-radius:7px; color:#FFF" type="button" value="立刻注册" id="zhuce" /></div>
    <div style=" float:left; width:20px; height:35px"></div>
    <div style=" float:left"> <a href="loginhoutai.php"><input style="width:47px; height:35px; background-color: #096; border-radius:7px; color:#FFF" type="button" value="取消" id="zhuce" /></a></div>
    
    
    
    </div>
</div>
</div>
<div style="clear:both"></div>
    
<!--最下面-->


<div id="login_zxm" style="background-image:url(images/1111_02.jpg)" )>

</div>



<script type="text/javascript">






$(document).ready(function(e) {
    dldjtz();
    $("#zc_uid").blur(function(){
        
        
        var zc_uid = $("#zc_uid").val();
        
        if(zc_uid.trim().length==zc_uid.length){
            if(zc_uid.indexOf(" ")==-1){
                if(zc_uid.trim().length>3 && zc_uid.trim().length<11){
            
        $.ajax({
            url:"uidchuli.php",
            data:{u:zc_uid},
            type:"POST",
            dataType:"TEXT",
            success: function(data){
                    if(data>0)
                    {
                        $("#ts").html("该用户名已存在");
                        $("#ts").css("color","red");
                    }
                    else
                    {
                        $("#ts").html("该用户名可用");
                        $("#ts").css("color","green");
                    }
                }
            
            });
        }else{
            
            $("#ts").html("账号长度太短或太长");
            $("#ts").css("color","red");
            }
        }else{
            $("#ts").html("账号不能输空格");
            $("#ts").css("color","red");
            }
        }else
        {
            $("#ts").html("账号不能输空格");
            $("#ts").css("color","red");
            }
        })


    
       $("#zhuce").click(function(){
        
        
        var zc_uid = $("#zc_uid").val();
        var zc_pwd = $("#zc_pwd").val();
        var zc_pwd2 = $("#zc_pwd2").val();
         if(zc_uid.trim().length==zc_uid.length){
        if(zc_pwd==zc_pwd2 && zc_pwd.trim().length>3){
            if(zc_pwd.indexOf(" ")==-1){
        
        $.ajax({            
            url:"zhucechulihouta.php",
            data:{zc_uid:zc_uid,zc_pwd:zc_pwd,zc_pwd2:zc_pwd2},
            type:"POST",
            dataType:"TEXT",
            success: function(data){
                 if(data==1){
                     
                     alert("注册成功");
                     window.location.href="loginhoutai.php";
                     
                     }
                     else{
                        
                        alert("注册失败");
                        }
            
                }
            
            });
        
 }else{
           alert("两次输入密码不一致或您输入密码过短")
           }
       }
       else{
            alert("密码不规范")
           }
         }else{
             alert("密码规范")
             }
        })
        
        
       
});


//导航
$(document).ready(function(e) {
    $.ajax({
            url:"dhchuli.php",
            dataType:"TEXT",
            success: function(data){
                
                    var hang=data.split("|");

                    var str="";
                    for(var i=0;i<5;i++){
                        if(i==3){
                            var lie=hang[i].split("^");
                                
                                    str+="<a href=http://www.mamicode.com/‘buju.php?code="+lie[1]+"‘><div class=‘daohang_11‘>"+lie[2]+"</div></a>";
                                }else{
                                var lie=hang[i].split("^");
                            str+="<a href=http://www.mamicode.com/‘buju.php?code="+lie[1]+"‘><div class=‘daohang_21‘ code=‘"+lie[1]+"‘>"+lie[2]+"</div></a>";
                                }
                }
                $("#dh_jieshou").html(str);
                }
                
        });
        });

function dldjtz(){
    $("#dhml0").click(function(){
        window.location.href="htshh.php";
        });
    $("#dhml1").click(function(){
        window.location.href="houtaishipin.php";
        });
    $("#dhml2").click(function(){
        window.location.href="caozuorizhi.php";
        });
    $("#dhml3").click(function(){
        window.location.href="guanlishipin.php";
        });
    
    }

</script>
</body>
</html>

htshh.php

<?php
session_start();

include("../DBDA.class.php");
$db = new DBDA();
if(empty($_SESSION["htuid"])){
    header("location:loginhoutai.php");
    }
?>
<!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="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-1.11.2.min.js"></script>
<title>无标题文档</title>
<link href="dingdancss.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--顶部导航-->
<div id="top">
    <div id="dlxx">
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="htdhl_wai">
    <?php
        $dhlb = "select * from htleibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==2?"htdhl htright":"htdhl" ;
            $color = $k==0?"#faa66a":"#000";
            $bsh =  $k==0?"1":"0";
            echo "<div id=‘dhml{$k}‘ bsh=‘{$bsh}‘ class=‘{$class}‘ style=‘ color:{$color}‘>{$v[1]}</div>";
            }
        
    ?>
    </div>
</div>
<!--中间图片-->

<!--付款记录部分-->
<div id="Paymentrecords" style=" background-image:url(../yuheng/img/51Q58PICvCP_1024.jpg)">
    <div id="htrecords_wai">
        <div id="huiyuanshh">会员审核</div>
        <div style=" float:left; position:relative; left:700px; height:20px; width:80px">购买用户</div><div style=" float:left; position:relative; left:700px"><input id="ss_name" class="bianshen"  type="text" /></div> <div style="position:relative; left:700px; float:left; width:80px; height:20px">商品名称</div> <div style=" float:left; position:relative; left:700px"> <input id="ss_mingch" class="bianshen"   type="text" /></div>
  <div style="clear:both"></div>
  <div style="height:10px; width:1349px"></div>
            <div id="htrecords_form">
                <div id="htrecords_tou">
                    <div class="htheader htheader1">编 号</div>
                    <div class="htheader htheader2">购买用户</div>
                    <div class="htheader htheader3">商品名称</div>
                    <div class="htheader htheader4">购买类型</div>
                    <div class="htheader htheader5">购买时间</div>
                    <div class="htheader htheader6">状 态</div>
                </div>
                <div id="htrecords_nr">
                    
                </div>
                <!--分页开始-->
                <center>
                <div id="fyh">
                <ul class="pagination" id="fy_list">
                   
                </ul>
                </div>
                <input type="hidden" value="1" id="fy_n" />
                </center>
                <!--分页结束-->
                
            </div>
    </div>
</div>
<!--尾部-->
<div id="bottom" >
    <div id="bottomlogo"><img src="img/bottomlogo.png" /></div>
    <div id="contact">
        <div id="tell">联系电话:13738482570</div>
        <div id="qq">QQ号: 3157945123</div>
        <div id="jszc">技术支持:天启网络</div>
    </div>
</div>
</body>
<script type="text/javascript">

$(document).ready(function(e){
    dldjtz();
    JiaZai();
    
    
    //确定总页数的变量
    var zys = 0;
    //查询数据
       
    });

//加载数据方法
    function JiaZai()
    {
        var n = $("#fy_n").val();
        
        $.ajax({
                url:"htshjchuli.php",
                async:false,
                data:{n:n,tp:1,ss_name:"",ss_mingch:""},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        var hang = data.split("|");
                        var strs = "";
                        for(var i=0;i<hang.length;i++)
                        {
                            var lie = hang[i].split("^");
                            var shenhe = lie[5]==1?"已审核":"审核";
                            var color = lie[5]==1?"#0F0":"#F00";
                            strs+="<div class=‘htcontent htcontent1‘>"+lie[0]+"</div><div class=‘htcontent htcontent2‘>"+lie[1]+"</div><div class=‘htcontent htcontent3‘>"+lie[2]+"</div><div class=‘htcontent htcontent4‘>"+lie[3]+"</div><div class=‘htcontent htcontent5‘>"+lie[4]+"</div><div class=‘htcontent htcontent6 ‘ style=‘color:"+color+"‘><a class=‘shenhe"+lie[5]+"‘ yonghu=‘"+lie[2]+"‘  shbs=‘"+lie[0]+"‘>"+shenhe+"</a></div>";
                            
                        }
                        $("#htrecords_nr").html(strs);
                        
                        
                    }
            });
        
        shenheshijian();
        //获取分页数(列表)
        $.ajax({
                url:"htshjchuli.php",
                data:{tp:2,ss_name:"",ss_mingch:""},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        //总页数
                        var ys = Math.ceil(data/10); 
                        zys = ys;
                        var cd = zys*48;
                        if(zys<5){
                            $("#fyh").css("width",cd+"px");
                            
                            }else{
                            $("#fyh").css("width","235px");
                            }
                        
                        var s = "";
                        //var s = "<li><a id=‘fy_shang‘>&laquo;</a></li>";
                        var dangqian = parseInt($("#fy_n").val()); //当前页数
                        
                        if(dangqian==1){
                            for(var i=dangqian;i<=dangqian+4;i++){
                                    if(i>0 && i<=ys)
                                    {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==2){
                                for(var i=dangqian-1;i<=dangqian+3;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘  style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==zys){
                                for(var i=dangqian-4;i<=dangqian;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                }else if(dangqian==zys-1){
                                    for(var i=dangqian-3;i<=dangqian+1;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                    
                                    }else{
                                for(var i=dangqian-2;i<=dangqian+2;i++){
                                    if(i>0 && i<=ys)
                                    {
                                    if(dangqian==i)
                                    {
                                    s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                    }
                                    else
                                    {
                                        s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                    }
                                    }
                                }
                            }
                        //s += "<li><a id=‘fy_xia‘>&raquo;</a></li>";
                        $("#fy_list").html(s);
                        
                           //给分页列表加事件
                        JiaShiJian();
                    }
                })
                schaxun();
    }
    //给分页列表加事件的方法
    function JiaShiJian()
    {
/*        $("#fy_shang").click(function(){
            
                var n = $("#fy_n").val(); 
                if(n>1)
                {
                    n--;
                }
                else
                {
                    n=1;
                }
                $("#fy_n").val(n);
                
                //加载数据
                JiaZai();
            })
        $("#fy_xia").click(function(){
                var n = $("#fy_n").val(); 
                if(n<zys)
                {
                    n++;
                }
                else
                {
                    n=zys;
                }
                $("#fy_n").val(n);
                
                //加载数据
                JiaZai();
            })*/
        $(".fy_zhong").click(function(){
                var n = $(this).text();
                $("#fy_n").val(n);
                //加载数据
                JiaZai();
            })
            
    }
    //审核点击事件
    function shenheshijian(){
        $(".shenhe0").click(function(){
        var num = $(this).attr("shbs");
        var yonghu = $(this).attr("yonghu");
        $.ajax({
            url:"htshjchuli.php",
            data:{num:num,tp:3,yonghu:yonghu},
            type:"POST",
            success: function(data){
                
                
                }
            
            })
        
        JiaZai();
        });    
        
        }
/*function dengluxx(){
    
    $.ajax({
        url:"htshjchuli.php",
        async:false,
        data:{tp:4},
        type:"POST",
        dataType:"TEXT",
        success: function(data){
            $("#dlxx").html(data);
            }
        
        });
    var yh = $("#yonghuming").width();
    var zx = $("#zhuxiao").width();
    var hyzx = $("#huiyuanzhx").width();
    var dl = $("#dl").width();
    var zc = $("#zc").width();
    $("#dlxx").width(yh+zx+hyzx+dl+zc+26);
    
    $("#dl").click(function(){        
        window.location.href="http://www.mamicode.com/login2.php";
        });
    $("#zc").click(function(){        
        window.location.href="http://www.mamicode.com/zhuce.php";
        });
    $("#zhuxiao").click(function(){
        $.ajax({
            url:"htshjchuli.php",
            data:{tp:5},
            type:"POST",
            success: function(data){
                window.location.href="http://www.mamicode.com/login2.php";
                }
            });
        
        });
    $("#huiyuanzhx").click(function(){
        window.location.href="http://www.mamicode.com/yhfukuanjilu.php";
        });
    $("#yonghuming").click(function(){
        window.location.href="http://www.mamicode.com/xiugaimm.php";
        });
    }
*/
function dldjtz(){
    $("#dhml0").click(function(){
        window.location.href="htshh.php";
        });
    $("#dhml1").click(function(){
        window.location.href="houtaishipin.php";
        });
    $("#dhml2").click(function(){
        window.location.href="caozuorizhi.php";
        });
    $("#dhml3").click(function(){
        window.location.href="guanlishipin.php";
        });
    
    }
function schaxun(){
$(".bianshen").keyup(function(){
    
    var n = $("#fy_n").val()
    var ss_name = $("#ss_name").val();
    var ss_mingch = $("#ss_mingch").val();
    
    $.ajax({
        url:"htshjchuli.php",
        data:{n:n,ss_name:ss_name,ss_mingch:ss_mingch,tp:1},
        dataType:"TEXT",
        type:"POST",
        success: function(data){
        
                        var hang = data.split("|");
                        var strs = "";
                        for(var i=0;i<hang.length;i++)
                        {
                            var lie = hang[i].split("^");
                            var shenhe = lie[5]==1?"已审核":"审核";
                            var color = lie[5]==1?"#0F0":"#F00";
                            strs+="<div class=‘htcontent htcontent1‘>"+lie[0]+"</div><div class=‘htcontent htcontent2‘>"+lie[1]+"</div><div class=‘htcontent htcontent3‘>"+lie[2]+"</div><div class=‘htcontent htcontent4‘>"+lie[3]+"</div><div class=‘htcontent htcontent5‘>"+lie[4]+"</div><div class=‘htcontent htcontent6 ‘ style=‘color:"+color+"‘><a class=‘shenhe"+lie[5]+"‘ yonghu=‘"+lie[2]+"‘  shbs=‘"+lie[0]+"‘>"+shenhe+"</a></div>";
                            
                        }
                        if(data=="kong"){
                            $("#htrecords_nr").html("");
                            }else{
                            $("#htrecords_nr").html(strs);
                            }
        }
        });
    $.ajax({
                url:"htshjchuli.php",
                data:{ss_name:ss_name,ss_mingch:ss_mingch,tp:2},
                type:"POST",
                dataType:"TEXT",
                success: function(data){
                        //总页数
                        var ys = Math.ceil(data/10); 
                        zys = ys;
                        var cd = zys*48;
                        if(zys<5){
                            $("#fyh").css("width",cd+"px");
                            
                            }else{
                            $("#fyh").css("width","235px");
                            }
                        
                        var s = "";
                        //var s = "<li><a id=‘fy_shang‘>&laquo;</a></li>";
                        var dangqian = parseInt($("#fy_n").val()); //当前页数
                        
                        if(dangqian==1){
                            for(var i=dangqian;i<=dangqian+4;i++){
                                    if(i>0 && i<=ys)
                                    {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==2){
                                for(var i=dangqian-1;i<=dangqian+3;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘  style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                            }else if(dangqian==zys){
                                for(var i=dangqian-4;i<=dangqian;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                }else if(dangqian==zys-1){
                                    for(var i=dangqian-3;i<=dangqian+1;i++){
                                        if(i>0 && i<=ys)
                                        {
                                        if(dangqian==i)
                                        {
                                        s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                        }
                                        else
                                        {
                                            s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                        }
                                    }
                                }
                                    
                                    }else{
                                for(var i=dangqian-2;i<=dangqian+2;i++){
                                    if(i>0 && i<=ys)
                                    {
                                    if(dangqian==i)
                                    {
                                    s+="<li class=‘active fy_zhong‘ style=‘background-color:#faa66a; color:#FFF‘><a>"+i+"</a></li>";
                                    }
                                    else
                                    {
                                        s+="<li class=‘fy_zhong‘><a>"+i+"</a></li>"
                                    }
                                    }
                                }
                            }
                        //s += "<li><a id=‘fy_xia‘>&raquo;</a></li>";
                        $("#fy_list").html(s);
                        
                           //给分页列表加事件
                        JiaShiJian();
                    }
                })
    
})
}

$(".htdhl").mouseover(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    $(this).css("color","#faa66a");
    });
$(".htdhl").mouseout(function(){
    for(var i=0;i<$(".htdhl").length;i++){
        if($(".htdhl").eq(i).attr("bsh")==0){
            $(".htdhl").eq(i).css("color","#000");
            }
        
        }
    
    });


</script>
</html>

htshjchuli.php

<?php
session_start();
include("../dbda.class.php");
$db = new DBDA();

$tp = $_POST["tp"];
if(!empty($_SESSION["htuid"])){
    $htuid = $_SESSION["htuid"];
    }
$sj = date("Y-m-d H-i-s");




switch($tp){
    case 1:
        $tj1 = "1=1";
        $tj2 = "1=1";
        $ss_name = $_POST["ss_name"];
        $ss_mingch = $_POST["ss_mingch"];
        if($_POST["ss_name"]!=""){
            $gmyh = $_POST["ss_name"];
            $tj1 = " uid like ‘%{$gmyh}%‘ ";
            }
            
        if($_POST["ss_mingch"]!=""){
            $gmmc = $_POST["ss_mingch"];
            $tj2 = " goumai.code in (select code from main where main_name like ‘%{$gmmc}%‘) ";
            }
        $n = $_POST["n"];
        $tg = ($n-1)*10;
        $xxlb = " select goumai.number,goumai.uid,main.main_name,leixing.leixingname,goumai.time,goumai.shenhe from goumai,main,leixing where goumai.code=main.code and  goumai.leixingcode=leixing.leixingcode and {$tj1} and {$tj2} order by number desc limit {$tg},10 ";
        if(empty($db->STRQuery($xxlb))){
            echo "kong";
            }else{
            echo $db->STRQuery($xxlb);
            }
        break;
    case 2:
        $tj1 = "1=1";
        $tj2 = "1=1";
        $ss_name = $_POST["ss_name"];
        $ss_mingch = $_POST["ss_mingch"];
        if($_POST["ss_name"]!=""){
            $gmyh = $_POST["ss_name"];
            $tj1 = " uid like ‘%{$gmyh}%‘ ";
            }
            
        if($_POST["ss_mingch"]!=""){
            $gmmc = $_POST["ss_mingch"];
            $tj2 = " code in (select code from main where main_name like ‘%{$gmmc}%‘) ";
            }
        $xxys = "select count(*) from goumai where {$tj1} and {$tj2} ";
        
        echo $db->StrQuery($xxys);
        break;
    case 3:
        $num = $_POST["num"];
        $yonghu = $_POST["yonghu"];
        $shhmc = "select main_name from main where code=‘(select code from goumai where number={$num})‘";
        $shhm = $db->StrQuery($shhmc);
        $shlxcd = "select leixingcode from goumai where number={$num} ";
        $shlxc = $db->StrQuery($shlxcd);
        
        $shhlx = "select leixingname from leixing where leixingcode = ‘{$shlxc}‘ ";
        
        $shhl = $db->StrQuery($shhlx);
        echo $shhl;
        $shhtj = "insert into houtairizhi values(‘‘,‘{$htuid}‘,‘通过了{$yonghu}购买视频{$shhm}-{$shhl}的审核‘,‘{$sj}‘)";
        $db->Query($shhtj,0);
        $xiugaish = "update goumai set shenhe=1 where number={$num}";
        $db->Query($xiugaish,0);
        
        break;
    case 4:
        if(!empty($htuid)){
            
            echo "<div id=‘yonghuming‘ class=‘yh‘>{$htuid}</div><div id=‘zhuxiao‘ class=‘yh‘>注销</div><div id=‘huiyuanzhx‘ class=‘yh‘>会员中心</div>";
            }else{
                echo "<div id=‘dl‘ class=‘yh‘>登陆</div><div id=‘zc‘ class=‘yh‘>注册</div>";
                }
        break;
    case 5:
        unset($_SESSION["htuid"]);
        session_destroy();
        break;
    }

htxiugai.php

<?php
session_start();
$htuid = $_SESSION["htuid"];
$yh=$_SESSION["yh"];
$sj = date("Y-m-d H-i-s");
$code = $_SESSION["sy"];
include("../DBDA.class.php");
$db = new DBDA();
$sp_name=$_POST{"sp_name"};
$sp_xiangqing=$_POST["sp_xiangqing"];
$sp_jiage1=$_POST["sp_jiage1"];
$sp_jiage2=$_POST["sp_jiage2"];
$sp_leibie=$_POST["sp_leibie"];


$sql2="select leibie_code from leibie where classname=‘{$sp_leibie}‘";
$sp_leibie=$db->StrQuery($sql2);
$sql="update main set video_jiage1=‘$sp_jiage1‘,video_leibie=‘{$sp_leibie}‘,main_name=‘$sp_name‘,main_xiangqing=‘$sp_xiangqing‘,video_jiage2=‘$sp_jiage2‘ where code=‘{$code}‘";
echo $db->Query($sql,0);
$sql4="insert into houtairizhi values(‘‘,‘{$htuid}‘,‘把{$yh}名字修改成{$sp_name}‘,‘{$sj}‘)";
            $db->Query($sql4,0);

header("location:houtaishipin.php");

loginhoutai.php

<?php
include("../DBDA.class.php");
$db = new DBDA();

?>
<!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="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="login.css" rel="stylesheet" type="text/css" />
<script src="../jquery-1.11.2.min.js"></script>
<style>
#top{ background-image:url(../yuheng/images/header.png); background-repeat:no-repeat; background-position:center; height:158px; width:100%; min-width:1347px; max-width:1920px;}
#dlxx{ margin:0 0 0 auto; text-align:right; height:20px; position:relative; top:10px}
#logo{margin:0 auto; text-align:center;width:290px; height:80px; position:relative; top:36px;}
#htdhl_wai{margin:0 auto; text-align:center; width:1100px; height:35px; position:relative; top:-25px}
.htdhl{ float:left; font-size:26px; width:120px; margin:0 33px; height:30px}
.htright{ margin-left:383px}
#second{background-image:url(img/banner.png); background-repeat:no-repeat; background-position:center; height:308px; width:100%; min-width:1347px; max-width:1920px}
.htdhl:hover{ cursor:pointer}
</style>
</head>

<body>
<!--导航-->
<div id="top">
    <div id="dlxx">
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="htdhl_wai">
    <?php
        $dhlb = "select * from htleibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==2?"htdhl htright":"htdhl" ;
            echo "<div id=‘dhml{$k}‘ class=‘{$class}‘>{$v[1]}</div>";
            }
        
    ?>
    </div>
</div>
<div style="clear:both"></div>

<!--中间图-->    
<div id="second"></div>
<div style="clear:both"></div>    


<!--登录界面-->
<div id="login_dlb">
<div id="login_dl">
    <div style="font-size:26px">管理员登录</div>
    <div style="height:20px"></div>
    <div id="login_uid">用户名&nbsp;&nbsp;<input type="text" style="height:25px; width:250px" id="uid" /></div>
    <div style="height:20px"></div>
    <div id="login_pwd">&nbsp;&nbsp;&nbsp;密码&nbsp;&nbsp;<input type="text" style="height:25px; width:250px" id="pwd"  /></div>   
    <div style="position:relative; left:150px; top:20px">
        <div style=" float:left"><input style="width:57px; height:25px; background-color:#F60; border-radius:7px ;color:#FFF" type="button" value="登录" id="btn" /></div>
        <div style=" float:left; width:40px; height:25px"></div>
        <div style=" float:left"> <a href="houtaizhuce.php"><input style="width:57px; height:25px; background-color:#999; border-radius:7px; color:#FFF" type="button" value="注册" /></a></div>
    </div>
</div>
</div>
<div style="clear:both"></div>
    
<!--最下面-->


<div id="login_zxm" style="background-image:url(images/1111_02.jpg)" )>

</div>



<script type="text/javascript">
$(document).ready(function(e) {
    dldjtz();
    $("#btn").click(function(){
        
        
        var uid = $("#uid").val();
        var pwd = $("#pwd").val();
        
        
        $.ajax({            
            url:"glloginchuli.php",
            data:{uid:uid,pwd:pwd},
            type:"POST",
            dataType:"TEXT",
            success: function(data){
                    if(data.trim()=="OK")
                    {
                        window.location.href="htshh.php";
                    }
                    else
                    {
                        alert ("用户名或密码错误");
                    }
            
                }
            
            });
        
        })
});

//导航
$(document).ready(function(e) {
})
function dldjtz(){
    $("#dhml0").click(function(){
        window.location.href="htshh.php";
        });
    $("#dhml1").click(function(){
        window.location.href="houtaishipin.php";
        });
    $("#dhml2").click(function(){
        window.location.href="caozuorizhi.php";
        });
    $("#dhml3").click(function(){
        window.location.href="guanlishipin.php";
        });
    
    }



</script>
</body>
</html>

piliangshanchu.php

<?php
include("../DBDA.class.php");
$db = new DBDA();
$stra = $_POST["stra"];
$sql = "delete from main where code in (‘{$stra}‘)";
$db->Query($sql,0);
header("location:houtaishipin.php");

rizhichuli.php

<?php
session_start();
$htuid = $_SESSION["htuid"];
include("../DBDA.class.php");
$db = new DBDA();
include("../page.class.php");
$type = $_POST["type"];


    $xxm = "";
    $mz="";
    $tj = " 1=1 ";
    $tj2 = " 1=1 ";
    if(!empty($_POST["ss_name"]))
    {
        $xxm = $_POST["ss_name"];
        $tj = " rz_uid like ‘%{$xxm}%‘  ";
    }
    if(!empty($_POST["ss_fenlei"]))
    {
        $mz = $_POST["ss_fenlei"];
        $tj2 = " rz_cznr like  ‘%{$mz}%‘  ";
    }
    
switch($type){
    case 1:
        $n = $_POST["n"];
        $tg = ($n-1)*10;
        $sql2 = "select * from houtairizhi where {$tj}  and {$tj2} order by rz_code desc limit {$tg},10 ";

        $xs=$db->StrQuery($sql2);
        if($xs!=""){
            echo $xs;
            }else{
                echo "kong";
        }
        break;
    case 2:
        $sql3 = "select count(*) from houtairizhi where {$tj}  and {$tj2} ";
        
        echo $db->StrQuery($sql3);
        break;
    }


 

?>

scchuli

<?php
session_start();
$htuid = $_SESSION["htuid"];
$sj = date("Y-m-d H-i-s");
include("../DBDA.class.php");
$db = new DBDA();
$sql3="select max(code) from main";
$maxcode=$db->StrQuery($sql3);
$sp_name=$_POST["sp_name"];
$sp_xiangqing=$_POST["sp_xiangqing"];
$sp_jiage1=$_POST["sp_jiage1"];
$sp_jiage2=$_POST["sp_jiage2"];
$sp_leibie=$_POST["sp_leibie"];
$sql2="select leibie_code from leibie where classname=‘{$sp_leibie}‘";
$sp_leibie=$db->StrQuery($sql2);
if(!$_FILES["file"]["error"]) 
{
    if($_FILES["file"]["type"]=="video/mp4" && $_FILES["file"]["size"]<=10240000000000)  // 判断上传文件的类型格式,和判断文件大小
    {
        $filename = "./video/".date("YmdHis").$_FILES["file"]["name"];  //文件名 单一 不重复
        $filename = iconv("UTF-8","gb2312",$filename);   // 转编码格式

        
        if(!file_exists($filename)) // 看文件是否存在  括号里面是路径
        {
            //上传
            move_uploaded_file($_FILES["file"]["tmp_name"],$filename);
            echo "上传成功";
            header("location:guanlishipin.php"); 
            $sql="update main set video_jiage1=‘$sp_jiage1‘,video_leibie=‘$sp_leibie‘,main_vid=‘$filename‘,main_name=‘$sp_name‘,main_xiangqing=‘$sp_xiangqing‘,video_jiage2=‘$sp_jiage2‘ where code =‘{$maxcode}‘";
            $db->Query($sql,0);
            $sql4="insert into houtairizhi values(‘‘,‘{$htuid}‘,‘上传视频{$sp_name}‘,‘{$sj}‘)";
            $db->Query($sql4,0);
            
              // 移动上传文件 
        }
        else
        {
            echo "该文件已存在";
        }
    }
    else
    {
        echo "文件格式或大小不对";
    }
}
else
{
    echo $_FILES["file"]["error"];
}

shancu2

<?php
session_start();
$code = $_GET["code"];
$htuid = $_SESSION["htuid"];
$yh=$_SESSION["yh"];
$sj = date("Y-m-d H-i-s");

//造连接对象
include("../DBDA.class.php");
$db = new DBDA();
$sq2="select main_name from main where code=‘{$code}‘";
$mc=$db->Query($sq2);


$sql = "delete from main where code=‘{$code}‘";
$r = $db->query($sql,0);

shangchuan

<?php
session_start();
include("../DBDA.class.php");
$db = new DBDA();
   if ((($_FILES["file"]["type"] == "image/gif")|| ($_FILES["file"]["type"] == "image/jpeg")|| ($_FILES["file"]["type"] == "image/png"))&& ($_FILES["file"]["size"] < 10000000))
  {
      //文件上传是否出错
      if ($_FILES["file"]["error"] > 0)
    {
        echo "上传出错: " . $_FILES["file"]["error"] . "<br />";
    }
      else
    {
        
    
    //判断文件是否已存在
    $filename = "./pic/".$_FILES["file"]["name"];
    $filename = iconv("UTF-8","gb2312",$filename);
     
    if (file_exists($filename))
      {
          echo "<script language=‘javascript‘>alert(‘文件已经存在!‘)</script>";
           
      }
    else
      {
          //移动图片至保存路径,解决中文乱码问题
            move_uploaded_file($_FILES["file"]["tmp_name"],$filename);
             $sql="insert into main values(‘‘,‘‘,‘‘,‘{$filename}‘,‘‘,‘‘,‘‘,‘‘)";
          $db->Query($sql,0);
          echo "<script language=‘javascript‘>parent.showimg(‘".$filename."‘)</script>";
          
        
    
      }
    }
  }
  else
  {
      echo "上传失败";
  }
 
?>

shangchuan2

<?php
session_start();
include("class/DBDA.class.php");
$db=new DBDA();
$shipin=$_FILES["shipin"];
$spname=$_POST["shipinname"];
$spclass=$_POST["spclass"];
$spxq=$_POST["spxq"];
$gkjg=$_POST["gkjg"];
$xzjg=$_POST["xzjg"];
if(empty($_SESSION["lslj"]))
{
    echo "<script type=‘text/javascript‘>alert(‘请选择缩略图‘)</script>";
    exit;
}
else
{$sltlj=$_SESSION["lslj"];}
if($shipin["type"]=="video/mp4" && $shipin["size"]<536870912)
{
    if($shipin["error"]>0)
    {echo "上传出错".$shipin["error"]."<br>";}
    else
    {
        $filename="video/".date("YmdHis").$shipin["name"];
        $filename = iconv("UTF-8","gb2312",$filename);
        if(file_exists($filename))
        {echo "<script type=‘text/javascript‘>alert(‘文件已经存在‘)</script>";}
        else
        {
            move_uploaded_file($shipin["tmp_name"],$filename);
            $sql="insert into main values(‘{$gkjg}‘,‘{$spname}‘,‘{$spxq}‘,‘{$filename}‘,‘‘,‘{$xzjg}‘,‘{$spclass}‘,‘{$sltlj}‘)";
            $n=$db->query($sql,0);
            if($n)
            {   unset($_SESSION["lslj"]);
                echo "<script type=‘text/javascript‘>alert(‘上传成功‘)</script>";
            }        
        }
    }
}
else
{
    echo "<script type=‘text/javascript‘>alert(‘上传失败‘)</script>";
}

大体就这些处理了

 

羽恒梦工厂所有后台的操作页面