From 559c388ea05d72ed0f69b8529e5ae8d2c77d8925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E4=B8=AD=E7=A3=90=E7=9F=B3?= Date: Fri, 18 Oct 2024 15:27:40 +0800 Subject: [PATCH] no commit message --- README.md | 6 +- config/version.php | 4 +- include/Action.php | 22 ++ include/chajian/colorChajian.php | 108 +++++++ include/chajian/htmlChajian.php | 37 ++- include/chajian/imapChajian.php | 2 +- include/chajian/inputChajian.php | 20 +- include/chajian/rockkefuChajian.php | 62 +++++ include/class/mysql.php | 57 ++-- include/class/mysqliClass.php | 10 +- include/class/pdoClass.php | 9 +- include/class/rockClass.php | 7 +- include/rockFun.php | 2 +- js/dingwei.js | 69 ++++- js/js.js | 47 +++- js/jswx.js | 103 +------ js/reim_xina.js | 111 ++++---- js/reim_xina_kefu.js | 263 ++++++++++++++++++ mode/bootstrapplugin/jquery-bootsform.js | 2 +- mode/bootstrapplugin/jquery-bootstable.js | 46 +-- mode/bootstrapplugin/jquery-bootstree.js | 10 +- mode/plugin/css/jquery-rockdatepicker.css | 19 +- mode/plugin/jquery-rockdatepicker.js | 28 +- mode/plugin/jquery-rockmodels.js | 4 +- web/res/css/chat.css | 5 +- web/res/css/webimcss.css | 67 ++++- web/res/js/jquery-changeuser.js | 24 +- web/res/js/notification.html | 43 +-- web/res/js/notify.js | 2 +- web/res/mode/calendar/jquery-rockcalendar.js | 6 +- web/res/mode/menu/jquery-rockmenu.css | 32 ++- web/res/mode/menu/jquery-rockmenu.js | 4 +- webmain/css/css.css | 51 +++- webmain/css/cssm.css | 38 ++- webmain/css/rock.css | 240 ++++++++++++++++ webmain/css/rockmy.css | 6 + webmain/css/rui.css | 14 +- webmain/css/webmain.css | 51 +++- webmain/flow/input/inputAction.php | 65 +++-- webmain/flow/input/inputjs/input_two.js | 4 +- webmain/flow/input/inputjs/mode_custprice.js | 75 +++++ webmain/flow/input/inputjs/mode_user.js | 4 + webmain/flow/input/mode_collectsAction.php | 1 + webmain/flow/input/mode_custpriceAction.php | 48 ++++ webmain/flow/input/mode_dailyAction.php | 2 +- webmain/flow/input/mode_userAction.php | 8 +- webmain/flow/input/rock_input_daoru.php | 22 +- webmain/flow/input/tpl_input_lu.html | 53 ++-- webmain/flow/input/tpl_input_lum.html | 6 +- webmain/flow/page/input_custprice.html | 1 + webmain/flow/page/input_hrshebao.html | 2 +- webmain/flow/page/rock_page_assetm.php | 2 +- webmain/flow/page/rock_page_customer.php | 4 +- .../page/rock_page_flowelement_script.php | 6 +- .../flow/page/rock_page_flowset_script.php | 2 +- webmain/flow/page/rock_page_worcword.php | 2 +- webmain/home/desktop/items_bianjian.php | 6 +- webmain/home/desktop/items_kjrko.php | 2 +- webmain/home/desktop/items_news.php | 4 +- webmain/index/indexAction.php | 5 + webmain/index/indexscript.js | 58 ++-- webmain/index/tpl_index.html | 138 +++++---- webmain/login/tpl_login.html | 35 +-- webmain/main/flow/flowAction.php | 4 + webmain/main/flow/rock_flow_course.php | 22 +- webmain/main/goods/goodsAction.php | 2 +- webmain/main/kaoqin/rock_kaoqin_geren.php | 4 +- webmain/main/salary/salaryAction.php | 2 + webmain/model/adminModel.php | 6 +- webmain/model/flow/carmreseModel.php | 16 +- webmain/model/flow/custpriceModel.php | 54 ++++ webmain/model/flow/custractModel.php | 9 +- webmain/model/flow/flow.php | 4 +- webmain/model/flow/hrsalaryModel.php | 12 +- webmain/model/flow/userModel.php | 4 +- webmain/model/goodsModel.php | 2 +- webmain/model/loginModel.php | 2 +- webmain/public/upload/tpl_upload.html | 19 +- webmain/reim/index/tpl_index_xina.html | 24 +- webmain/reim/login/tpl_login_xina.html | 21 +- webmain/reim/record/tpl_record_download.html | 23 +- webmain/reim/record/tpl_record_history.html | 15 +- webmain/reim/ying/tpl_ying_daka.html | 3 +- webmain/system/cog/rock_cog_log.php | 4 + webmain/system/cog/rock_cog_set.php | 2 +- webmain/system/cogini/coginiAction.php | 26 ++ webmain/system/dept/tpl_dept.html | 59 ++-- webmain/system/geren/rock_geren_cog.php | 8 +- .../schedule/rock_schedule_calendar.php | 4 +- webmain/system/upgrade/rock_upgrade.php | 9 +- webmain/system/upgrade/rock_upgrade_file.php | 21 ++ webmain/system/upgrade/upgradeAction.php | 2 +- webmain/task/api/kaoqinAction.php | 23 ++ webmain/task/api/rockkefuAction.php | 28 ++ webmain/task/api/uploadAction.php | 1 + webmain/task/mode/modeview.js | 2 +- webmain/task/mode/tpl_mode_p.html | 34 +-- webmain/task/mode/tpl_mode_x.html | 48 ++-- webmain/we/index/tpl_index.html | 21 +- webmain/we/login/tpl_login.html | 75 ++--- webmain/we/ying/tpl_ying.html | 1 + webmain/we/ying/tpl_ying_daka.html | 1 + webmain/we/ying/tpl_ying_location.html | 1 + 103 files changed, 2021 insertions(+), 783 deletions(-) create mode 100644 include/chajian/rockkefuChajian.php create mode 100644 js/reim_xina_kefu.js create mode 100644 webmain/css/rock.css create mode 100644 webmain/css/rockmy.css create mode 100644 webmain/flow/input/inputjs/mode_custprice.js create mode 100644 webmain/flow/input/mode_custpriceAction.php create mode 100644 webmain/flow/page/input_custprice.html create mode 100644 webmain/model/flow/custpriceModel.php create mode 100644 webmain/task/api/rockkefuAction.php diff --git a/README.md b/README.md index cbdd8ee..9d0050f 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ 官网网站:http://www.rockoa.com/ 源码仅供学习二次开发使用,禁止二次发布,禁止用于商业用途出售等(违者必究) 版权:Copyright @2016-2024 信呼开发团队 -版本整理时间:2024-08-01 23:59:59 -版本号:V2.6.5 +版本整理时间:2024-10-18 23:59:59 +版本号:V2.6.6 -### V2.6.5更新说明 +### V2.6.6更新说明 1、完善系统安全性。 2、更多升级日志详见:http://www.rockoa.com/view_core.html diff --git a/config/version.php b/config/version.php index 68f59e6..7a27229 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ display = true; $this->initMysql(); $this->initConstruct(); + $this->getTheme(); $this->initProject(); $this->initAction(); } @@ -124,6 +125,27 @@ abstract class mainAction{ || $this->rock->iswebbro(2))$showheader = 0; //闅愯棌澶撮儴 if($this->get('showheader')=='true')$showheader = 1; $this->assign('showheader', $showheader); + $nowtime = $this->getsession('nowtime'); + if(!$nowtime || getconfig('systype')=='dev'){ + $nowtime = time(); + $this->rock->setsession('nowtime', $nowtime); + } + $this->assign('nowtime', $nowtime); + } + + //涓婚棰滆壊澶勭悊 + public function getTheme() + { + $theme = $this->get('apptheme'); + if($theme){ + $this->rock->setsession('apptheme', $theme); + }else{ + $theme = $this->getsession('apptheme'); + } + if($theme)$theme = '#'.$theme.''; + if(!$theme || strlen($theme)!=7)$theme = getconfig('apptheme', '#1389D3'); //榛樿棰滆壊 + $this->assign('apptheme', $theme); + return substr($theme, 1); } public function setSmartyData() diff --git a/include/chajian/colorChajian.php b/include/chajian/colorChajian.php index 42d9340..5c4a824 100644 --- a/include/chajian/colorChajian.php +++ b/include/chajian/colorChajian.php @@ -37,4 +37,112 @@ class colorChajian extends Chajian{ $h = floor(($n / 16)) % 16; return ''.$hexch[$h].''.$hexch[$l].''; } + + /** + * 鑾峰彇棰滆壊鍊 + */ + public function colorTorgb($color) + { + if(!empty($color)&&(strlen($color)==7)){ + $r=hexdec(substr($color,1,2)); + $g=hexdec(substr($color,3,2)); + $b=hexdec(substr($color,5)); + }else{ + $r=$g=$b='00'; + } + return array($r, $g, $b); + } + + /** + * 鑾峰彇鏍峰紡鐨 + */ + public function getApptheme($nohui=true, $ism=false) + { + $arr = $this->getColor(); + $color = $arr['color']; + $colors = $arr['colors']; + $colora = $arr['colora']; + + $bodybgcolor = 'rgba('.$colors.',0.03)'; + $hgcolor = 'rgba('.$colors.',0.15)'; + $vgcolor = 'rgba('.$colors.',0.1)'; + $str[] = ''; + $str[] = ''; + $path = 'webmain/css/rockmy.css'; + if(file_exists($path))$str[] = ''; + $str[] = ''; + return join(PHP_EOL, $str); + } + + /** + * 鑾峰彇鏍峰紡 + */ + public function getColor() + { + $color = $this->getTheme(); + $maincolora = $this->colorTorgb($color); + $colors = ''.$maincolora[0].','.$maincolora[1].','.$maincolora[2].''; + return array( + 'color' => $color, + 'colors' => $colors, + 'colora' => $maincolora, + ); + } + + /** + * 鑾峰彇瀵瑰簲棰滆壊 + */ + public function getTheme() + { + $color = getconfig('apptheme','#1389D3'); + //$apptheme = $this->rock->get('apptheme'); + //if(strlen($apptheme)==6)$this->rock->savecookie('apptheme', $apptheme); + //if(!$apptheme)$apptheme = $this->rock->cookie('apptheme'); + //if(strlen($apptheme)==6)$color = '#'.$apptheme.''; + return $color; + } } \ No newline at end of file diff --git a/include/chajian/htmlChajian.php b/include/chajian/htmlChajian.php index 82553db..3219caf 100644 --- a/include/chajian/htmlChajian.php +++ b/include/chajian/htmlChajian.php @@ -35,7 +35,7 @@ class htmlChajian extends Chajian{ public function createtable($fields, $arr, $title='',$lx='',$bcolor='') { - if(isempt($bcolor))$bcolor = '#cccccc'; + if(isempt($bcolor))$bcolor = 'var(--main-border)'; if($lx=='print'){ $bcolor = '#000000'; $title=''; @@ -44,12 +44,13 @@ class htmlChajian extends Chajian{ if($title != ''){ $s .= ''.$title.''; } + $pstr = ''; foreach($fields as $fid=>$na){ $val = ''; $sty = 'padding:8px;'; if(isset($arr[$fid]))$val = $arr[$fid]; if(isset($arr[$fid.'_style']))$sty .= $arr[$fid.'_style']; - $s .= ''.$na.''.$val.''; + $s .= ''.$na.''.$val.''; } $s .=''; @@ -84,7 +85,7 @@ class htmlChajian extends Chajian{ $head[] = explode(',', $te_str); } $txt = ''; - $style = "padding:3px;border:1px ".$bor." solid"; + $style = "padding:3px;border:1px ".$bor." solid;border:var(--border)"; if($lx=='print')$style = "border:.5pt #000000 solid"; $txt .= ''; $txt .= ''; @@ -95,7 +96,7 @@ class htmlChajian extends Chajian{ if($h==0)$stls.=';border-left:none'; if($h==$lens)$stls.=';border-right:none'; } - $txt.= ''; + $txt.= ''; } $txt .= ''; foreach($rows as $k=>$rs){ @@ -211,15 +212,18 @@ class htmlChajian extends Chajian{ return $bo; } - - - - - - - - public function importdata($fields,$btfid='', $fid='') + private $importerrarr = array(); + public function importerrda() { + return $this->importerrarr; + } + + /** + * 瀵煎叆鏁版嵁澶勭悊 + */ + public function importdata($fields,$btfid='', $fid='', $lx=0) + { + $this->importerrarr = array(); if($fid=='')$fid='importcont'; $rows = array(); $val = $this->rock->post($fid); @@ -227,7 +231,7 @@ class htmlChajian extends Chajian{ $arrs = explode("\n", $val); $farr = explode(',', $fields); $fars = explode(',', $btfid); - foreach($arrs as $valss){ + foreach($arrs as $xu=>$valss){ $dars = explode(' ', $valss); $barr = array(); foreach($farr as $k=>$fid){ @@ -236,8 +240,13 @@ class htmlChajian extends Chajian{ } $bos = true; foreach($fars as $fids){ - if(isset($barr[$fids]) && isempt($barr[$fids]))$bos = false; + if(isset($barr[$fids]) && isempt($barr[$fids])){ + $bos = false; + $this->importerrarr[$xu] = ''.$fids.'鏄繀椤荤殑'; + break; + } } + if($lx==1)$barr['drxu'] = $xu; if($bos)$rows[] = $barr; } return $rows; diff --git a/include/chajian/imapChajian.php b/include/chajian/imapChajian.php index c27f28e..7adb9b8 100644 --- a/include/chajian/imapChajian.php +++ b/include/chajian/imapChajian.php @@ -32,7 +32,7 @@ class imapChajian extends Chajian { - private $supportbool = true; + private $supportbool = true,$marubox,$struck_tearr; protected function initChajian() { diff --git a/include/chajian/inputChajian.php b/include/chajian/inputChajian.php index aaa3046..f24416e 100644 --- a/include/chajian/inputChajian.php +++ b/include/chajian/inputChajian.php @@ -63,7 +63,7 @@ class inputChajian extends Chajian $str = ''; } if($fid=='file_content'){ - $str = '
锛嬫坊鍔犳枃浠
'; + $str = '
锛嬫坊鍔犳枃浠
'; } if($fid=='鍒'){ @@ -202,18 +202,16 @@ class inputChajian extends Chajian )); } if($type=='selectdatafalse' || $type=='selectdatatrue'){ - $str = '
'.$head[$h][1].''.$head[$h][1].'
'; - $str .= '
'; + $str = '
'; if($isbt=='0')$str .= ''; - $str .= '
'; + $str .= ''; } if($type=='ditumap'){ $zbnae = $data; if($iszb>0)$zbnae = ''.($iszb-1).''.$leox.''; - $str = ''; - $str .= '
'; + $str = '
'; if($isbt=='0')$str .= ''; - $str .= '
'; + $str .= ''; } if($type=='htmlediter'){ $iszhang= false; @@ -233,12 +231,12 @@ class inputChajian extends Chajian } if($type=='uploadfile'){ $str = ''; - $str.= '
'; + $str.= '
'; $str.= ''; } if($type=='graph'){ $str = ''; - $str.= '
'; + $str.= '
'; $str.= '
'; } if($type=='auto'){ @@ -289,8 +287,8 @@ class inputChajian extends Chajian $_vals0 = $valea[0]; $_vals1 = arrvalue($valea,1, $oarr['valueid']); - $str = ''; - $str .= '
'; + $str = '
'; + $str .= '
'; return $str; } diff --git a/include/chajian/rockkefuChajian.php b/include/chajian/rockkefuChajian.php new file mode 100644 index 0000000..3cd84e4 --- /dev/null +++ b/include/chajian/rockkefuChajian.php @@ -0,0 +1,62 @@ +openkey = getconfig('rockkefu_key'); + if(substr($url,-1)!='/')$url.='/'; + $this->updatekel = $url; + $this->updatekey = $url.'api.php'; + } + + + public function geturlstr($mod, $act, $can=array()) + { + $url = $this->updatekey; + $url.= '?m='.$mod.'&a='.$act.''; + $url.= '&openkey='.md5($this->openkey).''; + foreach($can as $k=>$v)$url.='&'.$k.'='.$v.''; + return $url; + } + + + /** + * get鑾峰彇鏁版嵁 + */ + public function getdata($mod, $act, $can=array()) + { + $url = $this->geturlstr($mod, $act, $can); + $cont = c('curl')->getcurl($url); + if(!isempt($cont) && contain($cont, 'success')){ + $data = json_decode($cont, true); + }else{ + $data = returnerror('鏃犳硶璁块棶,'.$cont.''); + } + return $data; + } + + /** + * post鍙戦佹暟鎹 + */ + public function postdata($mod, $act, $can=array(), $cans=array()) + { + $url = $this->geturlstr($mod, $act, $cans); + $cont = c('curl')->postcurl($url, $can); + if(!isempt($cont) && contain($cont, 'success')){ + $data = json_decode($cont, true); + }else{ + $data = returnerror('鏃犳硶璁块棶,'.$cont.''); + } + return $data; + } + +} \ No newline at end of file diff --git a/include/class/mysql.php b/include/class/mysql.php index 6ab833a..42d9734 100644 --- a/include/class/mysql.php +++ b/include/class/mysql.php @@ -72,8 +72,8 @@ abstract class mysql{ $this->tranend(); $this->close(); } - //璁板綍璁块棶sql鏃ュ織 - if(getconfig('sqllog')){ + //璁板綍璁块棶sql鏃ュ織(2024-10-13寮冪敤) + if(getconfig('sqllog') && 1==2){ $sql = ''; $filstr = 'sqllog_'.date('Y.m.d.H.i.s').'_'.$this->rock->adminid.'_'.str_shuffle('abcdefghijklmn').'.log'; foreach($this->sqlarr as $sql1)$sql.="\n\n$sql1;"; @@ -95,7 +95,7 @@ abstract class mysql{ public function fetch_array($res, $type=0){return false;} public function insert_id(){return 0;} - public function error(){return '';} + public function error(){return $this->errorlast;} public function close(){} @@ -127,13 +127,8 @@ abstract class mysql{ $this->sqlarr[] = $sql; $this->nowsql = $sql; $this->count = 0; - try { - $rsbool = $this->querysql($sql); - } catch (Exception $e) { - $rsbool = false; - $this->errormsg = $e->getMessage(); - } + $rsbool = $this->querysql($sql); $this->nowerror = false; if(!$rsbool)$this->nowerror = true; @@ -142,7 +137,7 @@ abstract class mysql{ //璁板綍閿欒sql if(!$rsbool && $ebo){ - $txt = '[ERROR SQL]'.chr(10).''.$sql.''.chr(10).''.chr(10).'[Reason]'.chr(10).''.$this->error().''.chr(10).''; + $txt = '[ERROR SQL]'.chr(10).$sql.chr(10).chr(10).''.$this->getError().''.chr(10).''; $efile = $this->rock->debug($txt,''.DB_DRIVE.'_sqlerr', true); $errmsg = str_replace("'",''', $this->error()); if(!contain($sql, $stabs)){ @@ -154,6 +149,30 @@ abstract class mysql{ return $rsbool; } + public $isError = false; + private $msgerror = ''; + private $msgerrorall = ''; + + /** + * 璁剧疆閿欒淇℃伅 + */ + public function setError($str, $sql){ + if(!$str)return; + $this->isError = true; + $this->errorlast = $str; + $this->errormsg = $str; + $this->msgerror .= ''.$str.';'; + $this->msgerrorall .= ''.$sql.chr(10).chr(10).$str.chr(10).chr(10).''; + } + + /** + * 鑾峰彇閿欒 + */ + public function getError() + { + return $this->msgerrorall; + } + /** * 杩斿洖鏈鍚庨敊璇俊鎭 */ @@ -260,12 +279,13 @@ abstract class mysql{ return $this->getall($sql); } - public function getall($sql) + public function getall($sql, $call=null) { $res=$this->query($sql); $arr=array(); if($res){ while($row=$this->fetch_array($res)){ + if($call != null)$row = $call($row); $arr[] = $row; $this->count++; } @@ -593,15 +613,14 @@ abstract class mysql{ } /** - 杩斿洖琛ㄦ墍鏈夊瓧娈 + * 杩斿洖琛ㄦ墍鏈夊瓧娈碉紝濡俒'id','name'] */ public function getallfields($table) { - $finfo = $this->gettablefields($table); - foreach ($finfo as $val) { - $arr[] = $val['name']; - } - return $arr; + $sql = 'SHOW FULL COLUMNS FROM `'.$table.'`'; + return $this->getall($sql, function($row){ + return $row['Field']; + }); } public function getfields($table) @@ -614,7 +633,9 @@ abstract class mysql{ public function gettablefields($table, $base='',$whe='') { if($base=='')$base = $this->db_base; - $sql = "select COLUMN_NAME as `name`,DATA_TYPE as `type`,COLUMN_COMMENT as `explain`,COLUMN_TYPE as `types`,`COLUMN_DEFAULT` as dev,`IS_NULLABLE` as isnull,`CHARACTER_MAXIMUM_LENGTH` as lens,`NUMERIC_PRECISION` as xslen1,`NUMERIC_SCALE` as xslen2 from information_schema.COLUMNS where `TABLE_NAME`='$table' and `TABLE_SCHEMA` ='$base' $whe order by `ORDINAL_POSITION`"; + $sql = "select COLUMN_NAME as `name`,DATA_TYPE as `type`,COLUMN_COMMENT as `explain`,COLUMN_TYPE as `types`,`COLUMN_DEFAULT` as dev,`IS_NULLABLE` as isnull,`CHARACTER_MAXIMUM_LENGTH` as lens,`NUMERIC_PRECISION` as xslen1,`NUMERIC_SCALE` as xslen2 from information_schema.COLUMNS where `TABLE_SCHEMA` ='$base' AND `TABLE_NAME`='$table' $whe order by `ORDINAL_POSITION`"; + //SHOW FULL COLUMNS FROM table_name + return $this->getall($sql); } diff --git a/include/class/mysqliClass.php b/include/class/mysqliClass.php index f361319..1f7250f 100644 --- a/include/class/mysqliClass.php +++ b/include/class/mysqliClass.php @@ -19,7 +19,9 @@ class mysqliClass extends mysql{ protected function querysql($sql) { - return $this->conn->query($sql); + $roboll = $this->conn->query($sql); + if(!$roboll)$this->setError($this->conn->error, $sql); + return $roboll; } public function fetch_array($result, $type = 0) @@ -58,11 +60,7 @@ class mysqliClass extends mysql{ } return $arr; } - - public function error() - { - return 'mysqliError:'.$this->conn->error; - } + public function close() { diff --git a/include/class/pdoClass.php b/include/class/pdoClass.php index e7cfc98..cd0d651 100644 --- a/include/class/pdoClass.php +++ b/include/class/pdoClass.php @@ -11,6 +11,7 @@ class pdoClass extends mysql{ $this->conn = @new PDO('mysql:host='.$this->db_host.';dbname='.$this->db_base.'', $this->db_user, $this->db_pass); $this->conn->query("SET NAMES 'utf8'"); $this->selectdb($this->db_base); + $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { $this->conn = null; $this->errormsg = $e->getMessage(); @@ -23,7 +24,7 @@ class pdoClass extends mysql{ $bo = $this->conn->query($sql); } catch (PDOException $e) { $bo = false; - $this->errormsg = $e->getMessage(); + $this->setError($e->getMessage(), $sql); } return $bo; } @@ -53,11 +54,7 @@ class pdoClass extends mysql{ } } - public function error() - { - $str = $this->conn->errorInfo(); - return 'pdoError('.$str[0].'):'.$str[2].''.$this->errormsg.''; - } + public function close() { diff --git a/include/class/rockClass.php b/include/class/rockClass.php index bd93e66..ed07d43 100644 --- a/include/class/rockClass.php +++ b/include/class/rockClass.php @@ -84,6 +84,11 @@ final class rockClass $this->adminid = (int)$this->session('adminid',0); $this->adminname= $this->session('adminname'); $this->adminuser= $this->session('adminuser'); + + $apptheme = $this->get('apptheme'); + if(strlen($apptheme)==6)$this->savecookie('apptheme', $apptheme); + if(!$apptheme)$apptheme = $this->cookie('apptheme'); + if(strlen($apptheme)==6)$GLOBALS['config']['apptheme']='#'.$apptheme.''; } public function iconvsql($str,$lx=0) @@ -251,7 +256,7 @@ final class rockClass $valn = $valarr; if(!is_array($valarr))$valn=explode(',',$valarr); for($i=0;$i=1000)wis.maximize(); + //if(w>=1000)wis.maximize(); }); } if(wina)this.openarr[wina]=opar; @@ -283,7 +296,7 @@ js.upload=function(call,can, glx){ if(glx=='url')return url; var s='',tit=can.title;if(!tit)tit='涓婁紶鏂囦欢'; js.tanbody('uploadwin',tit,500,300,{ - html:'
', + html:'
', bbar:'none' }); winiframe.location.href=url; @@ -308,7 +321,7 @@ js.winiframe=function(tit, url){ } var wi = winWb()-150;if(wi>mxw)wi=mxw;if(wi<700)wi=700; js.tanbody('winiframe',tit,wi,410,{ - html:'
', + html:'
', bbar:'none' }); openinputiframe.location.href=url; @@ -627,24 +640,24 @@ js.tanbody=function(act,title,w,h,can1){ var s = '',mid = ''+act+'_main',i,d; var can = js.applyIf(can1,{html:'',btn:[],bodystyle:'',showfun:function(){}}); if(w>winWb())w=winWb()-50; - var s = '
'; - s+='
'; + var s = '
'; + s+='
'; s+=' '; - s+=' '; - s+=' '; + s+=' '; + s+=' '; s+='
'+title+'
'+title+'
'; s+='
'; s+='
'+can.html+'
'; - s+='
'; + s+='
'; for(i=0; i'+d.text+''; } - s+=' '; + s+=' '; s+=' '; s+='
'; - s+='
'; + s+='
'; var str = '
'+s+'
'; $('body').append(str); if(can.closed=='none'){ @@ -653,7 +666,7 @@ js.tanbody=function(act,title,w,h,can1){ } if(can.bbar=='none'){ $('#'+act+'_bbar').remove(); - $('#'+mid+'').append('
'); + //$('#'+mid+'').append('
'); } this.resizetan(act); can.showfun(act); @@ -715,7 +728,7 @@ js.getmsg = function(txt,col){ var s = ''; if(!txt)txt=''; if(txt.indexOf('...')>0){ - s=' '; + s=''+this.ling(16)+' '; col = '#ff6600'; } s+=''+txt+''; @@ -807,7 +820,7 @@ js.msg = function(lx, txt,sj){ return; } if(lx == 'wait'){ - txt = ' '+txt; + txt = ''+this.ling(14)+' '+txt; sj = 60; } if(lx=='msg')txt=''+txt+'';var t=10; @@ -972,7 +985,7 @@ js.changeuser=function(na, lx, tits,ocans){ if(typeof(bcar)=='object')for(i in bcar)can[i]=bcar[i]; js.tanbody('changeaction',tits,w,h,{ - html:'
', + html:'
', bbar:'none' }); @@ -1215,4 +1228,10 @@ js.sendevent=function(typ,na,d){ function lang(ky){ return ky; +} + +js.ling = function(w){ + var sve = 'style="height:'+w+'px;width:'+w+'px"'; + if(!w)sve=''; + return ''; } \ No newline at end of file diff --git a/js/jswx.js b/js/jswx.js index b2569a4..008de9b 100644 --- a/js/jswx.js +++ b/js/jswx.js @@ -1,50 +1,13 @@ QOM='xinhuwx_' js.wx={}; js.wx.alert=function(msg,fun,tit, cof1){ - $('#weui_dialog_alert_div').remove(); - var s=''; - if(!tit)tit='绯荤粺鎻愮ず'; - s+='
'; - s+='
'; - s+='
'; - s+='
'+tit+'
'; - s+='
'+msg+'
'; - s+='
'; - s+=' 纭畾'; - if(cof1==1)s+=' 鍙栨秷'; - s+='
'; - s+='
'; - s+='
'; - $('body').append(s); - function backl(e){ - var jg = $(this).attr('sattr'); - if(typeof(fun)=='function')fun(jg,this); - $('#weui_dialog_alert_div').remove(); - return false; - } - $('#confirm_btn1').click(backl); - $('#confirm_btn').click(backl); + js.alert(msg,tit, fun); } js.wx.confirm=function(msg,fun,tit){ - this.alert(msg,fun,tit, 1); + js.confirm(msg,fun,tit); } js.wx.prompt=function(tit,msg,fun,nr){ - if(!nr)nr=''; - if(apicloud){ - api.prompt({ - buttons: ['纭畾', '鍙栨秷'], - text:nr,title:tit,msg:msg - }, function(ret, err) { - var index = ret.buttonIndex; - if(index==1)fun(ret.text); - }); - return; - } - function func(lx){ - if(lx=='yes')fun(get('prompttxt').value); - } - var msg = '
'+msg+'
'; - this.alert(msg,func,tit, 1); + js.prompt(tit,msg,fun,nr); } js.apiurl = function(m,a,cans){ var url=''+apiurl+'api.php?m='+m+'&a='+a+''; @@ -115,61 +78,13 @@ js.ajax = function(m,a,d,funs, mod,checs, erfs, glx){ }, 1000*30); } js.wx.load=function(txt){ - this.unload(); - if(txt=='none')return; - if(!txt)txt='鍔犺浇涓...'; - var s=''; - var t = winHb()-150; - s+='
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '

'+txt+'

'+ - '
'+ - '
'; - $('body').append(s); + js.loading(txt); } js.wx.unload=function(){ - $('#loadingToastsss').remove(); -} -js.loading=function(txt){ - this.wx.load(txt); -} -js.unloading=function(){ - this.wx.unload(); + js.unloading(); } js.wx.msgok=function(txt,fun,ms){ - $('#toastssss').remove(); - clearTimeout(this.msgtime); - if(txt=='none')return; - if(!ms)ms=3; - var t = winHb()-150; - var s='
'; - s+='
'; - s+= '
'; - s+= ''; - s+= '

'+txt+'

'; - s+= '
'; - s+='
'; - $('body').append(s); - this.msgtime=setTimeout(function(){ - $('#toastssss').remove(); - if(typeof(fun)=='function')fun(); - - }, ms*1000); + js.msgok(txt,fun,ms); } js.showmenu=function(d){ @@ -382,4 +297,10 @@ function touchclass(cans){ touchnowobj.onlongclick(); this.onlongmenu(); } +} + +js.ling = function(w){ + var sve = 'style="height:'+w+'px;width:'+w+'px"'; + if(!w)sve=''; + return ''; } \ No newline at end of file diff --git a/js/reim_xina.js b/js/reim_xina.js index 110456a..2cf700f 100644 --- a/js/reim_xina.js +++ b/js/reim_xina.js @@ -231,6 +231,10 @@ var reim={ } },''+lx+',json', efun); }, + initloads:function(){ + $('#mainreload').html(''+js.ling(12)+' 鍒锋柊涓...'); + this.initload(true); + }, //鍒濆鍔犺浇鏁版嵁 initload:function(bo){ this.initbool = true; @@ -238,6 +242,7 @@ var reim={ reim.initci++; reim.showdata(ret.data); if(bo)reim.reloaduser(); + $('#mainreload').html(' 鍒锋柊'); }); }, firstpid:0, @@ -566,7 +571,7 @@ var reim={ } } var len=ds.length,d,s='',s1,lx; - s='
浼氳瘽('+len+')
'; + s='
浼氳瘽('+len+')
'; for(i=0;i'; - s+=''; - s+=''; - s+=''; - s+=''; - s+='
'+na+''+nas+''+s1+'
'+jm.base64decode(d.cont)+'
'+st+'
'+ops+'
'; + s = '
'; + s+='
'; + s+='
'; + s+='
'; + s+='
'+na+''+nas+''+s1+'
'; + s+=' '+st+''; + s+='
'; + s+='
'; + s+='
'+strhtml(jm.base64decode(d.cont))+'
'; + s+='
'+ops+'
'; + s+='
'; + s+='
'; s+='
'; if(glx)return s; if(!pad){o.append(s);}else{o.prepend(s)} @@ -720,7 +731,7 @@ var reim={ if(d.tel==null)d.tel=''; var num = 'userinfo_'+d.id+''; var s = '
'; - s+='
'; + s+='
'; if(d.id==adminid)s+=''; s+='
濮撳悕锛'+d.name+'
閮ㄩ棬锛'+d.deptallname+'
鑱屼綅锛'+d.ranking+'
鎬у埆锛'+d.sex+'
鐢佃瘽锛'+d.tel+'
鎵嬫満锛'+d.mobile+'
閭锛'+d.email+'
'; @@ -779,10 +790,10 @@ var reim={ return; } var s = '
'; - s+='
'; + s+='
'; s+='
'; var hei = 206; - s+='
'; + s+='
'+js.ling(30)+'
'; s+='
'; s+=' '; @@ -987,7 +998,7 @@ var reim={ for(ty in agedt){ a = agedt[ty]; len = a.length; - s+='
  '+ty+'
'; + s+='
  '+ty+'
'; s+='
'; for(i=0;i'+nst+''; + } + h+='
'; + js.tanbody('color','鍒囨崲涓婚',310,200,{ + html:h + }); + }, editpass:function(bt,cse){ if(!bt)bt='淇敼瀵嗙爜'; if(!cse)cse=''; @@ -1224,18 +1237,18 @@ var reim={ var chs= (this.getsound())?'checked':''; var ch1= (this.getzhuom())?'checked':''; var num = 'userinfo_cogshow'; - var s = '
'; + var s = '
'; s+='
璁剧疆
'; - s+='
'; - s+='
'; - s+='
鎻愮ず澹伴煶锛
'; + s+='
'; + s+='
'; + s+='
鎻愮ず澹伴煶锛
'; chs = 'checked'; ch1 = ''; if(js.getoption('sendkuijie')=='1'){ ch1='checked';chs=''; } - s+='
鍙戦佸揩鎹烽敭锛 
'; + s+='
鍙戦佸揩鎹烽敭锛 
'; //s+='
鍒楄〃鍒楀锛   
'; @@ -1243,13 +1256,13 @@ var reim={ var ips = nwjs.getipmac(); var d = nw.process.versions; var json = nw.App.manifest; - s+='
寮鏈哄惎鍔細  
'; - s+='
鎴戝眬鍩熺綉IP锛'+ips.ip+'
'; - s+='
鎴戠殑MAC鍦板潃锛'+ips.mac+'
'; - s+='
姝ゅ鎴风鐗堟湰锛歏'+json.version+'锛屽唴鏍竛wjs-'+d.nw+'
'; + s+='
寮鏈哄惎鍔細  
'; + s+='
鎴戝眬鍩熺綉IP锛'+ips.ip+'
'; + s+='
鎴戠殑MAC鍦板潃锛'+ips.mac+'
'; + s+='
姝ゅ鎴风鐗堟湰锛歏'+json.version+'锛屽唴鏍竛wjs-'+d.nw+'
'; } - s+='
缃戠粶IP锛'+this.myip+'
'; + s+='
缃戠粶IP锛'+this.myip+'
'; s+='
'; s+='
'; this.addtabs(num,s); @@ -1429,7 +1442,7 @@ function chatcreate(cans){ var iref = (!iref)?false:true; var minid= 0; if(iref)minid=this.minid; - if(o1)$(o1).html(' 鍔犺浇涓...'); + if(o1)$(o1).html(''+js.ling(12)+' 鍔犺浇涓...'); this.boolload = true; reim.ajax(this.getapiurl('reim','getrecord'),{type:this.type,gid:this.gid,minid:minid,loadci:this.loadci,laiyuan:'not',soulx:this.soulx,soukey:jm.base64encode(this.soukey)},function(ret){ js.unloading(); @@ -1587,7 +1600,7 @@ function chatcreate(cans){ }); }; this.showhuilist=function(){ - var s = '
 鍔犺浇浜哄憳...
'; + var s = '
'+js.ling()+' 鍔犺浇浜哄憳...
'; js.tanbody('syscogshow','浼氳瘽涓婁汉鍛('+this.usershu+')',480,100,{html:s}); if(!this.userlistarr){ reim.ajax(this.getapiurl('reim','getgroupuser'),{type:this.type,gid:this.gid},function(ret){ @@ -1602,7 +1615,7 @@ function chatcreate(cans){ var sad = this.showtableda(a); $('#showuserlist').html(sad[0]); $('#showuserlist').perfectScrollbar(); - $('#msgview_syscogshow').html('鍙抽敭浜哄悕鍙互@TA锛'+sad[1]+'浜哄湪绾'); + $('#msgview_syscogshow').html('鍙抽敭浜哄悕鍙互@TA锛'+sad[1]+'浜哄湪绾'); $('#showuserlist').find('div[xuh]').contextmenu(function(e){ me.atright(this,e); return false; @@ -1623,7 +1636,7 @@ function chatcreate(cans){ d1=reim.nowonlinearr; if(d1 && d1.reim==1)zx++; } - s+='
'+a[i].name+''+s1+'
'; + s+='
'+a[i].name+''+s1+'
'; if(oi%5==0)s+=''; } if(len<5)for(i=0;i<5-len;i++)s+=''; @@ -1845,7 +1858,7 @@ function chatcreate(cans){ }; this.getemts=function(o){ if(!get('aemtsdiv')){ - var s = ''); + reim.showbadge('wait'); + }, + openwait:function(d){ + var str = ''+d.name+''; + if(d.subname)str+='@'+d.subname+''; + js.confirm('纭畾瑕佽В绛斺'+str+'鈥濇鐢ㄦ埛闂鍚楋紵', function(jg){ + if(jg=='yes')reim.kefu.openwaits(d); + }); + }, + openwaits:function(d){ + $('#history_wait_'+d.receid+'').remove(); + this.arrobj[''+d.type+'_'+d.receid+''] = false; + reim.showbadge('wait'); + js.loading('鍔犲叆涓...'); + reim.ajax(reim.getapiurl('rockkefu','addzixun'),{sid:d.receid}, function(ret){ + reim.kefu.reload(); + js.unloading(); + reim.changetabs(0); + reim.showbadge('wait'); + reim.openchat('zixun',d.receid,d.name,d.face); + }); + }, + showuser:function(sid){ + this.nowsid = sid; + js.tanbody('zhuandivkefu','鍜ㄨ浜哄憳淇℃伅',350,200,{ + html:'
' + }); + reim.ajax(reim.getapiurl('rockkefu','getzxinfo'),{sid:this.nowsid},function(ret){ + reim.kefu.showzxinfo(ret.data); + }); + }, + showzxinfo:function(ret){ + var str = '',k,v,s1; + this.prinfo = ret.prinfo; + this.prfies = ret.prfies; + for(k in ret.prfies){ + v = ret.prinfo[k]; + if(v==null)v=''; + s1 = ''+ret.prfies[k]+''; + if(k=='web'||k=='ip'||k=='adddt'||k=='zxdt'||k=='agentna'||k=='kefu')s1=ret.prfies[k]; + str+=''; + } + str+='
'+s1+'锛'+v+'
'; + $('#zhuandivkefu').html(str); + $('#zhuandivkefu').perfectScrollbar(); + js.resizetan('confirm'); + }, + shareuser:function(sid, slx){ + changkfid = 0; + this.nowsid = sid; + var nae = '杞粰鍏朵粬瀹㈡湇'; + if(slx==1)nae = '鍔犳洿澶氬鏈'; + js.confirm('
',function(jg){ + if(jg=='yes')reim.kefu.savezhuan(slx); + },'',nae); + this.zshouwku(false); + }, + dbleditstr:function(fid){ + var v = this.prinfo[fid],nam=this.prfies[fid]; + if(v==null)v=''; + js.prompt('璇峰~鍐欏唴瀹癸細','濉啓鈥'+nam+'鈥濈殑鍊',function(jg,txt,act){ + if(jg=='yes'){ + reim.kefu.saveval(fid,txt,'zhuandivkefu'); + return false; + } + },v); + }, + saveval:function(fid,val,act){ + js.setmsg('淇濆瓨涓...','','msgview_'+act+''); + reim.ajax(reim.getapiurl('rockkefu','savezixun'),{fid:fid,val:val,sid:this.nowsid},function(ret){ + reim.kefu.prinfo[fid] = val; + $('#zhuandivkefu').find('td[fields="'+fid+'"]').html(val); + js.setmsg('','','msgview_'+act+''); + },'post'); + }, + zshouwku:function(d){ + if(!d){ + reim.ajax(reim.getapiurl('rockkefu','getkefu'),{sid:this.nowsid},function(ret){reim.kefu.zshouwku(ret.data);}); + }else{ + this.kefuarr = d; + var i,len=d.length,a1,str=''; + for(i=0;i'+d[i].name+''; + if(d[i].ranking)str+='('+d[i].ranking+')'; + str+='  '; + } + $('#zhuandivkefu').html(str); + js.resizetan('confirm'); + } + }, + savezhuan:function(slx){ + if(changkfid==0)return; + js.loading('澶勭悊涓...'); + reim.ajax(reim.getapiurl('rockkefu','savekefu'),{sid:this.nowsid,tid:changkfid,slx:slx},function(ret){ + js.msgok(ret.data); + },'get',function(err){ + js.msgerror(err.msg); + }); + } +} \ No newline at end of file diff --git a/mode/bootstrapplugin/jquery-bootsform.js b/mode/bootstrapplugin/jquery-bootsform.js index 05e55a4..c39d49d 100644 --- a/mode/bootstrapplugin/jquery-bootsform.js +++ b/mode/bootstrapplugin/jquery-bootsform.js @@ -152,7 +152,7 @@ s+=''; s+=''; s+='
'; - s+='
 '; + s+='
 '; s+=' '; if(can.cancelbtn)s+='  '; s+='
'; diff --git a/mode/bootstrapplugin/jquery-bootstable.js b/mode/bootstrapplugin/jquery-bootstable.js index ad3dfc6..0716332 100644 --- a/mode/bootstrapplugin/jquery-bootstable.js +++ b/mode/bootstrapplugin/jquery-bootstable.js @@ -77,12 +77,12 @@ this._create = function(){ var a = can.columns; var s = '',i,len=a.length,val,s1,s2='',cols,s3='',s4='',s5='',le,st,ov,j,j1,na,attr,sty='',hs='',dis,dlen=this.data.length,mcol; - s+=''; + s+='
'; if(!can.hideHeaders){ mcol = window['maincolor']; if(!mcol)mcol='#3399FF'; - s+=''; - if(can.checked)s+=''; + s+=''; + if(can.checked)s+=''; var nstr = js.getoption(this.tablekeymd5()),nda={}; if(nstr)nda = JSON.parse(nstr); for(i=0;i1)attr+=' colspan="'+cols+'"'; - s+=''; + s=''; xu = ov.trxu;if(!xu)xu=j+1+can.pageSize*(this.page-1); - s+=''; + s+=''; if(can.checked){ dis = ''; if(ov.checkdisabled)dis='disabled'; - s+=''; + s+=''; } for(i=0;i'+s2+''+s1+''; + s+=''; } s+=''; - if(s4)s+=''; + if(s4)s+=''; return s; }; this._tredat={}; @@ -300,7 +300,7 @@ var off = obj.offset(); var a = can.columns,s='',i,len=a.length,w1,o2; if(!get('headerla_'+rand+'')){ - s = '
'; + s = '
'; obj.append(s); } var o1 = $('#headerla_'+rand+''); @@ -308,14 +308,14 @@ o1.css({left:''+(off.left)+'px',top:''+(off.top)+'px',width:''+($('#tablemain_'+rand+'').width())+'px'}); if(o1.html()==''){ s = ''; - s+='
'; + s+='
'; if(can.celleditor&&a[i].editor)s+=' '; s+=a[i].text; if(a[i].sortable){ @@ -184,13 +184,13 @@ if(ov.trbgcolor)trsty+='background:'+ov.trbgcolor+';'; if(ov.trstyle)trsty+=''+ov.trstyle+';'; if(trsty)trsty='style="'+trsty+'"'; - s='
'+xu+''+xu+''+s2+''+s1+'
'+s4+'
'+s4+'
'; - s+=''; - if(can.checked)s+=''; + s+='
'; + s+=''; + if(can.checked)s+=''; for(i=0;i'+o2.html()+''; + s+=''; } s+=''; s+='
'+o2.html()+'
'; @@ -339,8 +339,8 @@ $('#edittable_'+rand+'').remove(); if(b.editorbefore && !b.editorbefore(a))return; if(!b.textmsg)b.textmsg=''; - var s = '
'; - s+='
'; + var s = '
'; + s+='
'; s+='
 '+b.text+'锛 '+b.textmsg+'
'; s+='
'; var wss = 200; @@ -555,7 +555,7 @@ this.page = p; var o1 = $('#tablebody_'+rand+''); var h= o1.height()-2,w= o1.width()-2; - s='
 鍔犺浇涓...
'; + s='
'+js.ling(20)+' 鍔犺浇涓...
'; o1.append(s); can.beforeload(); this.bool = true; @@ -773,7 +773,7 @@ }; this._fanye = function(){ var s = ''; - s='