Просмотр исходного кода

计量支付附件

调整附件一对一关联为多对一
NoNZero 8 лет назад
Родитель
Сommit
3827109b7b

+ 3 - 0
protected/config/routes.conf.php

@@ -29,6 +29,8 @@ $route['get']['/sproject/:pid/section/:pmid/detail'] = array('SProjectController
 $route['get']['/sproject/:pid/section/measure'] = array('SProjectController', 'proMeasure');
 // 登入登出API
 $route['*']['/user/profile'] = array('UserController', 'index');
+$route['*']['/user/profile/sms'] = array('UserController', 'sms');
+$route['*']['/user/profile/sms/edit'] = array('UserController', 'smsEdit');
 $route['*']['/user/avatar'] = array('UserController', 'avatar');
 $route['*']['/user/repasswd'] = array('UserController', 'repasswd');
 // Client API
@@ -151,4 +153,5 @@ $route['*']['/manage/item/list/:pid/project'] = array('[admin]ItemController', '
 $route['*']['/manage/item/del/:pmid'] = array('[admin]ItemController', 'itemDel');
 $route['*']['/manage/restore/list'] = array('[admin]RestoreController', 'restoreList');
 $route['*']['/manage/sys/info'] = array('[admin]SysController', 'sysinfo');
+$route['*']['/manage/sys/sms/switch'] = array('[admin]SysController', 'smsSwitch');
 ?>

+ 72 - 23
protected/controller/UserController.php

@@ -17,11 +17,13 @@ Doo::loadClass('PasswordHash');
  * @author darkredz
  */
 
-class UserController extends DooController {
+class UserController extends DooController
+{
 
     private $data, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $user, $ph;
 
-    public function beforeRun($resource, $action) {
+    public function beforeRun($resource, $action)
+    {
 //	$uGroups = $this->profile->getProWithUid($this->auth->getUid());
 //	$falg = Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
 //	if (!$falg)
@@ -31,12 +33,13 @@ class UserController extends DooController {
             $falg = Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
             if (!$falg)
                 return Doo::acl()->defaultFailedRoute;
-        }else {
+        } else {
             return Doo::acl()->defaultFailedRoute;
         }
     }
 
-    public function __construct() {
+    public function __construct()
+    {
         $this->auth = new Auth();
         $this->attfile = new attFile();
         $this->profile = new Profile();
@@ -55,7 +58,8 @@ class UserController extends DooController {
      *
      * @return type
      */
-    public function index() {
+    public function index()
+    {
         $this->data['uprofile'] = $this->profile->getProWithUid($this->auth->getUid());
         $this->data['uprofile']['email'] = $this->auth->getUemail();
         if (isset($_POST['name']) && isset($_POST['company']) && isset($_POST['jobs']) && isset($_POST['phone']) && isset($_POST['mobile'])) {
@@ -65,7 +69,8 @@ class UserController extends DooController {
         $this->render('edit-profile', $this->data, TRUE);
     }
 
-    public function avatar() {
+    public function avatar()
+    {
         // TODO:加入目录可否写入判断
         if (count($_FILES) == 3) {
             $result = array();
@@ -114,16 +119,18 @@ class UserController extends DooController {
      *  @access public
      * ************************************************************ */
 
-    function createRandomCode($length) {
+    function createRandomCode($length)
+    {
         $randomCode = "";
         $randomChars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
         for ($i = 0; $i < $length; $i++) {
-            $randomCode .= $randomChars { mt_rand(0, 35) };
+            $randomCode .= $randomChars{mt_rand(0, 35)};
         }
         return $randomCode;
     }
 
-    public function proSection() {
+    public function proSection()
+    {
         /**
          * 计量期数
          * 完成进度
@@ -156,7 +163,7 @@ class UserController extends DooController {
                 }
                 $biaoduantotalmoney += $value['contracttotal'];
                 $totalmoney = number_format($value['contracttotal'], 2, '.', ',');
-                $bdhtmlstr .='
+                $bdhtmlstr .= '
 				<thead>
 				    <tr><th class="taC"  width="225">标段名</th><th class="taC" width="140">计量期数</th><th width="115" class="taC">总价</th><th class="taC" width="">截止本期累计完成/本期完成/未完成</th></tr></thead>
 				<tbody>
@@ -210,7 +217,39 @@ class UserController extends DooController {
         $this->render('w-project-section', $this->data, TRUE);
     }
 
-    Function fNumber($number) {
+    /**
+     *
+     * @return type
+     */
+    public function sms()
+    {
+//        $this->data['uprofile'] = $this->profile->getProWithUid($this->auth->getUid());
+//        $this->data['uprofile']['email'] = $this->auth->getUemail();
+//        if (isset($_POST['name']) && isset($_POST['company']) && isset($_POST['jobs']) && isset($_POST['phone']) && isset($_POST['mobile'])) {
+//            $this->profile->upProfile($this->auth->getUid(), $_POST);
+//            return DOO::conf()->APP_URL . 'user/profile';
+//        }
+        $this->render('edit-profile-sms', $this->data, TRUE);
+    }
+
+    /**
+     *
+     * @return type
+     */
+    public function smsEdit()
+    {
+//        $this->data['uprofile'] = $this->profile->getProWithUid($this->auth->getUid());
+//        $this->data['uprofile']['email'] = $this->auth->getUemail();
+//        if (isset($_POST['name']) && isset($_POST['company']) && isset($_POST['jobs']) && isset($_POST['phone']) && isset($_POST['mobile'])) {
+//            $this->profile->upProfile($this->auth->getUid(), $_POST);
+//            return DOO::conf()->APP_URL . 'user/profile';
+//        }
+        $this->render('edit-profile-sms-edit', $this->data, TRUE);
+    }
+
+
+    Function fNumber($number)
+    {
         if ($number == '')
             Return "-";
         $nlen = strlen($number);
@@ -226,7 +265,8 @@ class UserController extends DooController {
         Return $fNumber;
     }
 
-    private function getFav() {
+    private function getFav()
+    {
         $proArray = $this->project->getAll();
         $this->data['othrPro'] = [];
         foreach ($proArray as $key => $value) {
@@ -239,7 +279,8 @@ class UserController extends DooController {
         }
     }
 
-    public function proSectionMeasure() {
+    public function proSectionMeasure()
+    {
         //此处未做更改,JSON文件已经固定名称
         $jsonpath = pathinfo($this->attfile->getMaxRow()['filepath']);
         if (isset($jsonpath['dirname'])) {
@@ -254,7 +295,7 @@ class UserController extends DooController {
                 closedir($handle);
             }
             $this->data['proArray'] = $proArray['Bills'];
-        }else {
+        } else {
             $this->data['proArray'] = [];
         }
         $this->data['mpid'] = $this->params['mpid'];
@@ -262,7 +303,8 @@ class UserController extends DooController {
         $this->render('w-project-section-measure', $this->data, TRUE);
     }
 
-    public function substr_replace_cn($string, $repalce = '*', $start = 0, $len = 0) {
+    public function substr_replace_cn($string, $repalce = '*', $start = 0, $len = 0)
+    {
         $count = mb_strlen($string, 'UTF-8'); //此处传入编码,建议使用utf-8。此处编码要与下面mb_substr()所使用的一致
         if (!$count) {
             return $string;
@@ -281,12 +323,13 @@ class UserController extends DooController {
             } else {
                 $returnString .= $tmpString;
             }
-            $i ++;
+            $i++;
         }
         return $returnString;
     }
 
-    function unicode_encode($name) {//to Unicode
+    function unicode_encode($name)
+    {//to Unicode
         $name = iconv('UTF-8', 'UCS-2', $name);
         $len = strlen($name);
         $str = '';
@@ -303,7 +346,8 @@ class UserController extends DooController {
         return $str;
     }
 
-    function unicode_decode($name) {//Unicode to
+    function unicode_decode($name)
+    {//Unicode to
         $pattern = '/([\w]+)|(\\\u([\w]{4}))/i';
         preg_match_all($pattern, $name, $matches);
         if (!empty($matches)) {
@@ -324,7 +368,8 @@ class UserController extends DooController {
         return $name;
     }
 
-    public function proDetail() {
+    public function proDetail()
+    {
         // 面包屑导航项目
         $this->data['currproArray'] = $this->data['allproArray'] = NULL;
         $allproArray = $this->project->getAll();
@@ -377,7 +422,8 @@ class UserController extends DooController {
         $this->render('w-project-section-detail', $this->data, TRUE);
     }
 
-    public function welcome() {
+    public function welcome()
+    {
 //	if (!$this->auth->isLoggedIn())
 //	    return Doo::conf()->APP_URL;
         if ($this->profile->getProWithUid($this->auth->getUid())['userid'])
@@ -391,7 +437,8 @@ class UserController extends DooController {
         $this->render('welcome', $this->data);
     }
 
-    public function prolist() {
+    public function prolist()
+    {
 //	if (!$this->auth->isLoggedIn())
 //	    return Doo::conf()->APP_URL;
 //	$proArray = new stdClass();
@@ -412,13 +459,15 @@ class UserController extends DooController {
     }
 
 // ajax提取密码名称
-    public function getAjaxSection() {
+    public function getAjaxSection()
+    {
         if (!$this->isAjax())
             return;
         echo json_encode($_POST);
     }
 
-    public function repasswd() {
+    public function repasswd()
+    {
         if (isset($_POST['oldpasswd']) && isset($_POST['newpasswd']) && isset($_POST['renewpasswd']) && ($_POST['newpasswd'] == $_POST['renewpasswd'])) {
             $userArray = $this->user->getRowUser($this->auth->getUid());
             if ($this->ph->CheckPassword($_POST['oldpasswd'], $userArray['upass'])) {

+ 28 - 5
protected/module/admin/controller/SysController.php

@@ -1,5 +1,5 @@
 <?php
-
+ini_set('display_errors', 1);
 session_start(); // starts new or resumes existing session
 Doo::loadModelAt('aconfig', 'admin');
 Doo::loadModelAt('auser', 'admin');
@@ -14,24 +14,28 @@ Doo::loadClass('mailer');
 // 列表停用 编辑 重置密码
 // 管理员权限管理
 // 管理员修改密码
-class SysController extends DooController {
+class SysController extends DooController
+{
 
     private $data, $aconfig, $auser, $profile, $ph, $userz, $mailer;
 
-    public function beforeRun($resource, $action) {
+    public function beforeRun($resource, $action)
+    {
         if (!isset($_SESSION['auid'])) {
             return Doo::conf()->APP_URL . 'manage';
         }
     }
 
-    public function __construct() {
+    public function __construct()
+    {
         $this->aconfig = new AConfig();
         $this->auser = new AUser();
         $this->mailer = new Mailer();
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
     }
 
-    function sysinfo() {
+    function sysinfo()
+    {
         if (isset($_POST['proname']) || isset($_POST['aemail'])) {
             if ($_POST['proname']) {
                 $this->aconfig->proname = $_POST['proname'];
@@ -57,4 +61,23 @@ class SysController extends DooController {
         $this->render('admin-sysinfo', $this->data, TRUE);
     }
 
+    function smsSwitch()
+    {
+        if (isset($_POST['switch'])) {
+            if ($_POST['switch'] == 'off') {
+                $this->aconfig->smsswitch = 0;
+                if ($this->aconfig->update(array('where' => "conid = 1")) > 0)
+                    exit(json_encode(array('switch' => 'off')));
+            }
+            if ($_POST['switch'] == 'on') {
+                $this->aconfig->smsswitch = 1;
+                if ($this->aconfig->update(array('where' => "conid = 1")) > 0)
+                    exit(json_encode(array('switch' => 'on')));
+            }
+        }
+        $this->data['smsSwitch'] = $this->aconfig->getOne(array('select' => 'smsswitch', 'asArray' => TRUE))['smsswitch'];
+        $this->data['menu'] = 4;
+        $this->render('admin-sms', $this->data, TRUE);
+    }
+
 }

+ 6 - 3
protected/module/admin/model/aconfig.php

@@ -5,15 +5,18 @@ Doo::loadCore('db/DooModel');
 /**
  * 用户表
  */
-class AConfig extends DooModel {
+class AConfig extends DooModel
+{
 
     public $conid;
     public $proname;
+    public $smsswitch;
     public $_table = 'jl_config';
     public $_primarykey = 'conid';
-    public $_fields = array('conid', 'proname');
+    public $_fields = array('conid', 'proname', 'smsswitch');
 
-    public function __construct() {
+    public function __construct()
+    {
         parent::setupModel(__CLASS__);
     }
 

+ 95 - 0
protected/module/admin/view/admin-sms.html

@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<div class="wrapHeader">
+    <h1 class="mainLogo" title="纵横计量支付"></h1>
+    <div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
+            title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
+</div>
+<!-- include "top" -->
+<div class="warpAdmin">
+    <!-- include "menu" -->
+    <div class="adminContent">
+        <div class="adminMain">
+            <form class="form-horizontal">
+                <fieldset>
+                    <legend>短信通知</legend>
+                    <div id="switchon" class="control-group <!-- if {{smsSwitch}}=='1' --> hide <!-- endif -->">
+                        <label class="control-label">开启短信通知功能</label>
+                        <div class="controls">
+                            <div class="btn-group">
+                                <input type="button" class="btn" id="smsOn" title="开启短信通知" value="开启"/>
+                                <button class="btn btn-danger disabled" disabled="disabled">已关闭</button>
+                            </div>
+                        </div>
+                    </div>
+                    <div id="switchoff" class="control-group <!-- if {{smsSwitch}}=='0' --> hide <!-- endif -->">
+                        <label class="control-label">开启短信通知功能</label>
+                        <div class="controls">
+                            <div class="btn-group">
+                                <button class="btn btn-success  disabled" disabled="disabled">已开启</button>
+                                <input type="button" class="btn" id="smsOff" title="关闭短信通知" value="关闭"/>
+                            </div>
+                        </div>
+                    </div>
+                    <div id="alert-open" class="alert alert-info hide">
+                        初次开启,所有用户都必须进行手机验证才能正常接收短信通知。
+                    </div>
+                    <div id="alert-close" class="alert alert-error hide">
+                        短信通知已关闭,所有用户都将不会再接收短信通知。
+                    </div>
+                </fieldset>
+            </form>
+        </div>
+    </div>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript">
+    $(document).ready(function () {
+        $("#smsOff").click(function () {
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"switch": 'off'},
+                url: "{{rootUrl}}manage/sys/sms/switch"
+            }).done(function (data) {
+                if (data['switch'] == 'off') {
+                    $("#switchoff").fadeOut();
+                    $("#switchon").fadeIn();
+                    $("#alert-open").fadeOut();
+                    $("#alert-close").fadeIn();
+                }
+            });
+        });
+        $("#smsOn").click(function () {
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                cache: false,
+                data: {"switch": 'on'},
+                url: "{{rootUrl}}manage/sys/sms/switch",
+            }).done(function (data) {
+                if (data['switch'] == 'on') {
+                    $("#switchon").fadeOut();
+                    $("#switchoff").fadeIn();
+                    $("#alert-close").fadeOut();
+                    $("#alert-open").fadeIn();
+                }
+            });
+        });
+    });
+
+</script>
+</body>

Разница между файлами не показана из-за своего большого размера
+ 90 - 81
protected/module/admin/view/admin-userlist.html


+ 1 - 0
protected/module/admin/view/menu.html

@@ -1,6 +1,7 @@
 <div class="adminSidebar fL">
     <ul>
         <li><a href="{{rootUrl}}manage/sys/info"<!-- if {{menu}}=='1' --> class="now" <!-- endif -->>系统信息</a></li>
+        <li><a href="{{rootUrl}}manage/sys/sms/switch"<!-- if {{menu}}=='4' --> class="now" <!-- endif -->>短信通知</a></li>
         <li><a href="{{rootUrl}}manage/user/list"<!-- if {{menu}}=='2' --> class="now" <!-- endif -->>用户列表</a></li>
         <li><a href="{{rootUrl}}manage/user/add"<!-- if {{menu}}=='3' --> class="now" <!-- endif -->>添加用户</a></li>
     </ul>

+ 75 - 80
protected/view/edit-profile-avtra.html

@@ -1,89 +1,84 @@
 <!DOCTYPE html>
 <html lang=zh-cn>
-    <head>
-	<meta charset=utf-8>
-	<title>纵横计量支付系统</title>
-	<meta name=description content=计量支付>
-	<meta name=copyright content=smartcost.com.cn>
-		<meta name="viewport" content="width=device-width,initial-scale=1.0">
-	<link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
-	<link rel=stylesheet href={{rootUrl}}global/css/style.css>
-	<script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
-	<script src={{rootUrl}}global/js/bootstrap.js></script>
-	<script src={{rootUrl}}global/js/jl.js></script>
-    </head>
-    <body>
-	<!-- include "top" -->
-	<div class="wrapContent">
-	    <!-- include "left" -->
-	    <div class="mainContainer">
-		<!--内容-->
-		<div class="mainContent">
-		    <div class="title clearfix">
-			<div class="fR">
-			    <button class="btn btn-link" type="button"><i class="icon-question-sign"></i>&nbsp;帮助</button>
-			</div>
-		    </div>
-		    <div class="form">
-			<legend>修改头像</legend>
-			<div class="clearfix">
-			    <p id="swfContainer">
-				本组件需要安装Flash Player后才可使用,请从<a href="http://www.adobe.com/go/getflashplayer">这里</a>下载安装。
-			    </p>
-			</div>
-		    </div>
-		</div>
-		<!--内容-->
-	    </div>
-	</div>
-	<script type="text/javascript">autoFlashHeight();</script>
-	<script type="text/javascript" src="{{rootUrl}}global/avaup/scripts/swfobject.js"></script>
-        <script type="text/javascript" src="{{rootUrl}}global/avaup/scripts/fullAvatarEditor.js"></script>
-	<script type="text/javascript">
-swfobject.addDomLoadEvent(function () {
-    var swf = new fullAvatarEditor("swfContainer", {
-	id: 'swf',
-	upload_url: '{{rootUrl}}user/avatar',
-	src_upload: 2,
-	    avatar_sizes : '100*100|96*96|48*48',
-    avatar_sizes_desc : '100*100像素|96*96像素|48*48像素',
-    }, function (msg) {
-	switch (msg.code)
-	{
-	    case 1 :
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<!-- include "top" -->
+<div class="wrapContent">
+    <!-- include "left" -->
+    <div class="mainContainer">
+        <!--内容-->
+        <div class="mainContent">
+            <div class="title clearfix">
+                <div class="fR">
+                    <button class="btn btn-link" type="button"><i class="icon-question-sign"></i>&nbsp;帮助</button>
+                </div>
+            </div>
+            <div class="form">
+                <legend>修改头像</legend>
+                <div class="clearfix">
+                    <p id="swfContainer">
+                        本组件需要安装Flash Player后才可使用,请从<a href="http://www.adobe.com/go/getflashplayer">这里</a>下载安装。
+                    </p>
+                </div>
+            </div>
+        </div>
+        <!--内容-->
+    </div>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript" src="{{rootUrl}}global/avaup/scripts/swfobject.js"></script>
+<script type="text/javascript" src="{{rootUrl}}global/avaup/scripts/fullAvatarEditor.js"></script>
+<script type="text/javascript">
+    swfobject.addDomLoadEvent(function () {
+        var swf = new fullAvatarEditor("swfContainer", {
+                    id: 'swf',
+                    upload_url: '{{rootUrl}}user/avatar',
+                    src_upload: 2,
+                    avatar_sizes: '100*100|96*96|48*48',
+                    avatar_sizes_desc: '100*100像素|96*96像素|48*48像素',
+                }, function (msg) {
+                    switch (msg.code) {
+                        case 1 :
 //		alert("页面成功加载了组件!");
-		break;
-	    case 2 :
+                            break;
+                        case 2 :
 //		alert("已成功加载默认指定的图片到编辑面板。");
-		break;
-	    case 3 :
-		if (msg.type == 0)
-		{
+                            break;
+                        case 3 :
+                            if (msg.type == 0) {
 //		    alert("摄像头已准备就绪且用户已允许使用。");
-		}
-		else if (msg.type == 1)
-		{
+                            }
+                            else if (msg.type == 1) {
 //		    alert("摄像头已准备就绪但用户未允许使用!");
-		}
-		else
-		{
+                            }
+                            else {
 //		    alert("摄像头被占用!");
-		}
-		break;
-	    case 5 :
-		if (msg.type == 0)
-		{
-		    windows.location.href = '/user/profile';
+                            }
+                            break;
+                        case 5 :
+                            if (msg.type == 0) {
+                                windows.location.href = '/user/profile';
 
-		}
-		break;
-	}
-    }
-    );
-    document.getElementById("upload").onclick = function () {
-	swf.call("upload");
-    };
-});
-        </script>
-    </body>
+                            }
+                            break;
+                    }
+                }
+        );
+        document.getElementById("upload").onclick = function () {
+            swf.call("upload");
+        };
+    });
+</script>
+</body>
 </html>

+ 69 - 0
protected/view/edit-profile-sms-edit.html

@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<!-- include "top" -->
+<div class="wrapContent">
+    <!-- include "left" -->
+    <div class="mainContainer">
+        <!--内容-->
+        <div class="mainContent">
+            <div class="title clearfix">
+                <div class="fR">
+                    <button class="btn btn-link" type="button"><i class="icon-question-sign"></i>&nbsp;帮助</button>
+                </div>
+            </div>
+            <div class="form">
+                <form class="form-horizontal">
+                    <legend>短信通知-修改手机</legend>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">当前手机</label>
+                        <div class="controls">
+                            <input type="text" placeholder="17875434567" disabled="">
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">新手机</label>
+                        <div class="controls">
+                            <input type="text" placeholder="输入您的新手机号码">
+                        </div>
+                    </div>
+                    <div class="control-group error">
+                        <label class="control-label" for="inputEmail">新手机</label>
+                        <div class="controls">
+                            <input type="text" placeholder="输入您的新手机号码"><span class="help-inline">手机号码已被使用</span>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">短信校验码</label>
+                        <div class="controls">
+                            <input type="text" placeholder="输入验证码" class="span2">
+                            <button class="btn">获取验证码</button>
+                            <button class="btn" disabled>重新获取 60s</button>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label"></label>
+                        <div class="controls">
+                            <a class="btn btn-primary" href="welcome - 1.html"><i class="icon-ok icon-white"></i>&nbsp;确定修改</a>
+                        </div>
+                    </div>
+                    </fieldset>
+                </form>
+            </div>
+        </div>
+        <!--内容-->
+    </div>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+</body>

+ 90 - 0
protected/view/edit-profile-sms.html

@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang=zh-cn>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<!-- include "top" -->
+<div class="wrapContent">
+    <!-- include "left" -->
+    <div class="mainContainer">
+        <!--内容-->
+        <div class="mainContent">
+            <div class="title clearfix">
+                <div class="fR">
+                    <button class="btn btn-link" type="button"><i class="icon-question-sign"></i>&nbsp;帮助</button>
+                </div>
+            </div>
+            <div class="form">
+                <form class="form-horizontal">
+                    <legend>短信通知</legend>
+                    <!--初次使用-->
+                    <div class="alert alert-info">
+                        初次使用,请先添加用于接收通知的手机号码。
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">添加手机</label>
+                        <div class="controls">
+                            <input type="text" placeholder="输入您的手机号码">
+                        </div>
+                    </div>
+                    <div class="control-group error">
+                        <label class="control-label" for="inputEmail">添加手机</label>
+                        <div class="controls">
+                            <input type="text" placeholder="输入您的新手机号码"><span class="help-inline">手机号码已被使用</span>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">短信校验码</label>
+                        <div class="controls">
+                            <input type="text" placeholder="输入验证码" class="span2">
+                            <button class="btn">获取验证码</button>
+                            <button class="btn" disabled>重新获取 60s</button>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label"></label>
+                        <div class="controls">
+                            <a class="btn btn-primary" href="welcome - 1.html"><i class="icon-ok icon-white"></i>&nbsp;确定添加</a>
+                        </div>
+                    </div>
+                    <!--初次使用-->
+                    <!--正常使用-->
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">接收手机</label>
+                        <div class="controls">
+                            <input type="text" value="15678987654" disabled="">&nbsp;<a
+                                href="{{rootUrl}}user/profile/sms/edit">修改手机</a>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">通知类型</label>
+                        <div class="controls">
+                            <label class="checkbox inline">
+                                <input type="checkbox" checked value="option1" disabled> 到我审批
+                            </label>
+                        </div>
+                    </div>
+                    <!--正常使用-->
+                    <!--管理员关闭功能-->
+                    <div class="alert alert-error">
+                        短信通知功能已被关闭。
+                    </div>
+                    <!--管理员关闭功能-->
+                    </fieldset>
+                </form>
+            </div>
+        </div>
+        <!--内容-->
+    </div>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+</body>

+ 94 - 91
protected/view/edit-profile.html

@@ -1,94 +1,97 @@
 <!DOCTYPE html>
 <html lang=zh-cn>
-    <head>
-	<meta charset=utf-8>
-	<title>纵横计量支付系统</title>
-	<meta name=description content=计量支付>
-	<meta name=copyright content=smartcost.com.cn>
-		<meta name="viewport" content="width=device-width,initial-scale=1.0">
-	<link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
-	<link rel=stylesheet href={{rootUrl}}global/css/style.css>
-	<script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
-	<script src={{rootUrl}}global/js/bootstrap.js></script>
-	<script src={{rootUrl}}global/js/jl.js></script>
-    </head>
-    <body>
-	<!-- include "top" -->
-	<div class="wrapContent">
-	    <!-- include "left" -->
-	    <div class="mainContainer">
-		<!--内容-->
-		<div class="mainContent">
-		    <div class="title clearfix">
-			<div class="fR">
-			    <button class="btn btn-link" type="button"><i class="icon-question-sign"></i>&nbsp;帮助</button>
-			</div>
-		    </div>
-		    <div class="form">
-			<form class="form-horizontal" action="{{rootUrl}}user/profile" method="post">
-			    <legend>编辑个人信息</legend>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">头像</label>
-				<div class="controls">
-				    <img src="{{rootUrl}}{{user.avatar}}"> <a href="{{rootUrl}}user/avatar">更换</a>
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">邮箱(登录账号)</label>
-				<div class="controls">
-				    <input type="text" value="{{uprofile.email}}" disabled="">&nbsp;<a href="{{rootUrl}}user/repasswd">修改密码</a>
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">姓名</label>
-				<div class="controls">
-				    <input type="text" name="name" value="{{uprofile.name}}" placeholder="输入您的姓名">
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">单位(公司)名称</label>
-				<div class="controls">
-				    <input type="text" name="company" value="{{uprofile.company}}" placeholder="输入您的单位或者公司名称" >
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">职位</label>
-				<div class="controls">
-				    <input type="text" name="jobs" value="{{uprofile.jobs}}" placeholder="输入您的职位">
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">联系电话</label>
-				<div class="controls">
-				    <div class="input-prepend">
-					<span class="add-on">固话</span>
-					<input type="text" name="phone" value="{{uprofile.phone}}" placeholder="格式:0000-00000000" style="width:167px">
-				    </div>
-				    <div class="input-prepend">
-					<span class="add-on">手机</span>
-					<input type="text" name="mobile" value="{{uprofile.mobile}}" placeholder="输入11位手机号码"  class="span2">
-				    </div>
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label" for="inputEmail">QQ</label>
-				<div class="controls">
-				    <input type="text" name="qq" value="{{uprofile.qq}}" placeholder="输入您的QQ号码">
-				</div>
-			    </div>
-			    <div class="control-group">
-				<label class="control-label"></label>
-				<div class="controls">
-				    <input type="submit" class="btn btn-primary" value="确定提交"><i class="icon-ok icon-white"></i>&nbsp;</input>
-				</div>
-			    </div>
-			    </fieldset>
-			</form>
-		    </div>
-		</div>
-		<!--内容-->
-	    </div>
-	</div>
-	<script type="text/javascript">autoFlashHeight();</script>
-    </body>
+<head>
+    <meta charset=utf-8>
+    <title>纵横计量支付系统</title>
+    <meta name=description content=计量支付>
+    <meta name=copyright content=smartcost.com.cn>
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
+    <link rel=stylesheet href={{rootUrl}}global/css/style.css>
+    <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
+    <script src={{rootUrl}}global/js/bootstrap.js></script>
+    <script src={{rootUrl}}global/js/jl.js></script>
+</head>
+<body>
+<!-- include "top" -->
+<div class="wrapContent">
+    <!-- include "left" -->
+    <div class="mainContainer">
+        <!--内容-->
+        <div class="mainContent">
+            <div class="title clearfix">
+                <div class="fR">
+                    <button class="btn btn-link" type="button"><i class="icon-question-sign"></i>&nbsp;帮助</button>
+                </div>
+            </div>
+            <div class="form">
+                <form class="form-horizontal" action="{{rootUrl}}user/profile" method="post">
+                    <legend>编辑个人信息</legend>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">头像</label>
+                        <div class="controls">
+                            <img src="{{rootUrl}}{{user.avatar}}"> <a href="{{rootUrl}}user/avatar">更换</a>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">邮箱(登录账号)</label>
+                        <div class="controls">
+                            <input type="text" value="{{uprofile.email}}" disabled="">&nbsp;<a
+                                href="{{rootUrl}}user/repasswd">修改密码</a>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">姓名</label>
+                        <div class="controls">
+                            <input type="text" name="name" value="{{uprofile.name}}" placeholder="输入您的姓名">
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">单位(公司)名称</label>
+                        <div class="controls">
+                            <input type="text" name="company" value="{{uprofile.company}}" placeholder="输入您的单位或者公司名称">
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">职位</label>
+                        <div class="controls">
+                            <input type="text" name="jobs" value="{{uprofile.jobs}}" placeholder="输入您的职位">
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">联系电话</label>
+                        <div class="controls">
+                            <div class="input-prepend">
+                                <span class="add-on">固话</span>
+                                <input type="text" name="phone" value="{{uprofile.phone}}"
+                                       placeholder="格式:0000-00000000" style="width:167px">
+                            </div>
+                            <div class="input-prepend">
+                                <span class="add-on">手机</span>
+                                <input type="text" name="mobile" value="{{uprofile.mobile}}" placeholder="输入11位手机号码"
+                                       class="span2">
+                            </div>
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label" for="inputEmail">QQ</label>
+                        <div class="controls">
+                            <input type="text" name="qq" value="{{uprofile.qq}}" placeholder="输入您的QQ号码">
+                        </div>
+                    </div>
+                    <div class="control-group">
+                        <label class="control-label"></label>
+                        <div class="controls">
+                            <input type="submit" class="btn btn-primary" value="确定提交"><i class="icon-ok icon-white"></i>&nbsp;</input>
+                        </div>
+                    </div>
+                    </fieldset>
+                </form>
+            </div>
+        </div>
+        <!--内容-->
+    </div>
+</div>
+<script type="text/javascript">autoFlashHeight();</script>
+</body>
 </html>

+ 13 - 11
protected/view/top.html

@@ -1,16 +1,18 @@
 <div class="wrapHeader">
     <h1 title="纵横计量支付" class="mainLogo"></h1>
     <div class="userInfo"><img src="{{rootUrl}}{{user.avatar}}" class="fR">
-	<div class="btn-group">
-	    <button data-toggle="dropdown" class="btn dropdown-toggle">{{user.name}}&nbsp;<span class="caret"></span></button>
-	    <ul class="dropdown-menu">
-		<li><a href="{{rootUrl}}user/profile">个人信息</a></li>
-		<li class="hide"><a href="#"><span data-icon="r" aria-hidden="true"></span>&nbsp;工作组</a></li>
-		<li class="hide"><a href="#"><span data-icon="B" aria-hidden="true"></span>&nbsp;我的任务</a></li>
-		<li class="divider"></li>
-		<li class="hide"><a href="#">帮助中心</a></li>
-		<li><a href="{{rootUrl}}signout">退出</a></li>
-	    </ul>
-	</div>
+        <div class="btn-group">
+            <button data-toggle="dropdown" class="btn dropdown-toggle">{{user.name}}&nbsp;<span class="caret"></span>
+            </button>
+            <ul class="dropdown-menu">
+                <li><a href="{{rootUrl}}user/profile">个人信息</a></li>
+                <li><a href="{{rootUrl}}user/profile/sms/edit">短信通知</a></li>
+                <li class="hide"><a href="#"><span data-icon="r" aria-hidden="true"></span>&nbsp;工作组</a></li>
+                <li class="hide"><a href="#"><span data-icon="B" aria-hidden="true"></span>&nbsp;我的任务</a></li>
+                <li class="divider"></li>
+                <li class="hide"><a href="#">帮助中心</a></li>
+                <li><a href="{{rootUrl}}signout">退出</a></li>
+            </ul>
+        </div>
     </div>
 </div>

+ 1 - 0
短信提醒.sql

@@ -0,0 +1 @@
+ALTER TABLE  `jl_config` ADD  `smsswitch` TINYINT NOT NULL DEFAULT  '1';