diff --git a/README.md b/README.md
index e5177ad..54a61e4 100644
--- a/README.md
+++ b/README.md
@@ -5,12 +5,12 @@
公司团队:信呼开发团队
官网网站:http://www.rockoa.com/
源码仅供学习二次开发使用,禁止二次发布,禁止用于商业用途出售等(违者必究)
-版权:Copyright @2016-2022 信呼开发团队
-版本整理时间:2022-11-17 23:59:59
-版本号:V2.5.1
+版权:Copyright @2016-2023 信呼开发团队
+版本整理时间:2023-01-12 23:59:59
+版本号:V2.5.2
-### V2.5.1更新说明
+### V2.5.2更新说明
1、完善系统安全性。
2、更多升级日志详见:http://www.rockoa.com/view_core.html
diff --git a/config/version.php b/config/version.php
index 3dba2dc..076b865 100644
--- a/config/version.php
+++ b/config/version.php
@@ -1,3 +1,3 @@
';
}
if($type=='uploadimg'){
+ $str1= '搴撲腑閫 ';
+ if(M=='login' || $this->adminid==0 || $a['attr']=='onlychange')$str1='';
$str = '';
$str.= '
';
- $str.= '


\n 娆㈣繋浣跨敤锛屾湁浠讳綍闂鍙互闅忔椂鑱旂郴鎴戜滑锛屽府浣犺В绛斿摝銆 \n
\n\n 淇″懠鏄竴娆惧紑婧愬厤璐圭殑宸ヤ綔鍙拌蒋浠讹紝鍙坊鍔犲簲鐢紝绠$悊锛宲c涓婏紝app閮藉彲浠ヤ娇鐢紝鎴戜滑鐨勪唬鐮佸叏閮ㄥ紑鏀撅紝鍙嚜鐢变娇鐢ㄣ俓n
', null, null, null, '1', '绠$悊鍛', null, null, '淇″懠寮鍙戝洟闃', '2016-08-01', '1', null, '0', '0', '0', '0', null, null, '0', '0', '0'); INSERT INTO `xinhu_infor` VALUES ('2', '鍏充簬鍐欐棩鎶ュ埗搴﹁鏄', '2019-04-13 19:54:43', '瑙勫垯鍒跺害', '\n 1銆佹瘡涓汉宸ヤ綔鏃ュ湪涓嬬彮鍚庡繀椤诲啓宸ヤ綔鏃ユ姤锛屽叏澶╄鍋囧彲涓嶇敤鍐欙紝鍙鏈変笂鐝氨闇瑕佸啓锛屽嵆浣夸綘涓婄彮1鍒嗛挓銆俓n
\n\n 2銆佷篃鍙互闅斿ぉ鍐欍俓n
\n\n 鏈啓澶勭綒 \n
\n\n 1銆佹湭鍐欎竴娆℃墸浜斿潡锛岀疮璁″姞鍊嶃俓n
', null, 'u1,u2,u3,u4,u5,u6,u7,u8,u9', null, '1', '绠$悊鍛', null, null, '浜哄姏琛屾斂閮', '2016-08-01', '1', 'images/kqbanner1.jpg', '0', '0', '0', '0', null, null, '0', '0', '0'); -INSERT INTO `xinhu_infor` VALUES ('6', '淇″懠鏇存柊鍙戝竷V2.5.1鐗堟湰', '2022-11-17 10:48:38', '閫氱煡鍏憡', '\n 鐗堟湰娣诲姞浜嗗彂甯冨涓嬪姛鑳藉晩銆俓n
\n\n 1銆佺郴缁熷姛鑳藉畬鍠勩俓n
\n\n 2銆佹洿鏂颁簡寰堝锛岃嚜宸辩湅鍗囩骇鏃ュ織銆俓n
', 'http://www.rockoa.com/view_down.html', 'd1', '淇″懠寮鍙戝洟闃', '1', '绠$悊鍛', null, null, '淇″懠寮鍙戝洟闃', '2022-11-17', '1', 'images/logo.png', '0', '0', '0', '1', null, null, '1', '1', '0'); +INSERT INTO `xinhu_infor` VALUES ('6', '淇″懠鏇存柊鍙戝竷V2.5.2鐗堟湰', '2023-01-11 11:03:06', '閫氱煡鍏憡', '\n 鐗堟湰娣诲姞浜嗗彂甯冨涓嬪姛鑳藉晩銆俓n
\n\n 1銆佺郴缁熷姛鑳藉畬鍠勩俓n
\n\n 2銆佹洿鏂颁簡寰堝锛岃嚜宸辩湅鍗囩骇鏃ュ織銆俓n
', 'http://www.rockoa.com/view_down.html', 'd1', '淇″懠寮鍙戝洟闃', '1', '绠$悊鍛', null, null, '淇″懠寮鍙戝洟闃', '2023-01-11', '1', 'images/logo.png', '0', '0', '0', '1', null, null, '1', '1', '0'); INSERT INTO `xinhu_infor` VALUES ('9', '浣犱滑瑙夊緱杩欎釜绯荤粺濡備綍锛', '2019-06-03 13:17:05', '閫氱煡鍏憡', '寮濮嬫姇绁ㄦ媺銆', null, 'd1', '淇″懠寮鍙戝洟闃', '1', '绠$悊鍛', '2018-08-31 12:42:00', '2017-08-26 12:42:00', '寮鍙戦儴', '2017-08-26', '1', null, '1', '1', '0', '0', '2019-04-15', null, '1', '0', '0'); -- ---------------------------- @@ -5705,7 +5689,7 @@ CREATE TABLE `xinhu_kqdw` ( -- ---------------------------- -- Records of xinhu_kqdw -- ---------------------------- -INSERT INTO `xinhu_kqdw` VALUES ('1', '鍘﹂棬榛樿浣嶇疆', '24.528153', '118.167806', '鍘﹂棬', '0', '12', null, '1', null, '1'); +INSERT INTO `xinhu_kqdw` VALUES ('1', '鍘﹂棬榛樿浣嶇疆', '24.528153', '118.167806', '鍘﹂棬', '0', '12', null, '1', null, '0'); -- ---------------------------- -- Table structure for `xinhu_kqerr` @@ -5764,7 +5748,7 @@ CREATE TABLE `xinhu_kqinfo` ( PRIMARY KEY (`id`), KEY `uid` (`uid`), KEY `kind` (`kind`) -) ENGINE=MyISAM AUTO_INCREMENT=161 DEFAULT CHARSET=utf8 COMMENT='璇峰亣鏉″姞鐝崟'; +) ENGINE=MyISAM AUTO_INCREMENT=163 DEFAULT CHARSET=utf8 COMMENT='璇峰亣鏉″姞鐝崟'; -- ---------------------------- -- Records of xinhu_kqinfo @@ -5815,7 +5799,7 @@ INSERT INTO `xinhu_kqinfo` VALUES ('154', '2', '璨傝潐', '2019-08-09 00:00:00', INSERT INTO `xinhu_kqinfo` VALUES ('155', '1', '绠$悊鍛', '2019-08-26 18:20:00', '2019-08-26 22:20:00', '鍔犵彮', null, '濂界殑', '1', '4.0', '2019-08-26 18:20:43', '1', '绠$悊鍛', '1', '2019-08-26', '0.00', '0', '0.00', null, '1'); INSERT INTO `xinhu_kqinfo` VALUES ('157', '2', '璨傝潐', '2020-07-01 13:59:00', '2020-07-31 13:59:00', '澧炲姞璋冧紤', null, null, '1', '8.0', '2020-07-16 13:59:49', '1', '绠$悊鍛', '1', '2020-07-16', '0.00', '0', '1.00', null, '1'); INSERT INTO `xinhu_kqinfo` VALUES ('158', '1', '绠$悊鍛', '2020-11-16 12:24:00', '2020-11-17 04:24:00', '鍔犵彮', null, '鍟﹀暒鍟', '1', '16.0', '2020-11-16 12:28:24', '1', '绠$悊鍛', '1', '2020-11-16', '0.00', '0', '0.00', null, '1'); -INSERT INTO `xinhu_kqinfo` VALUES ('160', '1', '绠$悊鍛', '2022-09-15 20:26:00', '2022-09-16 20:26:00', '鍔犵彮', null, '鍔犵彮銆', '0', '8.0', '2022-09-16 20:26:43', '1', '绠$悊鍛', '1', '2022-09-16', '0.00', '0', '0.00', null, '1'); +INSERT INTO `xinhu_kqinfo` VALUES ('160', '1', '绠$悊鍛', '2022-09-15 20:26:00', '2022-09-16 20:26:00', '鍔犵彮', null, '鍔犵彮銆', '0', '8.0', '2022-12-06 18:56:23', '1', '绠$悊鍛', '1', '2022-09-16', '0.00', '0', '0.00', null, '1'); -- ---------------------------- -- Table structure for `xinhu_kqjcmd` @@ -6165,7 +6149,7 @@ CREATE TABLE `xinhu_menu` ( `types` tinyint(1) DEFAULT '0', PRIMARY KEY (`id`), KEY `pid` (`pid`,`status`) -) ENGINE=MyISAM AUTO_INCREMENT=438 DEFAULT CHARSET=utf8 COMMENT='绯荤粺鑿滃崟'; +) ENGINE=MyISAM AUTO_INCREMENT=452 DEFAULT CHARSET=utf8 COMMENT='绯荤粺鑿滃崟'; -- ---------------------------- -- Records of xinhu_menu @@ -6176,7 +6160,7 @@ INSERT INTO `xinhu_menu` VALUES ('3', '鐢ㄦ埛绠$悊', '220', '2', 'flow,page,use INSERT INTO `xinhu_menu` VALUES ('4', '璁″垝浠诲姟', '46', '7', 'system,task', 'time', null, 'taskrun', '1', '1', null, '0', '0', '1', '0'); INSERT INTO `xinhu_menu` VALUES ('5', '缁勭鐞', '220', '3', 'system,group', 'group', null, 'group', '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('6', '缁勭粐缁撴瀯', '220', '1', 'system,dept', 'sitemap', null, null, '1', '1', null, '0', '0', '0', '0'); -INSERT INTO `xinhu_menu` VALUES ('7', '娴佺▼妯″潡', '0', '10', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); +INSERT INTO `xinhu_menu` VALUES ('7', '娴佺▼妯″潡', '0', '15', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('8', '鏉冮檺绠$悊', '1', '6', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('9', '浜哄憳鈫掕彍鍗', '8', '0', 'system,extent,type=um', null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('10', '鑿滃崟鈫掍汉鍛', '8', '1', 'system,extent,type=mu', null, null, null, '1', '1', null, '0', '0', '0', '0'); @@ -6490,8 +6474,8 @@ INSERT INTO `xinhu_menu` VALUES ('413', '缁翠慨鎶ヤ慨鏌ョ湅', '411', '30', 'flow INSERT INTO `xinhu_menu` VALUES ('414', '淇℃伅鏀堕泦', '140', '10', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('415', '淇℃伅鏀堕泦绠$悊', '414', '0', 'flow,page,collectm,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('416', '淇℃伅鏀堕泦琛', '414', '0', 'flow,page,collects,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); -INSERT INTO `xinhu_menu` VALUES ('436', '鍋ュ悍鎶ュ', '286', '4', 'flow,page,yqhealthy,atype=all,pnum=all', 'medkit', null, null, '1', '1', null, '0', '0', '0', '0'); -INSERT INTO `xinhu_menu` VALUES ('437', '鎴戠殑鍋ュ悍鎶ュ', '39', '10', 'flow,page,yqhealthy,atype=my', 'medkit', null, null, '0', '1', null, '0', '0', '0', '0'); +INSERT INTO `xinhu_menu` VALUES ('436', '鍋ュ悍鎶ュ', '286', '4', 'flow,page,yqhealthy,atype=all,pnum=all', 'medkit', null, null, '1', '0', null, '0', '0', '0', '0'); +INSERT INTO `xinhu_menu` VALUES ('437', '鎴戠殑鍋ュ悍鎶ュ', '39', '10', 'flow,page,yqhealthy,atype=my', 'medkit', null, null, '0', '0', null, '0', '0', '0', '0'); -- ---------------------------- -- Table structure for `xinhu_news` @@ -6603,7 +6587,7 @@ CREATE TABLE `xinhu_option` ( PRIMARY KEY (`id`), KEY `num` (`num`), KEY `pid` (`pid`) -) ENGINE=MyISAM AUTO_INCREMENT=821 DEFAULT CHARSET=utf8 COMMENT='绯荤粺閫夐」'; +) ENGINE=MyISAM AUTO_INCREMENT=846 DEFAULT CHARSET=utf8 COMMENT='绯荤粺閫夐」'; -- ---------------------------- -- Records of xinhu_option @@ -7081,6 +7065,26 @@ INSERT INTO `xinhu_option` VALUES ('814', '浼戝', '0', '809', null, '4', '0', INSERT INTO `xinhu_option` VALUES ('815', '楂樹竴', '0', '782', null, null, '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('816', '楂樹簩', '0', '782', null, null, '1', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('817', '楂樹笁', '0', '782', null, null, '2', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('819', '鐗╀笟閫夐」', '0', '1', 'wuye', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('820', '鍏ヤ綇璺熶笟涓诲叧绯', '0', '819', 'wuyeguanxi', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('821', '涓氫富', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('822', '澶', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('823', '鍎垮コ', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('824', '鐖舵瘝', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('825', '浜叉垰', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('826', '鏈嬪弸', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('827', '绉熷', '0', '820', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('828', '鐗╀笟閫氱煡绫诲瀷', '0', '819', 'wuyetypename', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('829', '閫氱煡', '0', '828', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('830', '鐗╀笟鏈嶅姟鍒跺害', '0', '828', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('831', '瑁呬慨鐭ヨ瘑', '0', '828', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('832', '涓氫富鏈嶅姟绫诲瀷', '0', '819', 'wuyefwtype', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('833', '鎶ヤ慨', '0', '832', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('834', '寤鸿', '0', '832', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('835', '鎶曡瘔', '0', '832', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('836', '鍙嶉', '0', '832', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('837', '璁惧绫诲瀷', '0', '819', 'wuyesntype', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('838', '鏈虹數璁惧', '0', '837', null, null, '0', null, '1', null, '0', null, null, null, '0'); -- ---------------------------- -- Table structure for `xinhu_planm` @@ -7592,7 +7596,7 @@ CREATE TABLE `xinhu_task` ( INSERT INTO `xinhu_task` VALUES ('1', '娴佺▼浠庢柊鍖归厤', '绯荤粺', 'flow,pipei', 'd,d', '00:10:00,12:10:00', '姣忓ぉ0,12鐐', '1', '0', null, null, '0', null, null, null, null, null); INSERT INTO `xinhu_task` VALUES ('2', '鏁版嵁澶囦唤', '绯荤粺', 'sys,beifen', 'd', '00:20:00', '姣忓ぉ鍑屾櫒00:20', '1', '0', null, null, '0', null, null, null, null, null); INSERT INTO `xinhu_task` VALUES ('3', '绯荤粺鍗囩骇鎻愰啋', '绯荤粺', 'sys,upgtx', 'd', '00:25:00', '姣忓ぉ鍑屾櫒00:25', '0', '0', null, null, '0', null, null, null, '1,8', '绠$悊鍛,淇″懠瀹㈡湇'); -INSERT INTO `xinhu_task` VALUES ('4', '5鍒嗛挓杩愯1娆', '绯荤粺', 'minute5,run', 'i5', '00', '姣5鍒嗛挓杩愯涓娆', '1', '1', '2022-11-17 15:40:00', null, '0', null, 'success', '杩欎釜鏄繀椤荤殑锛屼笉鍙垹闄ゅ仠鐢', null, null); +INSERT INTO `xinhu_task` VALUES ('4', '5鍒嗛挓杩愯1娆', '绯荤粺', 'minute5,run', 'i5', '00', '姣5鍒嗛挓杩愯涓娆', '1', '0', null, null, '0', null, null, '杩欎釜鏄繀椤荤殑锛屼笉鍙垹闄ゅ仠鐢', null, null); INSERT INTO `xinhu_task` VALUES ('5', '鑰冨嫟淇℃伅鎻愰啋', '鑰冨嫟', 'kaoqin,todo', 'd', '09:25:00', '姣忓ぉ9鐐', '1', '0', null, null, '21', null, null, '鍦ㄦā鍧椼愯冨嫟淇℃伅銆戜笅璁剧疆鎻愰啋鍒板摢浜涘钩鍙般', null, null); INSERT INTO `xinhu_task` VALUES ('6', '鐢ㄦ埛鏁版嵁鏇存柊', '鐢ㄦ埛', 'sys,dataup', 'd', '00:10:00', '姣忓ぉ', '1', '0', null, null, '1', null, null, null, null, null); INSERT INTO `xinhu_task` VALUES ('7', '鑰冨嫟鍒嗘瀽', '鑰冨嫟', 'kaoqin,anay', 'd', '02:15:00', '姣忓ぉ2鐐', '1', '0', null, null, '22', null, null, '鍒嗘瀽鍏ㄤ綋浜哄憳鏄ㄥぉ鐨勮冨嫟', null, null); @@ -8034,16 +8038,13 @@ CREATE TABLE `xinhu_wordxie` ( `isgk` tinyint(4) DEFAULT '0' COMMENT '鏄惁鍙浠栦汉閫夋嫨', `tplvar` varchar(500) DEFAULT NULL COMMENT '妯$増涓彉閲', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='鏂囨。鍗忎綔'; +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='鏂囨。鍗忎綔'; -- ---------------------------- -- Records of xinhu_wordxie -- ---------------------------- INSERT INTO `xinhu_wordxie` VALUES ('1', '淇″懠寮鍙戝洟闃熶粙缁', null, 'pptx', '绠$悊鍛', '1', '2019-03-09 20:35:22', '琛屾斂浜轰簨閮,寮鍙戦儴', 'd4,d2', '淇″懠寮鍙戝洟闃', 'd1', '1', '3', null, '0', '0', null); INSERT INTO `xinhu_wordxie` VALUES ('2', '淇″懠浣跨敤鏂囨。', null, 'docx', '绠$悊鍛', '1', '2019-08-18 19:16:51', '寮鍙戦儴', 'd2', '淇″懠寮鍙戝洟闃', 'd1', '1', '4', null, '1', '0', null); -INSERT INTO `xinhu_wordxie` VALUES ('4', '鍛樺伐鍔冲姩鍚堝悓', '鍛樺伐鍚堝悓', 'docx', '绠$悊鍛', '1', '2020-10-29 10:08:17', null, null, '淇″懠寮鍙戝洟闃', 'd1', '1', '5', '鍙緵鍛樺伐鍚堝悓浣跨敤', '1', '1', 'company,name,idnum,mobile'); -INSERT INTO `xinhu_wordxie` VALUES ('5', '鏍囧噯绾㈠ご鏂囦欢妯$増', '绾㈠ご鏂囦欢', 'docx', '绠$悊鍛', '1', '2020-10-31 22:10:30', null, null, '淇″懠寮鍙戝洟闃', 'd1', '1', '6', '鍙戞枃鍗曞绾娇鐢', '1', '1', 'officiatitle,num,title,zuncheng,content,applydt,keyword,unitname,chaoname,unitsame'); -INSERT INTO `xinhu_wordxie` VALUES ('6', '瀹㈡埛鍚堝悓妯$増', '瀹㈡埛鍚堝悓', 'docx', '绠$悊鍛', '1', '2020-12-24 22:11:35', null, null, '淇″懠寮鍙戝洟闃', 'd1', '1', '7', null, '1', '1', 'custname,startdt,enddt,money'); -- ---------------------------- -- Table structure for `xinhu_work` diff --git a/webmain/model/adminModel.php b/webmain/model/adminModel.php index 33c7a84..461dc51 100644 --- a/webmain/model/adminModel.php +++ b/webmain/model/adminModel.php @@ -426,6 +426,7 @@ class adminClassModel extends Model public function getuser($lx=0, $uid=0) { $fields = '`id`,`name`,`deptid`,`deptname`,`deptpath`,`groupname`,`deptallname`,`mobile`,`ranking`,`tel`,`face`,`sex`,`email`,`pingyin`,`deptids`,`isvcard`'; + $this->allshow = false; if($uid==0){ $uid = $this->adminid; $where = m('view')->viewwhere('user', $uid, 'id'); @@ -474,6 +475,10 @@ class adminClassModel extends Model //璇诲彇鎴戝彲鏌ョ湅鏉冮檺 if(contain($where,'1=1')){ $where = ''; + if($this->rock->get('gtype')=='change'){ + //$this->allshow = true; + //if(!ISMORECOM && c('cache')->get('deptuserjson'))return array(); + } }else{ $where = 'and ((1 '.$where.') or (`id`='.$uid.'))'; } @@ -541,6 +546,7 @@ class adminClassModel extends Model */ public function updateinfo($where='') { + if($where)c('cache')->del('deptuserjson'); $rows = $this->db->getall("select * from `[Q]admin` a where id>0 $where"); $total = $this->db->count; $cl = 0; diff --git a/webmain/model/deptModel.php b/webmain/model/deptModel.php index 034ce3e..9cf380e 100644 --- a/webmain/model/deptModel.php +++ b/webmain/model/deptModel.php @@ -122,6 +122,7 @@ class deptClassModel extends Model 'uarr' => $userarr, 'darr' => $deptarr, 'garr' => $garr, + 'isall'=> $admindb->allshow ); } diff --git a/webmain/model/flow/flow.php b/webmain/model/flow/flow.php index 0f3377e..8c2766f 100644 --- a/webmain/model/flow/flow.php +++ b/webmain/model/flow/flow.php @@ -5,7 +5,7 @@ * 缃戝潃锛歨ttp://www.rockoa.com/ * 绯荤粺鏂囦欢 */ - class flowModel extends Model { public $modenum; public $editcont= ''; public $id = 0; public $moders; public $modeid; public $modename; public $sericnum; public $billrs = array(); public $rs = array(); public $urs = array(); public $drs = array(); public $fieldsarr = array(); public $fieldsarra = array(); public $mwhere; public $mtable; public $uname; public $uid = 0; public $optid = 0; public $isflow = 0; public $ismobile= 0; public $minwidth= 100; public $inputwidth= 0; public $atype = ''; public $daochubo= false; public $companyid= 1; protected function flowinit(){} protected function flowchangedata(){} protected function flowchangetodo(){} protected function flowdeletebill($sm){} protected function flowzuofeibill($sm){} protected function flowsubmit($na, $sm){} protected function flowaddlog($arr){} protected function flowdatalog($arr){} protected function flowcheckbefore(){} protected function flowcheckafter($zt, $sm){} protected function flowcheckfinsh($zt){} protected function flowgetfields($lx){} protected function flowgetoptmenu($opt){} protected function flowcheckname($num){} protected function flowcoursejudge($num){} protected function flowoptmenu($ors, $crs){} protected function flowisreadqx(){return false;} protected function flowisdeleteqx(){return false;} protected function flowprintrows($r){return $r;} protected function flowsubdata($r, $lx=0){return $r;} protected function flownexttodo($type){return false;} protected function flowbillwhere($lx, $uid){return '';} protected $flowweixinarr = array(); protected $flowviewufieds = 'uid'; protected $flowcompanyidfieds = 'comid'; protected $flowfieldstype = 0; public function flowrsreplace($rs){return $rs;} public function flowrsreplace_we($row, $rs){return $row;} public function flowwesearchdata($lx){return array();} protected function flowrsreplaceedit($rs){return $rs;} protected $flowstatusarr = array(1); protected $subsubdatastyle = ''; protected $wherejoin = array(); public $defaultorder = ''; public $floweditother = false; public $xiangbordercolor = ''; public function echomsg($msg) { if(!isajax())exit($msg); showreturn('', $msg, 201); exit(); } public function flowfieldarr($farr, $lx){return $farr;} public function flowinputtpl($cont, $lx){return $cont;} public function flowviewtpl($cont, $lx){return $cont;} public function floweditoffice($frs, $ofrs){} public function initdata($num, $id=null) { if(is_array($num)){ $this->moders= $num; }else{ $this->moders = m('flow_set')->getone(is_numeric($num) ? $num : "`num`='$num'"); if(!$this->moders)$this->echomsg('妯″潡['.$num.']涓嶅瓨鍦紝璇峰埌[娴佺▼妯″潡鍒楄〃]涓嬫坊鍔'); } $this->daochubo = ($this->rock->post('execldown')=='true') ? true :false; $table = $this->moders['table']; $this->modeid = $this->moders['id']; $this->modenum = $this->moders['num']; $this->modename = $this->moders['name']; $this->isflow = (int)$this->moders['isflow']; $this->settable($table); $this->mtable = $table; $this->viewmodel = m('view'); $this->chaomodel = m('flow_chao'); $this->billmodel = m('flow_bill'); $this->todomodel = m('flow_todo'); $this->todosmodel = m('flowtodo'); $this->flogmodel = m('flow_log'); $this->checksmodel = m('flow_checks'); $this->cnamemodel = m('flowcname'); $this->wheremodel = m('where'); $this->adminmodel = m('admin'); $this->remindmodel = m('remind'); $this->option = m('option'); $this->companyid = $this->adminmodel->getcompanyid(); $this->tfieldsarra(); $this->mwhere = "`table`='$this->mtable' and `mid`=-1"; if(!$this->defaultorder){ $sortdir = arrvalue($this->moders, 'sortdir'); if(!isempt($sortdir))$this->defaultorder = str_replace(' ',',', $sortdir); } $this->flowinit(); if($id==null)return $this; $this->loaddata($id, true); return $this; } private function tfieldsarra() { $rows = m('flow_element')->getrows("`mid`='$this->modeid' and `iszb`=0",'`name`,`fields`,`isbt`,`iszs`,`fieldstype`,`savewhere`,`data`,`isdr`,`iszb`,`issou`,`islu`,`islb`,`isonly`,`attr`','`sort`'); $this->fieldsarr = array(); if($rows)foreach($rows as $k=>$rs){ if($rs['islu']==1)$this->fieldsarr[] = $rs; } $this->fieldsarra = $rows; } public function inputtitle() { return $this->moders['name']; } public function flowsearchfields() { $arr = array(); if($this->isflow>0){ $arr[] = array('name'=>'鐢宠浜...','fields'=>'uid'); $arr[] = array('name'=>'鎻愪氦浜...','fields'=>'optid'); } return $arr; } public function loaddata($id, $ispd=true) { $this->id = (int)$id; $this->mwhere = "`table`='$this->mtable' and `mid`='$id'"; $swhere = "`id`='$id'"; $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $swhere .= ' and '.$wherestr; } $this->rs = $this->getone($swhere); $this->uname = ''; if(!$this->rs)$this->echomsg('鏁版嵁璁板綍涓嶅瓨鍦ㄤ簡'); $this->rs['base_name'] = ''; $this->rs['base_deptname'] = ''; if(isset($this->rs['uid']))$this->uid = $this->rs['uid']; if(isset($this->rs['comid']))$this->companyid = $this->rs['comid']; if(!isset($this->rs['applydt']))$this->rs['applydt'] = ''; if(!isset($this->rs['status']))$this->rs['status'] = 1; $uisfield = property_exists($this, 'uidfields') ? $this->uidfields : 'optid'; if($this->uid==0 && isset($this->rs[$uisfield]))$this->uid = $this->rs[$uisfield]; $this->optid = isset($this->rs['optid']) ? $this->rs['optid'] : $this->uid; $this->urs = $this->adminmodel->getone($this->uid,'id,name,user,deptid,deptids,deptname,deptallname,face,ranking,superid,superpath,superman,deptpath'); if($this->isempt($this->rs['applydt'])&&isset($this->rs['optdt']))$this->rs['applydt']=substr($this->rs['optdt'],0,10); if($this->urs){ $this->drs = $this->db->getone('[Q]dept',"`id`='".$this->urs['deptid']."'"); $this->uname = $this->urs['name']; $this->rs['base_name'] = $this->uname; if($this->drs){ $this->rs['base_deptname'] = $this->drs['name']; } } $this->sericnum = ''; $this->billrs = $this->billmodel->getone($this->mwhere); if($this->billrs){ $this->sericnum = $this->billrs['sericnum']; if(isempt(arrvalue($this->billrs,'uname'))){ $this->savebill(); } if($this->billrs['status']!=$this->rs['status'])$this->billmodel->update('`status`='.$this->rs['status'].'', $this->billrs['id']); if($this->billrs['isturn']!=$this->rs['isturn'])$this->billmodel->update('`isturn`='.$this->rs['isturn'].'', $this->billrs['id']); if(isempt($this->rs['base_name']))$this->rs['base_name'] = $this->billrs['uname']; if(isempt($this->rs['base_deptname']))$this->rs['base_deptname'] = $this->billrs['udeptname']; }else{ if($this->isflow>0)$this->savebill(); } if($this->isflow>0){ if($this->rs['status']==1 && $this->rs['isturn']=='0'){ $this->update(array('isturn' => 1), $this->id); $this->rs['isturn'] = 1; if($this->billrs)$this->billmodel->update('`isturn`=1', $this->billrs['id']); } } $this->getlogrows = array(); if($ispd)$this->isreadqx(); $this->rssust = $this->rs; $this->flowchangedata(); $this->rs['base_systitle'] = TITLE; $this->rs['base_modename'] = $this->modename; $this->rs['base_sericnum'] = $this->sericnum; $this->rs['base_summary'] = $this->getsummary(); } public function getdaiban() { $s = $this->rock->dbinstr('nowcheckid', $this->adminid); $to = $this->billmodel->rows('`modeid`='.$this->modeid.' and `isdel`=0 and `status` not in(1,2) and '.$s.''); return $to; } public function isreadqx($glx=0) { $bo = false; if($this->adminid==1)$bo=true; if($this->uid==$this->adminid && $this->adminid>0)$bo=true; if(!$bo && $this->isflow>0){ if($this->billrs){ $allcheckid = $this->billrs['allcheckid']; if(contain(','.$allcheckid.',',','.$this->adminid.','))$bo = true; } } if(!$bo){ if($this->urs && contain($this->urs['superpath'],'['.$this->adminid.']'))$bo = true; } if(!$bo){ $tos = $this->todosmodel->rows("".$this->mwhere." and `uid`='$this->adminid'"); if($tos>0)$bo=true; } if(!$bo){ $tos = $this->chaomodel->rows($this->mwhere.' and '.$this->rock->dbinstr('csnameid', $this->adminid).''); if($tos>0)$bo=true; } if(!$bo){ $tos = $this->db->rows('[Q]todo', "`uid`='$this->adminid' and ".$this->mwhere.""); if($tos>0)$bo=true; } if(!$bo)$bo = $this->flowisreadqx(); if(!$bo){ $bo = $this->isreadqxs(); } if(!$bo){ $tos = $this->isjiankongqx(); if($tos>0)$bo=true; } if($glx==1)return $bo; if(!$bo)$this->echomsg('鏃犳潈闄愭煡鐪嬫ā鍧梉'.$this->modenum.'.'.$this->modename.']'.$this->uname.'鐨勬暟鎹紝璇疯仈绯荤鐞嗗憳鍒癧娴佺▼妯″潡鈫掓祦绋嬫ā鍧楁潈闄怾涓嬭缃'); } public function isreadqxs() { $bo = false; $where = $this->viewmodel->viewwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=true; return $bo; } public function iseditqx() { $bo = 0; if($bo==0 && $this->isflow>0){ if($this->billrs && ($this->uid == $this->adminid || $this->optid==$this->adminid)){ if($this->billrs['nstatus']==0 || $this->billrs['nstatus']==2){ $bo = 1; } } if($this->rs['status']==1)$bo=0; } if($bo==0){ $where = $this->viewmodel->editwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } return $bo; } public function isdeleteqx() { $bo = 0; if($bo==0 && $this->isflow>0){ if($this->billrs && ($this->uid == $this->adminid || $this->optid==$this->adminid)){ if($this->billrs['nstatus']==0 || $this->billrs['nstatus']==2){ $bo = 1; } } if($this->rs['status']==1)$bo=0; } if($bo==0){ $where = $this->viewmodel->deletewhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } $isd = $this->flowisdeleteqx(); if(is_numeric($isd) && $isd <= 1)$bo = $isd; return $bo; } public function isjiankongqx() { $bo = 0; if($bo==0){ $where = $this->viewmodel->jiankongwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } return $bo; } public function getfields($lx=0) { $fields = array(); if(!$this->fieldsarra)$this->tfieldsarra(); $farr = $this->fieldsarra; foreach($farr as $k=>$rs)if($rs['iszs']=='1')$fields[$rs['fields']] = $rs['name']; $fters = $this->flowgetfields($lx); if(is_array($fters))$fields = array_merge($fields, $fters); return $fields; } public function getinputurl($num='',$mid=0,$can=array()) { if($num=='')$num = $this->modenum; $xa = 'lu'; if($this->ismobile==1)$xa = 'lum'; $url = 'index.php?a='.$xa.'&m=input&d=flow&num='.$num.'&mid='.$mid.''; if(is_array($can)){ foreach($can as $k=>$v)$url.='&'.$k.'='.$v.''; }else{ $url .= '&'.$can.''; } return $url; } public function replacepbr(&$arr, $k) { $val = arrvalue($arr, $k); if(!c('html')->ishtml($val))$arr[$k] = str_replace("\n",'| 璇诲彇浜哄憳缂撳瓨鏂瑰紡锛 | |
diff --git a/webmain/system/dept/deptAction.php b/webmain/system/dept/deptAction.php
index 63ce19b..5122d1d 100644
--- a/webmain/system/dept/deptAction.php
+++ b/webmain/system/dept/deptAction.php
@@ -128,7 +128,7 @@ class deptClassAction extends Action
$bo = $this->contain($val, $ars['did']);
}
$ars['checked']=$bo;
- }
+ }
}
$rows[] = $ars;
}
@@ -137,7 +137,14 @@ class deptClassAction extends Action
public function deptuserjsonAjax()
{
- $udarr = m('dept')->getdeptuserdata(1);
+ $udarr = m('dept')->getdeptuserdata(1);
+ $bool = false;
+ if(!ISMORECOM && !$udarr['uarr'] && $udarr['isall']){
+ $udarrs = c('cache')->get('deptuserjson');
+ if($udarrs)$udarr = $udarrs;
+ $bool = true;
+ }
+
$userarr = $udarr['uarr'];
$deptarr = $udarr['darr'];
$grouparr = $udarr['garr'];
@@ -145,6 +152,8 @@ class deptClassAction extends Action
$arr['deptjson'] = json_encode($deptarr);
$arr['userjson'] = json_encode($userarr);
$arr['groupjson'] = json_encode($grouparr);
+ $arr['iscache'] = getconfig('usercache');
+ if(!ISMORECOM && $udarr['isall'] && !$bool)c('cache')->set('deptuserjson', $udarr);
$this->showreturn($arr);
}
}
\ No newline at end of file
diff --git a/webmain/system/dept/tpl_dept.html b/webmain/system/dept/tpl_dept.html
index 3a6e879..46db26b 100644
--- a/webmain/system/dept/tpl_dept.html
+++ b/webmain/system/dept/tpl_dept.html
@@ -55,15 +55,21 @@ var c = {
$('#showtype').css('height',''+he+'px');
},
loaddata:function(iscs){
- var url = js.getajaxurl('deptuserjson','dept','system',{'changerange':this.changerange});
+ var url = js.getajaxurl('deptuserjson','dept','system',{'changerange':this.changerange,'gtype':'change'});
$('#showdiv_0').html('![]() |