羽恒梦工厂个人中心

这个页面是个人中心

下面是代码yhfukuanjilu.php

<?php
session_start();
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" />
<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="dhl_wai">
    <?php
        $dhlb = "select * from leibie";
        $dh = $db->Query($dhlb);
        foreach($dh as $k=>$v){
            $class = $k==3?"dhl right":"dhl" ;
            echo "<div class=‘{$class}‘ code=‘{$v[0]}‘>{$v[2]}</div>";
            }

    ?>
    </div>
</div>
<!--中间图片-->
<div id="second"></div>
<!--付款记录部分-->
<div id="Paymentrecords">
    <div id="records_wai">
        <div id="records_left">
            <div class="Payment Payment1" bs="1" xs="1">全部记录</div>
            <div class="Payment" bs="2" xs="0">未审核记录</div>
            <div class="Payment" bs="3" xs="0">已审核记录</div>
            <div class="Payment" bs="4" xs="0">可观看记录</div>
            <div class="Payment" bs="5" xs="0">可下载记录</div>
        </div>
        <div id="records_right">
            <div id="records_title">
            <div id="records_titlel" style=" font-size:28px; position:relative;left:300px">会员中心</div>
            <div id="records_titley"  style="position:relative;left:600px">商品名:<input type="text" id="shpmcx" /></div>
            </div>

            <div id="records_form">
                <div id="records_tou">
                    <div class="header header1">编 号</div>
                    <div class="header header2">商品名称</div>
                    <div class="header header3">购买类型</div>
                    <div class="header header4">购买时间</div>
                    <div class="header header5">状 态</div>
                </div>
                <div id="records_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>
<!--尾部-->
<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){
    dengluxx();
    JiaZai();
    //确定总页数的变量
    var zys = 0;
    //查询数据
   $(".Payment").click(function(){
            $("#fy_n").val(1);
            bs = $(this).attr("bs");

            JiaZai();
       })
    });

//加载数据方法
    function JiaZai()
    {
        var n = $("#fy_n").val();
        var b = $(".Payment");

        for(var i=0;i<b.length;i++){
            if(b.attr("xs")==1){
                bs = b.attr("bs");
                }

            }
        var shmp = $("#shpmcx").val();
        $.ajax({
                url:"./chuli/chuli.php",
                data:{bs:bs,n:n,shmp:shmp},
                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("^");
                            var shenhe = lie[4]==1?"已审核":"未审核";
                            var shhys = lie[4]==1?"#0F0":"#F00";
                            strs+="<div class=‘content content1‘>"+lie[0]+"</div><div class=‘content content2‘>"+lie[1]+"</div><div class=‘content content3‘>"+lie[2]+"</div><div class=‘content content4‘>"+lie[3]+"</div><div class=‘content content5‘ style=‘color:"+shhys+"‘>"+shenhe+"</div>";

                        }
                        if(data==""){
                            $("#records_nr").html("");
                            }else{
                        $("#records_nr").html(strs);}

                    }
            });
        $("#shpmcx").keyup(function(){
            var n = $("#fy_n").val();
            var b = $(".Payment");

            for(var i=0;i<b.length;i++){
                if(b.attr("xs")==1){
                    bs = b.attr("bs");
                    }

                }
            var shmp = $(this).val();
            $.ajax({
                    url:"./chuli/chuli.php",
                    data:{bs:bs,n:n,shmp:shmp},
                    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("^");
                                var shenhe = lie[4]==1?"已审核":"未审核";
                                var shhys = lie[4]==1?"#0F0":"#F00";
                                strs+="<div class=‘content content1‘>"+lie[0]+"</div><div class=‘content content2‘>"+lie[1]+"</div><div class=‘content content3‘>"+lie[2]+"</div><div class=‘content content4‘>"+lie[3]+"</div><div class=‘content content5‘ style=‘color:"+shhys+"‘>"+shenhe+"</div>";

                            }
                            if(data==""){
                                $("#records_nr").html("");
                                }else{
                            $("#records_nr").html(strs);}

                        }
                });
                $.ajax({
                url:"./chuli/yschuli.php",
                data:{bs:bs,shmp:shmp},
                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();
                    }
                })

            });
        //获取分页数(列表)
        $.ajax({
                url:"./chuli/yschuli.php",
                data:{bs:bs,shmp:""},
                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_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();
            })
    }

/*************************************/

$(".Payment").click(function(){
    var xs = $(".Payment");
    for(var i=0;i<xs.length;i++){
        xs.eq(i).attr("xs",0);
        xs.eq(i).css("background-color","#FFF");
        xs.eq(i).css("color","#000");
        }
    $(this).attr("xs",1);
    $(this).css("background-color","#faa66a");
    $(this).css("color","#FFF");    

    });
$(".Payment").mouseover(function(){
    var xs = $(".Payment");
    for(var i=0;i<xs.length;i++){
        if(xs.eq(i).attr("xs")==0){
            xs.eq(i).css("background-color","#FFF");
            xs.eq(i).css("color","#000");    

            }
        }
    $(this).css("background-color","#faa66a");
    $(this).css("color","#FFF");
    });
$(".Payment").mouseout(function(){
    var xs = $(".Payment");
    for(var i=0;i<xs.length;i++){
        if(xs.eq(i).attr("xs")==0){
            xs.eq(i).css("background-color","#FFF");
            xs.eq(i).css("color","#000");
            }
        }
    });

function shenhe(){
    var shh = $(".content5");
    for(var i=0;i<shh.length;i++){
        if(shh.eq(i).attr(shh)==1){
            shh.eq(i).css("color","#0F0");
            }else{

                shh.eq(i).css("color","#F00");
                }

        }

    }

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+"";
        });
    }

</script>
</html>

下面是分页需要的页面chuli.php

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

$uid = $_SESSION["uid"];

$n = $_POST["n"];
$bs = $_POST["bs"];
$shmp= $_POST["shmp"];
$tj2="1=1";
if($shmp!=""){
    $tj2 = " main.main_name like ‘%{$shmp}%‘ ";
    }

$tj = "1=1";
if(!empty($bs)){
        switch($bs){
        case 1:
            $tj = "1=1";
            break;
        case 2:
            $tj = "shenhe=0";
            break;
        case 3:
            $tj = "shenhe=1";
            break;
        case 4:
            $tj = "goumai.leixingcode=‘k001‘";
            break;
        case 5:
            $tj = "goumai.leixingcode=‘k002‘";
            break;
        }
    }

$tg = ($n-1)*10;

$xxlb = "select goumai.number,main.main_name,leixing.leixingname,goumai.time,goumai.shenhe from goumai,main,leixing where goumai.code=main.code and goumai.leixingcode=leixing.leixingcode and {$tj} and {$tj2} and uid=‘{$uid}‘ order by number desc limit {$tg},10";
echo $db->STRQuery($xxlb);
时间: 2024-10-12 04:49:31

羽恒梦工厂个人中心的相关文章

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

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 Transit

羽恒梦工厂主页项目

这是前台页面 下面是主页的代码 <?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="

羽恒梦工厂项目前台登录注册

前台登录和处理验证码挂了 这是代码login2 <?php session_start(); 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&quo

羽恒梦工厂布局分类页面

下面主页部分 下面是分布的代码buju.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 x

底层战详解使用Java开发Spark程序(DT大数据梦工厂)

Scala开发Spark很多,为什么还要用Java开发原因:1.一般Spark作为数据处理引擎,一般会跟IT其它系统配合,现在业界里面处于霸主地位的是Java,有利于团队的组建,易于移交:2.Scala学习角度讲,比Java难.找Scala的高手比Java难,项目的维护和二次开发比较困难:3.很多人员有Java的基础,确保对Scala不是很熟悉的人可以编写课程中的案例预测:2016年Spark取代Map Reduce,拯救HadoopHadoop+Spark = A winning combat

DT大数据 梦工厂57讲

今日[DT大数据梦工厂视频]<第57讲:Scala中Dependency Injection实战详解> 土豆:http://www.tudou.com/programs/view/5LnLNDBKvi8/ 百度网盘:http://pan.baidu.com/s/1c0no8yk (DT大数据梦工厂scala的所有视频.PPT和代码在百度云盘的链接地址:http://pan.baidu.com/share/home?uk=4013289088#category/type=0&qq-pf-

DT大数据梦工厂免费实战大数据视频全集 分享

接触大数据有几年,以前一直都是对hadoop的使用.相比于日新月异的前端技术,我还是比较喜欢大数据--这个已经被热炒多年的课题,也相信从事大数据方面的技术研究是IT从业者的一条光明坦途. 2010年hadoop开始进入我的视野, 不断自学,使用,感谢hadoop国内还是有很多书籍.去年开始各大社区开始讨论spark,也开始学习scala语言,断断续续没有坚持,没多久也会忘掉.今年初看到了王老师的<Spark亚太研究院Spark公益大讲堂>视频,一些实时性需求在工作中出现让我不得不对比hadoo

DT大数据梦工厂 第72,73讲

王家林亲授<DT大数据梦工厂>大数据实战视频“Scala深入浅出实战经典”视频.音频和PPT下载!第72讲:Scala界面事件处理编程实战详解百度云:http://pan.baidu.com/s/1qWsq6Jy腾讯微云:http://url.cn/g6En3l360云盘:http://yunpan.cn/cchw9EZAp2rKd 访问密码 05d1本节王老师讲了scala界面的事件处理就是当用户操作一个行为,GUI将做出一个反应.比如点击一个按钮事件.def top=new MainFra

DT大数据梦工厂 第63,64,65讲

王家林亲授<DT大数据梦工厂>大数据实战视频“Scala深入浅出实战经典”视频.音频和PPT下载!第63讲:Scala中隐式类代码实战详解百度云:http://pan.baidu.com/s/1o6wxJdS腾讯微云:http://url.cn/TfOJqr360云盘:http://yunpan.cn/cckajtapNGT9z 访问密码 369d本节王老师讲了隐式类.其作用就是把转换后的类放在一个作用域中,消除了之前的隐式转换方法.object Context{ implicit class