羽恒梦工厂详情页

这是详情页

下面是代码。通过前面传过来的code值寻找路径并隐藏地址。下面有隐藏地址的代码

<?php
session_start();
if(!empty($_SESSION["uid"])){
    $uid = $_SESSION["uid"];
    }

$id=$_GET['code'];

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

$sql="select main_pic,main_name,main_xiangqing,main_vid from main where code='{$id}'";
$attr=$db->Query($sql);
foreach($attr as $v){
$v[0];
    }
$splj= substr($v[3],2);

?>

<!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>
<script src="CuPlayerV35/player/js/swfobject.js"></script>
<style>
*{ font-family:微软雅黑}
#dlxx{ margin:0 0 0 auto; text-align:right; height:10px; position:relative; top:10px}
#yonghuming{ width: auto; max-width:160px; text-align:center;}
#zhuxiao{ width:46px; text-align:center;}
#huiyuanzhx{ width:76px; text-align:center}
#dl{ width:46px; text-align:center;}
#zc{ width:46px; text-align:center;}

.yh{ float:left;}
.yh:hover{ cursor:pointer}
#fg{Opacity:0.8;-moz-opacity:0.8;;filter:alpha(opacity=80)}
#top{ background-image:url(img/header.png); background-repeat:no-repeat; background-position:center; height:158px; width:100%; min-width:1347px; max-width:1920px;}
#dhl_wai{margin:0 auto; text-align:center; width:1190px; height:35px}
#logo{ margin:0 auto; text-align:center;width:290px; height:80px; position:relative; top:35px }
#logo:hover{ cursor:pointer}
.dhl{ float:left; font-size:26px; width:80px; margin:0 33px; position:relative; top:-10px}
.dhl:hover{ cursor:pointer; color:#faa66a}
.right{ margin-left:343px}
#second{background-image:url(img/banner.png); background-repeat:no-repeat; background-position:center; height:308px; width:100%; min-width:1347px; max-width:1920px}
.goumai{ height:30px; width:60px}
#xiazai{ text-align:center; font-size:20px}
#guankan{ text-align:center; font-size:20px}

</style>
</head>

<body>
<!--导航-->
<!--导航-->
<div id="top">
    <div id="dlxx">
    
    </div>
    <div id="logo"><img src="img/logo.png" /></div>
    <div id="dhl_wai">
    <?php
        $dhlb = "select * from leibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$f){
            $class = $k==3?"dhl right":"dhl" ;
            echo "<div class='{$class}' code='{$f[0]}'>{$f[2]}</div>";
            }
        
    ?>
    </div>
</div>
<div style="clear:both"></div>

<!--中间图-->    
<div id="second"></div>
<div style="clear:both"></div>    
<!--下面视频-->
<div style="height:20px; width:100%px"></div>
<div style="width:600px; height:410px; overflow:hidden; margin:0 auto; ">
<div class="video" id="CuPlayer" style=" width:600px; height:410px; overflow:hidden; margin:0 auto; text-align:center; "><b><img src="CuPlayerV35/player/images/loading.gif" /> 网页视频播放器加载中,请稍后...</b></div>
<div id="fg" style="width:600px; height:410px; background-color: #FFF; margin:0 auto; position:relative; top:-410px; display:block"></div>
<!--详情-->
</div>
<div style="clear:left"></div>
<div style=" width:602px; height:100px; background-color:#FFF">

    <div style="height:10px; width:602px;"></div>
    <?php
    
    $cjg = "select * from main where code = '{$id}'";
    $att = $db->Query("$cjg");
    $gkshy="block";
    $xzshy="block";
    $xzsp = "none";
    $gkdd = "<input id='guananan' class='goumai' type='button' value='购买' name='k001' />";
    $xzdd = "<input id='xiazaian' class='goumai' type='button' value='购买' name='k002' />";
    
    if(!empty($_SESSION["uid"])){
        $gkgm = "select shenhe from goumai where uid='{$uid}' and leixingcode='k001' and code='{$id}' ";
        $gksh = $db->StrQuery("$gkgm");
        $xzgm = "select shenhe from goumai where uid='{$uid}' and leixingcode='k002' and code='{$id}' ";
        $xzsh = $db->StrQuery("$xzgm");
        
        
        $gksl = "select count(*) from goumai where leixingcode='k001' and code='{$id}' and shenhe=0 and uid='{$uid}' ";
        $gks = $db->StrQuery($gksl);
        if($gks>=1){
            $gkdd = "<span style='color:#0F0'>审核中,请稍等……</span>";
            }
            
        $xzsl = "select count(*) from goumai where leixingcode='k002' and code='{$id}' and shenhe=0 and uid='{$uid}' ";
        $xzs = $db->StrQuery($xzsl);
        if($xzs>=1){
            $xzdd = "<span style='color:#0F0'>审核中,请稍等……</span>";
            }
        
        $gkshy = $gksh==1?"none":"block";
        $xzshy = $xzsh==1?"none":"block";
        $xzsp = $xzsh==1?"block":"none";
        
        
        
        }
    
    
    
    echo "<div id='guankan' style=' display:{$gkshy} '  code='{$id}'><div style=' width:200px; float:left'>观看价格:{$att[0][0]}</div><div id='guankanshenhe' >{$gkdd}</div></div>";
    echo "<div id='xiazai' style=' display:{$xzshy} ' ><div style=' width:200px; float:left'>下载价格:{$att[0][7]}</div><div id='xiazaishenhe' >{$xzdd}</div></div>";    
    echo "<div style=' display:{$xzsp} '><a href='xiazaisp.php?bs={$id}'><input id='xiazaisp' type= 'button' value='下载视频'  /></a></div>";
    
    ?>
    <div style="height:40px; width:602px; text-align:center; font-size:20px">名称:<?php echo $v[1];?></div>
    <div style="height:70px; width:602px; text-align:center; font-size:20px">详情:<?php echo $v[2];?></div>
</div>


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

</div>





<script type="text/javascript">

//导航
$(document).ready(function(e) {
    
    dengluxx();
    goumai();
    var y=window.location.search.substr(6);

var so = new SWFObject("/yuheng/CuPlayerV35/player/player.swf?FlvID="+y+"","ply","600","410","9","#000000");
so.addParam("allowfullscreen","true");
so.addParam("allowscriptaccess","always");
so.addParam("wmode","opaque");
so.addParam("quality","high");
so.addParam("salign","lt");
//播放器配置文件-----------------------------
so.addVariable("JcScpFile","/yuheng/shipinbofang.php"); //加载xml后辍的配置文件
//视频文件及略缩图--------------------------
so.write("CuPlayer");

    $.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='buju.php?code="+lie[1]+"'><div class='daohang_1'>"+lie[2]+"</div></a>";
                                }else{
                                var lie=hang[i].split("^");
                            str+="<a href='buju.php?code="+lie[1]+"'><div class='daohang_2' code='"+lie[1]+"'>"+lie[2]+"</div></a>";
                                }
                }
                $("#dh_jieshou").html(str);
                }
                
        });
        });


function dengluxx(){
    
    $.ajax({
        url:"./chuli/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="login2.php";
        });
    $("#zc").click(function(){        
        window.location.href="zhuce.php";
        });
    $("#zhuxiao").click(function(){
        $.ajax({
            url:"./chuli/htshjchuli.php",
            data:{tp:5},
            type:"POST",
            success: function(data){
                window.location.href="login2.php";
                }
            });
        
        });
    $("#huiyuanzhx").click(function(){
        window.location.href="yhfukuanjilu.php";
        });
    $("#yonghuming").click(function(){
        window.location.href="xiugaimm.php";
        });
    $("#logo").click(function(){
        window.location.href="main.php";
        });
    $(".dhl").click(function(){
        var code = $(this).attr("code");
        window.location.href="buju.php?code="+code+"";
        });
    }

function goumai(){
    var gkdiv = $("#guankan");
    var xzdiv = $("#xiazai");
    var code = $("#guankan").attr("code");
    if(gkdiv.css("display")=="none"){
        $("#fg").css("display","none")
    }
    $(".goumai").click(function(){
        
       
  
        
        var leixing = $(this).attr("name");
        
        $.ajax({
            url:"goumaichuli.php",
            data:{tp:1},
            type:"POST",
            datatype:"TEXT",
            success: function(data){
                 if(data=="no"){
                     window.location.href="login2.php";
                     }else{
                         if(confirm("确认购买吗?")){
                            if(leixing=="k001"){
                                $("#guankanshenhe").html("审核中,请稍等……");
                                $("#guankanshenhe").css("color","#0F0");
                                }else{
                                    $("#xiazaishenhe").html("审核中,请稍等……");
                                    $("#xiazaishenhe").css("color","#0F0");
                                    }
                             $.ajax({
                                url:"goumaichuli.php",
                                data:{leixing:leixing,code:code,tp:2},
                                type:"POST",
                                datatype:"TEXT",
                                success: function(data){
                                
                                }
                                 
                                 });
                            
                             }
                         }
                }
            
            
            });
        
        
        
        });    
        
        
        
        
        }
    
    

</script>

</body>
</html>

下面是隐藏播放地址的代码shipinbofang。php

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

$FlvID = $_GET["FlvID"];  //接收传过来的参数
$sql = "select main_vid from main where code ='{$FlvID}'";  //查找视频路径
$rs = $db->StrQuery($sql);  //获取路径
$ss = substr($rs,2);
$gkgm = "select shenhe from goumai where uid='{$uid}' and leixingcode='k001' and code='{$FlvID}' ";
$gksh = $db->StrQuery("$gkgm");
$gkshy = $gksh==1?"yes":"no";        
?>
<CuPlayer>  <!--下面的都是从xml文件里复制过来的参数-->
<Player_Set 
    JcScpBufferTime = "3"
    JcScpVolume = "75"
    JcScpCode = "utf8"
    JcScpImgDisplay = "no"
    JcScpAutoHideControl="yes"
    JcScpControlHideTime="0.5"
    JcScpControlHeight="40"    
    JcScpShowList= "yes"
    JcScpAutoRepeat = "yes"
    JcScpAutoPlay = "<?php echo $gkshy; ?>"
    JcScpsetMode = "1"
    JcScpAFrontCanClose = "no"
    JcScpShowRightmenu = "yes"
    JcScpShareMode = "JcScpVideoPath"
    JcScpLoadbarMode = "0"
    JcScpLiveMode  = "0"
/>
<Logo_Set
    JcScpLogoDisplay = "yes"
    JcScpLogoPath = "Images/logo.png"
    JcScpLogoPosition = "top-left"
    JcScpLogoWidth = "165"
    JcScpLogoHeight = "55"
    JcScpLogoAlpha = "0.5"
/>

<Flashvars_Set
    JcScpServer =""
    
    JcScpVideoPath = "<?php echo $ss ?>"
    JcScpVideoPathHD = "<?php echo $ss ?>"
    JcScpImg =""
    JcScpTitle  = ""
    JcScpStarTime = "0" 
    JcScpEndTime = "0"

    JcScpCuePointInfo = ""
    JcScpCuePointTime = ""
    
    ShowJcScpAFront = "no"
    JcScpCountDowns = "5"
    JcScpCountDownsPosition = "top-right"
    JcScpAFrontW = "730"
    JcScpAFrontH = "454"
    JcScpAFrontPath = ""
    JcScpAFrontLink = "/"
     
    ShowJcScpAVideo= "no"
    JcScpAVideoServer= ""    
    JcScpAVideoPath= ""    
    JcScpAVideoLink= "/"
    
    ShowJcScpAPause = "no"
    JcScpAPausePath = ""
    JcScpAPauseW = "300"
    JcScpAPauseH = "250"
    JcScpAPauseLink= "/"
    
    ShowJcScpACorner = "no"
    JcScpACornerPath= ""
    JcScpACornerW = "90"
    JcScpACornerH = "50"
    JcScpACornerPosition = "top-right"
    JcScpACornerLink = "/"

    ShowJcScpAEnd = "no"
    JcScpAEndPath = ""
    JcScpAEndW = "400"
    JcScpAEndH = "300"
    JcScpAEndLink= "/"

    ShowJcScpAMoveText = "no"
        
/>

<SkinColor_Set
    JcScpBackcolor = "0x000000"
    JcScpBackcolortop = "0x353535"
    JcScpLightcolor = "0xcfcfcf"
    
    JcScpFontcolor = "0xffffff"
    JcScptimebg = "0x393939"
    
    JcScpLoadbar = "0x00a0e9"
    JcScpLoaded = "0x4d4b4b"
    JcScpLoadbg = "0x000000"
    JcScpPlayBtn = "0x2d2d2d"
    
    JcScpBar = "0xffffff" 
/>
  
</CuPlayer>

 

posted @ 2016-12-04 14:26  夜雨声烦丶  阅读(176)  评论(0编辑  收藏  举报