程序员小墨

Results 18 comments of 程序员小墨

【controller\admin.php】 **67行附近** ``` //跳转到首页 header('location:/'); 改为 header('location:'.dirname($_SERVER['PHP_SELF'])); ``` **107行附近** ``` exit("认证失败,请重新登录!"); 改为 exit("认证失败,请重新登录!"); ```

【controller\login.php】 **15行附近** ``` header('location:index.php?c=admin'); 改为 $phpSelf = dirname($_SERVER['PHP_SELF']); $phpSelf = ($phpSelf == "/" || $phpSelf == "\\") ? "" : $phpSelf; header('location:'.$phpSelf.'/index.php?c=admin'); ```

【admin\header.php】 ``` OneNav后台管理 改为 OneNav后台管理 前台首页 分类列表 添加分类 我的链接 添加链接 改为 前台首页 分类列表 添加分类 我的链接 添加链接 ``` ``` 退出 改为 退出 ```

【admin\left.php】 ``` 分类列表 添加分类 改为 分类列表 添加分类 ``` ``` 我的链接 添加链接 改为 我的链接 添加链接 ```

【templates\admin\static\embed.js】 所有的url index.php?。。。。的index前面都加上./ embed.js文件内的改动比较分散,我就贴出修改后的代码了 ``` layui.use(['element','table','layer','form'], function(){ var element = layui.element; var table = layui.table; var form = layui.form; layer = layui.layer; //第一个实例 table.render({ elem: '#category_list' ,height: 500 ,url: './index.php?c=api&method=category_list'...

【templates\default\index.php】 第45行附近 ``` account_circle 改为 account_circle ```

【templates\default\static\embed.js】 改动和templates\admin\static\embed.js类似,也比较分散,下面附上改动后的代码 ``` function gotop(){ $("html,body").animate({scrollTop: '0px'}, 600); } $(".search").blur(function(data,status){ var keywords = $(".search").val(); if( keywords == ''){ $(".cat-title").removeClass("mdui-hidden"); } }); var h = holmes({ input: '.search', find: '.link-space', placeholder:...

[onenav 修改以使其可以在网站非根目录下运行.zip](https://github.com/helloxz/onenav/files/5822750/onenav.zip)

@helloxz controller目录下,index.php文件内13-17行的函数 ` //如果已经登录,直接跳转 if( $cookie == $key ){ header('location:index.php?c=admin'); exit; } ` 这里有问题,`location:index.php?c=admin`会跳转到域名根目录的index.php