码迷,mamicode.com
首页 > Web开发 > 详细

从此不求人:自主研发一套PHP前端开发框架(31)搭建后台框架

时间:2016-05-07 09:53:17      阅读:453      评论:0      收藏:0      [点我收藏+]

标签:

1.使用的是easyui作为后台页面框架
技术分享

header.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 id="Head1">
    <meta charset="utf-8">
    <title>漂亮的easyui后台框架演示-css后台模板-www.nongfuit.com</title>
    <link href="/lkphp/lkphp/MVC/View/defaultadmin/css/default.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/lkphp/lkphp/MVC/View/defaultadmin/js/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/lkphp/lkphp/MVC/View/defaultadmin/js/themes/icon.css" />
    <script type="text/javascript" src="/lkphp/lkphp/MVC/View/defaultadmin/js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="/lkphp/lkphp/MVC/View/defaultadmin/js/jquery.easyui.js"></script>

    <script type="text/javascript" src=‘/lkphp/lkphp/MVC/View/defaultadmin/js/outlook2.js‘> </script>

    <script type="text/javascript">
     var _menus = {"menus":[
                        {"menuid":"1","icon":"icon-sys","menuname":"系统管理",
                            "menus":[{"menuname":"菜单管理","icon":"icon-nav","url":"http://www.nongfuit.com"},
                                    {"menuname":"添加用户","icon":"icon-add","url":"demo.html"},
                                    {"menuname":"用户管理","icon":"icon-users","url":"demo2.html"},
                                    {"menuname":"角色管理","icon":"icon-role","url":"demo2.html"},
                                    {"menuname":"权限设置","icon":"icon-set","url":"demo.html"},
                                    {"menuname":"系统日志","icon":"icon-log","url":"demo.html"}
                                ]
                        },{"menuid":"8","icon":"icon-sys","menuname":"员工管理",
                            "menus":[{"menuname":"员工列表","icon":"icon-nav","url":"demo.html"},
                                    {"menuname":"视频监控","icon":"icon-nav","url":"demo1.html"}
                                ]
                        },{"menuid":"56","icon":"icon-sys","menuname":"部门管理",
                            "menus":[{"menuname":"添加部门","icon":"icon-nav","url":"demo1.html"},
                                    {"menuname":"部门列表","icon":"icon-nav","url":"demo2.html"}
                                ]
                        },{"menuid":"28","icon":"icon-sys","menuname":"财务管理",
                            "menus":[{"menuname":"收支分类","icon":"icon-nav","url":"demo.html"},
                                    {"menuname":"报表统计","icon":"icon-nav","url":"demo1.html"},
                                    {"menuname":"添加支出","icon":"icon-nav","url":"demo.html"}
                                ]
                        },{"menuid":"39","icon":"icon-sys","menuname":"商城管理",
                            "menus":[{"menuname":"商品分","icon":"icon-nav","url":"/shop/productcatagory.aspx"},
                                    {"menuname":"商品列表","icon":"icon-nav","url":"/shop/product.aspx"},
                                    {"menuname":"商品订单","icon":"icon-nav","url":"/shop/orders.aspx"}
                                ]
                        }
                ]};
        //设置登录窗口
        function openPwd() {
            $(‘#w‘).window({
                title: ‘修改密码‘,
                width: 300,
                modal: true,
                shadow: true,
                closed: true,
                height: 160,
                resizable:false
            });
        }
        //关闭登录窗口
        function close() {
            $(‘#w‘).window(‘close‘);
        }



        //修改密码
        function serverLogin() {
            var $newpass = $(‘#txtNewPass‘);
            var $rePass = $(‘#txtRePass‘);

            if ($newpass.val() == ‘‘) {
                msgShow(‘系统提示‘, ‘请输入密码!‘, ‘warning‘);
                return false;
            }
            if ($rePass.val() == ‘‘) {
                msgShow(‘系统提示‘, ‘请在一次输入密码!‘, ‘warning‘);
                return false;
            }

            if ($newpass.val() != $rePass.val()) {
                msgShow(‘系统提示‘, ‘两次密码不一至!请重新输入‘, ‘warning‘);
                return false;
            }

            $.post(‘/ajax/editpassword.ashx?newpass=‘ + $newpass.val(), function(msg) {
                msgShow(‘系统提示‘, ‘恭喜,密码修改成功!<br>您的新密码为:‘ + msg, ‘info‘);
                $newpass.val(‘‘);
                $rePass.val(‘‘);
                close();
            })

        }

        $(function() {

            openPwd();
            //
            $(‘#editpass‘).click(function() {
                $(‘#w‘).window(‘open‘);
            });

            $(‘#btnEp‘).click(function() {
                serverLogin();
            })



            $(‘#loginOut‘).click(function() {
                $.messager.confirm(‘系统提示‘, ‘您确定要退出本次登录吗?‘, function(r) {

                    if (r) {
                        location.href = ‘/ajax/loginout.ashx‘;
                    }
                });

            })



        });



    </script>

</head>

从此不求人:自主研发一套PHP前端开发框架(31)搭建后台框架

标签:

原文地址:http://blog.csdn.net/laike1355/article/details/51331502

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!