Skip to content

Commit

Permalink
升级到PHPOK5.4.081
Browse files Browse the repository at this point in the history
  • Loading branch information
qinggan committed Dec 27, 2019
1 parent 85519b9 commit d70c396
Show file tree
Hide file tree
Showing 415 changed files with 12,286 additions and 5,400 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ phpok
手工安装
===
1. 打包下载后,请手工在 _data 目录下创建以下文件夹: **session****tpl_admin****tpl_www****log****update****zip**
2. 在根目录下创建 **_cache** 文件夹
3. 运行 phpokinstall.php 进行安装
2. 运行 phpokinstall.php 进行安装

感谢
===
Expand Down
2 changes: 1 addition & 1 deletion css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ select {
-webkit-appearance:none;
background:url("../images/arrow-select.png") no-repeat scroll right center transparent;
background-color:#fff;
padding-right: 14px !important;
padding-right: 26px !important;
}
select::-ms-expand { display: none; }
textarea{border:1px solid #E5E5E5;}
Expand Down
29 changes: 20 additions & 9 deletions css/extadmin.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,25 @@
* html .clearfix{zoom: 1;}
*:first-child + html .clearfix{zoom: 1;}
body{overflow-x: hidden;}
select{padding:3px;}
select {
border: solid 1px #D2D2D2;
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
background:url("../images/arrow-select.png") no-repeat scroll right center transparent;
background-color:#fff;
padding-right: 14px !important;
select{
padding:2px 30px 2px 3px;
line-height:30px;
border: solid 1px #D2D2D2;
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
background:#fff url("../images/arrow-select.png") no-repeat scroll right center transparent;
}
select:focus{
outline:none;
}

input[type="number"] {
-moz-appearance: textfield;
}
img{
max-width:100%;
}

/* LayUI 后台框架样式改写-开始 */
.layui-layout-admin .layui-body {
Expand Down Expand Up @@ -60,6 +65,12 @@ input[type="number"] {
right:auto;
vertical-align: middle;
}
.layui-card-header.auto{
height:auto;
padding-bottom:5px;
}


.layui-form .layui-form-item .long{
width: 500px;
}
Expand Down
3 changes: 1 addition & 2 deletions extension/phpexcel/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ class phpexcel_lib
{
public function __construct()
{
require_once 'phar://' . ROOT . 'extension/phpexcel/phpexcel.phar';
//PHP版
//require_once ROOT . 'extension/phpexcel/phpexcel/PHPExcel.php';
require_once EXTENSION . 'phpexcel/phpexcel/PHPExcel.php';
}

public function excelTime($date, $time = false)
Expand Down
5 changes: 5 additions & 0 deletions framework/admin/address_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public function open_f()
if(!$status){
$this->tip(P_Lang('该会员还没有设置地址信息'));
}
$types = $this->get('types');
if(!$types){
$types = 'shipping';
}
$this->assign('types',$types);
$this->view($tpl);
}

Expand Down
7 changes: 2 additions & 5 deletions framework/admin/all_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,6 @@ function gset_save_f()
$identifier = $this->get("identifier");
$ico = $this->get("ico");
$chk = $this->all_check($identifier,$id);
$error_url = $this->url("all","gset");
if($id){
$error_url .= "&id=".$id;
}
if($chk != "ok"){
$this->error(P_Lang($chk));
}
Expand All @@ -532,7 +528,8 @@ function gset_save_f()
$array["status"] = $status;
$array["ico"] = $ico;
$array["identifier"] = $identifier;
$array["site_id"] = $_SESSION["admin_site_id"];
$array['is_api'] = $this->get('is_api','int');
$array["site_id"] = $this->session->val('admin_site_id');
$this->model('site')->all_save($array,$id);
$this->success();
}
Expand Down
154 changes: 0 additions & 154 deletions framework/admin/appsys_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,160 +356,6 @@ public function add_f()
$this->view('appsys_add');
}

public function filelist_f()
{
if(!$this->popedom['filelist']){
$this->error(P_Lang('您没有模板应用文件列表权限'));
}
$id = $this->get('id');
if(!$id){
$this->error(P_Lang('未指定ID'));
}
$rs = $this->model('appsys')->get_one($id);
$this->assign('rs',$rs);
$this->assign('id',$id);
if(!is_dir($this->dir_app.$id)){
$this->error(P_Lang('目录不存在'));
}
$folder = $this->get("folder");
if(!$folder){
$folder = "/";
}
$tmplist = explode("/",$folder);
$leadlist = array();
$leadurl = $this->url("appsys","filelist","id=".$id);
if(substr($folder,-1) != "/"){
$folder .= "/";
}
if($folder && $folder != '/'){
$this->assign("folder",$folder);
}
//绑定目录
$tpl_dir = $this->dir_app.$id."/".$folder;
$tpl_list = $this->lib('file')->ls($tpl_dir);
if(!$tpl_list){
$tpl_list = array();
}
$myurl = $this->url("appsys","filelist","id=".$id);
$rslist = $dirlist = array();
$rs_i = $dir_i = 0;
$edit_array = array("html","php","js","css","asp","jsp","tpl","dwt","aspx","htm","txt","xml");
$pic_array = array("gif","png","jpeg","jpg");
$this->assign("edit_array",$edit_array);
$this->assign("pic_array",$pic_array);
foreach($tpl_list as $key=>$value){
$bname = basename($value);
$type = is_dir($value) ? "dir" : "file";
if(is_dir($value)){
$url = $this->url("appsys","filelist","id=".$id."&folder=".rawurlencode($folder.$bname."/"));
$dirlist[] = array("filename"=>$value,"title"=>$bname,"data"=>"","type"=>"dir","url"=>$url);
$dir_i++;
}else{
$date = date("Y-m-d H:i:s",filemtime($value));
$tmp = explode(".",$bname);
$tmp_total = count($tmp);
$type = "unknown";
if($tmp_total > 1){
$tmp_ext = strtolower($tmp[($tmp_total-1)]);
$typefile = $this->dir_root."images/filetype/".$tmp_ext.".gif";
$type = file_exists($typefile) ? $tmp_ext : "unknown";
}
$tmp = array("filename"=>$value,"title"=>$bname,"date"=>$date,"type"=>$type);
$rslist[] = $tmp;
$rs_i++;
}
}
if($dir_i> 0){
$this->assign("dirlist",$dirlist);
}
if($rs_i > 0){
$this->assign("rslist",$rslist);
}
$this->view('appsys_filelist');
}

public function file_edit_f()
{
if(!$this->popedom['fedit']){
$this->error(P_Lang('您没有模板应用文件列表权限'));
}
$id = $this->get('id');
if(!$id){
$this->error(P_Lang('未指定ID'));
}
$rs = $this->model('appsys')->get_one($id);
if(!is_dir($this->dir_app.$id)){
$this->error(P_Lang('目录不存在'));
}
$folder = $this->get("folder");
if(!$folder){
$folder = "/";
}
$title = $this->get("title");
if(!$title){
$this->error(P_Lang('未指定文件名'));
}
$file = $this->dir_app.$id."/".$folder.$title;
if(!file_exists($file)){
$this->error(P_Lang('文件不存在'));
}
$is_edit = true;
if(!is_writable($file)){
$tips = P_Lang('文件无法写法,不支持在线编辑');
$this->assign('tips',$tips);
$is_edit = false;
}
$this->assign('is_edit',$is_edit);
$content = $this->lib('file')->cat($file);
$content = str_replace(array("<",'>'),array("<",">"),$content);
$content = str_replace(array('<','>'),array('&lt;','&gt;'),$content);
$this->assign("content",$content);
$this->assign("id",$id);
$this->assign("rs",$rs);
$this->assign("folder",$folder);
$this->assign("title",$title);
//加载编辑器
$cdnUrl = phpok_cdn();
$this->addcss($cdnUrl.'codemirror/5.42.2/lib/codemirror.css');
$this->addjs($cdnUrl.'codemirror/5.42.2/lib/codemirror.js');
$this->addjs($cdnUrl.'codemirror/5.42.2/mode/css/css.js');
$this->addjs($cdnUrl.'codemirror/5.42.2/mode/javascript/javascript.js');
$this->addjs($cdnUrl.'codemirror/5.42.2/mode/htmlmixed/htmlmixed.js');
$this->addjs($cdnUrl.'codemirror/5.42.2/mode/php/php.js');
$this->addjs($cdnUrl.'codemirror/5.42.2/mode/xml/xml.js');
$this->view("appsys_file_edit");
}

public function file_edit_save_f()
{
if(!$this->popedom["fedit"]){
$this->error(P_Lang('您没有权限执行此操作'));
}
$id = $this->get("id");
if(!$id){
$this->error(P_Lang('未指定ID'));
}
$rs = $this->model('appsys')->get_one($id);
if(!$rs){
$this->error(P_Lang('项目信息不存在'));
}
$folder = $this->get("folder");
if(!$folder){
$folder = "/";
}
$title = $this->get("title");
$file = $this->dir_app."/".$id.$folder.$title;
if(!file_exists($file)){
$this->error(P_Lang('文件不存在'));
}
if(!is_writable($file)){
$this->error(P_Lang('文件无法写法,不支持在线编辑'));
}
$content = $this->get("content","html_js");
$this->lib('file')->vim($content,$file);
$this->success();
}

public function create_f()
{
$title = $this->get('title');
Expand Down
Loading

0 comments on commit d70c396

Please sign in to comment.