From 8c2983b577685447376004aa46e7c06304e472d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E4=B8=AD=E7=A3=90=E7=9F=B3?= Date: Thu, 11 May 2023 16:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83v2.5.7=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- config/version.php | 4 +- include/chajian/inputChajian.php | 4 +- include/chajian/langChajian.php | 127 ++++++++++++- include/chajian/lang_en_USChajian.php | 15 -- include/chajian/lang_zh_CNChajian.php | 15 -- include/class/rockClass.php | 17 ++ include/langlocal/langphp/lang.php | 2 + include/langlocal/langphp/langbase.php | 2 + include/langlocal/langphp/langmenu.php | 2 + include/langlocal/langtxt/lang.txt | 31 ++++ include/langlocal/langtxt/lang_onlyjs.txt | 2 + .../langlocal/langtxt/langbase_onlyphp.txt | 1 + .../langlocal/langtxt/langmenu_onlyphp.txt | 3 + include/rockFun.php | 28 +-- js/js.js | 4 + js/lang.js | 9 + web/res/js/jquery-changeuser.js | 22 ++- webmain/flow/input/inputAction.php | 10 +- .../flow/input/inputjs/mode_flowelement.js | 56 ++++++ webmain/flow/input/inputjs/mode_flowmenu.js | 4 + webmain/flow/input/inputjs/mode_flowset.js | 4 + webmain/flow/input/mode_flowelementAction.php | 114 ++++++++++++ webmain/flow/input/mode_flowmenuAction.php | 52 ++++++ webmain/flow/input/mode_flowsetAction.php | 40 ++++ webmain/flow/input/mode_userinfoAction.php | 22 ++- webmain/flow/input/tpl_input_lu.html | 2 +- webmain/flow/input/tpl_input_lum.html | 2 +- webmain/flow/page/input_flowelement.html | 1 + webmain/flow/page/input_flowmenu.html | 1 + webmain/flow/page/input_flowset.html | 1 + webmain/flow/page/input_gong.html | 2 +- webmain/flow/page/rock_page.php | 61 +++++-- webmain/flow/page/rock_page_aas.php | 29 +-- webmain/flow/page/rock_page_caigou.php | 12 +- .../page/rock_page_flowelement_script.php | 102 +++++++++++ .../flow/page/rock_page_flowmenu_script.php | 58 ++++++ .../flow/page/rock_page_flowset_script.php | 171 ++++++++++++++++++ webmain/flow/page/rock_page_gong.php | 12 +- webmain/flow/page/rock_page_userinfo.php | 24 ++- webmain/flow/page/view_flowset_0.html | 28 +++ webmain/home/desktop/items_apply.php | 6 +- webmain/home/desktop/items_kjrk.php | 4 +- webmain/home/desktop/items_kjrko.php | 2 +- webmain/home/index/indexAction.php | 1 + webmain/index/indexAction.php | 1 + webmain/index/tpl_index.html | 11 +- webmain/main/flow/flowAction.php | 5 +- webmain/main/yingyong/rock_yingyong.php | 2 +- webmain/model/agent/custfinaModel.php | 13 ++ webmain/model/agent/custfkdModel.php | 13 ++ webmain/model/finaModel.php | 2 +- webmain/model/flow/flow.php | 4 +- webmain/model/flow/flowelementModel.php | 77 ++++++++ webmain/model/flow/flowmenuModel.php | 52 ++++++ webmain/model/flow/flowsetModel.php | 87 +++++++++ webmain/model/modeModel.php | 45 +++-- webmain/system/cog/cogAction.php | 2 +- webmain/system/cog/rock_cog_moreset.php | 15 ++ webmain/system/cog/rock_cog_set.php | 12 +- webmain/system/cogini/coginiAction.php | 11 ++ webmain/system/menu/menuAction.php | 24 +++ webmain/system/menu/rock_menu.php | 42 +++-- 63 files changed, 1371 insertions(+), 162 deletions(-) delete mode 100644 include/chajian/lang_en_USChajian.php delete mode 100644 include/chajian/lang_zh_CNChajian.php create mode 100644 include/langlocal/langphp/lang.php create mode 100644 include/langlocal/langphp/langbase.php create mode 100644 include/langlocal/langphp/langmenu.php create mode 100644 include/langlocal/langtxt/lang.txt create mode 100644 include/langlocal/langtxt/lang_onlyjs.txt create mode 100644 include/langlocal/langtxt/langbase_onlyphp.txt create mode 100644 include/langlocal/langtxt/langmenu_onlyphp.txt create mode 100644 js/lang.js create mode 100644 webmain/flow/input/inputjs/mode_flowelement.js create mode 100644 webmain/flow/input/inputjs/mode_flowmenu.js create mode 100644 webmain/flow/input/inputjs/mode_flowset.js create mode 100644 webmain/flow/input/mode_flowelementAction.php create mode 100644 webmain/flow/input/mode_flowmenuAction.php create mode 100644 webmain/flow/input/mode_flowsetAction.php create mode 100644 webmain/flow/page/input_flowelement.html create mode 100644 webmain/flow/page/input_flowmenu.html create mode 100644 webmain/flow/page/input_flowset.html create mode 100644 webmain/flow/page/rock_page_flowelement_script.php create mode 100644 webmain/flow/page/rock_page_flowmenu_script.php create mode 100644 webmain/flow/page/rock_page_flowset_script.php create mode 100644 webmain/flow/page/view_flowset_0.html create mode 100644 webmain/model/flow/flowelementModel.php create mode 100644 webmain/model/flow/flowmenuModel.php create mode 100644 webmain/model/flow/flowsetModel.php diff --git a/README.md b/README.md index 9a91bc9..3f9b8d6 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ 官网网站:http://www.rockoa.com/ 源码仅供学习二次开发使用,禁止二次发布,禁止用于商业用途出售等(违者必究) 版权:Copyright @2016-2023 信呼开发团队 -版本整理时间:2023-04-26 23:59:59 -版本号:V2.5.6 +版本整理时间:2023-05-11 23:59:59 +版本号:V2.5.7 -### V2.5.6更新说明 +### V2.5.7更新说明 1、完善系统安全性。 2、更多升级日志详见:http://www.rockoa.com/view_core.html diff --git a/config/version.php b/config/version.php index f40f341..e774d16 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ '; + $str = ' '; } if($type=='uploadimg'){ $str1= '搴撲腑閫 '; @@ -248,6 +249,7 @@ class inputChajian extends Chajian } } } + if(!isempt($zdsm))$str.='
'.$zdsm.''; if($iszb>0)return $str; if($isasm==1){ $lx = 'span';if($ism==1)$lx='div'; diff --git a/include/chajian/langChajian.php b/include/chajian/langChajian.php index e26e369..f5d9081 100644 --- a/include/chajian/langChajian.php +++ b/include/chajian/langChajian.php @@ -5,8 +5,9 @@ class langChajian extends Chajian{ //鏀寔鐨勮瑷鍖 - private $langArray = array('zh-CN','en-US','zh-TW','jp'); - private $locallang = 'zh-CN'; //榛樿鐨勮瑷鍖 + public $langArray = array('zh-CN','zh-FT','en-US'); + public $langArraycn = array('绠浣撲腑鏂','绻佷綋涓枃','鑻辨枃'); + public $locallang = 'zh-CN'; //榛樿鐨勮瑷鍖 /** * 鍒濆鍖栬瑷鍖 @@ -17,14 +18,120 @@ class langChajian extends Chajian{ $lang = $this->rock->get('locallang', $moren); if(!in_array($lang, $this->langArray))$lang = $moren; if(!defined('LANG'))define('LANG', $lang); - $langs = str_replace('-','_', $lang); - $langr = str_replace('-','_', $moren); - - $obj = c('lang_'.$langs.''); - $objmr = c('lang_'.$langr.''); - $data[$moren] = method_exists($objmr, 'getLang') ? $objmr->getLang() : array(); - $data[$lang] = method_exists($obj, 'getLang') ? $obj->getLang() : $data[$moren]; - $GLOBALS['langdata'] = $data; + $xuhao= 0; + foreach($this->langArray as $k=>$v){ + if($v==$lang)$xuhao = $k; + } + $GLOBALS['langdata'] = array( + 'lang' => $lang, + 'xuhao' => $xuhao + ); } + public function getLocal() + { + return array( + 'arr' => $this->langArray, + 'arrcn' => $this->langArraycn, + ); + } + + /** + * 鐢熸垚璇█鍖呮枃浠 + */ + public function createlocal() + { + $bar = glob('include/langlocal/langtxt/*.txt'); + $path= 'include/langlocal/langphp/lang.php'; + $pats= 'include/langlocal/langphp/langjs.php'; + $sss = $ssb = ''; + if(is_array($bar))foreach($bar as $k=>$fil1){ + $str = $this->getcontarr($fil1); + if($str){ + $isph = 1; + $isjs = 0; + if(contain($fil1,'_onlyjs')){ + $isph = 0; + $isjs = 1; + } + if(contain($fil1,'_onlyphp')){ + $isph = 0; + } + if($isph==1){ + if($sss)$sss.=','; + $sss.=''.$str.''; + } + if($isjs==1){ + if($ssb)$ssb.=','; + $ssb.=''.$str.''; + } + if($isph==0 && $isjs==0){ + $fname = str_replace('_onlyphp.txt','.php',str_replace('include/langlocal/langtxt/','',$fil1)); + $spath = 'include/langlocal/langphp/'.$fname.''; + $this->rock->createtxt($spath, 'rock->createtxt($path, $str); + + + $str = 'rock->createtxt($pats, $str); + + $nrs = require($pats); + $nrs = 'var rocklang = \'\',rocklangxu=0,langdata = '.json_encode($nrs).';'; + $ss1 = ''; + foreach($this->langArray as $k=>$v){ + $ss1.='if(rocklang==\''.$v.'\')rocklangxu='.$k.';'; + } +$nrs.=" +function lang(ky){ + if(!rocklang){rocklang = $('html').attr('lang');if(!rocklang)rocklang='".$this->locallang."';".$ss1."} + var d = langdata[ky]; + if(!d)return ky; + var str = d[rocklangxu]; + if(!str)str = ky; + return str; +}"; + $this->rock->createtxt('js/lang.js', $nrs); + unlink($pats); + return returnsuccess(); + } + + public function getcontarr($file,$lx=0) + { + if(!file_exists($file))return ''; + $cont = file_get_contents($file); + $arra = explode("\n", $cont); + $str = ''; + $ssb = ''; + foreach($arra as $k=>$strb){ + if(!$strb)continue; + $strb = str_replace(array('^M',"\n","\r"),'', $strb); + $arrx = explode('|', $strb); + if($k>0){ + $str.=','; + $ssb.=','; + } + $keys= $arrx[0]; + $v001= ''; + if(contain($keys,'::')){ + $arr1 = explode('::', $keys); + $keys = $arr1[0]; + $v001 = $arr1[1]; + } + $str.='\''.$keys.'\'=>array(\''.$v001.'\''; + $ssb.='"'.$keys.'":["'.$v001.'"'; + $len = count($arrx); + foreach($arrx as $k1=>$v1)if($k1>0){ + $str.=',\''.$v1.'\''; + $ssb.=',"'.$v1.'"'; + } + $str.=')'; + $ssb.=']'; + } + if($lx==0)return $str; + if($lx==1)return $ssb; + } } \ No newline at end of file diff --git a/include/chajian/lang_en_USChajian.php b/include/chajian/lang_en_USChajian.php deleted file mode 100644 index 2b1c4d7..0000000 --- a/include/chajian/lang_en_USChajian.php +++ /dev/null @@ -1,15 +0,0 @@ -$rs){ + if($rs[$fid1]==$val){ + $nval = $rs[$fid2]; + break; + } + } + return $nval; + } } \ No newline at end of file diff --git a/include/langlocal/langphp/lang.php b/include/langlocal/langphp/lang.php new file mode 100644 index 0000000..d3fd305 --- /dev/null +++ b/include/langlocal/langphp/lang.php @@ -0,0 +1,2 @@ +array('','','add'),'鏇村'=>array('','','more'),'鎴戠殑鐢宠'=>array('','鎴戠殑鐢宠珛','My Apply'),'鍒锋柊'=>array('','','Refresh'),'鍒锋柊缁熻涓'=>array('','鍒锋柊绲辫▓涓','RefreshTotaling'),'缂栬緫'=>array('','绶ㄨ集','edit'),'鍒犻櫎'=>array('','鍒櫎','delete'),'鑿滃崟'=>array('','鑿滃柈','menu'),'璇勮'=>array('','瑭曡珫','pinglun'),'缂栧彿'=>array('','绶ㄥ彿','num'),'鐘舵'=>array('','鐙鎱','state'),'鐢宠浜'=>array('','鐢宠珛浜','Apply'),'鐢宠浜洪儴闂'=>array('','鐢宠珛浜洪儴闁','color'),'鍗曞彿'=>array('','鍠彿','level'),'鎼滅储'=>array('','','Search'),'鍏抽敭瀛'=>array('','闂滈嵉瀛','keyword'),'鎻愪氦浜'=>array('','','Turn'),'鍖呭惈'=>array('','','contain'),'绛変簬'=>array('','绛夌榾','equal to'),'灏忎簬'=>array('','灏忕榾','less than'),'澶т簬'=>array('','澶х榾','greater than'),'璇烽夋嫨'=>array('','璜嬮伕鎿','Please select'),'涓嶅寘鍚'=>array('','','not contain'),'宸插鏍'=>array('','涔欏鏍',''),'寰呭鐞'=>array('','寰呰檿鐞',''),'涓嶅悓鎰'=>array('','涓嶅悓閫',''),'宸蹭綔搴'=>array('','涔欎綔寤',''),'閫鍥'=>array('','','back'),'娴佺▼'=>array('','','Flow'),'鎺堟潈鏌ョ湅'=>array('','鎺堟瑠鏌ョ湅',''),'缁忔垜澶勭悊'=>array('','缍撴垜铏曠悊','')); \ No newline at end of file diff --git a/include/langlocal/langphp/langbase.php b/include/langlocal/langphp/langbase.php new file mode 100644 index 0000000..e13a49d --- /dev/null +++ b/include/langlocal/langphp/langbase.php @@ -0,0 +1,2 @@ +array('鍒楄〃椤垫病璁剧疆濂斤紝鏁版嵁鏃犳硶鏄剧ず锛屾病鏈夊彲鍒囨崲閫夋嫨鍗★紝鍘荤湅甯姪璁剧疆','鍒楄〃闋佹矑瑷疆濂斤紝鏁告摎鐒℃硶椤ず锛屾矑鍙嬪彲鍒囨崲閬告搰鍗★紝鍘荤湅骞姪瑷疆','')); \ No newline at end of file diff --git a/include/langlocal/langphp/langmenu.php b/include/langlocal/langphp/langmenu.php new file mode 100644 index 0000000..d5a1642 --- /dev/null +++ b/include/langlocal/langphp/langmenu.php @@ -0,0 +1,2 @@ +array('','鍊嬩汉杈﹀叕',''),'浠诲姟璧勬簮'=>array('','浠诲嫏璩囧‖',''),'瀛︽牎'=>array('','瀛告牎','')); \ No newline at end of file diff --git a/include/langlocal/langtxt/lang.txt b/include/langlocal/langtxt/lang.txt new file mode 100644 index 0000000..87516be --- /dev/null +++ b/include/langlocal/langtxt/lang.txt @@ -0,0 +1,31 @@ +鏂板||add +鏇村||more +鎴戠殑鐢宠|鎴戠殑鐢宠珛|My Apply +鍒锋柊||Refresh +鍒锋柊缁熻涓瓅鍒锋柊绲辫▓涓瓅RefreshTotaling +缂栬緫|绶ㄨ集|edit +鍒犻櫎|鍒櫎|delete +鑿滃崟|鑿滃柈|menu +璇勮|瑭曡珫|pinglun +缂栧彿|绶ㄥ彿|num +鐘舵亅鐙鎱媩state +鐢宠浜簗鐢宠珛浜簗Apply +鐢宠浜洪儴闂▅鐢宠珛浜洪儴闁|color +鍗曞彿|鍠彿|level +鎼滅储||Search +鍏抽敭瀛梶闂滈嵉瀛梶keyword +鎻愪氦浜簗|Turn +鍖呭惈||contain +绛変簬|绛夌榾|equal to +灏忎簬|灏忕榾|less than +澶т簬|澶х榾|greater than +璇烽夋嫨|璜嬮伕鎿噟Please select +涓嶅寘鍚珅|not contain +宸插鏍竱涔欏鏍竱 +寰呭鐞唡寰呰檿鐞唡 +涓嶅悓鎰弢涓嶅悓閫竱 +宸蹭綔搴焲涔欎綔寤 +閫鍥瀨|back +娴佺▼||Flow +鎺堟潈鏌ョ湅|鎺堟瑠鏌ョ湅| +缁忔垜澶勭悊|缍撴垜铏曠悊| \ No newline at end of file diff --git a/include/langlocal/langtxt/lang_onlyjs.txt b/include/langlocal/langtxt/lang_onlyjs.txt new file mode 100644 index 0000000..1fc4073 --- /dev/null +++ b/include/langlocal/langtxt/lang_onlyjs.txt @@ -0,0 +1,2 @@ +缂栬緫|绶ㄨ集|edit +鍒犻櫎|鍒櫎|delete \ No newline at end of file diff --git a/include/langlocal/langtxt/langbase_onlyphp.txt b/include/langlocal/langtxt/langbase_onlyphp.txt new file mode 100644 index 0000000..5c941d3 --- /dev/null +++ b/include/langlocal/langtxt/langbase_onlyphp.txt @@ -0,0 +1 @@ +notcolumns::鍒楄〃椤垫病璁剧疆濂斤紝鏁版嵁鏃犳硶鏄剧ず锛屾病鏈夊彲鍒囨崲閫夋嫨鍗★紝鍘荤湅甯姪璁剧疆|鍒楄〃闋佹矑瑷疆濂斤紝鏁告摎鐒℃硶椤ず锛屾矑鍙嬪彲鍒囨崲閬告搰鍗★紝鍘荤湅骞姪瑷疆| \ No newline at end of file diff --git a/include/langlocal/langtxt/langmenu_onlyphp.txt b/include/langlocal/langtxt/langmenu_onlyphp.txt new file mode 100644 index 0000000..2f7bdd7 --- /dev/null +++ b/include/langlocal/langtxt/langmenu_onlyphp.txt @@ -0,0 +1,3 @@ +涓汉鍔炲叕|鍊嬩汉杈﹀叕| +浠诲姟璧勬簮|浠诲嫏璩囧‖| +瀛︽牎|瀛告牎| \ No newline at end of file diff --git a/include/rockFun.php b/include/rockFun.php index 662e491..f5c6fbd 100644 --- a/include/rockFun.php +++ b/include/rockFun.php @@ -273,19 +273,23 @@ function getparams($key, $dev='') /** * 澶氳瑷杩斿洖 */ -function lang($key) +function lang($str,$lx='') { - $data = arrvalue($GLOBALS,'langdata'); - $val = ''; - if(!$data)return $val; - if(strpos($key,'.')>0){ - $skad = explode('.', $key); - $key1 = $skad[0]; - $key2 = $skad[1]; - $sdat = arrvalue($data[LANG], $key1); - if($sdat)$val = arrvalue($sdat, $key2); + if(!$str)return $str; + $da = arrvalue($GLOBALS,'langdata'); + if(!$da)return $str; + $xuhao = $da['xuhao']; + $key = 'data'.$lx.''; + if(!isset($da[$key])){ + $path = ''.ROOT_PATH.'/include/langlocal/langphp/lang'.$lx.'.php'; + $data = array(); + if(file_exists($path))$data = require($path); + $GLOBALS['langdata'][$key] = $data; }else{ - $val = arrvalue($data[LANG], $key); + $data = $da[$key]; } - return $val; + if(!isset($data[$str]))return $str; + $nstr = arrvalue($data[$str], $xuhao); + if(!$nstr)$nstr = $str; + return $nstr; } \ No newline at end of file diff --git a/js/js.js b/js/js.js index 8c26720..d2fdf43 100644 --- a/js/js.js +++ b/js/js.js @@ -1180,4 +1180,8 @@ js.sendevent=function(typ,na,d){ d.opttype=typ; if(!na)na='xinhuhome'; if(api.sendEvent)api.sendEvent({name: na,extra:d}); +} + +function lang(ky){ + return ky; } \ No newline at end of file diff --git a/js/lang.js b/js/lang.js new file mode 100644 index 0000000..c517e12 --- /dev/null +++ b/js/lang.js @@ -0,0 +1,9 @@ +var rocklang = '',rocklangxu=0,langdata = {"\u7f16\u8f91":["","\u7de8\u8f2f","edit"],"\u5220\u9664":["","\u522a\u9664","delete"]}; +function lang(ky){ + if(!rocklang){rocklang = $('html').attr('lang');if(!rocklang)rocklang='zh-CN';if(rocklang=='zh-CN')rocklangxu=0;if(rocklang=='zh-FT')rocklangxu=1;if(rocklang=='en-US')rocklangxu=2;} + var d = langdata[ky]; + if(!d)return ky; + var str = d[rocklangxu]; + if(!str)str = ky; + return str; +} \ No newline at end of file diff --git a/web/res/js/jquery-changeuser.js b/web/res/js/jquery-changeuser.js index 60a31f4..5ef4e0a 100644 --- a/web/res/js/jquery-changeuser.js +++ b/web/res/js/jquery-changeuser.js @@ -186,15 +186,23 @@ } return ssu; }; + this._showdeptci = 0; this._showdept=function(pid,oi,s1,type,sel,dob,uob){ - var a,len,i,wwj,s2='',s=''; + var a,len,i,wwj,s2='',s='',zs; a=this.deptarr; len=a.length; + this._showdeptci++; for(i=0;i'; if(dob)s2=''; if(s2!='' && !this._isdeptcheck(a[i]))s2=''; @@ -206,6 +214,18 @@ } return s; }; + this._showdepticons=function(xu){ + var a,len,i,d,zs=0; + a=this.deptarr; + len=a.length; + d = a[xu]; + if(!isempt(d.dtotal))return zs; + for(i=0;i$rs1){ $na = $rs1['name']; - if(!$this->isempt($rs1['explain']))$na.= '
('.$rs1['explain'].')'; + //if(!$this->isempt($rs1['explain']))$na.= '
('.$rs1['explain'].')'; $rs1['name'] = $na; $rs1['k'] = $k; $rs1['isnow']= $rs1['id']==$nowcourseid; @@ -829,22 +829,23 @@ class inputAction extends Action $this->atypearr[] = array( 'id' => 0, 'num' => 'grant', - 'name' => ''.$this->flow->modename.'鎺堟潈鏌ョ湅', + 'name' => ''.$this->flow->modename.''.lang('鎺堟潈鏌ョ湅').'', ); }else if($this->loadci==1 && $this->adminid>0){ $this->atypearr = m('where')->getmywhere($this->modeid, $this->adminid, $pnum); + if(LANG!='zh-CN' && $this->atypearr)foreach($this->atypearr as $k1=>$rs1)$this->atypearr[$k1]['name'] = $this->flow->lang($rs1['name']); if(isempt($pnum)){ $mors = $this->flow->moders; if((int)arrvalue($mors,'iscs','0')>0)$this->atypearr[] = array( 'id' => 0, 'num' => 'chaos', - 'name' => ''.$mors['name'].'鎶勯佺粰鎴', + 'name' => ''.$mors['name'].''.lang('鎶勯佺粰鎴').'', ); if($mors['isflow']>0){ $this->atypearr[] = array( 'id' => 0, 'num' => 'mychuli', - 'name' => ''.$mors['name'].'缁忔垜澶勭悊', + 'name' => ''.$mors['name'].''.lang('缁忔垜澶勭悊').'', ); } } @@ -903,6 +904,7 @@ class inputAction extends Action $souarr = array(); $this->input= c('input'); $this->flow = $flow; + $this->input->flow = $flow; foreach($flow->fieldsarra as $k=>$rs){ if($rs['issou']==1){ diff --git a/webmain/flow/input/inputjs/mode_flowelement.js b/webmain/flow/input/inputjs/mode_flowelement.js new file mode 100644 index 0000000..dda32e3 --- /dev/null +++ b/webmain/flow/input/inputjs/mode_flowelement.js @@ -0,0 +1,56 @@ +//娴佺▼妯″潡銆恌lowelement.琛ㄥ崟鍏冪礌绠$悊銆戜笅褰曞叆椤甸潰鑷畾涔塲s椤甸潰,鍒濆鍑芥暟 +function initbodys(){ + c.fieldshide('xiaoshu'); + if(mid==0){ + form('mid').value = js.request('mkid'); + if(!form('mid').value){ + js.msgerror('娌℃湁閫夋嫨妯″潡锛屾棤娉曟柊澧'); + c.formdisabled(); + return; + } + } + form('attr').readOnly=false; + form('fields').readOnly=false; + form('dev').readOnly=false; + + c.onselectdata['attr']=function(sav,sna,sid){ + form('attr').value = sid; + } + c.onselectdata['fields']=function(sav,sna,sid){ + if(sav.subname)form('name').value = sav.subname; + } + $(form('fieldstype')).change(function(){ + c.changetypes(); + }); +} + +c.onselectdatabefore=function(fid){ + if(fid=='fields')return {mkid:form('mid').value,iszb:form('iszb').value}; +} +c.changetypes=function(){ + var val = form('fieldstype').value; + if(val=='number'){ + c.fieldsshow('xiaoshu'); + }else{ + c.fieldshide('xiaoshu'); + } +} + +function changesubmit(d){ + if(d.fieldstype.indexOf('change')==0){ + if(d.data=='' || d.data==d.fields)return '姝ゅ瓧娈靛厓绱犵被鍨嬫椂锛屾暟鎹簮蹇呴』濉啓鐢ㄦ潵瀛樺偍閫夋嫨鏉ョ殑Id锛岃濉啓涓猴細'+d.fields+'id'; + } + if(d.islu=='1' && d.fields=='id')return 'id瀛楁鏄笉鍙互鍋氬綍鍏ラ」瀛楁'; +} + +c.xuanchangs=function(){ + var val = form('fieldstype').value; + if(val.indexOf('change')==0){ + var cans1 = { + idobj:form('gongsi') + }; + js.changeuser('AltS', 'deptusercheck', '閫夋嫨鑼冨洿', cans1); + }else{ + js.msg('msg','鍏冪礌绫诲瀷涓嶆槸閫夋嫨浜哄憳閮ㄩ棬鐨'); + } +} \ No newline at end of file diff --git a/webmain/flow/input/inputjs/mode_flowmenu.js b/webmain/flow/input/inputjs/mode_flowmenu.js new file mode 100644 index 0000000..e7e6133 --- /dev/null +++ b/webmain/flow/input/inputjs/mode_flowmenu.js @@ -0,0 +1,4 @@ +//娴佺▼妯″潡銆恌lowmenu.鑿滃崟绠$悊銆戜笅褰曞叆椤甸潰鑷畾涔塲s椤甸潰,鍒濆鍑芥暟 +function initbodys(){ + +} \ No newline at end of file diff --git a/webmain/flow/input/inputjs/mode_flowset.js b/webmain/flow/input/inputjs/mode_flowset.js new file mode 100644 index 0000000..2fc2b56 --- /dev/null +++ b/webmain/flow/input/inputjs/mode_flowset.js @@ -0,0 +1,4 @@ +//娴佺▼妯″潡銆恌lowset.娴佺▼妯″潡鍒楄〃銆戜笅褰曞叆椤甸潰鑷畾涔塲s椤甸潰,鍒濆鍑芥暟 +function initbodys(){ + +} \ No newline at end of file diff --git a/webmain/flow/input/mode_flowelementAction.php b/webmain/flow/input/mode_flowelementAction.php new file mode 100644 index 0000000..31df752 --- /dev/null +++ b/webmain/flow/input/mode_flowelementAction.php @@ -0,0 +1,114 @@ +pobj = new flowClassAction(); + $strs= $this->pobj->elemensavefieldsbefore($table, $arr, $id); + if($strs)return $strs; + + $rows = array(); + if($arr['zdsm'])$rows['zdsm'] = htmlspecialchars_decode($arr['zdsm']); + return array( + 'rows' => $rows + ); + } + + protected function saveafter($table, $arr, $id, $addbo){ + $this->pobj->elemensavefields($table, $arr); + } + + + public function iszbdata() + { + $mkid = (int)$this->get('mkid','0'); + $mid = (int)$this->get('mid','0'); + $mkrs = array(); + $talbe = ''; + if($mid>0){ + $mkid = m('flow_element')->getmou('mid', $mid); + } + if($mkid){ + $mkrs = m('flow_set')->getone($mkid); + $talbe = $mkrs['table']; + } + $arr[] = array('value'=>'0','name'=>'涓昏〃('.$talbe.')瀛楁'); + if($mkrs){ + $tables = $mkrs['tables']; + $names = $mkrs['names']; + if(!isempt($tables)){ + $tablesa = explode(',', $tables); + $namesa = explode(',', $names); + foreach($tablesa as $k=>$v)$arr[] = array('value'=>$k+1,'name'=>'绗釜'.($k+1).'瀛愯〃('.arrvalue($namesa, $k).'.'.$v.')瀛楁'); + } + } + return $arr; + } + + public function attrdata() + { + $arr[] = array('value'=>'readonly','name'=>'鍙'); + $arr[] = array('value'=>'onlyen','name'=>'涓嶈兘鏈変腑鏂'); + $arr[] = array('value'=>'onlycn','name'=>'蹇呴』鍖呭惈涓枃'); + $arr[] = array('value'=>'maxhang','name'=>'甯冨眬鍗犳暣琛'); + $arr[] = array('value'=>'email','name'=>'閭欢鏍煎紡'); + $arr[] = array('value'=>'mobile','name'=>'涓枃鎵嬫満鍙'); + $arr[] = array('value'=>'number','name'=>'蹇呴』鏄暟瀛'); + $arr[] = array('value'=>'date','name'=>'蹇呴』鏄棩鏈熸牸寮忓2020-02-02'); + return $arr; + } + + public function devdata() + { + $arr[] = array('value'=>'admin','name'=>'{admin}','subname'=>'褰撳墠鐢ㄦ埛濮撳悕'); + $arr[] = array('value'=>'deptname','name'=>'{deptname}','subname'=>'褰撳墠鐢ㄦ埛閮ㄩ棬'); + $arr[] = array('value'=>'uid','name'=>'{uid}','subname'=>'褰撳墠鐢ㄦ埛ID'); + $arr[] = array('value'=>'date','name'=>'{date}','subname'=>'褰撳墠鏃ユ湡'); + $arr[] = array('value'=>'optdt','name'=>'{optdt}','subname'=>'褰撳墠鏃堕棿'); + $arr[] = array('value'=>'ranking','name'=>'{urs.ranking}','subname'=>'褰撳墠鐢ㄦ埛鑱屼綅'); + $arr[] = array('value'=>'urs','name'=>'{urs.mobile}','subname'=>'褰撳墠鐢ㄦ埛鍏朵粬淇℃伅瀛楁锛宮obile鏀规垚闇瑕佸瓧娈靛悕'); + return $arr; + } + + + protected function storeafter($table, $rows) + { + $mkid = (int)$this->post('mkid','0'); + $mkrs = false; + if($mkid>0)$mkrs = m('flow_set')->getone($mkid); + if($this->loadci>1)return array( + 'rows' => $rows, + 'mkrs' => $mkrs, + ); + + return array( + 'rows' => $rows, + 'modearr' => m('mode')->getmodearr(), + 'mkrs' => $mkrs, + ); + } + + public function fieldsstore() + { + $mkid = (int)$this->get('mkid','0'); + $iszb = (int)$this->get('iszb','0'); + $mkrs = m('flow_set')->getone($mkid); + $table = $mkrs['table']; + $tables = $mkrs['tables']; + if($iszb>0 && !isempt($tables)){ + $tablesa = explode(',', $tables); + $table = $tablesa[$iszb-1]; + } + $farrs = array(); + $farr = $this->db->gettablefields('[Q]'.$table.''); + foreach($farr as $k=>$rs){ + $farrs[]= array('value'=>$rs['name'],'name'=>$rs['name'],'subname'=>$rs['explain']); + } + return $farrs; + } +} + \ No newline at end of file diff --git a/webmain/flow/input/mode_flowmenuAction.php b/webmain/flow/input/mode_flowmenuAction.php new file mode 100644 index 0000000..2f9b3ac --- /dev/null +++ b/webmain/flow/input/mode_flowmenuAction.php @@ -0,0 +1,52 @@ +post('pid','0'); + if($pid>0){ + $this->showgetmenu($rows,0,1,1); + $rows = $this->alldata; + } + + return array( + 'rows' => $rows + ); + } + + private function showgetmenu($rows,$pid, $oi, $zt) + { + $zh = 0; + foreach($rows as $k=>$rs){ + if($pid==$rs['pid']){ + $zh++; + $rs['level'] = $oi; + $zthui = $rs['status']; + if($zt==0){ + $rs['ishui']=1; + $zthui = 0; + } + $this->alldata[] = $rs; + $len = count($this->alldata)-1; + $cd = $this->showgetmenu($rows,$rs['id'], $oi+1, $zthui); + $this->alldata[$len]['stotal']=$cd; + } + } + return $zh; + } +} + \ No newline at end of file diff --git a/webmain/flow/input/mode_flowsetAction.php b/webmain/flow/input/mode_flowsetAction.php new file mode 100644 index 0000000..6168bf5 --- /dev/null +++ b/webmain/flow/input/mode_flowsetAction.php @@ -0,0 +1,40 @@ +pobj = new flowClassAction(); + return $this->pobj->flowsetsavebefore($table, $arr); + } + + + protected function saveafter($table, $arr, $id, $addbo){ + $this->pobj->flowsetsaveafter($table, $arr); + } + + public function typedata() + { + $arr = array(); + $rows = $this->db->getall('select `type` from `[Q]flow_set` group by `type` order by `sort`'); + foreach($rows as $k=>$rs)$arr[] = array('value'=>'','name'=>$rs['type']); + return $arr; + } + + public function getothernrAjax() + { + $mkid = (int)$this->get('mkid','0'); + $ind = (int)$this->get('ind','0'); + $bh = 'flowelement'; + $atype = 'all'; + + //璇诲彇鏁版嵁 + $flow = m('flow')->initflow($bh);//鍒濆鍖栨ā鍧 + $cont = $flow->getrowstable($atype, 'and `mid`='.$mkid.'', 100,'name,fields,fieldstype,islu,isbt,iszb');//璇诲彇琛ㄦ牸鏁版嵁 + return $cont; + } +} + \ No newline at end of file diff --git a/webmain/flow/input/mode_userinfoAction.php b/webmain/flow/input/mode_userinfoAction.php index e71ee41..6561df5 100644 --- a/webmain/flow/input/mode_userinfoAction.php +++ b/webmain/flow/input/mode_userinfoAction.php @@ -38,12 +38,32 @@ class mode_userinfoClassAction extends inputAction{ public function storeafter($table, $rows) { + $deptdata = false; + if($this->loadci==1 && $this->post('showdept')=='1'){ + $drows = m('dept')->getall('1=1','`id`,`name`,`pid`'); + $deptdata = $this->depttreeshu($drows, '0', '0'); + } return array( 'statearr' => $this->flow->statearrs, - 'isadd' => false + 'isadd' => false, + 'deptdata' => $deptdata, ); } + //缁勭粐缁撴瀯娲诲姩寰楀埌鏍戝舰鏁版嵁 + private function depttreeshu($rows, $pid, $fids) + { + $barr = array(); + foreach($rows as $k=>$rs){ + if($rs['pid']==$pid){ + $rs['children'] = $this->depttreeshu($rows, $rs['id'], $fids); + $rs['expanded'] = $pid==$fids; + $barr[] = $rs; + } + } + return $barr; + } + //浜哄憳鐘舵佸垏鎹繚瀛樺悗澶勭悊 public function userstateafter($table, $cans, $id) { diff --git a/webmain/flow/input/tpl_input_lu.html b/webmain/flow/input/tpl_input_lu.html index e751387..7ffc5b0 100644 --- a/webmain/flow/input/tpl_input_lu.html +++ b/webmain/flow/input/tpl_input_lu.html @@ -96,7 +96,7 @@ echo 'body{--main-color:'.$maincolor.';--main-border:rgba('.$maincolors.',0.2)}' $stsp = '
'; diff --git a/webmain/flow/input/tpl_input_lum.html b/webmain/flow/input/tpl_input_lum.html index 22b8c32..d5dd4b8 100644 --- a/webmain/flow/input/tpl_input_lum.html +++ b/webmain/flow/input/tpl_input_lum.html @@ -152,7 +152,7 @@ if($showheader==1)echo '
'; if($firstrs['checktype']=='change'){ $stsp.='*'; - $placeholder = '蹇呴』鎸囧畾浜哄憳'; + $placeholder = '蹇呴』鎸囧畾浜哄憳'.arrvalue($firstrs,'explain').''; $firstrs['isbt'] = 1; } $stsp.= ''.$firstrs['name'].':'; diff --git a/webmain/flow/page/input_flowelement.html b/webmain/flow/page/input_flowelement.html new file mode 100644 index 0000000..9802173 --- /dev/null +++ b/webmain/flow/page/input_flowelement.html @@ -0,0 +1 @@ +
'; if($firstrs['checktype']=='change'){ $stsp.='*'; - $placeholder = '蹇呴』鎸囧畾浜哄憳'; + $placeholder = '蹇呴』鎸囧畾浜哄憳'.arrvalue($firstrs,'explain').''; $firstrs['isbt'] = 1; } $stsp.= ''.$firstrs['name'].'锛
*^mid^{mid}*^iszb^{iszb}
*^name^{name}*^fields^{fields}
*^fieldstype^{fieldstype}^dev^{dev}
^ftype^{ftype}^lens^{lens}
^xiaoshu^{xiaoshu}
^data^{data}
^attr^{attr}
^placeholder^{placeholder}
^gongsi^{gongsi}
^savewhere^{savewhere}
^sort^{sort}^isalign^{isalign}
^islu^{islu}^isbt^{isbt}
^iszs^{iszs}^islb^{islb}
^ispx^{ispx}^issou^{issou}
^isonly^{isonly}^isdr^{isdr}
^istj^{istj}^iseditlx^{iseditlx}
^zdsm^{zdsm}
\ No newline at end of file diff --git a/webmain/flow/page/input_flowmenu.html b/webmain/flow/page/input_flowmenu.html new file mode 100644 index 0000000..39aa8ea --- /dev/null +++ b/webmain/flow/page/input_flowmenu.html @@ -0,0 +1 @@ +
*^name^{name}^num^{num}
^url^{url}
*^pid^{pid}^icons^{icons}
^status^{status}^ispir^{ispir}
^ishs^{ishs}^sort^{sort}
^color^{color}^type^{type}
\ No newline at end of file diff --git a/webmain/flow/page/input_flowset.html b/webmain/flow/page/input_flowset.html new file mode 100644 index 0000000..85c9842 --- /dev/null +++ b/webmain/flow/page/input_flowset.html @@ -0,0 +1 @@ +
鍩烘湰淇℃伅
*^type^{type}*^name^{name}
*^num^{num}*^table^{table}
^where^{where}^tables^{tables}
^sort^{sort}^names^{names}
*^recename^{recename}
^status^{status}

娴佺▼
*^isflow^{isflow}^sericnum^{sericnum}
*^isflowlx^{isflowlx}^isys^{isys}
^isbxs^{isbxs}*^iscs^{iscs}
^zfeitime^{zfeitime}

鎽樿璁剧疆
^summary^{summary}
^summarx^{summarx}
^sortdir^{sortdir}

鎻愰啋璁剧疆
^pctx^{pctx}^emtx^{emtx}
^mctx^{mctx}^wxtx^{wxtx}
^ddtx^{ddtx}^istxset^{istxset}

璇︽儏鏄剧ず
^isgbjl^{isgbjl}^isgbcy^{isgbcy}
^ispl^{ispl}

鍏朵粬
^islu^{islu}^isup^{isup}
^statusstr^{statusstr}
^ishz^{ishz}^lbztxs^{lbztxs}
\ No newline at end of file diff --git a/webmain/flow/page/input_gong.html b/webmain/flow/page/input_gong.html index 5ab3885..ea658ea 100644 --- a/webmain/flow/page/input_gong.html +++ b/webmain/flow/page/input_gong.html @@ -1 +1 @@ -
*^title^{title}
灏侀潰鍥剧墖{fengmian}
*绫诲瀷鍚嶇О{typename}鍙戞墜鏈虹煭淇 
鍙戦佺粰{recename}
*鍐呭{content}
鐩稿叧鏂囦欢{file_content}
鐩稿簲鍦板潃{url}
*鏉ユ簮{zuozhe}*鏃ユ湡{indate}
灞曠ず鏃ユ湡{zstart}灞曠ず鎴{zsend}
鑷冲皯鎶曠エ{mintou}鏈澶氭姇绁{maxtou}
寮濮嬫椂闂{startdt}鎴鏃堕棿{enddt}
鎶曠エ閫夐」
搴忓彿*鎶曠エ閫夐」鎿嶄綔
[xuhao0,0][touitems0,0]{鍒,0}
[xuhao0,1][touitems0,1]{鍒,0}
{鏂板,0}
\ No newline at end of file +
*^title^{title}
^fengmian^{fengmian}
*^typename^{typename}^issms^{issms} 
^recename^{recename}
*^content^{content}
^file_content^{file_content}
^url^{url}
*^zuozhe^{zuozhe}*^indate^{indate}
^zstart^{zstart}^zsend^{zsend}
^mintou^{mintou}^maxtou^{maxtou}
^startdt^{startdt}^enddt^{enddt}
鎶曠エ閫夐」
搴忓彿*鎶曠エ閫夐」鎿嶄綔
[xuhao0,0][touitems0,0]{鍒,0}
[xuhao0,1][touitems0,1]{鍒,0}
{鏂板,0}
\ No newline at end of file diff --git a/webmain/flow/page/rock_page.php b/webmain/flow/page/rock_page.php index 08b4a10..06b3707 100644 --- a/webmain/flow/page/rock_page.php +++ b/webmain/flow/page/rock_page.php @@ -1,5 +1,6 @@ // \ No newline at end of file diff --git a/webmain/home/desktop/items_apply.php b/webmain/home/desktop/items_apply.php index 17aeba1..c6a5c28 100644 --- a/webmain/home/desktop/items_apply.php +++ b/webmain/home/desktop/items_apply.php @@ -7,7 +7,7 @@ defined('HOST') or die ('not access'); ?>
- (0) - 鏇村>> + (0) + >>
\ No newline at end of file diff --git a/webmain/home/desktop/items_kjrk.php b/webmain/home/desktop/items_kjrk.php index 3d52306..1d7eb7c 100644 --- a/webmain/home/desktop/items_kjrk.php +++ b/webmain/home/desktop/items_kjrk.php @@ -8,7 +8,7 @@ defined('HOST') or die ('not access'); + \ No newline at end of file diff --git a/webmain/main/flow/flowAction.php b/webmain/main/flow/flowAction.php index 113cd81..50fb76d 100644 --- a/webmain/main/flow/flowAction.php +++ b/webmain/main/flow/flowAction.php @@ -112,6 +112,7 @@ class flowClassAction extends Action } } $rows['tables']= $tabs; + if($cans['where'])$rows['where'] = htmlspecialchars_decode($cans['where']); return array( 'rows' => $rows ); @@ -167,8 +168,9 @@ PRIMARY KEY (`id`),KEY `mid` (`mid`) $addsts[] = $tabsas; } } - + $noarray = array('menu','flow_set','flow_element','flow_menu','flow_bill','flow_extent','flow_where'); if(isempt($tab))return; + if(in_array($tab, $noarray))return; if(!$alltabls)$alltabls = $this->db->getalltable(); if($isflow==0){ if(!in_array(''.PREFIX.''.$tab.'', $alltabls)){ @@ -1377,6 +1379,7 @@ class mode_'.$modenum.'ClassAction extends inputAction{ $file = ''; $hurs = $this->getfiles(); $hurs[] = ''.P.'/flow/page/rock_page_{bh}.php'; + $hurs[] = ''.P.'/flow/page/rock_page_{bh}_script.php'; foreach($rows as $k=>$rs){ $ids.=','.$rs['id'].''; $table.=','.$rs['table'].''; diff --git a/webmain/main/yingyong/rock_yingyong.php b/webmain/main/yingyong/rock_yingyong.php index 1ba1fe5..b12c553 100644 --- a/webmain/main/yingyong/rock_yingyong.php +++ b/webmain/main/yingyong/rock_yingyong.php @@ -2,7 +2,7 @@