diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 120ff044..e199295d 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -2839,5 +2839,27 @@ class Admin_DataController extends Zend_Controller_Action public function jsonexit($data){ $this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK)); return true; - }//jsonexit() 退出并返回json数据 + }//jsonexit() 退出并返回json数据 + + private function genRandomString($len) + { + $chars = array( + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", + "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", + "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", + "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", + "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", + "3", "4", "5", "6", "7", "8", "9" + ); + $charsLen = count($chars) - 1; + + shuffle($chars); // 将数组打乱 + + $output = ""; + for ($i=0; $i<$len; $i++) + { + $output .= $chars[mt_rand(0, $charsLen)]; + } + return $output; + } } diff --git a/application/admin/views/scripts/data/md.phtml b/application/admin/views/scripts/data/md.phtml index 0cdfa305..c3135e85 100644 --- a/application/admin/views/scripts/data/md.phtml +++ b/application/admin/views/scripts/data/md.phtml @@ -74,7 +74,7 @@ 邮件通知 | 支持项目 | 数据可视化 | - FTP数据上传 + FTP数据管理