sxjun@ulucu.com 4 anos atrás
pai
commit
e3751c3456
100 arquivos alterados com 9856 adições e 0 exclusões
  1. BIN
      words20201124.tar.gz
  2. 5 0
      www.hanlinyuanonline.com/.buildpath
  3. 8 0
      www.hanlinyuanonline.com/.htaccess
  4. 27 0
      www.hanlinyuanonline.com/.project
  5. BIN
      www.hanlinyuanonline.com/Application/Admin/.zip
  6. 1 0
      www.hanlinyuanonline.com/Application/Admin/Common/index.html
  7. 17 0
      www.hanlinyuanonline.com/Application/Admin/Conf/config.php
  8. 31 0
      www.hanlinyuanonline.com/Application/Admin/Conf/development.php
  9. 1 0
      www.hanlinyuanonline.com/Application/Admin/Conf/index.html
  10. 38 0
      www.hanlinyuanonline.com/Application/Admin/Conf/online.php
  11. 70 0
      www.hanlinyuanonline.com/Application/Admin/Controller/ActivityController.class.php
  12. 144 0
      www.hanlinyuanonline.com/Application/Admin/Controller/AlarmController.class.php
  13. 168 0
      www.hanlinyuanonline.com/Application/Admin/Controller/ChoiceController.class.php
  14. 266 0
      www.hanlinyuanonline.com/Application/Admin/Controller/CourseController.class.php
  15. 80 0
      www.hanlinyuanonline.com/Application/Admin/Controller/CoursetypeController.class.php
  16. 51 0
      www.hanlinyuanonline.com/Application/Admin/Controller/FeedbackController.class.php
  17. 122 0
      www.hanlinyuanonline.com/Application/Admin/Controller/GoodController.class.php
  18. 108 0
      www.hanlinyuanonline.com/Application/Admin/Controller/IndexController.class.php
  19. 69 0
      www.hanlinyuanonline.com/Application/Admin/Controller/LoginController.class.php
  20. 64 0
      www.hanlinyuanonline.com/Application/Admin/Controller/ManagerController.class.php
  21. 118 0
      www.hanlinyuanonline.com/Application/Admin/Controller/NotepadController.class.php
  22. 87 0
      www.hanlinyuanonline.com/Application/Admin/Controller/NoticeController.class.php
  23. 74 0
      www.hanlinyuanonline.com/Application/Admin/Controller/SliderController.class.php
  24. 58 0
      www.hanlinyuanonline.com/Application/Admin/Controller/SoftController.class.php
  25. 214 0
      www.hanlinyuanonline.com/Application/Admin/Controller/SquareController.class.php
  26. 171 0
      www.hanlinyuanonline.com/Application/Admin/Controller/StoreController.class.php
  27. 464 0
      www.hanlinyuanonline.com/Application/Admin/Controller/UeditorController.class.php
  28. 239 0
      www.hanlinyuanonline.com/Application/Admin/Controller/UserController.class.php
  29. 319 0
      www.hanlinyuanonline.com/Application/Admin/Controller/WordsController.class.php
  30. 1 0
      www.hanlinyuanonline.com/Application/Admin/Controller/index.html
  31. 40 0
      www.hanlinyuanonline.com/Application/Admin/Model/CourseModel.class.php
  32. 21 0
      www.hanlinyuanonline.com/Application/Admin/Model/FeedbackModel.class.php
  33. 41 0
      www.hanlinyuanonline.com/Application/Admin/Model/NotepadModel.class.php
  34. 12 0
      www.hanlinyuanonline.com/Application/Admin/Model/UserConnectModel.class.php
  35. 1 0
      www.hanlinyuanonline.com/Application/Admin/Model/index.html
  36. 167 0
      www.hanlinyuanonline.com/Application/Admin/View/Activity/edit.html
  37. 83 0
      www.hanlinyuanonline.com/Application/Admin/View/Activity/index.html
  38. 85 0
      www.hanlinyuanonline.com/Application/Admin/View/Alarm/index.html
  39. 173 0
      www.hanlinyuanonline.com/Application/Admin/View/Alarm/info.html
  40. 64 0
      www.hanlinyuanonline.com/Application/Admin/View/Alarm/refuse.html
  41. 65 0
      www.hanlinyuanonline.com/Application/Admin/View/Choice/detail.html
  42. 146 0
      www.hanlinyuanonline.com/Application/Admin/View/Choice/edit.html
  43. 133 0
      www.hanlinyuanonline.com/Application/Admin/View/Choice/index.html
  44. 222 0
      www.hanlinyuanonline.com/Application/Admin/View/Course/detail.html
  45. 78 0
      www.hanlinyuanonline.com/Application/Admin/View/Course/edit.html
  46. 131 0
      www.hanlinyuanonline.com/Application/Admin/View/Course/import.html
  47. 128 0
      www.hanlinyuanonline.com/Application/Admin/View/Course/index.html
  48. 71 0
      www.hanlinyuanonline.com/Application/Admin/View/Coursetype/course.html.bak
  49. 57 0
      www.hanlinyuanonline.com/Application/Admin/View/Coursetype/edit.html
  50. 76 0
      www.hanlinyuanonline.com/Application/Admin/View/Coursetype/index.html
  51. 107 0
      www.hanlinyuanonline.com/Application/Admin/View/Feedback/index.html
  52. 81 0
      www.hanlinyuanonline.com/Application/Admin/View/Feedback/sys.html
  53. 116 0
      www.hanlinyuanonline.com/Application/Admin/View/Good/add.html
  54. 65 0
      www.hanlinyuanonline.com/Application/Admin/View/Good/edit.html
  55. 112 0
      www.hanlinyuanonline.com/Application/Admin/View/Good/index.html
  56. 162 0
      www.hanlinyuanonline.com/Application/Admin/View/Index/index.html
  57. 108 0
      www.hanlinyuanonline.com/Application/Admin/View/Index/pwd.html
  58. 78 0
      www.hanlinyuanonline.com/Application/Admin/View/Login/index.html
  59. 114 0
      www.hanlinyuanonline.com/Application/Admin/View/Manager/edit.html
  60. 93 0
      www.hanlinyuanonline.com/Application/Admin/View/Manager/index.html
  61. 65 0
      www.hanlinyuanonline.com/Application/Admin/View/Notepad/edit.html
  62. 113 0
      www.hanlinyuanonline.com/Application/Admin/View/Notepad/index.html
  63. 106 0
      www.hanlinyuanonline.com/Application/Admin/View/Notice/edit.html
  64. 79 0
      www.hanlinyuanonline.com/Application/Admin/View/Notice/index.html
  65. 10 0
      www.hanlinyuanonline.com/Application/Admin/View/Public/bar.html
  66. 276 0
      www.hanlinyuanonline.com/Application/Admin/View/Public/left.html
  67. 104 0
      www.hanlinyuanonline.com/Application/Admin/View/Public/top.html
  68. 69 0
      www.hanlinyuanonline.com/Application/Admin/View/Public/top1.html
  69. 81 0
      www.hanlinyuanonline.com/Application/Admin/View/Public/topbak.html
  70. 132 0
      www.hanlinyuanonline.com/Application/Admin/View/Slider/edit.html
  71. 75 0
      www.hanlinyuanonline.com/Application/Admin/View/Slider/index.html
  72. 113 0
      www.hanlinyuanonline.com/Application/Admin/View/Soft/edit.html
  73. 71 0
      www.hanlinyuanonline.com/Application/Admin/View/Soft/index.html
  74. 116 0
      www.hanlinyuanonline.com/Application/Admin/View/Square/course.html
  75. 133 0
      www.hanlinyuanonline.com/Application/Admin/View/Square/detailCourse.html
  76. 61 0
      www.hanlinyuanonline.com/Application/Admin/View/Square/detailNotepad.html
  77. 119 0
      www.hanlinyuanonline.com/Application/Admin/View/Square/notepad.html
  78. 155 0
      www.hanlinyuanonline.com/Application/Admin/View/Square/show.html
  79. 60 0
      www.hanlinyuanonline.com/Application/Admin/View/Square/unpass.html
  80. 140 0
      www.hanlinyuanonline.com/Application/Admin/View/Store/detail.html
  81. 69 0
      www.hanlinyuanonline.com/Application/Admin/View/Store/edit.html
  82. 88 0
      www.hanlinyuanonline.com/Application/Admin/View/Store/index.html
  83. 86 0
      www.hanlinyuanonline.com/Application/Admin/View/Store/words.html
  84. 71 0
      www.hanlinyuanonline.com/Application/Admin/View/User/course.html
  85. 117 0
      www.hanlinyuanonline.com/Application/Admin/View/User/detail.html
  86. 189 0
      www.hanlinyuanonline.com/Application/Admin/View/User/index.html
  87. 69 0
      www.hanlinyuanonline.com/Application/Admin/View/User/notepad.html
  88. 353 0
      www.hanlinyuanonline.com/Application/Admin/View/Words/edit.html
  89. 1 0
      www.hanlinyuanonline.com/Application/Admin/View/index.html
  90. 1 0
      www.hanlinyuanonline.com/Application/Admin/index.html
  91. 237 0
      www.hanlinyuanonline.com/Application/Api/Common/function.php
  92. 1 0
      www.hanlinyuanonline.com/Application/Api/Common/index.html
  93. 19 0
      www.hanlinyuanonline.com/Application/Api/Conf/config.php
  94. 50 0
      www.hanlinyuanonline.com/Application/Api/Conf/development.php
  95. 1 0
      www.hanlinyuanonline.com/Application/Api/Conf/index.html
  96. 60 0
      www.hanlinyuanonline.com/Application/Api/Conf/online.php
  97. BIN
      www.hanlinyuanonline.com/Application/Api/Controller/.UserController.class.php.swp
  98. 62 0
      www.hanlinyuanonline.com/Application/Api/Controller/AcfunController.class.php
  99. 459 0
      www.hanlinyuanonline.com/Application/Api/Controller/ChoiceController.class.php
  100. 0 0
      www.hanlinyuanonline.com/Application/Api/Controller/CourseController.class.php

BIN
words20201124.tar.gz


+ 5 - 0
www.hanlinyuanonline.com/.buildpath

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<buildpath>
+	<buildpathentry excluding="vendor/**/test*/**" kind="src" path=""/>
+	<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
+</buildpath>

+ 8 - 0
www.hanlinyuanonline.com/.htaccess

@@ -0,0 +1,8 @@
+<IfModule mod_rewrite.c>
+  Options +FollowSymlinks
+  RewriteEngine On
+
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
+</IfModule>

+ 27 - 0
www.hanlinyuanonline.com/.project

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>words</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.dltk.core.scriptbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.zend.php.composer.core.ComposerJsonBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.php.core.PHPNature</nature>
+	</natures>
+</projectDescription>

BIN
www.hanlinyuanonline.com/Application/Admin/.zip


+ 1 - 0
www.hanlinyuanonline.com/Application/Admin/Common/index.html

@@ -0,0 +1 @@
+ 

+ 17 - 0
www.hanlinyuanonline.com/Application/Admin/Conf/config.php

@@ -0,0 +1,17 @@
+<?php
+if($_SERVER['DEPLOY_ENV']=='DEVELOPMENT'){//本地开发环境
+    return array(
+        //'配置项'=>'配置值'
+        'LOAD_EXT_CONFIG' => 'development',
+    );
+}elseif($_SERVER['DEPLOY_ENV']=='ONLINE'){//线上环境
+    return array(
+        //'配置项'=>'配置值'
+        'LOAD_EXT_CONFIG' => 'online',
+    );
+}else{
+    return array(
+        //'配置项'=>'配置值'
+        'LOAD_EXT_CONFIG' => 'online',
+    );
+}

+ 31 - 0
www.hanlinyuanonline.com/Application/Admin/Conf/development.php

@@ -0,0 +1,31 @@
+<?php
+return array(
+    //'配置项'=>'配置值'
+    'DB_TYPE'       => 'mysql', //分布式数据库类型必须相同
+    'DB_HOST'       => 'localhost',
+    'DB_NAME'       => 'words', //如果相同可以不用定义多个
+    'DB_USER'       => 'root',
+    'DB_PWD'        => '',
+    'DB_PORT'       => '3306',
+    'DB_PREFIX'     => 't_',
+
+    'URL_CASE_INSENSITIVE'=>false,//设置url区分大小写
+
+    'TMPL_L_DELIM'          =>  '<{',// 模板引擎普通标签开始标记
+    'TMPL_R_DELIM'          =>  '}>',// 模板引擎普通标签结束标记
+
+    //验证码
+    'VERIFY_CODE'=>array(
+        'fontSize'    =>    50,    // 验证码字体大小
+        'length'      =>    4,     // 验证码位数
+        'useNoise'    =>    true, // 关闭验证码杂点
+    ),
+    
+    'WEB_HOST'=> 'http://words.my',
+    
+    'URL_HTML_SUFFIX'=>'',
+    'IMG_PATH'=>'./Uploads/img/',
+    'MUSIC_PATH'=>'./Uploads/music/',
+    
+    'TRANS' => 'http://dict-co.iciba.com/api/dictionary.php?key=293E92740629E0F44C315F64B9BDE4A6',
+);

+ 1 - 0
www.hanlinyuanonline.com/Application/Admin/Conf/index.html

@@ -0,0 +1 @@
+ 

+ 38 - 0
www.hanlinyuanonline.com/Application/Admin/Conf/online.php

@@ -0,0 +1,38 @@
+<?php
+return array(
+    //'配置项'=>'配置值'
+    'DB_TYPE'       => 'mysql', //分布式数据库类型必须相同
+    'DB_HOST'       => 'localhost',
+    'DB_NAME'       => 'words', //如果相同可以不用定义多个
+    'DB_USER'       => 'root',
+    'DB_PWD'        => 'KeYpZrZx',
+    'DB_PORT'       => '3306',
+    'DB_PREFIX'     => 't_',
+
+    'URL_CASE_INSENSITIVE'=>true,//设置url区分大小写
+
+    'TMPL_L_DELIM'          =>  '<{',// 模板引擎普通标签开始标记
+    'TMPL_R_DELIM'          =>  '}>',// 模板引擎普通标签结束标记
+
+    /* 'HTML_CACHE_ON' =>true,
+    'HTML_CACHE_TIME'   =>    86400,   // 全局静态缓存有效期(秒)
+    'HTML_FILE_SUFFIX'  =>    '.htm', // 设置静态缓存文件后缀
+    'HTML_CACHE_RULES'  =>     array(
+        '*'=>array('{$_SERVER.REQUEST_URI|md5}')
+    ), */
+    
+    //验证码
+    'VERIFY_CODE'=>array(
+        'fontSize'    =>    50,    // 验证码字体大小
+        'length'      =>    4,     // 验证码位数
+        'useNoise'    =>    true, // 关闭验证码杂点
+    ),
+    
+    'WEB_HOST'=> 'http://www.hanlinyuanonline.com',
+    
+    'URL_HTML_SUFFIX'=>'',
+    'IMG_PATH'=>'./Uploads/img/',
+    'MUSIC_PATH'=>'./Uploads/music/',
+    
+    'TRANS' => 'http://dict-co.iciba.com/api/dictionary.php?key=293E92740629E0F44C315F64B9BDE4A6',
+);

+ 70 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/ActivityController.class.php

@@ -0,0 +1,70 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class ActivityController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $count = M('Activity')->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $list = M('Activity')->order('act_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$list);
+        $this->display();
+    }
+    
+    public function edit(){
+        $step = I('step','');
+        $actId = I('act_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($actId)){
+                $info = M('Activity')->where(array('act_id'=>$actId))->find();
+            }
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $saveData =[
+                'act_title'=>I('act_title',''),
+                'act_sort'=>I('act_sort','0'),
+                'act_pic'=>I('act_pic',''),
+                'act_name'=>I('act_name',''),
+                'act_content'=>I('act_content',''),
+            ] ;
+            if (empty($saveData['act_pic'])){
+                $this->error('图片不能为空');
+            }
+            if (empty($saveData['act_title'])){
+                $this->error('活动名称不能为空');
+            }
+            if (empty($saveData['act_name'])){
+                $this->error('出品方不能为空');
+            }
+            if ($actId){
+                M('Activity')->where(array('act_id'=>$actId))->save($saveData);
+            }else{
+                $saveData['operate_dt'] = time();
+                M('Activity')->add($saveData);
+            }
+            $this->success('操作成功','/admin/activity/index');
+        }
+    }
+    
+    public function status(){
+        $actId = I('act_id','');
+        $actStatus = I('act_status','');
+        M('Activity')->where(array('act_id'=>$actId))->save(['act_status'=>$actStatus]);
+        $this->success('操作成功','/admin/activity/index');
+    }
+    
+    //删除
+    public function del(){
+        $actId = I('act_id','');
+        M('Activity')->where(array('act_id'=>$actId))->delete();
+        $this->success('操作成功','/admin/activity/index');
+    }
+}

+ 144 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/AlarmController.class.php

@@ -0,0 +1,144 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class AlarmController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $page = I('get.p','1');
+        session('page',$page);
+        $condition = array('is_delete'=>1,'notice_flag'=>array('IN','5,6,7'));
+        $count = M('Notice')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $noticeList = M('Notice')->where($condition)->field()->order('notice_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        foreach($noticeList as $k=>$v){
+			$tmp=json_decode($v['extra'],1);
+			$wc_id=$tmp['wc_id'];
+			$checkinfo = M('words_check')->where(array('wc_id'=>$wc_id))->field('*')->find();
+			if($v['notice_flag']==5){
+				if($checkinfo['wc_status']==0){
+					$noticeList[$k]['status_info']='未处理';
+				}elseif($checkinfo['wc_status']==1){
+					$noticeList[$k]['status_info']='已通过';
+				}else{
+					$noticeList[$k]['status_info']='未通过';
+				}
+			}else{
+				$noticeList[$k]['status_info']='';
+			}
+			$noticeList[$k]['wc_info']=$checkinfo;
+			if($v['notice_read']==0){
+				$c=session('alarm');
+				$c--;
+				session('alarm',$c);
+				M('Notice')->where(array('notice_id'=>$v['notice_id']))->save(array('notice_read'=>1));
+			}
+		}
+		
+		$this->assign('page',$show);
+        $this->assign('list',$noticeList);
+        $this->display();
+    }
+    
+    public function refuse(){
+		$noticeId = I('notice_id','');
+		$this->assign('notice_id',$noticeId);
+        $this->display();
+	}
+	public function info(){
+		$noticeId = I('notice_id','');
+		$wordsKeys = array('n'=>'words_n','pron'=>'words_pron','adj'=>'words_adj','num'=>'words_num','v'=>'words_v','adv'=>'words_adv','art'=>'words_art',
+            'prep'=>'words_prep','conj'=>'words_conj','int'=>'words_int','vt'=>'words_vt','vi'=>'words_vi','other'=>'words_other',);
+        
+		if (empty($noticeId)){
+            $this->error("通知消息ID错误",'/admin/alarm/index');
+        }
+		$info = M('Notice')->where(array('notice_id'=>$noticeId))->find();
+		$tmp=json_decode($info['extra'],1);
+		$wc_id=$tmp['wc_id'];
+		$checkinfo = M('words_check')->where(array('wc_id'=>$wc_id))->field('*')->find();
+		if(!$checkinfo){
+			$this->error("审核信息错误",'/admin/alarm/index');
+		}
+		
+		$info = json_decode($checkinfo['wc_json'],1);
+		
+		$where=array();
+		$where['course_id']=$checkinfo['course_id'];
+		$where['words_id']=$checkinfo['words_id'];
+		
+        $info2 = M('Words')->where($where)->field('*')->find();
+		if(!$info2){
+			$this->error("原课程单词信息获取失败",'/admin/alarm/index');
+		}
+		$dif=array();
+		foreach($info as $k=>$v){
+			if(in_array($k,array('id','words_voice1','words_voice2')))continue;
+			if($v!=$info2[$k]){
+				$dif[]=$k;
+			}
+		}
+	
+		if($info['words_img']){
+				$arr=explode(',',$info['words_img']);
+				$info['words_img1']=$arr[0];
+				$info['words_img2']=$arr[1];
+				$info['words_img3']=$arr[2];
+		}
+        $this->assign('info',$info);
+		$this->assign('dif',$dif);
+		$this->assign('notice_id',$noticeId);
+		$this->assign('wordsKeys', $wordsKeys);
+		$this->assign('status', $checkinfo['wc_status']);
+		$this->assign('wc_content', $checkinfo['wc_content']);
+		
+		$this->display();
+	}
+    public function check(){
+        $noticeId = I('notice_id','');
+		$wc_status= I('wc_status','');
+		$wc_content = I('wc_content','');
+        if (empty($noticeId)){
+            $this->error("通知消息ID错误",'/admin/alarm/index');
+        }
+		$info = M('Notice')->where(array('notice_id'=>$noticeId))->find();
+		$tmp=json_decode($info['extra'],1);
+		$wc_id=$tmp['wc_id'];
+		$checkinfo = M('words_check')->where(array('wc_id'=>$wc_id))->field('*')->find();
+		M('words_check')->where(array('wc_id'=>$wc_id))->save(array('wc_status'=>$wc_status,'wc_content'=>$wc_content));
+        $saveData=json_decode($checkinfo['wc_json'],1);
+		$courseInfo = M('Course')->where(array('course_id'=>$saveData['course_id'],'is_delete'=>1))->field('course_id,user_id,course_name,course_num,course_status,course_source')->find();
+    
+		if($wc_status==1){
+			if($checkinfo['words_id']){
+				M('Words')->where(array('words_id'=>$checkinfo['words_id']))->save($saveData);
+			}
+			$Content="亲爱的小主,您提交的关于课程《".$courseInfo['course_name']."》的修改,作者已同意修改,并已更新课程内容";
+			$temp=array();
+			$temp['wc_id']=$checkinfo['wc_id'];
+			M('Notice')->add(array('ref_user_id'=>$checkinfo['user_id'],'user_id'=>$this->userId,'notice_flag'=>6,'notice_status'=>1,'notice_type'=>0,'notice_title'=>'课程修改审核通过','notice_content'=>$Content,'operate_dt'=>time(),'extra'=>json_encode($temp)));
+			M('User')->where(array('user_id'=>$checkinfo['user_id']))->setInc('sys_notice');
+			$data = json_encode(array('type'=>0,'msg'=>$Content,'data'=>array('title'=>"课程修改审核通过",'wc_id'=>$checkinfo['wc_id'],'course_id'=>$saveData['course_id'],'words_id'=>$saveData['words_id'],'content'=>$Content)));
+			
+		}else{
+			$Content="亲爱的小主,您提交的关于课程《".$courseInfo['course_name']."》的修改,作者拒绝修改,拒绝原因:".$wc_content;
+			$temp=array();
+			$temp['wc_id']=$checkinfo['wc_id'];
+			M('Notice')->add(array('ref_user_id'=>$checkinfo['user_id'],'user_id'=>$this->userId,'notice_flag'=>7,'notice_status'=>1,'notice_type'=>0,'notice_title'=>'课程修改审核不通过','notice_content'=>$Content,'operate_dt'=>time(),'extra'=>json_encode($temp)));
+			M('User')->where(array('user_id'=>$checkinfo['user_id']))->setInc('sys_notice');
+			$data = json_encode(array('type'=>0,'msg'=>$Content,'data'=>array('title'=>"课程修改审核不通过",'wc_id'=>$checkinfo['wc_id'],'course_id'=>$saveData['course_id'],'words_id'=>$saveData['words_id'],'content'=>$Content)));	
+		}
+		$uid=$checkinfo['user_id'];
+		$url="http://www.hanlinyuanonline.com/api/choice/push?uid=".$uid."&data=".urlencode(base64_encode(json_encode($data)));
+		$ch = curl_init(); 
+		curl_setopt($ch, CURLOPT_URL, $url); 
+		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
+		$output = curl_exec($ch); 
+		curl_close($ch); 
+        $this->success('消息处理成功','/admin/alarm/index');
+    }
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 168 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/ChoiceController.class.php


Diferenças do arquivo suprimidas por serem muito extensas
+ 266 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/CourseController.class.php


+ 80 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/CoursetypeController.class.php

@@ -0,0 +1,80 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class CoursetypeController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    //课程类型列表
+    public function index(){
+        $page = I('get.p','1');
+        session('page',$page);
+        $res = M('CourseType')->select();
+        foreach ($res as $r){
+            $typeNum = M('Course')->where(array('course_type'=>$r['type_id']))->count();
+            M('CourseType')->where(array('type_id'=>$r['type_id']))->save(array('type_num'=>$typeNum));
+        }
+        $count = M('CourseType')->where(array('is_delete'=>1))->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $typeList = M('CourseType')->where(array('is_delete'=>1))->field()->order('type_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$typeList);
+        $this->display();
+    }
+    //课程类型编辑
+    public function edit(){
+        $step = I('step','');
+        $typeId = I('type_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($typeId)){
+                $info = M('CourseType')->where(array('type_id'=>$typeId))->find();
+            }
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $typeName = I('type_name','');
+            if (mb_strlen($typeName,'UTF8')<2 || mb_strlen($typeName,'UTF8')>12){
+                $this->error('课程类型名称2到12个汉字');
+            }
+            $res = M('CourseType')->where(array('type_name'=>$typeName,'is_delete'=>1))->find();
+            if ($res!=NULL){
+                $this->error('课程类型名称已经存在');
+            }
+            if ($typeId){
+                M('CourseType')->where(array('type_id'=>$typeId))->save(array('type_name'=>$typeName));
+            }else{
+                M('CourseType')->add(array('type_name'=>$typeName,'operate_dt'=>time()));
+            }
+            $this->success('课程类型操作成功','/admin/coursetype/index');
+        }
+    }
+    //删除
+    public function del(){
+        $typeId = I('type_id','');
+        if (!$typeId){
+            $this->error('课程类型ID错误');
+        }
+        //M('CourseType')->where(array('type_id'=>$typeId))->save(array('is_delete'=>2));
+        M('CourseType')->where(array('type_id'=>$typeId))->delete();
+        $this->success('课程类型操作成功','/admin/coursetype/index');
+    }
+    //分类下课程列表
+    public function course(){
+        $typeId = I('type_id','');
+        if (!$typeId){
+            $this->error('课程类型ID错误');
+        }
+        $condition = array('is_delete'=>1,'course_type'=>$typeId,'course_source'=>1);
+        $count = M('Course')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $courseList = M('Course')->where($condition)->field()->order('course_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$courseList);
+        $this->display('User/course');
+    }
+}

+ 51 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/FeedbackController.class.php

@@ -0,0 +1,51 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class FeedbackController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    public function index(){
+        $fbStatus = I('fb_status');
+        if (empty($fbStatus)){
+            $count = M('Feedback')->where(array('is_delete'=>1,'fb_source'=>1))->count();
+        }else{
+            $count = M('Feedback')->where(array('is_delete'=>1,'fb_source'=>1,'fb_status'=>$fbStatus,))->count();
+        }
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        if (empty($fbStatus)){
+            $fbList = D('Feedback')->getFbList(array('fb_source'=>1),$Page->firstRow, $Page->listRows);
+        }else{
+            $fbList = D('Feedback')->getFbList(array('fb_source'=>1,'fb_status'=>$fbStatus,),$Page->firstRow, $Page->listRows);
+        }
+        $this->assign('page',$show);
+        $this->assign('list',$fbList);
+        $this->assign('fbStatus',$fbStatus);
+        $this->display();
+    }
+    
+    public function sys(){
+        $page = I('get.p','1');
+        session('page',$page);
+        $count = M('Feedback')->where(array('is_delete'=>1,'fb_source'=>2))->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $fbList = D('Feedback')->getFbSysList(array('fb_source'=>2),$Page->firstRow, $Page->listRows);
+        
+        $this->assign('page',$show);
+        $this->assign('list',$fbList);
+        $this->display();
+    }
+    
+    public function status(){
+        $fbId = I('fb_id','');
+        if (empty($fbId)){
+            $this->error("反馈ID错误",'/admin/feedback/index');
+        }
+        M('Feedback')->where(array('fb_id'=>$fbId))->save(array('fb_status'=>2));
+        $this->success('反馈状态修改成功','/admin/feedback/index');
+    }
+}

+ 122 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/GoodController.class.php

@@ -0,0 +1,122 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class GoodController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $sort = I('sort','1');
+        $orderList = array(
+            1=>array('good_id desc','时间倒序',1),
+            2=>array('good_id asc','时间正序',2),
+            3=>array('course_join desc','加入量倒序',3),
+            4=>array('course_join asc','加入量正序',4),
+            5=>array('course_join desc','排序id倒序',5),
+            6=>array('course_join asc','排序id正序',6),
+        );
+        $orderby = $orderList[$sort][0];
+        $condition = array('course_flag'=>1);
+        $count = M('GoodCourse')->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $field = 'gc.*,c.course_name,c.course_num,c.course_join,u.user_name';
+        $join = 'gc LEFT JOIN t_course c ON gc.course_id=c.course_id LEFT JOIN t_user u ON c.user_id=u.user_id';
+        $res = M('GoodCourse')->join($join)->where($condition)->field($field)->order($orderby)->limit($Page->firstRow.','.$Page->listRows)->select();
+
+        $resShow = M('GoodCourseShow')->find();
+        
+        $this->assign('page',$show);
+        $this->assign('list',$res);
+        $this->assign('sort',$sort);
+        $this->assign('orderby',$orderby);
+        $this->assign('resShow',$resShow);
+        $this->assign('orderList',$orderList);
+        $this->display();
+    }
+    
+    public function add(){
+        $step = I('step');
+        if (empty($step)){
+            $sort = I('sort','1');
+            $orderList = array(
+                1=>array('good_id desc','时间倒序',1),
+                2=>array('good_id asc','时间正序',2),
+                3=>array('course_join desc','加入量倒序',3),
+                4=>array('course_join asc','加入量正序',4),
+                5=>array('course_join desc','排序id倒序',5),
+                6=>array('course_join asc','排序id正序',6),
+            );
+            $orderby = $orderList[$sort][0];
+            $condition = array('course_flag'=>1,'course_status'=>3);
+            $count = M('GoodCourse')->count();
+            //分页
+            $Page = new \Think\Page($count);
+            $show = $Page->show();
+            $field = 'gc.good_id,c.course_id,c.course_name,c.course_num,c.course_join,u.user_name';
+            $join = 'c LEFT JOIN t_good_course gc ON gc.course_id=c.course_id LEFT JOIN t_user u ON c.user_id=u.user_id';
+            $res = M('Course')->join($join)->where($condition)->field($field)->order($orderby)->limit($Page->firstRow.','.$Page->listRows)->select();
+            
+            //echo D('Course')->getLastSql();exit;
+            $this->assign('page',$show);
+            $this->assign('list',$res);
+            $this->assign('sort',$sort);
+            $this->assign('orderby',$orderby);
+            $this->assign('orderList',$orderList);
+            $this->display();
+        }else if($step==2){
+            $courseIdArr = I('course_id');
+            if (empty($courseIdArr)){
+                $this->error('请选择需要添加的课程');
+            }
+            foreach ($courseIdArr as $courseId){
+                $dataList[] = array('course_id'=>$courseId,'operate_dt'=>time());
+            }
+            M('GoodCourse')->addAll($dataList);
+            $this->success('添加成功');
+        }
+    }
+    
+    public function del(){
+        $goodId = I('good_id');
+        if (empty($goodId)){
+            $this->error('请选择需要删除的课程');
+        }
+        M('GoodCourse')->where(array('good_id'=>$goodId))->delete();
+        $this->success('删除成功');
+    }
+    
+    public function edit(){
+        $step = I('step');
+        $goodId = I('good_id');
+        if (empty($step)){
+            if (empty($goodId)){
+                $this->error('请选择需要删除的课程');
+            }
+            $info = M('GoodCourse')->where(array('good_id'=>$goodId))->find();
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $goodSort = I('good_sort');
+            $courseInfo = I('course_info');
+            if ($goodSort<=0){
+                $this->error('排序id错误');
+            }
+            if (!empty($courseInfo)){
+                if (mb_strlen($courseInfo,'UTF8')<2 || mb_strlen($courseInfo,'UTF8')>140){
+                    $this->error('介绍说明2到140个汉字');
+                }
+            }
+            M('GoodCourse')->where(array('good_id'=>$goodId))->save(array('good_sort'=>$goodSort,'course_info'=>$courseInfo,));
+            $this->success('编辑成功','/admin/good/index');
+        }
+    }
+    
+    public function status(){
+        $goodShow = I('good_show');
+        M('GoodCourseShow')->where(array('show_id'=>1))->save(array('good_show'=>$goodShow));
+        $this->success('推送设置成功','/admin/good/index');
+    }
+}

+ 108 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/IndexController.class.php

@@ -0,0 +1,108 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class IndexController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    public function index() {
+		
+		
+        $flag = I('flag',1);
+        $dayType = I('day_type',3);
+        $startDate = I('start_date');
+        $endDate = I('end_date');
+        $dayList = array(
+            1=>array('startDate'=>date('Y-m-d'),'endDate'=>date('Y-m-d',strtotime('+1 day'))),
+            2=>array('startDate'=>date('Y-m-d',strtotime('-1 day')),'endDate'=>date('Y-m-d')),
+            3=>array('startDate'=>date('Y-m-d',strtotime('-7 day')),'endDate'=>date('Y-m-d')),
+            4=>array('startDate'=>date('Y-m-d',strtotime('-30 day')),'endDate'=>date('Y-m-d')),
+        );
+        if (empty($startDate)||empty($endDate)){
+            $startDate = $dayList[$dayType]['startDate'];
+            $endDate = $dayList[$dayType]['endDate'];
+        }
+        if ($flag==1){
+            $startDate = $dayList[$dayType]['startDate'];
+            $endDate = $dayList[$dayType]['endDate'];
+        }
+        
+        $startTime = strtotime($startDate);
+        $endTime = strtotime($endDate);
+        if ($endTime<2){
+            $this->error('结束时间错误');
+        }
+        //统计全部
+        $info = M('Sta')->field('sum(sta_reg) reg,sum(sta_normal) normal,sum(sta_rank) rank,sum(sta_pve) pve')->find();
+        //分天统计
+        $condition = array('operate_dt'=>array('BETWEEN',array($startTime,$endTime+1)));
+        $staRes = M('Sta')->where($condition)->field('sta_reg, sta_normal, sta_rank, sta_pve, operate_dt')->select();
+        foreach ($staRes as $row){
+            $staList[$row['operate_dt']] = array('reg'=>$row['sta_reg'], 'normal'=>$row['sta_normal'], 'rank'=>$row['sta_rank'], 'pve'=>$row['sta_pve']);
+        }
+        $xAxis = '';
+        $yAxisReg = '';
+        $yAxisPve = '';
+        $yAxisRank = '';
+        $yAxisNormal = '';
+        for($i=$startTime;$i<=$endTime;$i=$i+86400){
+            $xAxis .= "'".date('md',$i)."',";
+            if (isset($staList[$i])){
+                $yAxisPve .= $staList[$i]['pve'].',';
+                $yAxisReg .= $staList[$i]['reg'].',';
+                $yAxisRank .= $staList[$i]['rank'].',';
+                $yAxisNormal .= $staList[$i]['normal'].',';
+            }else{
+                $yAxisPve .= '0,';
+                $yAxisReg .= '0,';
+                $yAxisRank .= '0,';
+                $yAxisNormal .= '0,';
+            }
+        }
+        $xAxis = substr($xAxis, 0, -1);
+        $yAxisPve = substr($yAxisPve, 0, -1);
+        $yAxisReg = substr($yAxisReg, 0, -1);
+        $yAxisRank = substr($yAxisRank, 0, -1);
+        $yAxisNormal = substr($yAxisNormal, 0, -1);
+        $this->assign('info',$info);
+        $this->assign('xAxis', $xAxis);
+        $this->assign('yAxisPve',$yAxisPve);
+        $this->assign('yAxisReg', $yAxisReg);
+        $this->assign('yAxisRank', $yAxisRank);
+        $this->assign('yAxisNormal', $yAxisNormal);
+        $this->assign('dayType', $dayType);
+        $this->assign('endDate',$endDate);
+        $this->assign('startDate',$startDate);
+        $this->display();
+    }
+    
+    public function pwd(){
+        $step = I('step','');
+        $adminId = session('admin_id');
+        $info = M('Admin')->where(array('admin_id'=>$adminId))->field('admin_account,admin_pwd')->find();
+        if (empty($step)){
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $oldPwd = I('old_pwd');
+            $newPwd = I('new_pwd');
+            $newRepwd = I('new_repwd');
+            if (mb_strlen($oldPwd,'UTF8')<6 || mb_strlen($oldPwd,'UTF8')>20){
+                $this->error('旧密码长度6到20之间');
+            }
+            if (mb_strlen($newPwd,'UTF8')<6 || mb_strlen($newPwd,'UTF8')>20){
+                $this->error('新密码长度6到20之间');
+            }
+            if ($newPwd!==$newRepwd){
+                $this->error('两次输入的新密码不一致,请重新输入');
+            }
+            if ($info!=NULL && $info['admin_pwd']!=md5($info['admin_pwd'])){
+                $this->error('输入的原密码有误,请重新输入');
+            }
+            M('Admin')->where(array('admin_id'=>$adminId))->save(array('admin_pwd'=>md5($newPwd)));
+            $this->success('修改密码成功','/admin/index/index');
+        }
+    }
+    
+
+}

+ 69 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/LoginController.class.php

@@ -0,0 +1,69 @@
+<?php
+namespace Admin\Controller;
+use Think\Controller;
+class LoginController extends Controller {
+    public function index(){
+        $step = I('post.step','');
+        if (empty($step)){
+            $this->display();
+        }else if($step==2){
+            $admin_account = I('post.admin_account','');
+            $admin_pwd = I('post.admin_pwd','');
+            $admin_code = I('post.admin_code','');
+            if ($this->checkVerify($admin_code)=== false){
+                $this->error("验证码错误",'/admin/login/index');
+            }
+            $adminInfo = M('Admin')->where("admin_account='".$admin_account."'")->find();
+            if ($adminInfo==NULL || $adminInfo['admin_pwd']!=md5($admin_pwd)){
+				$info = M('User')->where(array('user_phone'=>$admin_account))->field('user_id,user_phone,user_intro,user_pwd,user_name,user_level,user_sex,user_icon,zan_notice,friend_notice,sys_notice,user_city,user_province,user_birthdate,user_score,access_token,operate_dt,unionid,fbid,imei')->find();
+				if ($info==NULL){
+					$this->error("用户名或密码错误",'/admin/login/index');
+				}
+				if ($info['user_pwd']!=md5($admin_pwd)){
+					$this->error("用户名或密码错误",'/admin/login/index');
+				}
+				$adminInfo = M('Admin')->where("admin_id='".$info['admin_id']."'")->find();
+				if(!$adminInfo){
+					$this->error("登陆异常",'/admin/login/index');
+				}
+                
+            }
+			$condition=array('notice_flag'=>array('IN','5,6,7'),'notice_read'=>0);
+			$count = M('notice')->where($condition)->count();
+			session('alarm',$count);
+			session('admin_id',$adminInfo['admin_id']);
+			session('admin_account',$adminInfo['admin_account']);
+			session('group_id',$adminInfo['group_id']);
+			if($adminInfo['admin_id']!=1){
+				$this->success("登录成功",'/admin/course/index');
+			}else{
+				$this->success("登录成功",'/admin/index/index');
+			}
+			
+        }
+    }
+    
+    public function logout(){
+        session(null);
+        $this->error("退出成功",'/admin/login/index');
+    }
+    /**
+     * 验证码
+     */
+    public function code(){
+        $config =  C('VERIFY_CODE');
+        $Verify =     new \Think\Verify($config);
+        // 设置验证码字符为纯数字
+        //$Verify->codeSet = '0123456789';
+        // 开启验证码背景图片功能
+        $Verify->useImgBg = true;
+        //verify_code
+        $Verify->entry();
+    }
+    
+    // 检测输入的验证码是否正确,$code为用户输入的验证码字符串
+    private function checkVerify($code, $id = ''){
+        $verify = new \Think\Verify();
+        return $verify->check($code, $id);
+    }
+}

+ 64 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/ManagerController.class.php

@@ -0,0 +1,64 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class ManagerController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $keyword = I('get.keyword','');
+        $condition = array();
+        if (!empty($keyword)){
+            $condition['admin_account'] = array('LIKE','%'.$keyword.'%');
+            $this->assign('keyword',$keyword);
+        }
+        $count = M('Admin')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $userList = M('Admin')->where($condition)->field()->order('admin_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$userList);
+        $this->display();
+    }
+    
+    public function edit(){
+        $step = I('step','');
+        if (empty($step)){
+            $this->display();
+        }else if($step==2){
+            $adminAccount = I('admin_account');
+            $newPwd = I('new_pwd');
+            $newRepwd = I('new_repwd');
+            $groupId = I('group_id');
+            if (mb_strlen($adminAccount,'UTF8')<6 || mb_strlen($adminAccount,'UTF8')>20){
+                $this->error('用户名长度6到20之间');
+            }
+            if (mb_strlen($newPwd,'UTF8')<6 || mb_strlen($newPwd,'UTF8')>20){
+                $this->error('新密码长度6到20之间');
+            }
+            if ($newPwd!==$newRepwd){
+                $this->error('两次输入的新密码不一致,请重新输入');
+            }
+            $info = M('Admin')->where(array('admin_account'=>$adminAccount))->field('admin_id')->find();
+            if ($info!=NULL){
+                $this->error('用户名已经存在');
+            }
+            $saveData = array(
+                'admin_account'=>$adminAccount,
+                'admin_pwd'=>md5($newPwd),
+                'group_id'=>$groupId,
+                'operate_dt'=>time(),
+            );
+            M('Admin')->add($saveData);
+            $this->success('创建账号成功','/admin/manager/index');
+        }
+    }
+    
+    public function del(){
+        $adminId = I('admin_id');
+        M('Admin')->where(array('admin_id'=>$adminId))->delete();
+        $this->success('删除成功','/admin/manager/index');
+    }
+}

+ 118 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/NotepadController.class.php

@@ -0,0 +1,118 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class NotepadController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    //自由记列表
+    public function index(){
+        $sort = I('sort','1');
+        $courseStatus = I('course_status','');
+        $keyword = I('get.keyword','');
+        $condition = array('is_delete'=>1,'course_flag'=>2,'course_source'=>1);
+        $orderList = array(
+            1=>array('operate_dt desc','时间倒序',1),
+            2=>array('operate_dt asc','时间正序',2),
+            3=>array('course_join desc','加入量倒序',3),
+            4=>array('course_join asc','加入量倒序',4),
+        );
+        $statusList = array('全部状态','未上架',3=>'已上架');
+        $orderby = $orderList[$sort][0];
+        if (!empty($keyword)){
+            $condition['course_id|course_name'] = array('LIKE','%'.$keyword.'%');
+        }
+        if (!empty($courseStatus)){
+            $condition['course_status'] = $courseStatus;
+        }
+        $this->assign('sort',$sort);
+        $this->assign('orderby',$orderby);
+        $this->assign('keyword',$keyword);
+        $this->assign('orderList',$orderList);
+        $this->assign('statusList',$statusList);
+        $this->assign('courseStatus',$courseStatus);
+        
+        $count = M('Course')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $courseList = M('Course')->where($condition)->field()->order($orderby)->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$courseList);
+        $this->display();
+    }
+    
+    //编辑自由记
+    public function edit(){
+        $step = I('step','');
+        $courseId = I('course_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($courseId)){
+                $info = M('Course')->where(array('course_id'=>$courseId))->find();
+            }
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $courseName = I('course_name','');
+            $courseContent = I('course_content','');
+            if (mb_strlen($courseName,'UTF8')<2 || mb_strlen($courseName,'UTF8')>40){
+                $this->error('自由记名称2到40个汉字');
+            }
+            if (mb_strlen($courseContent,'UTF8')<2 || mb_strlen($courseContent,'UTF8')>10000){
+                $this->error('自由记名称2到10000个汉字');
+            }
+            
+            $res = M('Course')->where(array('course_name'=>$courseName,'is_delete'=>1))->field('course_id')->find();
+            //新增
+            if (empty($courseId) && $res!=NULL){
+                $courseName = $this->getNotepadName($courseName);
+            }
+            //更新
+            if (!empty($courseId) && $courseId!=$res['course_id']){
+                $courseName = $this->getNotepadName($courseName);
+            }
+            if (empty($courseId)){
+                M('Course')->add(array('course_content'=>$courseContent,'course_name'=>$courseName,'course_source'=>1,'course_flag'=>2,'operate_dt'=>time()));
+            }else{
+                M('Course')->where(array('course_id'=>$courseId))->save(array('course_content'=>$courseContent,'course_name'=>$courseName));
+            }
+            $this->success('自由记操作成功','/admin/notepad/index');
+        }
+    }
+    
+    //获取课程名称相同时,新的课程名称
+    private function getNotepadName($courseName){
+        $course = M('Course')->where(array('course_name'=>$courseName,'is_delete'=>1))->field('course_id')->find();
+        $res = M('TitleNum')->where(array('title_name'=>$courseName,'title_source'=>2))->field('title_id,title_num')->find();
+        if ($res!=NULL){
+            $courseName = $courseName.'('.($res['title_num']+1).')';
+            M('TitleNum')->where(array('title_id'=>$res['title_id']))->setInc('title_num');
+        }else if($course!=NULL){
+            $courseName = $courseName.'('.($res['title_num']+1).')';
+            M('TitleNum')->add(array('title_name'=>$courseName,'operate_dt'=>time()));
+            //$courseName = $courseName;
+        }
+        return $courseName;
+    }
+    
+    public function del(){
+        $courseId = I('course_id','');
+        if (empty($courseId)){
+            $this->error("自由记ID错误",'/admin/notepad/index');
+        }
+        //M('Course')->where(array('course_id'=>$courseId))->save(array('is_delete'=>2));
+        M('Course')->where(array('course_id'=>$courseId))->delete();
+        $this->success('自由记删除成功','/admin/notepad/index');
+    }
+    
+    public function status(){
+        $courseId = I('course_id','');
+        $courseStatus = I('course_status','');
+        if (empty($courseId)){
+            $this->error("自由记ID错误",'/admin/notepad/index');
+        }
+        M('Course')->where(array('course_id'=>$courseId))->save(array('course_status'=>$courseStatus));
+        $this->success('自由记状态修改成功','/admin/notepad/index');
+    }
+}

+ 87 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/NoticeController.class.php

@@ -0,0 +1,87 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class NoticeController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $page = I('get.p','1');
+        session('page',$page);
+        $condition = array('is_delete'=>1,'user_id'=>0);
+        $count = M('Notice')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $noticeList = M('Notice')->where($condition)->field()->order('notice_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$noticeList);
+        $this->display();
+    }
+    
+    public function edit(){
+        $step = I('step','');
+        $noticeId = I('notice_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($noticeId)){
+                $info = M('Notice')->where(array('notice_id'=>$noticeId))->find();
+            }
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $userIdArr = array();
+            $userType = I('user_type','');
+            $refUserId = I('ref_user_id','');
+            $refUserId = str_replace(',', ',', $refUserId);
+            $refUserId = trim($refUserId,',');
+            if ($userType==2){
+                if (empty($refUserId)){
+                    $this->error('用户id不能为空');
+                }
+                $userIdArr = explode(',', $refUserId);
+                $userInfo = M('User')->where(array('user_id'=>array('IN',$userIdArr)))->field('user_id')->select();
+                if (function_exists('array_column')){
+                    $userIdDbArr = array_column($userInfo, 'user_id');
+                }else{
+                    foreach ($userInfo as $r){
+                        $userIdDbArr[] = $r['user_id'];
+                    }
+                }
+                if (count($userIdArr)!=count($userIdDbArr)){
+                    $userIdDiff = array_diff($userIdArr, $userIdDbArr);
+                    $userIdDiffStr = implode(',', $userIdDiff);
+                    $this->error('您输入的“'.$userIdDiffStr.'”未找到相关用户id信息,请仔细核实后提交。');
+                }
+            }
+            $noticeContent = I('notice_content','');
+            if (mb_strlen($noticeContent,'UTF8')<2 || mb_strlen($noticeContent,'UTF8')>500){
+                $this->error('通知消息2到500个汉字');
+            }
+            
+            if (empty($noticeId)){
+                if ($userType==2){
+                    M('Notice')->add(array('notice_content'=>$noticeContent,'notice_title'=>'系统消息','ref_user_id'=>$refUserId,'user_id'=>0,'operate_dt'=>time()));
+                    M('User')->where(array('user_id'=>array('IN',$userIdArr),'is_delete'=>1))->setInc('sys_notice');
+                }else{
+                    M('Notice')->add(array('notice_content'=>$noticeContent,'notice_title'=>'系统消息','user_id'=>0,'operate_dt'=>time()));
+                    M('User')->where(array('is_delete'=>1))->setInc('sys_notice');
+                }
+            }else{
+                M('Notice')->where(array('notice_id'=>$noticeId))->save(array('notice_content'=>$noticeContent));
+            }
+            $this->success('通知消息操作成功','/admin/notice/index');
+        }
+    }
+    
+    public function del(){
+        $noticeId = I('notice_id','');
+        if (empty($noticeId)){
+            $this->error("通知消息ID错误",'/admin/notice/index');
+        }
+        //M('Notice')->where(array('notice_id'=>$noticeId))->save(array('is_delete'=>2));
+        M('Notice')->where(array('notice_id'=>$noticeId))->delete();
+        $this->success('通知消息删除成功','/admin/notice/index');
+    }
+}

+ 74 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/SliderController.class.php

@@ -0,0 +1,74 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class SliderController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $count = M('Slider')->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $list = M('Slider')->order('slider_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$list);
+        $this->display();
+    }
+    
+    public function edit(){
+        $step = I('step','');
+        $sliderId = I('slider_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($sliderId)){
+                $info = M('Slider')->where(array('slider_id'=>$sliderId))->find();
+            }
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $saveData =[
+                'link_url'=>I('link_url',''),
+                'slider_sort'=>I('slider_sort','0'),
+                'slider_pic'=>I('slider_pic',''),
+            ] ;
+            if (empty($saveData['slider_pic'])){
+                $this->error('Banner图片不能为空');
+            }
+            if ($sliderId){
+                M('Slider')->where(array('slider_id'=>$sliderId))->save($saveData);
+            }else{
+                $saveData['operate_dt'] = time();
+                M('Slider')->add($saveData);
+            }
+            $this->success('操作成功','/admin/slider/index');
+        }
+    }
+    
+    //删除
+    public function del(){
+        $sliderId = I('slider_id','');
+        M('Slider')->where(array('slider_id'=>$sliderId))->delete();
+        $this->success('操作成功','/admin/slider/index');
+    }
+    
+    public function upload(){
+        $upload = new \Think\Upload();// 实例化上传类
+        $upload->maxSize = 10485760;// 设置附件上传大小
+        $upload->exts = array('jpg', 'gif', 'png', 'jpeg');// 设置附件上传类型
+        $upload->rootPath = './Uploads/'; // 设置附件上传根目录
+        $upload->savePath = ''; // 设置附件上传(子)目录
+        // 上传文件
+        $info = $upload->upload();
+        if (!$info) {// 上传错误提示错误信息
+            //$this->error($upload->getError());
+            $this->ajaxReturn(['code' => 1, 'msg' => $upload->getError()]);
+        } else {// 上传成功 获取上传文件信息
+            $file = array_pop($info);
+            $filePath = C('WEB_HOST').'/Uploads/'.$file['savepath'].$file['savename'];
+            $this->ajaxReturn(['code' => 0, 'info' => '', 'path' => $filePath]);
+        }
+        
+    }
+}

+ 58 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/SoftController.class.php

@@ -0,0 +1,58 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class SoftController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    public function index(){
+        $os  = I('os');
+        $condition = array();
+        if (!empty($os)){
+            $condition['os'] = $os;
+        }
+        $count = M('Soft')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $softList = M('Soft')->where($condition)->field()->order('soft_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$softList);
+        $this->display();
+    }
+    
+    public function edit(){
+        $step = I('step','');
+        $softId = I('soft_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($softId)){
+                $info = M('Soft')->where(array('soft_id'=>$softId))->find();
+            }
+            $this->assign('info',$info);
+            $this->display();
+        }else if($step==2){
+            $data['os'] = I('os');
+            $data['force_up'] = I('force_up');
+            $data['new_ver'] = I('new_ver');
+            $data['up_info'] = I('up_info');
+            $data['url'] = I('app_url');
+            if (empty($data['up_info'])){
+                $this->error('更新内容不能为空');
+            }
+            if (empty($data['url'])){
+                $this->error('app链接不能为空');
+            }
+            if (empty($softId)){
+                $data['operate_dt'] = time();
+                M('Soft')->add($data);
+            }else{
+                M('Soft')->where(array('soft_id'=>$softId))->save($data);
+            }
+            $this->success('APP操作成功','/admin/soft/index');
+        }
+    }
+    
+    
+}

+ 214 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/SquareController.class.php

@@ -0,0 +1,214 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class SquareController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    public function course(){
+        $sort = I('sort','1');
+        $courseStatus = I('course_status','');
+        $keyword = I('get.keyword','');
+        $condition = array('course_flag'=>1);
+        $orderList = array(
+            1=>array('operate_dt desc','时间倒序',1),
+            2=>array('operate_dt asc','时间正序',2),
+            3=>array('course_join desc','加入量倒序',3),
+            4=>array('course_join asc','加入量倒序',4),
+        );
+        $statusList = array('全部状态',2=>'待审核',3=>'已上架',4=>'审核不通过');
+        $orderby = $orderList[$sort][0];
+        if (!empty($keyword)){
+            $condition['course_id|course_name'] = array('LIKE','%'.$keyword.'%');
+        }
+        if (!empty($courseStatus)){
+            $condition['course_status'] = $courseStatus;
+        }else{
+            $condition['course_status'] = array('IN','2,3,4');
+        }
+        $this->assign('sort',$sort);
+        $this->assign('orderby',$orderby);
+        $this->assign('keyword',$keyword);
+        $this->assign('orderList',$orderList);
+        $this->assign('statusList',$statusList);
+        $this->assign('courseStatus',$courseStatus);
+        $crons = $condition;
+        $crons['is_delete'] = 1;
+        $count = M('Course')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $courseList = D('Course')->getCourseList($condition,$Page->firstRow, $Page->listRows, $orderby);
+        $this->assign('page',$show);
+        $this->assign('list',$courseList);
+        $this->display();
+    }
+    
+    public function detailCourse(){
+        $courseId = I('course_id','');
+        if (empty($courseId) || $courseId<1000000){
+            $this->error("课程ID错误",'/admin/square/course');
+        }
+        $keyword = I('get.keyword','');
+        $condition = array('is_delete'=>1,'course_id'=>$courseId);
+        if (!empty($keyword)){
+            $condition['words_name'] = array('LIKE','%'.$keyword.'%');
+        }
+        $count = M('Words')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $wordsRes = M('Words')->where($condition)->field()->order('words_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $wordsList = array();
+        foreach ($wordsRes as $row){
+            $wordsList[] = array(
+                'words_id' => $row['words_id'],
+                'course_id' => $row['course_id'],
+                'words_name' => $row['words_name'],
+                'words_voice' => $row['words_voice'],
+                'words_read' => $row['words_read'],
+                'operate_dt' => $row['operate_dt'],
+                'words_text' => $this->getWordsText($row),
+            );
+        }
+        $this->assign('page',$show);
+        $this->assign('list',$wordsList);
+        $this->assign('keyword',$keyword);
+        $this->assign('courseId',$courseId);
+        $this->display('detailCourse');
+    }
+    
+    public function show(){
+        $wordsId = I('words_id','');
+        $wordsKeys = array('n'=>'words_n','pron'=>'words_pron','adj'=>'words_adj','num'=>'words_num','v'=>'words_v','adv'=>'words_adv','art'=>'words_art','prep'=>'words_prep','conj'=>'words_conj','int'=>'words_int','vt'=>'words_vt','vi'=>'words_vi',);
+        $info = array();
+        if (!empty($wordsId)){
+            $info = M('Words')->where(array('words_id'=>$wordsId))->find();
+        }
+        $this->assign('info',$info);
+        $this->assign('wordsKeys', $wordsKeys);
+        $this->display();
+    }
+    //修改课程状态
+    public function statusCourse(){
+        $courseId = I('course_id','');
+        $courseStatus = I('course_status','');
+        if (empty($courseId) || $courseId<1000000){
+            $this->error("课程ID错误",'/admin/square/course');
+        }
+        M('Course')->where(array('course_id'=>$courseId))->save(array('course_status'=>$courseStatus));
+        if ($courseStatus==3){
+            $info = M('Course')->where(array('course_id'=>$courseId))->find();
+            $noticeTitle = '上传课程审核已通过';
+            $noticeContent = '亲爱的小主,你上传至单词广场的《'.$info['course_name'].'》课程已审核通过,赶紧去单词广场查看下吧。';
+            M('Notice')->add(array('notice_title'=>$noticeTitle,'notice_content'=>$noticeContent,'ref_user_id'=>$info['user_id'],'user_id'=>0,'operate_dt'=>time()));
+            M('User')->where(array('user_id'=>$info['user_id'],'is_delete'=>1))->setInc('sys_notice');
+        }
+        $this->success('课程状态修改成功','/admin/square/course');
+    }
+    
+    //修改自由记
+    public function statusNotepad(){
+        $courseId = I('course_id','');
+        $courseStatus = I('course_status','');
+        if (empty($courseId) || $courseId<1000000){
+            $this->error("自由记ID错误",'/admin/square/notepad');
+        }
+        M('Course')->where(array('course_id'=>$courseId))->save(array('course_status'=>$courseStatus));
+        if ($courseStatus==3){
+            $info = M('Course')->where(array('course_id'=>$courseId))->find();
+            $noticeTitle = '上传自由记审核已通过';
+            $noticeContent = '亲爱的小主,你上传至单词广场的《'.$info['course_name'].'》自由记已审核通过,赶紧去单词广场查看下吧。';
+            M('Notice')->add(array('notice_title'=>$noticeTitle,'notice_content'=>$noticeContent,'ref_user_id'=>$info['user_id'],'user_id'=>0,'operate_dt'=>time()));
+            M('User')->where(array('user_id'=>$info['user_id'],'is_delete'=>1))->setInc('sys_notice');
+        }
+        $this->success('自由记状态修改成功','/admin/square/notepad');
+    }
+    
+    public function notepad(){
+        $sort = I('sort','1');
+        $courseStatus = I('course_status','');
+        $keyword = I('get.keyword','');
+        $condition = array('course_source'=>2,'couse_flag'=>2);
+        $orderList = array(
+            1=>array('operate_dt desc','时间倒序',1),
+            2=>array('operate_dt asc','时间正序',2),
+            3=>array('course_join desc','加入量倒序',3),
+            4=>array('course_join asc','加入量倒序',4),
+        );
+        $statusList = array('全部状态',2=>'待审核',3=>'已上架',4=>'审核不通过');
+        $orderby = $orderList[$sort][0];
+        if (!empty($keyword)){
+            $condition['course_id|course_name'] = array('LIKE','%'.$keyword.'%');
+        }
+        if (!empty($courseStatus)){
+            $condition['course_status'] = $courseStatus;
+        }else{
+            $condition['course_status'] = array('IN','2,3,4');
+        }
+        $this->assign('sort',$sort);
+        $this->assign('orderby',$orderby);
+        $this->assign('keyword',$keyword);
+        $this->assign('orderList',$orderList);
+        $this->assign('statusList',$statusList);
+        $this->assign('courseStatus',$courseStatus);
+
+        $crons = $condition;
+        $crons['is_delete'] = 1;
+        $count = M('Course')->where($crons)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $notepadList = D('Course')->getCourseList($condition,$Page->firstRow, $Page->listRows, $orderby);
+        $this->assign('page',$show);
+        $this->assign('list',$notepadList);
+        $this->display();
+    }
+    
+    public function detailNotepad(){
+        $courseId = I('course_id','');
+        $info = array();
+        if (!empty($courseId)){
+            $info = M('Course')->where(array('course_id'=>$courseId))->find();
+        }
+        $this->assign('info',$info);
+        $this->assign('courseId', $courseId);
+        $this->display();
+    }
+    
+    public function unpass(){
+        $step = I('step');
+        $courseId = I('course_id','');
+        if (empty($courseId) || $courseId<1000000){
+            $this->error("ID错误",$_SERVER['HTTP_REFERER']);
+        }
+        $info = M('Course')->where(array('course_id'=>$courseId))->find();
+        if (empty($step)){
+            $refererUrl = $_SERVER['HTTP_REFERER'];
+            if (empty($refererUrl)){
+                $refererUrl = '/admin/square/index';
+            }
+            $this->assign('info',$info);
+            $this->assign('courseId', $courseId);
+            $this->assign('refererUrl', $refererUrl);
+            $this->display();
+        }else if($step==2){
+            $refererUrl = I('refererUrl');
+            $courseReason = I('course_reason');
+            if (mb_strlen($courseReason,'UTF8')<3 || mb_strlen($courseReason,'UTF8')>50){
+                $this->error('未通过原因3到50个汉字');
+            }
+            M('Course')->where(array('course_id'=>$courseId))->save(array('course_reason'=>$courseReason,'course_status'=>4));
+            if ($info['course_flag']==1){
+                $noticeTitle = '上传课程审核不通过';
+                $noticeContent = '亲爱的小主,你上传至单词广场的《'.$info['course_name'].'》课程审核不通过,原因为:'.$courseReason.'。请修改后再重新上传。';
+            }else{
+                $noticeTitle = '上传自由记审核不通过';
+                $noticeContent = '亲爱的小主,你上传至单词广场的《'.$info['course_name'].'》自由记审核不通过,原因为:'.$courseReason.'。请修改后再重新上传。';
+            }
+            M('Notice')->add(array('notice_title'=>$noticeTitle,'notice_content'=>$noticeContent,'ref_user_id'=>$info['user_id'],'user_id'=>0,'operate_dt'=>time()));
+            M('User')->where(array('user_id'=>$info['user_id'],'is_delete'=>1))->setInc('sys_notice');
+            $this->success('审核未通过成功',$refererUrl);
+        }
+    }
+}

+ 171 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/StoreController.class.php

@@ -0,0 +1,171 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class StoreController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    //题库列表
+    public function index(){
+        $condition = array('is_delete'=>1);
+        //课程类型
+        $levelRes = M('UserLevel')->where(array('is_delete'=>1))->field('level_id,level_name')->select();
+        $levelList = array();
+        foreach ($levelRes as $type){
+            $levelList[$type['level_id']] = $type['level_name'];
+        }
+        $count = M('Store')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $storeList = M('Store')->where($condition)->field()->order('store_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$storeList);
+        $this->assign('levelList',$levelList);
+        $this->display();
+    }
+
+    //编辑题库
+    public function edit(){
+        $step = I('step','');
+        $storeId = I('store_id','');
+        if (empty($step)){
+            $info = array();
+            if (!empty($storeId)){
+                $info = M('Store')->where(array('store_id'=>$storeId))->find();
+            }
+            $levelList = M('UserLevel')->where(array('is_delete'=>1))->field('level_id,level_name')->select();
+            $this->assign('info',$info);
+            $this->assign('levelList',$levelList);
+            $this->display();
+        }else if($step==2){
+            $levelId = I('level_id','');
+            /* $storeName = I('store_name','');
+            if (mb_strlen($storeName,'UTF8')<2 || mb_strlen($storeName,'UTF8')>12){
+                $this->error('题库名称2到12个汉字');
+            }
+            $res = M('Store')->where(array('store_name'=>$storeName,'is_delete'=>1))->field('store_id')->find();
+            //新增
+            if (empty($storeId) && $res!=NULL){
+                $this->error('题库名称已经存在');
+            }
+            //更新
+            if (!empty($storeId) && $storeId!=$res['store_id']){
+                $this->error('题库名称已经存在');
+            } */
+            $res = M('Store')->where(array('level_id'=>$levelId,'is_delete'=>1))->field('store_id')->find();
+            //新增
+            if (empty($storeId) && $res!=NULL){
+                $this->error('题库类型已经存在');
+            }
+            //更新
+            if (!empty($storeId) && $storeId!=$res['store_id']){
+                $this->error('题库类型已经存在');
+            }
+            if (empty($storeId)){
+                //M('Store')->add(array('level_id'=>$levelId,'store_name'=>$storeName,'operate_dt'=>time()));
+                M('Store')->add(array('level_id'=>$levelId,'operate_dt'=>time()));
+            }else{
+                M('Store')->where(array('store_id'=>$storeId))->save(array('level_id'=>$levelId));
+            }
+            $this->success('题库操作成功','/admin/store/index');
+        }
+    }
+    
+    //删除题库
+    public function del(){
+        $storeId = I('store_id','');
+        if (empty($storeId)){
+            $this->error("题库ID错误",'/admin/store/index');
+        }
+        //M('store')->where(array('store_id'=>$storeId))->save(array('is_delete'=>2));
+        M('store')->where(array('store_id'=>$storeId))->delete();
+        $this->success('题库删除成功','/admin/store/index');
+    }
+    
+     //获取课程的单词列表
+    public function detail(){
+        $storeId = I('store_id','');
+        if (empty($storeId)){
+            $this->error("题库ID错误",'/admin/store/index');
+        }
+        $keyword = I('get.keyword','');
+        $condition = array('is_delete'=>1,'store_id'=>$storeId);
+        if (!empty($keyword)){
+            $condition['words_name'] = array('LIKE','%'.$keyword.'%');
+        }
+        $count = M('StoreWords')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $wordsRes = M('StoreWords')->where($condition)->field()->order('words_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $wordsList = array();
+        foreach ($wordsRes as $row){
+            $wordsList[] = array(
+                'words_id' => $row['words_id'],
+                'store_id' => $row['store_id'],
+                'words_name' => $row['words_name'],
+                'operate_dt' => $row['operate_dt'],
+                'words_text' => $this->getWordsText($row),
+            );
+        }
+        $this->assign('page',$show);
+        $this->assign('list',$wordsList);
+        $this->assign('storeId', $storeId);
+        $this->display();
+    }
+    
+    //编辑题库单词
+    public function words(){
+        $step = I('step','');
+        $wordsId = I('words_id','');
+        $storeId = I('store_id','');
+        $wordsKeys = array('n'=>'words_n','pron'=>'words_pron','adj'=>'words_adj','num'=>'words_num','v'=>'words_v','adv'=>'words_adv','art'=>'words_art','prep'=>'words_prep','conj'=>'words_conj','int'=>'words_int','vt'=>'words_vt','vi'=>'words_vi','other'=>'words_other',);
+        if (empty($step)){
+            $info = array();
+            if (!empty($storeId)){
+                $info = M('StoreWords')->where(array('words_id'=>$wordsId))->find();
+            }
+            $this->assign('info',$info);
+            $this->assign('storeId', $storeId);
+            $this->assign('wordsKeys', $wordsKeys);
+            $this->display();
+        }else if($step==2){
+            $data['store_id'] = $storeId;
+            $data['words_name'] = I('words_name','');
+            $wordsVals = array_values($wordsKeys);
+            $checkWords = true;
+            foreach ($wordsVals as $keys){
+                $data[$keys] = I($keys,'');
+                if (!empty($data[$keys])){
+                    $checkWords = false;
+                }
+            }
+            if (empty($data['words_name'])){
+                $this->error('单词不能为空');
+            }
+            if ($checkWords){
+                $this->error('中文释义不能为空');
+            }
+            $data['operate_dt'] = time();
+            if ($wordsId){
+                M('StoreWords')->where(array('words_id'=>$wordsId))->save($data);
+            }else{
+                M('StoreWords')->add($data);
+                M('Store')->where(array('store_id'=>$storeId))->setInc('store_num');
+            }
+            //$this->success('单词操作成功','/admin/store/detail?store_id='.$storeId);
+            $this->success('单词操作成功','/admin/store/words?store_id='.$storeId);
+        }
+    }
+    
+    //删除题库单词
+    public function delWords(){
+        $wordsId = I('words_id','');
+        $storeId = I('store_id','');
+        //M('StoreWords')->where(array('words_id'=>$wordsId))->save(array('is_delete'=>2));
+        M('StoreWords')->where(array('words_id'=>$wordsId))->delete();
+        M('Store')->where(array('store_id'=>$storeId))->setDec('store_num');
+        $this->success('题库单词删除成功','/admin/store/detail/index?store_id='.$storeId);
+    }
+}

+ 464 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/UeditorController.class.php

@@ -0,0 +1,464 @@
+<?php
+/**
+* 百度编辑器控制器
+*/
+namespace Admin\Controller;
+use Think\Controller;
+class UeditorController extends Controller{
+	
+	private $thumb;//缩略图模式(看手册)
+	private $water;	//是否加水印(0:无水印,1:水印文字,2水印图片)
+	private $waterText;//水印文字
+	private $waterPosition;//水印位置
+	private $savePath; //保存位置
+	private $userid; //操作用户名
+
+
+	public function _initialize(){
+		$this->userid=empty($_SESSION['userid'])? $_GET['userid'] : $_SESSION['userid'];
+		if(empty($this->userid)){
+			$this->userid= 'anonymity';
+		}
+
+		$this->rootPath= './Public/uploads/';
+		$this->savePath='';
+		$this->thumb=1;
+		$this->water=1;
+		$this->waterText='逐日软件';
+ 		$this->waterPosition= 9;
+	}
+
+	public function index(){
+		$CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents(CONF_PATH."config.json")), true);
+
+		$action = htmlspecialchars($_GET['action']);
+		switch ($action) {
+		    case 'config':
+		        $result =  json_encode($CONFIG);
+		        break;
+
+		    /* 上传图片 */
+		    case 'uploadimage':
+		        $config = array(
+		            "pathFormat" => $CONFIG['imagePathFormat'],
+		            "maxSize" => $CONFIG['imageMaxSize'],
+		            "allowFiles" => $CONFIG['imageAllowFiles']
+		        );
+		        $fieldName = $CONFIG['imageFieldName'];
+		        $result=$this->upFile($config, $fieldName);
+		        break;
+
+		    /* 上传涂鸦 */
+		    case 'uploadscrawl':
+		        $config = array(
+		            "pathFormat" => $CONFIG['scrawlPathFormat'],
+		            "maxSize" => $CONFIG['scrawlMaxSize'],
+		            "allowFiles" => $CONFIG['scrawlAllowFiles'],
+		            "oriName" => "scrawl.png"
+		        );
+		        $fieldName = $CONFIG['scrawlFieldName'];
+		        $base64 = "base64";
+		        $result=$this->upBase64($config,$fieldName);
+		        break;
+
+		    /* 上传视频 */
+		    case 'uploadvideo':
+		        $config = array(
+		            "pathFormat" => $CONFIG['videoPathFormat'],
+		            "maxSize" => $CONFIG['videoMaxSize'],
+		            "allowFiles" => $CONFIG['videoAllowFiles']
+		        );
+		        $fieldName = $CONFIG['videoFieldName'];
+		        $result=$this->upFile($config, $fieldName);
+		        break;
+
+		    /* 上传文件 */
+		    case 'uploadfile':
+		    // default:
+		        $config = array(
+		            "pathFormat" => $CONFIG['filePathFormat'],
+		            "maxSize" => $CONFIG['fileMaxSize'],
+		            "allowFiles" => $CONFIG['fileAllowFiles']
+		        );
+		        $fieldName = $CONFIG['fileFieldName'];
+		        $result=$this->upFile($config, $fieldName);
+		        break;
+
+		    /* 列出图片 */
+		    case 'listimage':
+			$allowFiles = $CONFIG['imageManagerAllowFiles'];
+			$listSize = $CONFIG['imageManagerListSize'];
+			$path = $CONFIG['imageManagerListPath'];
+			$get=$_GET;
+			$result =$this->file_list($allowFiles, $listSize, $get);
+		        	break;
+		    /* 列出文件 */
+		    case 'listfile':
+			$allowFiles = $CONFIG['fileManagerAllowFiles'];
+			$listSize = $CONFIG['fileManagerListSize'];
+			$path = $CONFIG['fileManagerListPath'];
+			$get=$_GET;
+			$result =$this->file_list($allowFiles, $listSize, $get);
+	    	            break;
+
+		    /* 抓取远程文件 */
+		    case 'catchimage':
+		    	$config = array(
+			    "pathFormat" => $CONFIG['catcherPathFormat'],
+			    "maxSize" => $CONFIG['catcherMaxSize'],
+			    "allowFiles" => $CONFIG['catcherAllowFiles'],
+			    "oriName" => "remote.png"
+			);
+			$fieldName = $CONFIG['catcherFieldName'];
+			/* 抓取远程图片 */
+			$list = array();
+			if (isset($_POST[$fieldName])) {
+			    $source = $_POST[$fieldName];
+			} else {
+			    $source = $_GET[$fieldName];
+			}
+			foreach ($source as $imgUrl) {
+			    $info=json_decode($this->saveRemote($config, $imgUrl),true);
+			    // dump($info);
+			    array_push($list, array(
+			        "state" => $info["state"],
+			        "url" => $info["url"],
+			        "size" => $info["size"],
+			        "title" => htmlspecialchars($info["title"]),
+			        "original" => htmlspecialchars($info["original"]),
+			        "source" => htmlspecialchars($imgUrl)
+			    ));
+			}
+
+			$result= json_encode(array(
+			    'state'=> count($list) ? 'SUCCESS':'ERROR',
+			    'list'=> $list
+			));
+		        break;
+
+		    default:
+		        $result = json_encode(array(
+		            'state'=> '请求地址出错'
+		        ));
+		        break;
+		}
+
+		/* 输出结果 */
+		if (isset($_GET["callback"])) {
+		    if (preg_match("/^[\w_]+$/", $_GET["callback"])) {
+		        echo htmlspecialchars($_GET["callback"]) . '(' . $result . ')';
+		    } else {
+		        echo json_encode(array(
+		            'state'=> 'callback参数不合法'
+		        ));
+		    }
+		} else {
+		    echo $result;
+		}
+
+	}
+	/**
+	     * 上传文件的主处理方法
+	     * @return mixed
+	     */
+	private function upFile($config,$fieldName){
+		$conf=array(
+			'rootPath' => $this->rootPath,
+			'savePath' => $this->savePath,
+			'autoSub' => true,
+			'subName'=>$this->userid . '/' . date('Ym',time()) ,// 子目录命名的规则为 用户名/年月/
+			'maxSize'=>$config['maxSize'],
+			'exts'=>$this->format_exts($config['allowFiles']),//去除扩展名前的点 .
+			);
+
+		$upload=new \Think\Upload($conf);
+		$info=$upload->uploadOne($_FILES[$fieldName]);
+		if($info){
+			$fname=$upload->rootPath .$info['savepath'].$info['savename'];
+			$imagearr = explode(',', 'jpg,gif,png,jpeg,bmp,ttf,tif'); 
+			$info['ext']= strtolower($info['ext']);
+
+			$isimage = in_array($info['ext'],$imagearr) ? 1 : 0;
+			if ($isimage) {
+				$image=new \Think\Image();
+				$image->Open($fname);
+				$image->thumb(680,680,$this->thumb)->save($fname);
+				if ($this->water==1) {
+					$image->text($this->waterText,'./Public/font/STXINGKA.TTF',18,'#9a9a9a',$this->waterPosition,array(-2,0))->save($fname); 
+				}
+				if ($this->water==2) {
+					$image->water($this->waterImage)->save($fname);
+				}	
+			}
+
+			$data=array(
+				'state'=>'SUCCESS',
+				//'url'=>__ROOT__. strtolower(substr($fname,1)),
+			    'url'=>C('WEB_HOST'). strtolower(substr($fname,1)),
+				'title'=>$info['savename'],
+				'original'=>$info['name'],
+				'type'=>'.' . $info['ext'],
+				'size'=>$info['size'],
+				);
+		}else{
+			$data=array(
+				'state'=>$upload->getError(),
+				);
+		}
+		return json_encode($data);
+	}
+
+	/**
+	 * 处理base64编码的图片上传
+	 * @return mixed
+	 */
+	private function upBase64($config,$fieldName)
+	{
+	    $base64Data = $_POST[$fieldName];
+	    $img = base64_decode($base64Data);
+
+	    $dirname=$this->rootPath . $this->savePath . $this->userid . '/scrawl/';
+	    $file['filesize']=strlen($img);
+	    $file['oriName']=$config['oriName'];
+	    $file['ext']=strtolower(strrchr($config['oriName'], '.'));
+	    $file['name']= uniqid() .  $file['ext'];
+	    $file['fullName']=$dirname . $file['name'];
+	    $fullName=$file['fullName'];
+	    // dump($file);
+
+ 	//检查文件大小是否超出限制
+	    if ($file['filesize'] >= ($config["maxSize"])) {
+  		$data=array(
+			'state'=>'文件大小超出网站限制',
+		);
+		return json_encode($data);
+	    }
+
+	    //创建目录失败
+	    if (!file_exists($dirname) && !mkdir($dirname, 0777, true)) {
+	           $data=array(
+			'state'=>'目录创建失败',
+		);
+		return json_encode($data);
+	    } else if (!is_writeable($dirname)) {
+	         $data=array(
+			'state'=>'目录没有写权限',
+		);
+		return json_encode($data);
+	    }
+
+	    //移动文件
+	    if (!(file_put_contents($fullName, $img) && file_exists($fullName))) { //移动失败
+        	         $data=array(
+		'state'=>'写入文件内容错误',
+		);
+	    } else { //移动成功	       
+	        	$data=array(
+			'state'=>'SUCCESS',
+			'url'=>__ROOT__ . substr($file['fullName'],1),
+			'title'=>$file['name'],
+			'original'=>$file['oriName'],
+			'type'=>$file['ext'],
+			'size'=>$file['filesize'],
+		);
+	    }
+	    return json_encode($data);
+	}
+
+	/**
+	 * 拉取远程图片
+	 * @return mixed
+	 */
+	private function saveRemote($config, $fieldName)
+	{
+	    $imgUrl = htmlspecialchars($fieldName);
+	    $imgUrl = str_replace("&amp;", "&", $imgUrl);
+
+	    //http开头验证
+	    if (strpos($imgUrl, "http") !== 0) {
+	         $data=array(
+		'state'=>'链接不是http链接',
+		);
+	         return json_encode($data);
+	    }
+	    //获取请求头并检测死链
+	    $heads = get_headers($imgUrl);
+	    if (!(stristr($heads[0], "200") && stristr($heads[0], "OK"))) {
+	         $data=array(
+		'state'=>'链接不可用',
+		);
+	         return json_encode($data);
+	    }
+	    //格式验证(扩展名验证和Content-Type验证)
+	    $fileType = strtolower(strrchr($imgUrl, '.'));
+	    if (!in_array($fileType, $config['allowFiles']) || stristr($heads['Content-Type'], "image")) {
+	        $data=array(
+		'state'=>'链接contentType不正确',
+		);
+	         return json_encode($data);
+	    }
+
+	    //打开输出缓冲区并获取远程图片
+	    ob_start();
+	    $context = stream_context_create(
+	        array('http' => array(
+	            'follow_location' => false // don't follow redirects
+	        ))
+	    );
+	    readfile($imgUrl, false, $context);
+	    $img = ob_get_contents();
+	    ob_end_clean();
+	    preg_match("/[\/]([^\/]*)[\.]?[^\.\/]*$/", $imgUrl, $m);
+
+	    $dirname=$this->rootPath . $this->savePath . $this->userid . '/remote/';
+	    $file['oriName']=$m ? $m[1]:"";
+	    $file['filesize']=strlen($img);
+	    $file['ext']=strtolower(strrchr($config['oriName'], '.'));
+	    $file['name']= uniqid() .  $file['ext'];
+	    $file['fullName']=$dirname . $file['name'];
+	    $fullName=$file['fullName'];
+
+	    //检查文件大小是否超出限制
+	    if ($file['filesize'] >= ($config["maxSize"])) {
+  		$data=array(
+			'state'=>'文件大小超出网站限制',
+		);
+		return json_encode($data);
+	    }
+
+	    //创建目录失败
+	    if (!file_exists($dirname) && !mkdir($dirname, 0777, true)) {
+  		$data=array(
+			'state'=>'目录创建失败',
+		);
+		return json_encode($data);
+	    } else if (!is_writeable($dirname)) {
+  		$data=array(
+			'state'=>'目录没有写权限',
+		);
+		return json_encode($data);
+	    }
+
+	    //移动文件
+	    if (!(file_put_contents($fullName, $img) && file_exists($fullName))) { //移动失败
+  		$data=array(
+			'state'=>'写入文件内容错误',
+		);
+		return json_encode($data);
+	    } else { //移动成功
+	       	 $data=array(
+			'state'=>'SUCCESS',
+			'url'=>__ROOT__ . substr($file['fullName'],1),
+			'title'=>$file['name'],
+			'original'=>$file['oriName'],
+			'type'=>$file['ext'],
+			'size'=>$file['filesize'],
+		);
+	    }
+	    return json_encode($data);
+	}
+	private function file_list($allowFiles, $listSize, $get){
+		$dirname=$this->rootPath . $this->savePath ;
+		if ($this->userid!='admin') {
+			$dirname.=$this->userid . '/';
+		}
+		$allowFiles = substr(str_replace(".", "|", join("", $allowFiles)), 1);
+
+		/* 获取参数 */
+		$size = isset($get['size']) ? htmlspecialchars($get['size']) : $listSize;
+		$start = isset($get['start']) ? htmlspecialchars($get['start']) : 0;
+		$end = $start + $size;
+
+		/* 获取文件列表 */
+		// $path = $_SERVER['DOCUMENT_ROOT'] . (substr($path, 0, 1) == "/" ? "":"/") . $path;
+		$path=$dirname;
+		$files = $this->getfiles($path, $allowFiles);
+		if (!count($files)) {
+		    return json_encode(array(
+		        "state" => "no match file",
+		        "list" => array(),
+		        "start" => $start,
+		        "total" => count($files)
+		    ));
+		}
+
+		/* 获取指定范围的列表 */
+		$len = count($files);
+		for ($i = min($end, $len) - 1, $list = array(); $i < $len && $i >= 0 && $i >= $start; $i--){
+		    $list[] = $files[$i];
+		}
+		//倒序
+		//for ($i = $end, $list = array(); $i < $len && $i < $end; $i++){
+		//    $list[] = $files[$i];
+		//}
+
+		/* 返回数据 */
+		$result = json_encode(array(
+		    "state" => "SUCCESS",
+		    "list" => $list,
+		    "start" => $start,
+		    "total" => count($files)
+		));
+
+		return $result;
+	}
+
+   	 /**
+	     * 遍历获取目录下的指定类型的文件
+	     * @param $path
+	     * @param array $files
+	     * @return array
+	     */
+	    private function getfiles( $path , $allowFiles, &$files = array() ) {
+	        if ( !is_dir( $path ) ) return null;
+	        if(substr($path, strlen($path) - 1) != '/') $path .= '/';
+	        $handle = opendir( $path);
+	        while ( false !== ( $file = readdir( $handle ) ) ) {
+	            if ( $file != '.' && $file != '..' ) {
+	                $path2 = $path . $file;
+	                if ( is_dir( $path2)) {
+	                    $this->getfiles( $path2 ,$allowFiles,  $files );
+	                } else {
+		                if (preg_match("/\.(".$allowFiles.")$/i", $file)) {
+		                    $files[] = array(
+		                        'url'=> __ROOT__ . substr($path2, 1),
+		                        'mtime'=> filemtime($path2)
+		                    );
+		                }
+	                }
+	            }
+	        }
+	        return $files;
+	    }
+	    /**
+	     * [formatUrl 格式化url,用于将getfiles返回的文件路径进行格式化,起因是中文文件名的不支持浏览]
+	     * @param  [type] $files [文件数组]
+	     * @return [type]        [格式化后的文件数组]
+	     */
+	    private function formatUrl($files){
+	    	if(!is_array($files)) return $files;
+	    	foreach ($files as  $key => $value) {
+	    		$data=array();
+	    		$data=explode('/', $value);
+	    		foreach ($data as $k=>$v) {
+	    			if($v!='.' && $v!='..'){
+	    				$data[$k]=urlencode($v);
+	    				$data[$k] = str_replace("+", "%20", $data[$k]); 
+	    			}
+	    		}
+	    		$files[$key]=implode('/', $data);
+	    	}
+	    	return $files;
+	    }	
+
+
+	private function format_exts($exts){
+		$data=array();
+		foreach ($exts as $key => $value) {
+			$data[]=ltrim($value,'.');
+		}
+		return $data;
+	}
+
+}
+?>

+ 239 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/UserController.class.php

@@ -0,0 +1,239 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class UserController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    //用户列表
+    public function index(){
+        $page = I('get.p','1');
+        session('page',$page);
+        $keyword = I('get.keyword','');
+		$is_admin = I('get.is_admin',2);
+		$is_auth = I('get.is_auth',2);
+        $condition = array();
+        if (!empty($keyword)){
+            $condition['user_id|user_phone|user_name'] = array('LIKE','%'.$keyword.'%');
+            $this->assign('keyword',$keyword);
+        }
+		if($is_admin==0){
+			$condition['admin_id']=0;
+		}elseif($is_admin==1){
+			$condition['admin_id']=array('GT',0);
+		}
+		
+		if($is_auth!=2){
+			$Model = M();
+			$sql = "select a.user_id from ((select user_id from `t_choice` where choice_status=3 and choice_type=2) union all (select user_id from `t_course` where course_status=3)) as a group by a.user_id";
+			$list = $Model->query($sql);
+			$ids=array();
+			foreach($list as $k=>$v){
+				$ids[]=$v['user_id'];
+			}
+			if($is_auth==0){
+				$condition['user_id']=array('not in',$ids);
+			}elseif($is_auth==1){
+				$condition['user_id']=array('in',$ids);
+			}
+			
+		}
+		
+		$this->assign('is_admin',$is_admin);
+		$this->assign('is_auth',$is_auth);
+        $count = M('User')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $userList = M('User')->where($condition)->field()->order('user_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        //获取用户等级
+        $levelRes = M('UserLevel')->field('level_id,level_name')->select();
+        $levelList = array();
+        foreach ($levelRes as $level){
+            $levelList[$level['level_id']] = $level['level_name'];
+        }
+		foreach($userList as $k=>$v){
+			if($v['forbidden']-time()>0){
+				$userList[$k]['is_forbidden']=1;
+				$time=$v['forbidden']-time();
+				$d = floor($time / (3600*24));
+				$h = floor(($time % (3600*24)) / 3600);
+				$m = floor((($time % (3600*24)) % 3600) / 60);
+				$tmp='';
+				if($d>'0'){
+					$tmp=$d.'天'.$h.'小时'.$m.'分';
+				}else{
+					if($h!='0'){
+						$tmp=$h.'小时'.$m.'分';
+					}else{
+						$tmp=$m.'分';
+					}
+				}
+				$userList[$k]['str_forbidden']=$tmp;
+				$userList[$k]['is_forbidden']=1;
+			}else{
+				$userList[$k]['str_forbidden']='';
+				$userList[$k]['is_forbidden']=0;
+			}
+		}
+        $this->assign('page',$show);
+        $this->assign('list',$userList);
+        $this->assign('levelList',$levelList);
+        $this->display();
+    }
+    //用户详细信息
+    public function detail(){
+        $userId = I('user_id','');
+        if (empty($userId) || $userId<1000000){
+            //$this->error("用户ID错误",'/admin/user/index');
+        }
+        $userInfo = M('User')->where(array('user_id'=>$userId))->find();
+        //用户好友
+        $Model = M();
+        $count = $Model->field('user_id2')->table('t_user_connect')->where(array('user_id1'=>$userId))
+        ->union(array('field'=>'user_id1','table'=>'t_user_connect','where'=>array('user_id2'=>$userId)))->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $userIdList = D('UserConnect')->getConnectUserList($userId, $Page->firstRow, $Page->listRows);
+        $userList = array();
+        $userIdArr = array();
+        if (function_exists('array_column')){
+            $userIdArr = array_column($userIdList, 'user_id');
+        }else{
+            foreach ($userIdList as $row){
+                $userIdArr[] = $row['user_id'];
+            }
+        }
+        if (count($userIdArr)){
+            $userList = M('User')->where(array('user_id'=>array('IN',implode(',', $userIdArr))))->field()->order('user_id desc')->select();
+        }
+        //获取用户等级
+        $levelRes = M('UserLevel')->field('level_id,level_name')->select();
+        $levelList = array();
+        foreach ($levelRes as $level){
+            $levelList[$level['level_id']] = $level['level_name'];
+        }
+        
+        $areaRes = M('China')->select();
+        $areaList = array();
+        foreach ($areaRes as $row){
+            $areaList[$row['id']] = $row['name'];
+        }
+        $this->assign('areaList',$areaList);
+        $this->assign('levelList',$levelList);
+        $this->assign('userList',$userList);
+        $this->assign('userInfo',$userInfo);
+        $this->display();
+    }
+    //用户课程
+    public function course(){
+        $courseStatus = I('course_status','');
+        $userId = I('user_id','');
+        if (empty($userId) || $userId<1000000){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+        $condition = array('course_source'=>2,'user_id'=>$userId, 'is_delete'=>1,'course_flag'=>1);
+        if (!empty($courseStatus)){
+            $condition['course_status'] = array('IN',$courseStatus);
+        }
+        $count = M('Course')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $courseList = M('Course')->where($condition)->field()->order('course_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$courseList);
+        $this->display();
+    }
+    //用户自由记
+    public function notepad(){
+        $courseStatus = I('course_status','');
+        $userId = I('user_id','');
+        if (empty($userId) || $userId<1000000){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+        $condition = array('user_id'=>$userId,'course_flag'=>2, 'is_delete'=>1,'course_source'=>2,);
+        if (!empty($courseStatus)){
+            $condition['course_status'] = array('IN',$courseStatus);
+        }
+        $count = M('Course')->where($condition)->count();
+        //分页
+        $Page = new \Think\Page($count);
+        $show = $Page->show();
+        $notepadList = M('Course')->where($condition)->field()->order('course_id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
+        $this->assign('page',$show);
+        $this->assign('list',$notepadList);
+        $this->display();
+    }
+	//用户禁言
+    public function forbidden(){
+        $userId = I('user_id','');
+        $days = I('days','0');
+        if (empty($userId) || $userId<1000000){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+        M('user')->where(array('user_id'=>$userId))->save(array('forbidden'=>time()+$days*24*60*60));
+    }
+	
+	//设置用户管理员
+    public function set_admin(){
+        $userId = I('user_id','');
+       
+        if (empty($userId) || $userId<1000000){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+		$userInfo = M('User')->where(array('user_id'=>$userId))->find();
+		
+		if (!$userInfo){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+		$adminInfo = M('admin')->where(array('admin_account'=>$userInfo['user_phone']))->find();
+		
+		if (!$adminInfo){
+			$data=array();
+			$data['admin_account']=$userInfo['user_phone'];
+			$data['admin_pwd']=$userInfo['user_pwd'];
+			$data['group_id']=1;
+			$data['operate_dt'] = time();
+			M('admin')->add($data);
+			$adminInfo = M('admin')->where($data)->find();
+        }
+		
+		$admin_id=$adminInfo['admin_id'];
+		
+		$uid=$userId;
+		$noticeContent = '您已被设置为管理员,遇到恶意评论长摁评论可以删除,情节严重可长摁用户ID进行一段时间的禁言。';
+		$temp=array();
+		M('Notice')->add(array('ref_user_id'=>$uid,'user_id'=>0,'notice_flag'=>0,'notice_status'=>1,'notice_type'=>0,'notice_title'=>$noticeContent,'notice_content'=>$noticeContent,'operate_dt'=>time(),'extra'=>json_encode($temp)));
+		M('User')->where(array('user_id'=>$uid))->setInc('sys_notice');
+		$data = array('type'=>0,'msg'=>$noticeContent,'data'=>array());
+		$url="http://www.hanlinyuanonline.com/api/choice/push?uid=".$uid."&data=".urlencode(base64_encode(json_encode($data)));
+		$ch = curl_init(); 
+		curl_setopt($ch, CURLOPT_URL, $url); 
+		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
+		$output = curl_exec($ch); 
+
+		curl_close($ch);
+		M('user')->where(array('user_id'=>$userId))->save(array('admin_id'=>$admin_id,'is_delete'=>1));
+    }
+	
+	//取消用户管理员
+    public function cancle_admin(){
+        $userId = I('user_id','');
+       
+        if (empty($userId) || $userId<1000000){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+		if($userId==0){
+			$this->error("超管无法取消",'/admin/user/index');
+		}
+		$userInfo = M('User')->where(array('user_id'=>$userId))->find();
+		if (!$userInfo){
+            $this->error("用户ID错误",'/admin/user/index');
+        }
+		M('admin')->where(array('admin_id'=>$userInfo['admin_id']))->delete();
+		M('user')->where(array('user_id'=>$userId))->save(array('admin_id'=>0));
+    }
+    
+}

+ 319 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/WordsController.class.php

@@ -0,0 +1,319 @@
+<?php
+namespace Admin\Controller;
+use Common\Controller\AdminController;
+class WordsController extends AdminController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    //单词编辑
+    public function edit() {
+        $step = I('step','');
+        $wordsId = I('words_id','');
+        $courseId = I('course_id','');
+        $wordsKeys = array('n'=>'words_n','pron'=>'words_pron','adj'=>'words_adj','num'=>'words_num','v'=>'words_v','adv'=>'words_adv','art'=>'words_art',
+            'prep'=>'words_prep','conj'=>'words_conj','int'=>'words_int','vt'=>'words_vt','vi'=>'words_vi','other'=>'words_other',);
+        if (empty($step)){
+            $info = array();
+            $wordsPreId = '';
+            $wordsNextId = '';
+            if (!empty($courseId)){
+                $info = M('Words')->where(array('words_id'=>$wordsId))->find();
+                $wordsPreInfo = M('Words')->where(array('course_id'=>$courseId,'words_id'=>array('LT',$wordsId)))->order('words_id desc')->field('words_id')->find();
+                if ($wordsPreInfo!=null){
+                    $wordsPreId = $wordsPreInfo['words_id'];
+                }
+                $wordsNextInfo = M('Words')->where(array('course_id'=>$courseId,'words_id'=>array('GT',$wordsId)))->order('words_id asc')->field('words_id')->find();
+                if ($wordsNextInfo!=null){
+                    $wordsNextId = $wordsNextInfo['words_id'];
+                }
+				if($info['words_img']){
+					$arr=explode(',',$info['words_img']);
+					$info['words_img1']=$arr[0];
+					$info['words_img2']=$arr[1];
+					$info['words_img3']=$arr[2];
+				}
+				
+				$ttt='';
+				if($info['words_voice1']){
+					if($ttt){
+						$ttt.=",".$info['words_voice1'];
+					}else{
+						$ttt=$info['words_voice1'];
+					}
+				}
+				if($info['words_voice2']){
+					if($ttt){
+						$ttt.=",".$info['words_voice2'];
+					}else{
+						$ttt=$info['words_voice2'];
+					}
+				}
+				if($info['words_voice3']){
+					if($ttt){
+						$ttt.=",".$info['words_voice3'];
+					}else{
+						$ttt=$info['words_voice3'];
+					}
+				}
+				$info['words_voice']=$ttt;
+				
+				$ttt='';
+				if($info['words_read1']){
+					if($ttt){
+						$ttt.=",".$info['words_read1'];
+					}else{
+						$ttt=$info['words_read1'];
+					}
+				}
+				if($info['words_read2']){
+					if($ttt){
+						$ttt.=",".$info['words_read2'];
+					}else{
+						$ttt=$info['words_read2'];
+					}
+				}
+				if($info['words_read3']){
+					if($ttt){
+						$ttt.=",".$info['words_read3'];
+					}else{
+						$ttt=$info['words_read3'];
+					}
+				}
+				$info['words_read']=$ttt;
+				
+            }
+            $this->assign('info',$info);
+            $this->assign('courseId', $courseId);
+            $this->assign('wordsKeys', $wordsKeys);
+            $this->assign('wordsPreId', $wordsPreId);
+            $this->assign('wordsNextId', $wordsNextId);
+            $this->display();
+        }else if($step==2){
+            $data['course_id'] = $courseId;
+            $data['words_name'] = trim(I('words_name',''));
+            $wordsVoice = I('words_voice','');
+            $wordsRead = I('words_read','');
+            if (substr($wordsVoice,-1)==','){
+                $wordsVoice = substr($wordsVoice, 0, -1);
+            }
+            $wordsVoiceArr = explode(',', $wordsVoice);
+            $wordsReadArr = explode(',', $wordsRead);
+            for ($i=0;$i<count($wordsVoiceArr);$i++){
+                $j = $i+1;
+                $data['words_read'.$j] = $wordsReadArr[$i];
+                $data['words_voice'.$j] = $wordsVoiceArr[$i];
+            }
+            $wordsVals = array_values($wordsKeys);
+            $checkWords = true;
+            foreach ($wordsVals as $keys){
+                $data[$keys] = I($keys,'');
+                if (!empty($data[$keys])){
+                    $checkWords = false;
+                }
+            }
+            if (empty($data['words_name'])){
+                $this->error('单词不能为空');
+            }
+            /* if (empty($data['words_voice1'])){
+                $this->error('读音不能为空');
+            }
+            if (empty($data['words_read1'])){
+                $this->error('音标不能为空');
+            } */
+            if ($checkWords){
+                $this->error('中文释义不能为空');
+            }
+            $data['jz_en1'] = I('jz_en1','');
+            $data['jz_cn1'] = I('jz_cn1','');
+            $data['jz_en2'] = I('jz_en2','');
+            $data['jz_cn2'] = I('jz_cn2','');
+            $data['jz_en3'] = I('jz_en3','');
+            $data['jz_cn3'] = I('jz_cn3','');
+            $data['words_similar'] = I('words_similar','');
+            $data['annotation_cn'] = I('annotation_cn','');
+            $data['similar_cn'] = I('similar_cn','');
+			$words_img1=I('words_img1','');
+			$words_img2=I('words_img2','');
+			$words_img3=I('words_img3','');
+			$ttt='';
+			if($words_img1){
+				if($ttt){
+					$ttt.=",".$words_img1;
+				}else{
+					$ttt=$words_img1;
+				}
+			}
+			if($words_img2){
+				if($ttt){
+					$ttt.=",".$words_img2;
+				}else{
+					$ttt=$words_img2;
+				}
+			}
+			if($words_img3){
+				if($ttt){
+					$ttt.=",".$words_img3;
+				}else{
+					$ttt=$words_img3;
+				}
+			}
+			$data['words_img']=$ttt;
+			
+			
+			/*
+            if (!empty($data['jz_en1']) && strpos(strtolower($data['jz_en1']), strtolower($data['words_name']))===FALSE){
+                $this->error('您添加的例句1不包含对应单词,请仔细核对后提交');
+            }
+            if (!empty($data['jz_en2']) && strpos(strtolower($data['jz_en2']), strtolower($data['words_name']))===FALSE){
+                $this->error('您添加的例句2不包含对应单词,请仔细核对后提交');
+            }
+            if (!empty($data['jz_en3']) && strpos(strtolower($data['jz_en3']), strtolower($data['words_name']))===FALSE){
+                $this->error('您添加的例句3不包含对应单词,请仔细核对后提交');
+            }
+			*/
+            if (!empty($data['jz_en1']) && empty($data['jz_cn1'])){
+                $this->error('您添加的例句1释义不能为空,请仔细核对后提交');
+            }
+            if (!empty($data['jz_en2']) && empty($data['jz_cn2'])){
+                $this->error('您添加的例句1释义不能为空,请仔细核对后提交');
+            }
+            if (!empty($data['jz_en3']) && empty($data['jz_cn3'])){
+                $this->error('您添加的例句1释义不能为空,请仔细核对后提交');
+            }
+            if (!empty($data['words_similar']) && strlen($data['words_similar'])>50){
+                $this->error('近义词不能大于50个字节');
+            }
+            if (!empty($data['similar_cn']) && strlen($data['similar_cn'])>500){
+                $this->error('英文释义不能大于500个字节');
+            }
+            $data['operate_dt'] = time();
+            if ($wordsId){
+                $jumpType = 1;
+                M('Words')->where(array('words_id'=>$wordsId))->save($data);
+            }else{
+                $jumpType = 2;
+                $wordsId = M('Words')->add($data);
+                M('Course')->where(array('course_id'=>$courseId))->setInc('course_num');
+            }
+            //$this->success('单词操作成功','/admin/course/detail?course_id='.$courseId);
+            $jumpId = I('jumpId');
+            if ($jumpId==1){
+                if ($jumpType==1){
+                    $this->success('单词操作成功','/admin/words/edit?course_id='.$courseId.'&words_id='.$wordsId);
+                }else{
+                    $this->success('单词操作成功','/admin/words/edit?course_id='.$courseId);
+                }
+            }else if($jumpId==2){
+                $wordsInfo = M('Words')->where(array('course_id'=>$courseId,'words_id'=>array('LT',$wordsId)))->order('words_id desc')->field('words_id')->find();
+                if ($wordsInfo==NULL){
+                    $this->success('单词操作成功,暂无上一个单词','/admin/words/edit?course_id='.$courseId);
+                }
+                $this->success('单词操作成功,跳转至上一个单词','/admin/words/edit?course_id='.$courseId.'&words_id='.$wordsInfo['words_id']);
+            }else if($jumpId==3){
+                $wordsInfo = M('Words')->where(array('course_id'=>$courseId,'words_id'=>array('GT',$wordsId)))->order('words_id asc')->field('words_id')->find();
+                if ($wordsInfo==NULL){
+                    $this->success('单词操作成功,暂无下一个单词','/admin/words/edit?course_id='.$courseId);
+                }
+                $this->success('单词操作成功,跳转至下一个单词','/admin/words/edit?course_id='.$courseId.'&words_id='.$wordsInfo['words_id']);
+            }
+        }
+    }
+    
+    //删除单词
+    public function del(){
+        $wordsId = I('words_id','');
+        $courseId = I('course_id','');
+        //M('Words')->where(array('words_id'=>$wordsId))->save(array('is_delete'=>2));
+        M('Words')->where(array('words_id'=>$wordsId))->delete();
+        M('Course')->where(array('course_id'=>$courseId))->setDec('course_num');
+        $this->success('单词删除成功','/admin/course/detail/index?course_id='.$courseId);
+    }
+    
+    //获取单词信息接口
+    public function dict(){
+        $wordsFields = array('n','pron','adj','num','v','adv','art','prep','conj','int','vt','vi','other',);
+        $wordsName = I('words_name','');
+        if (empty($wordsName)){
+            $data = array('code'=>1,'msg'=>'单词不能为空');
+            echo json_encode($data);
+        }
+        $httpCurl = new \Org\Net\HttpCurl();
+        $url = C('TRANS').'&w='.$wordsName;
+        $res = $httpCurl->get($url,'xml');
+        $res = json_decode(json_encode(simplexml_load_string($res, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
+        /* $url = C('TRANS').'&type=json&w='.$wordsName;
+        $res = $httpCurl->get($url); */
+        
+        if (!isset($res['key'])){
+            $data = array('code'=>1,'msg'=>'单词翻译出错');
+            echo json_encode($data);
+        }
+        if (isset($res['ps'])){
+            if (!is_array($res['ps'])){
+                $data['data']['ps'][] = $res['ps'];
+            }else{
+                $data['data']['ps'] = $res['ps'];
+            }
+        }else{
+            $data['data']['ps'] = array();
+        }
+        if (isset($res['pron'])){
+            if (!is_array($res['pron'])){
+                $data['data']['pron'][] = $res['pron'];
+            }else{
+                $data['data']['pron'] = $res['pron'];
+            }
+            /* $data['data']['pron'] = array(
+                'http://res.iciba.com/resource/amp3/0/0/c4/7d/c47d187067c6cf953245f128b5fde62a.mp3',
+                'http://res.iciba.com/resource/amp3/0/0/34/d1/34d1f91fb2e514b8576fab1a75a89a6b.mp3'
+            ); */
+        }else{
+            $data['data']['pron'] = array();
+        }
+        if (isset($res['pos']) && !empty($res['pos'])){
+            if (is_array($res['pos'])){
+                foreach ($res['pos'] as $k=>$v){
+                    $key = str_replace('.', '', $v);
+                    if (!in_array($key, $wordsFields)){
+                        $pos[] = array('other', trim($res['acceptation'][$k]));
+                    }else{
+                        $pos[] = array($key, trim($res['acceptation'][$k]));
+                    }
+                }
+            }else{
+                $key = str_replace('.', '', $res['pos']);
+                //$pos[] = array(str_replace('.', '', $res['pos']),trim($res['acceptation']));
+                if (!in_array($key, $wordsFields)){
+                    $pos[] = array('other', trim($res['acceptation']));
+                }else{
+                    $pos[] = array($key, trim($res['acceptation']));
+                }
+                /* if (isset($wordsKeys[str_replace('.', '', $res['pos'])])){
+                    $pos[] = array(str_replace('.', '', $res['pos']),trim($res['acceptation']));
+                }else{
+                    $pos[] = array('words_other',trim($res['acceptation']));
+                } */
+            }
+            $data['data']['pos'] = $pos;
+        }else{
+            $pos[] = array('other', trim($res['acceptation']));
+            $data['data']['pos'] = $pos;
+        }
+        if (isset($res['sent'])){
+            if (empty($res['sent'][0])){
+                $sent[] = array(trim($res['sent']['orig']),trim($res['sent']['trans']));
+            }else{
+                foreach ($res['sent'] as $k=>$v){
+                    if ($k>2){
+                        continue;
+                    }
+                    $sent[] = array(trim($v['orig']),trim($v['trans']));
+                }
+            }
+            $data['data']['sent'] = $sent;
+        }
+        $data['code'] = 0;
+        $this->ajaxReturn($data);exit;
+    }
+}

+ 1 - 0
www.hanlinyuanonline.com/Application/Admin/Controller/index.html

@@ -0,0 +1 @@
+ 

+ 40 - 0
www.hanlinyuanonline.com/Application/Admin/Model/CourseModel.class.php

@@ -0,0 +1,40 @@
+<?php
+namespace Admin\Model;
+use Think\Model;
+
+class CourseModel extends Model{
+    /* public function getCourseList($condition, $page, $pageSize, $orderby){
+        $condition[] = 'A.user_id = B.user_id';
+        $condition['A.is_delete'] = 1;
+        $fields = 'A.*,B.user_name,B.user_nickname,B.user_phone';
+        return $this->table('t_course A, t_user B')->where($condition)->field($fields)->order($orderby)->limit($page, $pageSize)->select();
+    } */
+    public function  getCourseList($condition, $page, $pageSize, $orderby){
+        $condition['is_delete']=1;
+        $res = M('Course')->where($condition)->field('course_id,course_status,user_id,course_flag,course_name,course_join,course_num,course_source,operate_dt')
+        ->order($orderby)->limit($page, $pageSize)->select();
+        $userInfo = array();
+        foreach ($res as $key=>$row){
+            if ($row['course_source']==1){
+                $res[$key]['user_name'] = '系统课程';
+                //$res[$key]['user_icon'] = C('DOMAIN').'/Public/img/admin_icon.png';
+                $res[$key]['user_icon'] = '/Public/img/admin_icon.png';
+                $res[$key]['user_city'] = '';
+                $res[$key]['user_province'] = '';
+            }else{
+                if (isset($userInfo[$row['user_id']])){
+                    $info = $userInfo[$row['user_id']];
+                }else{
+                    $info = M('User')->where(array('user_id'=>$row['user_id']))->field('user_name,user_phone,user_icon,user_city,user_province')->find();
+                    $userInfo[$row['user_id']] = $info;
+                }
+                $res[$key]['user_name'] = $info['user_name'];
+                $res[$key]['user_phone'] = $info['user_phone'];
+                $res[$key]['user_icon'] = $info['user_icon'];
+                $res[$key]['user_city'] = $info['user_city'];
+                $res[$key]['user_province'] = $info['user_province'];
+            }
+        }
+        return $res;
+    }
+}

+ 21 - 0
www.hanlinyuanonline.com/Application/Admin/Model/FeedbackModel.class.php

@@ -0,0 +1,21 @@
+<?php
+namespace Admin\Model;
+use Think\Model;
+
+class FeedbackModel extends Model{
+    public function getFbList($condition, $page, $pageSize){
+        $condition[] = 'A.words_id = B.words_id';
+        $condition[] = 'A.course_id = C.course_id';
+        $condition[] = 'A.user_id = D.user_id';
+        $condition['A.is_delete'] = 1;
+        $fields = 'A.*,B.words_name,C.course_name,D.user_name,D.user_phone';
+        return $this->table('t_feedback A, t_words B, t_course C,t_user D')->where($condition)->field($fields)->order('fb_id desc')->limit($page, $pageSize)->select();
+    }
+    
+    public function getFbSysList($condition, $page, $pageSize){
+        $condition[] = 'A.user_id = D.user_id';
+        $condition['A.is_delete'] = 1;
+        $fields = 'A.*,D.user_name,D.user_phone';
+        return $this->table('t_feedback A ,t_user D')->where($condition)->field($fields)->order('fb_id desc')->limit($page, $pageSize)->select();
+    }
+}

+ 41 - 0
www.hanlinyuanonline.com/Application/Admin/Model/NotepadModel.class.php

@@ -0,0 +1,41 @@
+<?php
+namespace Admin\Model;
+use Think\Model;
+
+class NotepadModel extends Model{
+    /* public function getNotepadeList($condition, $page, $pageSize, $orderby){
+        $condition[] = 'A.user_id = B.user_id';
+        $condition['A.is_delete'] = 1;
+        $condition['A.course_flag'] = 2;
+        $fields = 'A.*,B.user_name,B.user_nickname,B.user_phone';
+        return $this->table('t_course A, t_user B')->where($condition)->field($fields)->order($orderby)->limit($page, $pageSize)->select();
+    } */
+    public function  getNotepadeList($condition, $page, $pageSize, $orderby){
+        $condition['is_delete']=1;
+        $res = M('Course')->where($condition)->field('course_id,course_status,user_id,course_flag,course_name,course_join,course_num,course_source,operate_dt')
+        ->order($orderby)->limit($page, $pageSize)->select();
+        $userInfo = array();
+        foreach ($res as $key=>$row){
+            if ($row['course_source']==1){
+                $res[$key]['user_name'] = '系统课程';
+                //$res[$key]['user_icon'] = C('DOMAIN').'/Public/img/admin_icon.png';
+                $res[$key]['user_icon'] = '/Public/img/admin_icon.png';
+                $res[$key]['user_city'] = '';
+                $res[$key]['user_province'] = '';
+            }else{
+                if (isset($userInfo[$row['user_id']])){
+                    $info = $userInfo[$row['user_id']];
+                }else{
+                    $info = M('User')->where(array('user_id'=>$row['user_id']))->field('user_name,user_phone,user_icon,user_city,user_province')->find();
+                    $userInfo[$row['user_id']] = $info;
+                }
+                $res[$key]['user_name'] = $info['user_name'];
+                $res[$key]['user_phone'] = $info['user_phone'];
+                $res[$key]['user_icon'] = $info['user_icon'];
+                $res[$key]['user_city'] = $info['user_city'];
+                $res[$key]['user_province'] = $info['user_province'];
+            }
+        }
+        return $res;
+    }
+}

+ 12 - 0
www.hanlinyuanonline.com/Application/Admin/Model/UserConnectModel.class.php

@@ -0,0 +1,12 @@
+<?php
+namespace Admin\Model;
+use Think\Model;
+
+class UserConnectModel extends Model
+{   
+    public function getConnectUserList($userId, $page, $pageSize){
+        $sql = sprintf("SELECT user_Id FROM (SELECT `friend_id`,`ref_user_id` AS user_id FROM `t_friend` WHERE `user_id` = '%d' UNION ALL SELECT `friend_id`,`user_id` AS user_id FROM `t_friend` WHERE `ref_user_id` = '%d' ORDER BY user_id DESC) A LIMIT %d,%d",$userId, $userId, $page, $pageSize);
+        return $this->db->query($sql);
+        //return M('Friend')->where(array('user_id|ref_user_id'=>$userId))->field('user_id,ref_user_id')
+    }
+}

+ 1 - 0
www.hanlinyuanonline.com/Application/Admin/Model/index.html

@@ -0,0 +1 @@
+ 

+ 167 - 0
www.hanlinyuanonline.com/Application/Admin/View/Activity/edit.html

@@ -0,0 +1,167 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+            <!-- 右侧 -->
+	        <div class="col-md-12">
+                <form method="post">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑活动</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                        <div class="box-body">
+                        
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-danger" type="button">活动名称:</button>
+                                    </div>
+                                    <input type="text" name="act_title" value="<{$info['act_title']}>" class="form-control"/>
+                                </div>
+                            </div>
+                            
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-danger" type="button">出品方:</button>
+                                    </div>
+                                    <input type="text" name="act_name" value="<{$info['act_name']}>" class="form-control"/>
+                                </div>
+                            </div>
+                            
+                        	<div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-primary" type="button">显示顺序:</button>
+                                    </div><!-- /btn-group -->
+                                    <input type="text" name="act_sort" value="<{$info['act_sort']}>" class="form-control"/>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                    	<button class="btn btn-danger" type="button">Banner图片:</button>
+                                    </div><!-- /btn-group -->
+                                    <div class="col-xs-10">
+                                    	<input name="act_pic" type="hidden" id="act_pic" value="<{$info['act_pic']}>">
+                                    	<input id="upload" name="image" accept="image/*" type="file" style="display: none"/>
+                                    	<img id="headPic" src="<empty name="info['act_pic']">__PUBLIC__/img/banner.jpg<else /><{$info['act_pic']}></empty>" height="150px" style="padding: 5px">
+                                    	<button id="submit_btn" type="button" class="btn btn-primary" style="display: none;">确定修改</button>
+                                    	<label >点击图片即可修改<br/>建议上传尺寸:420x320 px</label><br>
+                                    </div>
+                                </div>
+                            </div>
+                            
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-danger" type="button">活动详情:</button>
+                                    </div>
+                                     <textarea rows="15" id="container" name="act_content" width:500px;height:500px><{$info['act_content']}></textarea>
+                                </div>
+                            </div>
+                            
+                        </div><!-- /.box-body -->
+                        <div class="box-footer">
+                            <input type="hidden" name="step" id="step" value="2" />
+                            <input type="hidden" name="act_id" id="act_id" value="<{$info['act_id']}>" />
+                            <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                            <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                            <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                        </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+	        <!-- 右侧 -->
+        </aside>
+        <!-- /.content -->
+    </div>
+    <!-- /.content-wrapper -->
+    <!-- Main Footer -->
+    <!-- 底部 -->
+    <script src="__PUBLIC__/js/ajaxfileupload.js" type="text/javascript"></script>
+    <js href="__PUBLIC__/ueditor/ueditor.config.js" />    
+    <js href="__PUBLIC__/ueditor/ueditor.all.min.js" />
+	<script type="text/javascript">
+	<!--
+	$(function() {
+		var url='<{:U('Admin/Ueditor/Index')}>';
+        var ue = UE.getEditor('container',{
+            initialFrameHeight: 600,
+            serverUrl :url,
+            UEDITOR_HOME_URL:'__PUBLIC__/ueditor/',
+        });
+
+        ue.ready(function(){
+            ue.execCommand('serverparam', {
+                'userid': '1',
+               'username': 'admin',
+            });
+        });
+		
+	    //头像预览
+	    $("#headPic").click(function () {
+	        $("#upload").click(); //隐藏了input:file样式后,点击头像就可以本地上传
+	        $("#upload").on("change",function(){
+	            var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径
+	            if (objUrl) {
+	                $("#headPic").attr("src", objUrl) ; //将图片路径存入src中,显示出图片
+	            }
+	            // 如果确认已经选择了一张图片, 则进行上传操作
+	            if ($.trim($(this).val())) {
+	                $("#submit_btn").trigger('click');
+	            }
+	        });
+	    });
+	
+	     //图片上传
+	    $("#submit_btn").click(function () {
+	        var imgurl = document.getElementById("upload").value;
+	        $.ajaxFileUpload({
+	            url:"/admin/slider/upload?dir=ad",
+	            fileElementId: "upload", //文件上传域的ID,这里是input的ID,而不是img的
+	            dataType: 'json', //返回值类型 一般设置为json
+	            contentType: "application/x-www-form-urlencoded; charset=utf-8",
+	            success: function (data) {
+	                if (data.code==0){
+	                    $("#imag").attr("src","/images/loading.gif");
+	                    //将图片换成默认的+图片
+	                    $("#imag").attr('src',data.path);
+	                    $('#act_pic').val(data.path);
+	                }else{
+	                	alert(data.info);
+	                }
+	            }
+	        });
+	    });
+	});
+	
+	//建立一個可存取到該file的url
+	function getObjectURL(file) {
+	    var url = null ;
+	    if (window.createObjectURL!=undefined) { // basic
+	        url = window.createObjectURL(file) ;
+	    } else if (window.URL!=undefined) { // mozilla(firefox)
+	        url = window.URL.createObjectURL(file) ;
+	    } else if (window.webkitURL!=undefined) { // webkit or chrome
+	        url = window.webkitURL.createObjectURL(file) ;
+	    }
+	    return url ;
+	}
+	//-->
+	</script>
+   <!-- 底部 -->
+   </body>
+</html>

+ 83 - 0
www.hanlinyuanonline.com/Application/Admin/View/Activity/index.html

@@ -0,0 +1,83 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<div class="box-header">
+						<h3 class="box-title">
+							<a href="/admin/activity/edit" class="btn btn-primary">新增活动</a>
+						</h3>
+					</div>
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>图片预览</th>
+									<th>活动名称</th>
+									<th>出品方</th>
+									<th>排序id</th>
+									<th colspan="3">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><img width="100" src="<{$val['act_pic']}>"></td>
+									<td><{$val['act_title']}></td>
+									<td><{$val['act_name']}></td>
+									<td><{$val['act_sort']}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										<if condition="$val['act_status']==1">
+										<a href="/admin/activity/status?act_id=<{$val['act_id']}>&act_status=2">不展示</a>
+										<else />
+										<a href="/admin/activity/status?act_id=<{$val['act_id']}>&act_status=1">展示</a>
+										</if>
+										&nbsp;<a href="/admin/activity/edit?act_id=<{$val['act_id']}>">查看</a>
+										&nbsp;<a href="/admin/activity/edit?act_id=<{$val['act_id']}>">编辑</a>
+										&nbsp;<a href="/admin/activity/del?act_id=<{$val['act_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="6" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 85 - 0
www.hanlinyuanonline.com/Application/Admin/View/Alarm/index.html

@@ -0,0 +1,85 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<div class="box-header">
+						<h3 class="box-title">
+							
+						</h3>
+					</div>
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>标题</th>
+									<th>消息</th>
+									<th>时间</th>
+									<th>状态</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr <if condition="$val['notice_read']==1">style="color:#bbb;"</if>>
+									<td><{$i}></td>
+									<td title="<{$val['notice_title']}>"><{$val['notice_title']||msubstr=0,80,'utf-8'}></td>	
+									<td title="<{$val['notice_content']}>"><{$val['notice_content']||msubstr=0,80,'utf-8'}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><{$val['status_info']}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										&nbsp;<a href="/admin/alarm/info?notice_id=<{$val['notice_id']}>">查看</a>
+										<if condition="$val['notice_flag'] eq 5">
+											<if condition="$val['wc_info']['wc_status'] eq 0">
+												<if condition="$val['ref_user_id'] eq 0">
+													&nbsp;<a href="/admin/alarm/check?notice_id=<{$val['notice_id']}>&wc_status=1" onclick="return confirm('确定审核通过吗?')">通过</a>
+													&nbsp;<a style="color:red;" href="/admin/alarm/refuse?notice_id=<{$val['notice_id']}>" >不通过</a>
+												</if>
+											</if>
+										</if>
+										
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 173 - 0
www.hanlinyuanonline.com/Application/Admin/View/Alarm/info.html

@@ -0,0 +1,173 @@
+<!-- 头部 -->
+<include file="Public/top" />
+
+<script src="__PUBLIC__/js/ajaxfileupload.js" type="text/javascript"></script>
+<script language="javascript">
+	$(function(){
+		$("input").attr("disabled","disabled");
+		$("textarea").attr("disabled","disabled");
+		$("#wc_content").removeAttr("disabled");
+		
+		<foreach name="dif" item="val">
+			$("#<{$val}>").css("border","1px solid red"); 
+		</foreach>
+	});
+	function changeBut(jumpId){
+	
+		var t=$("#wc_content").val();
+		if(jumpId==2&&!t){
+			alert('失败原因必填写');
+			return;
+		}
+		window.location.href="/admin/alarm/check?wc_status="+jumpId+"&notice_id=<{$notice_id}>&wc_content="+t;
+	}
+</script>
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+            <div class="col-md-12">
+            	<div class="box box-primary">
+	            	<div class="box-header">
+	            		<h3 class="box-title">审核查看</h3>
+	            	</div>
+	            	<div class="col-md-6">
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">单词:</button>
+	                            </div><!-- /btn-group -->
+	                            <input type="text" name="words_name" id="words_name" value="<{$info['words_name']}>" class="form-control" placeholder="输入完毕后移开光标读取第三方信息" required/>
+	                        </div>
+	                    </div>
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">读音:</button>
+	                            </div><!-- /btn-group -->
+								<span id="words_audio"></span>
+	                            <input type="hidden" id="words_voice" name="words_voice" value="<{$info['words_voice']}>" class="form-control"/>
+	                        </div>
+	                    </div>
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">音标:</button>
+	                            </div><!-- /btn-group -->
+	                            <input type="text" id="words_read" name="words_read" value="<{$info['words_read']}>" readonly="readonly" class="form-control"/>
+	                        </div>
+	                    </div>
+	                  	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">中文释义:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<foreach name="wordsKeys" item="val">
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon"><{$key}>.</span>
+		                             <input type="text" class="form-control" id="<{$key}>" name="<{$val}>" value="<{$info[$val]}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+		                         </foreach>
+	            			</div>
+		        		</div>
+						
+		        	</div>
+	            	<div class="col-md-6">
+		            	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句1:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" id="jz_en1" name="jz_en1" value="<{$info['jz_en1']}>" placeholder="多个释义间用逗号隔开"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" id="jz_cn1" name="jz_cn1" value="<{$info['jz_cn1']}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+	            			</div>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句2:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" id="jz_en2" name="jz_en2" value="<{$info['jz_en2']}>" placeholder="多个释义间用逗号隔开"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" id="jz_cn2" name="jz_cn2" value="<{$info['jz_cn2']}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+	            			</div>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句3:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" id="jz_en3" name="jz_en3" value="<{$info['jz_en3']}>" placeholder="多个释义间用逗号隔开"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" id="jz_cn3" name="jz_cn3" value="<{$info['jz_cn3']}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+	            			</div>
+		        		</div>
+                    	<div class="form-group">
+                    		<label>近义词:</label>
+                            <textarea class="form-control" rows="3" name="words_similar" placeholder="多个近义词直接逗号隔开"><{$info['words_similar']}></textarea>
+                        </div>
+                        <div class="form-group">
+                            <label>英文释义:</label>
+                            <textarea class="form-control" rows="3" name="similar_cn" placeholder="请输入英文释义"><{$info['similar_cn']}></textarea>
+                        </div>
+                        <div class="form-group">
+                            <label>注释:</label>
+                            <textarea class="form-control" rows="3" name="annotation_cn" placeholder="对单词的注释"><{$info['annotation_cn']}></textarea>
+                        </div>
+						
+						<div class="form-group">
+                            <label>审核说明:</label>
+                            <textarea class="form-control" rows="3" name="wc_content" id="wc_content" placeholder="不通过原因"><{$wc_content}></textarea>
+                        </div>
+						
+	            	</div>
+	            	<div class="col-md-12">
+		                <div class="box-footer">
+		                    <input type="hidden" name="step" id="step" value="2" />
+		                    <input type="hidden" name="words_id" value="<{$info['words_id']}>" />
+		                    <input type="hidden" name="course_id" value="<{$courseId}>" />
+		                    <input type="hidden" id="jumpId" name="jumpId" value="" />
+							<input type="hidden" name="words_img" value="<{$info['words_img']}>" />
+		                    <!--<button class="btn btn-primary" name="submit3" onclick="changeBut(2)" type="submit">上翻</button>
+		                    <button class="btn btn-primary" name="submit4" onclick="changeBut(3)" type="submit">下翻</button>-->
+							<if condition="$status eq 0">	
+		                    <button class="btn btn-primary" name="submit1" onclick="return changeBut(2)" type="button" style="background-color:red;">审核不通过</button>
+		                    <button class="btn btn-primary" name="submit2" onclick="return changeBut(1)" type="button">审核通过</button>
+		                    </if>
+							<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+		                </div>
+		             </div>
+            	</div>
+           </div>
+            </form>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 64 - 0
www.hanlinyuanonline.com/Application/Admin/View/Alarm/refuse.html

@@ -0,0 +1,64 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post" action="/admin/alarm/check"  enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">审核不通过</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">拒绝原因:</button>
+                                        </div><!-- /btn-group -->
+                                        <textarea class="form-control" rows="8" name="wc_content" placeholder="请输入原因"></textarea>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="wc_status" id="wc_status" value="2" />
+                                <input type="hidden" name="notice_id" id="notice_id" value="<{$notice_id}>" />
+                                
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+           
+                               
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+<script type="text/javascript">
+<!--
+
+//-->
+</script>
+</body>
+</html>

+ 65 - 0
www.hanlinyuanonline.com/Application/Admin/View/Choice/detail.html

@@ -0,0 +1,65 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-md-12">
+               
+                    <div class="box box-primary">
+                        <div class="box-header">
+							<div class="input-group margin col-xs-6">
+                            <h3  class="box-title"><a href="/admin/choice/index"><if condition="$info['choice_type'] eq 2">精选<else />社区</if>管理</a> > 查看</h3>
+							</div>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <h2><{$info['choice_name']}></h2>
+                                    </div>
+                                </div>
+								<div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+									   <volist name="info.choice_img" id="v">
+                                       <img src="<{$v}>" style="width:45%;">
+									   </volist>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <{$info['choice_content']}>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+							<if condition="$info['choice_type'] eq 2"><a href="/admin/choice/edit?choice_id=<{$info['choice_id']}>" class="btn btn-primary">编辑</a><else /></if>
+							
+                               
+                            </div>
+                    </div>
+              
+                <!-- /.box -->
+            </div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 146 - 0
www.hanlinyuanonline.com/Application/Admin/View/Choice/edit.html

@@ -0,0 +1,146 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+            <!-- 右侧 -->
+	        <div class="col-md-12">
+                <form method="post">
+                    <div class="box box-primary">
+                        <div class="box-header">
+						<h3 class="box-title"><a href="/admin/choice/index">精选管理</a> > <if condition="$info['choice_id']">编辑<else />新增</if>精选</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                        <div class="box-body">
+                        
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-primary" type="button">精选标题</button>
+                                    </div>
+                                    <input type="text" name="choice_name" value="<{$info['choice_name']}>" class="form-control"/>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                    	<button class="btn btn-primary" type="button">精选封面</button>
+                                    </div><!-- /btn-group -->
+                                    <div class="col-xs-10">
+                                    	<input name="choice_img" type="hidden" id="choice_img" value="<{$info['choice_img']}>">
+                                    	<input id="upload" name="image" accept="image/*" type="file" style="display: none"/>
+                                    	<img id="headPic" src="<empty name="info['choice_img']">__PUBLIC__/img/add.jpg<else /><{$info['choice_img']}></empty>" height="150px" style="padding: 5px">
+                                    	<button id="submit_btn" type="button" class="btn btn-primary" style="display: none;">确定修改</button>
+                                    	<label >点击图片即可修改</label><br>
+                                    </div>
+                                </div>
+                            </div>
+                        	<div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-primary" type="button">精选内容</button>
+                                    </div><!-- /btn-group -->
+                                    <textarea rows="15" id="container" name="choice_content" width:500px;height:500px><{$info['choice_content']}></textarea>
+                                </div>
+                            </div>
+                            
+                        </div><!-- /.box-body -->
+                        <div class="box-footer">
+                            <input type="hidden" name="step" id="step" value="2" />
+                            <input type="hidden" name="choice_id" id="choice_id" value="<{$info['choice_id']}>" />
+                            <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                            <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                            <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                        </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+	        <!-- 右侧 -->
+        </aside>
+        <!-- /.content -->
+    </div>
+    <!-- /.content-wrapper -->
+    <!-- Main Footer -->
+    <!-- 底部 -->
+    <script src="__PUBLIC__/js/ajaxfileupload.js" type="text/javascript"></script>
+	<js href="__PUBLIC__/ueditor/ueditor.config.js" />    
+    <js href="__PUBLIC__/ueditor/ueditor.all.min.js" />
+	<script type="text/javascript">
+
+	$(function() {
+	    //头像预览
+		var url='<{:U('Admin/Ueditor/Index')}>';
+        var ue = UE.getEditor('container',{
+            initialFrameHeight: 600
+        });
+
+        ue.ready(function(){
+          
+        });
+		document.getElementById("upload").value='';
+		
+	    $("#headPic").click(function () {
+	        $("#upload").click(); //隐藏了input:file样式后,点击头像就可以本地上传
+	        $("#upload").on("change",function(){
+			
+				var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径
+				if (objUrl) {
+					$("#headPic").attr("src", objUrl) ; //将图片路径存入src中,显示出图片
+				}
+				// 如果确认已经选择了一张图片, 则进行上传操作
+				if ($.trim($(this).val())) {
+					$("#submit_btn").trigger('click');
+				}
+			});
+	    });
+	
+	     //图片上传
+	    $("#submit_btn").click(function () {
+	        var imgurl = document.getElementById("upload").value;
+	        $.ajaxFileUpload({
+	            url:"/admin/slider/upload?dir=choice",
+		    secureuri:false,
+	            fileElementId: "upload", //文件上传域的ID,这里是input的ID,而不是img的
+	            dataType: 'json', //返回值类型 一般设置为json
+	            contentType: "application/x-www-form-urlencoded; charset=utf-8",
+	            success: function (data) {
+	                if (data.code==0){
+	                    $("#imag").attr("src","/images/loading.gif");
+	                    //将图片换成默认的+图片
+	                    $("#imag").attr('src',data.path);
+	                    $('#choice_img').val(data.path);
+	                }else{
+	                	alert(data.info);
+	                }
+	            }
+	        });
+	    });
+	});
+	
+	//建立一個可存取到該file的url
+	function getObjectURL(file) {
+	    var url = null ;
+	    if (window.createObjectURL!=undefined) { // basic
+	        url = window.createObjectURL(file) ;
+	    } else if (window.URL!=undefined) { // mozilla(firefox)
+	        url = window.URL.createObjectURL(file) ;
+	    } else if (window.webkitURL!=undefined) { // webkit or chrome
+	        url = window.webkitURL.createObjectURL(file) ;
+	    }
+	    return url ;
+	}
+	//-->
+	</script>
+   <!-- 底部 -->
+   </body>
+</html>

+ 133 - 0
www.hanlinyuanonline.com/Application/Admin/View/Choice/index.html

@@ -0,0 +1,133 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                            <div class="btn-group">
+                                <select name="sort" class="form-control input-sm">
+                                	<volist name="orderList" id="v">
+                                    <option <if condition="$sort eq $v[2]">selected="selected"</if> value="<{$v[2]}>"><{$v[1]}></option>
+                                    </volist>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <select name="choice_status" class="form-control input-sm">
+                                	<foreach name="statusList" item="r" key="k">
+                                    <option <if condition="$choiceStatus eq $k">selected="selected"</if> value="<{$k}>"><{$r}></option>
+                                    </foreach>
+                                </select>
+                            </div>
+                   
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入精选名称" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+								<input type="hidden" name="choice_source" value="<{$choice_source}>">
+							
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+							<if condition="$choice_source eq 1"><a href="/admin/choice/edit" class="btn btn-primary">新增精选</a><else /></if>
+								
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>标题</th>
+									<th>评论数</th>
+									<th>点赞数</th>
+									<th>创建时间</th>
+									<th>状态</th>
+									<th>发布者</th>
+									<th colspan="4">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><a href="/admin/choice/detail?choice_id=<{$val['choice_id']}>"><{$val['choice_name']}></a></td>
+									<td><{$val['reply']}></td>
+									<td><{$val['praise']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><if condition="$val['choice_status'] eq 3">已上架<else />未上架</if></td>
+									<td>
+									<{$val['user_name']}>
+									
+									</td>
+									<td>
+										
+										&nbsp;<a href="/admin/choice/detail?choice_id=<{$val['choice_id']}>">查看</a>
+										<if condition="$val['choice_status'] eq 3">
+										&nbsp;<a href="/admin/choice/status?choice_id=<{$val['choice_id']}>&choice_status=1" onclick="return confirm('确定下架吗?')">下架</a>
+										<else />
+										&nbsp;<a href="/admin/choice/status?choice_id=<{$val['choice_id']}>&choice_status=3" onclick="return confirm('确定上架吗?')">上架</a>
+										</if>
+										<if condition="$val['choice_source'] eq 1">
+										&nbsp;<a href="/admin/choice/edit?choice_id=<{$val['choice_id']}>">编辑</a>
+										&nbsp;<a href="/admin/choice/del?choice_id=<{$val['choice_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+										<else />
+											<if condition="$val['choice_type'] eq 2">
+											&nbsp;<a href="/admin/choice/type?choice_id=<{$val['choice_id']}>&choice_type=1" onclick="return confirm('确定取消精选吗?')">取消精选</a>
+											<else />
+											&nbsp;<a href="/admin/choice/type?choice_id=<{$val['choice_id']}>&choice_type=2" onclick="return confirm('确定精选吗?')">精选</a>
+											</if>
+										</if>
+										
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="12" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 222 - 0
www.hanlinyuanonline.com/Application/Admin/View/Course/detail.html

@@ -0,0 +1,222 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<style>
+.tab span{
+     float:left;
+     background:#fefefe;
+     background:-moz-linear-gradient(top, #fefefe, #ededed);    
+     background:-o-linear-gradient(left top,left bottom, from(#fefefe), to(#ededed));
+     background:-webkit-gradient(linear,left top,left bottom, from(#fefefe), to(#ededed));
+     border:1px solid #ccc;
+     padding:5px 0;
+     width:100px;
+     text-align:center;
+     margin-left:-1px;
+     position:relative;
+     cursor:pointer;
+}
+.tab .active{
+     border-bottom:none;
+     background:#fff;
+ }
+ .ylcon{width:100%;min-width:320px;}
+.tit{height:26px;line-height:26px;padding:0px 15px;position:relative;font-size:15px;color:#aaa;border-bottom:1px solid rgba(0, 0, 0, 0.15);}
+ 
+.story{border-bottom:1px dashed #cecece;padding:0 15px 3px;position:relative;}
+.story_t{font-size:1.2em;color:rgba(0,0,0,1);padding-top:5px;padding-bottom:2px;}
+.story_m{color:rgba(110,110,110,1);line-height:21px;word-break:break-all;word-wrap:break-word;overflow:hidden;font-size:1.2em;padding:2px 0;}
+.story_time{color:rgba(154,154,154,1);padding:2px 0;}
+.story_hf{background:rgb(245,245,245);font-size:1.2em;border:1px solid rgba(204,204,204,0.2);border-radius:2px;color:rgba(110,110,110,1);padding:4px;margin-bottom:5px;}
+.opbtn{position:absolute;top: 0;right: 0;}
+</style>
+
+</style>
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<h4><{$info['course_name']}></h4>
+			</div>
+			<div class="col-xs-12">
+				<div class="tab" id="tab">
+					<span class="active">课程详情</span>
+					<span>课程介绍</span>
+					<span>课程评论</span>
+				</div>
+			</div>
+			
+			<div class="col-xs-12 tabpane">
+				<div class="col-sm-12">
+					<div class="row pad">
+						<form name="form1" method="get">
+							<div class="col-sm-10">
+								<div class="btn-group">
+									<input type="text" placeholder="请输入单词" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+								</div>
+								<div class="btn-group">
+									<input type="hidden" name="course_id" value="<{$courseId}>">
+									<button class="btn btn-sm btn-primary" name="sub" type="submit">
+										<i class="fa fa-search"></i>
+									</button>
+								</div>
+							</div>
+							<div class="col-sm-1">
+								<div class="col-sm-1">
+									<a href="/admin/words/edit?course_id=<{$courseId}>" class="btn btn-primary">新增单词</a>
+								</div>
+							</div>
+							<div class="col-sm-1">
+								<div class="col-sm-1">
+									<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+								</div>
+							</div>
+						</form>
+					</div>
+				</div>
+				<div class="col-xs-6">
+					<div class="box">
+						<!-- /.box-header -->
+						<div class="box-body table-responsive">
+							<table class="table table-bordered table-striped">
+								<thead>
+									<tr>
+										<th>序号</th>
+										<th>单词</th>
+										<th>中文释义</th>
+										<th colspan="2">操作</th>
+									</tr>
+								</thead>
+								<tbody>
+									<volist name="list" id="val" mod='2'>
+									<eq name='mod' value='0'>
+									<tr>
+										<td><{$i}></td>
+										<td><a href="/admin/words/edit?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>"><{$val['words_name']}></a></td>
+										<td title="<{$val['words_text']}>"><{$val['words_text']|msubstr=0,20,'utf-8'}></td>
+										<td>
+											&nbsp;<a href="/admin/words/edit?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>">编辑</a>
+											&nbsp;<a href="/admin/words/del?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+										</td>
+									</tr>
+									</eq>
+									</volist>
+									<empty name="list">
+									<tr>
+										<td colspan="5" align="center">没有记录</td>
+									</tr>
+									</empty>
+								</tbody>
+							</table>
+
+						</div>
+						<!-- /.box-body -->
+					</div>
+				</div>
+				<div class="col-xs-6">
+					<div class="box">
+						<!-- /.box-header -->
+						<div class="box-body table-responsive">
+							<table class="table table-bordered table-striped">
+								<thead>
+									<tr>
+										<th>序号</th>
+										<th>单词</th>
+										<th>中文释义</th>
+										<th colspan="2">操作</th>
+									</tr>
+								</thead>
+								<tbody>
+									<volist name="list" id="val" mod='2'>
+									<eq name='mod' value='1'>
+									<tr>
+										<td><{$i}></td>
+										<td><a href="/admin/words/edit?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>"><{$val['words_name']}></a></td>
+										<td title="<{$val['words_text']}>"><{$val['words_text']|msubstr=0,20,'utf-8'}></td>
+										<td>
+											&nbsp;<a href="/admin/words/edit?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>">编辑</a>
+											&nbsp;<a href="/admin/words/del?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+										</td>
+									</tr>
+									</eq>
+									</volist>
+									<empty name="list">
+									<tr>
+										<td colspan="5" align="center">没有记录</td>
+									</tr>
+									</empty>
+								</tbody>
+							</table>
+
+						</div>
+						<!-- /.box-body -->
+					</div>
+				</div>
+			
+				<div class="col-xs-12">
+					<div class="box">
+						<!-- /.box-body -->
+						<{$page}>
+					</div>
+					<!-- /.box -->
+				</div>
+			</div>
+			<div class="col-xs-12 tabpane" style="display:none;"><{$info['course_intro']}></div>
+			<div class="col-xs-12 tabpane" style="display:none;">
+				<div class="ylcon">
+				
+					<div id="messDivId" style="width:60%;">
+						<volist name="reply" id="val">
+						<div class="story">
+						<div class="opbtn"></div>
+						
+						<p class="story_t"><div style="float:left;"><img src="<{$val['user_icon']}>" style="width:20px;"></div>&nbsp;<{$val['user_name']}><span style="float:right;background-color:">👍<{$val['praise']}></span></p>
+						<p class="story_time" style="padding-left:20px;"><{$val['operate_dt']}></p>
+						<p class="story_m" style="padding-left:20px;"><{$val['reply_content']}></p>
+						<volist name="val.reply_list" id="val">
+						<p class="story_hf" style="padding-left:20px;"><{$val['user_name']}><span style="float:right;"><{$val['operate_dt']}></span><br><{$val['reply_content']}></p>
+						</volist>
+						</div>
+						</volist>
+						
+					</div>
+				</div>
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+<script>
+var span = document.querySelectorAll('#tab span'),       //css选择器
+    div = document.querySelectorAll('.tabpane');
+
+for(var i=0;i<span.length;i++){                   //循环span标签
+    span[i].idx = i;                                    
+//给span一个自定义的idx属性,将I赋值进去,因为下边的循环不能直接拿到这个循环的i
+    span[i].onclick = function(){
+        for(var j=0;j<div.length;j++){         //循环div标签
+            div[j].style.display = 'none';    //每次点击都先隐藏掉div,并移除class
+            span[j].classList.remove('active');
+        }
+        div[this.idx].style.display = 'block';           //给当前div显示出来
+        this.classList.add('active');                      //增加class
+    }
+}
+</script>
+</body>
+</html>

+ 78 - 0
www.hanlinyuanonline.com/Application/Admin/View/Course/edit.html

@@ -0,0 +1,78 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑课程</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">课程类型:</button>
+                                        </div><!-- /btn-group -->
+                                        <select name="course_type" class="form-control">
+                                        	<volist name="typeList" id="val">
+                                        	<option <if condition="$info['course_type'] eq $val['type_id']">selected="selected"</if> value="<{$val['type_id']}>"><{$val['type_name']}></option>
+                                        	</volist>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">课程名称:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="course_name" value="<{$info['course_name']}>" class="form-control" required/>
+                                    </div>
+                                </div>
+								<div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">课程介绍:</button>
+                                        </div><!-- /btn-group -->
+										<textarea rows="5" cols="102" name="course_intro" ><{$info['course_intro']}></textarea>
+                                      
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="course_id" id="course_id" value="<{$info['course_id']}>" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 131 - 0
www.hanlinyuanonline.com/Application/Admin/View/Course/import.html

@@ -0,0 +1,131 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post" id="myForm"   enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">单词导入</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">课程选择:</button>
+                                        </div><!-- /btn-group -->
+                                        <select name="course_id" class="form-control">
+                                        	<volist name="Course" id="val">
+                                        	<option <if condition="$info['course_id'] eq $val['course_id']">selected="selected"</if> value="<{$val['course_id']}>"><{$val['course_name']}></option>
+                                        	</volist>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">文件上传:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="file" id="file" name="file" value="上传" class="form-control"/>
+                                    </div>
+                                </div>
+								<div class="form-group" id="load" style="display:none;">
+                                    <div class="input-group margin col-xs-6">
+                                        <img style="display:block;margin:0 auto;" src="/Public/images/loading.gif" >
+                                    </div>
+                                </div>
+								
+								
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <button class="btn btn-primary" id="submit1" type="button">提交</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+								<a href="/import/course.zip" target="_blank" class="btn btn-primary">模板</a>
+								
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+<script>
+var run=0;
+var id=0;
+var clock;
+$('#submit1').click(function(){
+	if(run){
+		alert('当前有任务在运行,请耐心等待');
+		return;
+	}
+	var form = new FormData(document.getElementById("myForm"));
+	$.ajax({
+		type :"post",
+		url : "/admin/course/import?step=2",
+		data : form,
+		dataType: 'json',
+		processData:false,
+		//告诉jQuery不要去设置Content-Type请求头,因为表单已经设置了multipart/form-data
+		contentType:false,
+		success :function (res) {
+			if(res.code){
+				alert(res.msg);
+				return;
+			}else{
+				run=1;
+				id=res.data.id;
+				$('#load').show();
+				clock = setInterval(task, 1000);
+			}
+		}
+	})
+
+});
+function task(){
+	$.ajax({
+		url:"/admin/course/task", //请求的url地址
+		dataType:"json", //返回格式为json
+		async:false,//请求是否异步,默认为异步,这也是ajax重要特性
+		data:{"id":id}, //参数值
+		type:"GET", //请求方式
+		
+		success:function(res){
+			if(res.data.status==0){
+				return;
+			}
+			run=0;
+			id=0;
+			clearInterval(clock);
+			$('#load').hide();
+			alert(res.data.note);
+		},
+		
+	});
+}
+</script>
+</body>
+</html>

+ 128 - 0
www.hanlinyuanonline.com/Application/Admin/View/Course/index.html

@@ -0,0 +1,128 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-10">
+                            <div class="btn-group">
+                                <select name="sort" class="form-control input-sm">
+                                	<volist name="orderList" id="v">
+                                    <option <if condition="$sort eq $v[2]">selected="selected"</if> value="<{$v[2]}>"><{$v[1]}></option>
+                                    </volist>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <select name="course_status" class="form-control input-sm">
+                                	<foreach name="statusList" item="r" key="k">
+                                    <option <if condition="$courseStatus eq $k">selected="selected"</if> value="<{$k}>"><{$r}></option>
+                                    </foreach>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <select name="course_type" class="form-control input-sm">
+                                	<option value="">全部类型</option>
+                                	<foreach name="typeList" item="r" key="k">
+                                    <option <if condition="$courseType eq $k">selected="selected"</if> value="<{$k}>"><{$r}></option>
+                                    </foreach>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入课程ID或者名称" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+		
+                        <div class="col-sm-2">
+								<a href="/export.zip" target="_blank" class="btn btn-primary" style="float:left;margin-right:10px;">导出备份</a>
+								<a href="/admin/course/edit" class="btn btn-primary" style="float:left;">新增课程</a>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>课程ID</th>
+									<th>课程名称</th>
+									<th>课程类型</th>
+									<th>课程单词量</th>
+									<th>加入量</th>
+									<th>创建时间</th>
+									<th>状态</th>
+									<th colspan="4">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/course/detail?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$typeList[$val['course_type']]}></td>
+									<td><{$val['course_num']}></td>
+									<td><{$val['course_join']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><{$statusList[$val['course_status']]}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										&nbsp;<a href="/admin/course/detail?course_id=<{$val['course_id']}>">查看</a>
+										<if condition="$val['course_status'] eq 3">
+										&nbsp;<a href="/admin/course/status?course_id=<{$val['course_id']}>&course_status=1" onclick="return confirm('确定下架吗?')">下架</a>
+										<else />
+										&nbsp;<a href="/admin/course/status?course_id=<{$val['course_id']}>&course_status=3" onclick="return confirm('确定上架吗?')">上架</a>
+										</if>
+										&nbsp;<a href="/admin/course/edit?course_id=<{$val['course_id']}>">编辑</a>
+										&nbsp;<a href="/admin/course/import?course_id=<{$val['course_id']}>">导入</a>
+										&nbsp;<a href="/admin/course/del?course_id=<{$val['course_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="12" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 71 - 0
www.hanlinyuanonline.com/Application/Admin/View/Coursetype/course.html.bak

@@ -0,0 +1,71 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="row pad">
+					<div class="col-sm-1">
+						<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+					</div>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>课程ID</th>
+									<th>课程名称</th>
+									<th>课程单词量</th>
+									<th>课程累计加入量</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$val['course_id']}></td>
+									<td><{$val['course_name']}></td>
+									<td><{$val['course_num']}></td>
+									<td><{$val['course_join']}></td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="4" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 57 - 0
www.hanlinyuanonline.com/Application/Admin/View/Coursetype/edit.html

@@ -0,0 +1,57 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑课程分类</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">课程类型:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="type_name" value="<{$info['type_name']}>" class="form-control" required/>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="type_id" id="type_id" value="<{$info['type_id']}>" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 76 - 0
www.hanlinyuanonline.com/Application/Admin/View/Coursetype/index.html

@@ -0,0 +1,76 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<div class="box-header">
+						<h3 class="box-title">
+							<a href="/admin/coursetype/edit" class="btn btn-primary">新增课程类型</a>
+						</h3>
+					</div>
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>课程类型</th>
+									<th>所含课程</th>
+									<th colspan="3">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['type_name']}></td>
+									<td><{$val['type_num']}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										&nbsp;<a href="/admin/coursetype/course?type_id=<{$val['type_id']}>">查看</a>
+										&nbsp;<a href="/admin/coursetype/edit?type_id=<{$val['type_id']}>">编辑</a>
+										<if condition="$val['type_num'] eq 0">
+										&nbsp;<a href="/admin/coursetype/del?type_id=<{$val['type_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+										</if>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="6" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 107 - 0
www.hanlinyuanonline.com/Application/Admin/View/Feedback/index.html

@@ -0,0 +1,107 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                        	<div class="btn-group">
+                                <select name="fb_status" class="form-control input-sm">
+                                	<option value="0">全部</option>
+                                	<option value="1" <if condition="$fbStatus==1">selected="selected"</if>>未处理</option>
+                                	<option value="2" <if condition="$fbStatus==2">selected="selected"</if>>已处理</option>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/feedback/sys" class="btn btn-primary">系统反馈</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>反馈账号</th>
+									<th>用户名称</th>
+									<th>对应课程id</th>
+									<th>课程名称</th>
+									<th>对应单词</th>
+									<th>错误信息</th>
+									<th>反馈时间</th>
+									<th>状态</th>
+									<th>操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['user_phone']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['course_id']}></td>
+									<td><{$val['course_name']}></td>
+									<td><{$val['words_name']}></td>
+									<td><{$val['fb_content']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><if condition="$val['fb_status'] eq 1">未处理<else />已处理</if></td>
+									<td>
+									<if condition="$val['fb_status'] eq 1">
+									&nbsp;<a href="/admin/feedback/status?fb_id=<{$val['fb_id']}>">标记已处理</a>
+									<else />
+									--
+									</if>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="10" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 81 - 0
www.hanlinyuanonline.com/Application/Admin/View/Feedback/sys.html

@@ -0,0 +1,81 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/feedback/index" class="btn btn-primary">单词反馈</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>用户id</th>
+									<th>反馈账号</th>
+									<th>用户名称</th>
+									<th>错误信息</th>
+									<th>反馈时间</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['user_id']}></td>
+									<td><{$val['user_phone']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['fb_content']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 116 - 0
www.hanlinyuanonline.com/Application/Admin/View/Good/add.html

@@ -0,0 +1,116 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+<link rel="stylesheet" href="__PUBLIC__/css/iCheck/all.css">
+<link rel="stylesheet" href="__PUBLIC__/css/iCheck/square/blue.css">
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<form name="form1" method="get" action="/admin/good/add">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th><input type="checkbox" name="modules_all" id="modules_all" value="modules_all" />全选</th>
+									<th>序号</th>
+									<th>课程ID</th>
+									<th>课程名称</th>
+									<th>课程单词量</th>
+									<th>加入量</th>
+									<th>上传用户</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td>
+										<empty name="val['good_id']">
+										<input value="<{$val['course_id']}>" name="course_id[]" id="module_<{$row['course_id']}>" type="checkbox">
+										</empty>
+									</td>
+									<td><{$i}></td>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/course/detail?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$val['course_num']}></td>
+									<td><{$val['course_join']}></td>
+									<td><{$val['user_name']}></td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="7" align="center">没有记录</td>
+								</tr>
+								<else /> 
+								<tr>
+									<td colspan="7" align="center">
+										<div class="btn-group">
+											<input type="hidden" name="step" value="2">
+			                                <button class="btn btn-sm btn-primary" name="sub" id="sub" type="submit">确认添加</button>
+			                            </div>
+									</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+						</form>
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+<script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
+    <script type="text/javascript">
+        $(function(){
+            $('input').iCheck({
+                checkboxClass: 'icheckbox_square-blue',
+                radioClass: 'iradio_square-blue',
+                increaseArea: '20%' // optional
+            });
+            $("#modules_all").on('ifUnchecked', function(event) {
+                $("input[type='checkbox']").iCheck("uncheck");
+            });
+            $("#modules_all").on('ifChecked', function(event) {
+                $("input[type='checkbox']").iCheck("check");
+            });
+            $('#sub').on('click',function () {
+                var str="";
+                var ids="";
+                $("input[name='course_id[]']:checkbox").each(function(){
+                    if(true == $(this).is(':checked')){
+                        str+=$(this).val()+",";
+                    }
+                });
+                if(str.substr(str.length-1)== ','){
+                    ids = str.substr(0,str.length-1);
+                }
+                if(ids.length==0){
+                    alert('请选择需要添加的课程');
+                    return false;
+                }
+            })
+        })
+    </script>
+</body>
+</html>

+ 65 - 0
www.hanlinyuanonline.com/Application/Admin/View/Good/edit.html

@@ -0,0 +1,65 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑信息</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">排序ID:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="good_sort" value="<{$info['good_sort']}>" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">介绍说明:</button>
+                                        </div><!-- /btn-group -->
+                                        <textarea class="form-control" rows="8" name="course_info" placeholder="介绍说明"><{$info['course_info']}></textarea>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="good_id" id="good_id" value="<{$info['good_id']}>" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 112 - 0
www.hanlinyuanonline.com/Application/Admin/View/Good/index.html

@@ -0,0 +1,112 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get" action="/admin/good/index">
+                        <div class="col-sm-10">
+                            <div class="btn-group">
+                                <select name="sort" class="form-control input-sm">
+                                	<volist name="orderList" id="v">
+                                    <option <if condition="$sort eq $v[2]">selected="selected"</if> value="<{$v[2]}>"><{$v[1]}></option>
+                                    </volist>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+                        		<if condition="$resShow['good_show'] eq  0">
+								<a href="/admin/good/status?good_show=1" class="btn btn-primary">启用推送</a>
+								<else />
+								<a href="/admin/good/status?good_show=0" class="btn btn-primary">禁用推送</a>
+								</if>
+							</div>
+						</div>
+						<div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/good/add" class="btn btn-primary">新增课程</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>排序ID</th>
+									<th>课程ID</th>
+									<th>课程名称</th>
+									<th>课程单词量</th>
+									<th>加入量</th>
+									<th>上传用户</th>
+									<th>介绍</th>
+									<th colspan="3">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['good_sort']}></td>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/course/detail?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$val['course_num']}></td>
+									<td><{$val['course_join']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['course_info']}></td>
+									<td>
+										<a href="/admin/course/detail?course_id=<{$val['course_id']}>">查看</a>
+										<a href="/admin/good/edit?good_id=<{$val['good_id']}>">编辑</a>
+										<a href="/admin/good/del?good_id=<{$val['good_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="11" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 162 - 0
www.hanlinyuanonline.com/Application/Admin/View/Index/index.html

@@ -0,0 +1,162 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+		<script src="__PUBLIC__/js/My97DatePicker/WdatePicker.js"></script>
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-10">
+                            <div class="btn-group">
+                                时间:<input id="startDate" name="start_date" value="<{$startDate}>" class="Wdate" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')}'})"/>
+                                <input id="endDate" name="end_date" value="<{$endDate}>" class="Wdate" type="text" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startDate\')}'})"/>
+                            </div>
+                            <div class="btn-group">
+                                <select name="day_type" id="day_type" class="form-control input-sm">
+                                    <option <if condition="$dayType eq 1">selected="selected"</if> value="1">今天</option>
+                                    <option <if condition="$dayType eq 2">selected="selected"</if> value="2">昨天</option>
+                                    <option <if condition="$dayType eq 3">selected="selected"</if> value="3">最近7天</option>
+                                    <option <if condition="$dayType eq 4">selected="selected"</if> value="4">最近30天</option>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                            	<input type="hidden" name="flag" id="flag" value="2" />
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit"><i class="fa fa-search"></i></button>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+	        <div class="col-md-6">
+	        	<!-- BAR CHART -->
+                <div class="box box-success">
+                    <div class="box-header">
+                        <h3 class="box-title">总数</h3>
+                    </div>
+                    <div class="box-body chart-responsive">
+                    <div style="height: 300px;">
+                        <table class="table table-bordered table-striped">
+	                        <tbody>
+		                        <tr>
+		                            <th>总用户数</th>
+		                            <th>normal模式对战次数</th>
+		                            <th>rank模式对战次数</th>
+		                            <th>人机对战次数</th>
+		                        </tr>
+		                        <tr>
+		                            <td><{$info['reg']}></td>
+		                            <td><{$info['normal']}></td>
+		                            <td><{$info['rank']}></td>
+		                            <td><{$info['pve']}></td>
+		                        </tr>
+	                    	</tbody>
+	                	</table>
+	                	</div>
+                    </div><!-- /.box-body -->
+                </div><!-- /.box -->
+	            <!-- AREA CHART -->
+	            <div class="box box-primary">
+	                <div class="box-header">
+	                    <h3 class="box-title">新增用户数</h3>
+	                </div>
+	                <div class="box-body chart-responsive">
+	                    <div class="chart" id="regChart" style="height: 300px;"></div>
+	                </div><!-- /.box-body -->
+	            </div><!-- /.box -->
+				<div class="box box-warning">
+                    <div class="box-header">
+                        <h3 class="box-title">新增人机模式对战次数</h3>
+                    </div>
+                    <div class="box-body chart-responsive">
+                        <div class="chart" id="pveChart" style="height: 300px;"></div>
+                    </div><!-- /.box-body -->
+                </div><!-- /.box -->
+	        </div><!-- /.col (LEFT) -->
+            <div class="col-md-6">
+             	<!-- DONUT CHART -->
+	            <div class="box box-danger">
+	                <div class="box-header">
+	                    <h3 class="box-title">新增normal模式对战次数</h3>
+	                </div>
+	                <div class="box-body chart-responsive">
+	                    <div class="chart" id="normalChart" style="height: 300px; position: relative;"></div>
+	                </div><!-- /.box-body -->
+	            </div><!-- /.box -->
+                <!-- LINE CHART -->
+                <div class="box box-info">
+                    <div class="box-header">
+                        <h3 class="box-title">新增rank模式对战次数</h3>
+                    </div>
+                    <div class="box-body chart-responsive">
+                        <div class="chart" id="rankChart" style="height: 300px;"></div>
+                    </div><!-- /.box-body -->
+                </div><!-- /.box -->
+            </div><!-- /.col (RIGHT) -->
+        </div><!-- /.row -->
+        <script type="text/javascript" src="__PUBLIC__/js/echarts.min.js"></script>
+        <script type="text/javascript">
+        	$(function(){
+        		console.log(222);
+        		$('#day_type').on('change',function(){
+        			console.log(111);
+        			$('#flag').val('1');
+        		});
+        	})
+        	var regChart = echarts.init(document.getElementById('regChart'));
+        	var regOption = {
+        	        tooltip : {trigger: 'axis'},
+        	        xAxis : [{type : 'category',boundaryGap : false,data : [<{$xAxis}>]}],
+        	        yAxis : [{type : 'value'}],
+        	        series : [{name:'数量',type:'line',data:[<{$yAxisReg}>],itemStyle:{normal:{color:'#3c8dbc',lineStyle:{width:3,color:'#3c8dbc'}}},}]
+        	    };
+        	    regChart.setOption(regOption);
+        	    
+        	    var normalChart = echarts.init(document.getElementById('normalChart'));
+            	var normalOption = {
+            	        tooltip : {trigger: 'axis'},
+            	        xAxis : [{type : 'category',boundaryGap : false,data : [<{$xAxis}>]}],
+            	        yAxis : [{type : 'value'}],
+            	        series : [{name:'数量',type:'line',data:[<{$yAxisNormal}>],itemStyle:{normal:{color:'#3c8dbc',lineStyle:{width:3,color:'#3c8dbc'}}},}]
+            	    };
+            	normalChart.setOption(normalOption);
+            	    
+            	    var rankChart = echarts.init(document.getElementById('rankChart'));
+                	var rankOption = {
+                	        tooltip : {trigger: 'axis'},
+                	        xAxis : [{type : 'category',boundaryGap : false,data : [<{$xAxis}>]}],
+                	        yAxis : [{type : 'value'}],
+                	        series : [{name:'数量',type:'line',data:[<{$yAxisRank}>],itemStyle:{normal:{color:'#3c8dbc',lineStyle:{width:3,color:'#3c8dbc'}}},}]
+                	    };
+                	rankChart.setOption(rankOption);
+                	
+                	var pveChart = echarts.init(document.getElementById('pveChart'));
+                	var pveOption = {
+                	        tooltip : {trigger: 'axis'},
+                	        xAxis : [{type : 'category',boundaryGap : false,data : [<{$xAxis}>]}],
+                	        yAxis : [{type : 'value'}],
+                	        series : [{name:'数量',type:'line',data:[<{$yAxisPve}>],itemStyle:{normal:{color:'#3c8dbc',lineStyle:{width:3,color:'#3c8dbc'}}},}]
+                	    };
+                	pveChart.setOption(pveOption);
+        </script>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 108 - 0
www.hanlinyuanonline.com/Application/Admin/View/Index/pwd.html

@@ -0,0 +1,108 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+		<link href="__PUBLIC__/css/bootstrapValidator.min.css" rel="stylesheet" type="text/css" />
+		<script src="__PUBLIC__/js/bootstrap.min.js" type="text/javascript"></script>     
+		<script src="__PUBLIC__/js/bootstrapValidator.min.js" type="text/javascript"></script>
+		<script type="text/javascript">
+        	$(function(){
+        		$('#defaultForm').bootstrapValidator({
+        			 message: '必填字段',
+        			 feedbackIcons: {
+       		            valid: 'glyphicon glyphicon-ok',
+       		            invalid: 'glyphicon glyphicon-remove',
+       		            validating: 'glyphicon glyphicon-refresh'
+       		         },
+       		      	 fields: {
+       		      		old_pwd: {validators: {notEmpty: {message: '请输入原密码'}}},
+       		      		new_pwd: {validators: {
+       		      			notEmpty: {message: '请输入新密码'},
+	       		      		stringLength: {min: 6,max: 20,message: '长度必须在6到30之间'},
+	                     	//different: {field: 'admin_account',message: '不能和用户名相同'},
+       		      		}},
+       		      		new_repwd: {validators: {
+       		      			notEmpty: {message: '请输入确认密码'},
+	       		      		stringLength: {min: 6,max: 20,message: '长度必须在6到30之间'},
+	       		      		identical: {field: 'new_pwd',message: '两次输入的新密码不一致,请重新输入'},
+	                     	//different: {field: 'admin_account',message: '不能和用户名相同'},
+       		      		}},
+       		      		
+       		      	 },
+        		});
+        	})
+        </script>
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post" id="defaultForm" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">修改密码</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">账号:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="admin_account" value="<{$info['admin_account']}>" disabled="disabled" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">原密码:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="password" name="old_pwd" value="" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">新密码:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="password" name="new_pwd" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">确认密码:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="password" name="new_repwd" class="form-control" required/>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 78 - 0
www.hanlinyuanonline.com/Application/Admin/View/Login/index.html

@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html class="bg-black">
+    <head>
+        <meta charset="UTF-8">
+        <title>碰词儿后台管理系统</title>
+        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
+        <!-- bootstrap 3.0.2 -->
+        <link href="__PUBLIC__/css/bootstrap.css" rel="stylesheet" type="text/css" />
+        <!-- font Awesome -->
+        <link href="__PUBLIC__/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
+        <!-- Theme style -->
+        <link href="__PUBLIC__/css/AdminLTE.css" rel="stylesheet" type="text/css" />
+        <link href="__PUBLIC__/css/bootstrapValidator.min.css" rel="stylesheet" type="text/css" />
+
+        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+        <!--[if lt IE 9]>
+          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
+        <![endif]-->
+    </head>
+    <body class="bg-black">
+
+        <div class="form-box" id="login-box">
+            <div class="header">碰词儿后台管理系统</div>
+            <form method="post" id="defaultForm">
+                <div class="body bg-gray">
+                    <div class="form-group">
+                        <input type="text" name="admin_account" class="form-control" placeholder="用户名" />
+                    </div>
+                    <div class="form-group">
+                        <input type="password" name="admin_pwd" id="admin_pwd" class="form-control" placeholder="密码" required/>
+                    </div>
+                    
+                     <!-- <div class="input-group"> -->
+                       <div class="form-group">
+                        <div class="col-sm-7" style="padding-left:0px;padding-right: 5px">
+                     		<input type="text" name="admin_code" id="admin_code" class="form-control" placeholder="验证码" required/>
+                     	</div>
+                     	<span class="input-group-addon" style="padding:0px;text-align:left;width:auto">
+                     	 <img id="secpic" style='cursor:pointer;height: 33px;' onclick="updateseccode()" src="/admin/login/code"/>
+                        </span>
+                    </div>  
+                </div>
+                <div class="footer">
+                	<input type="hidden" name="step" value="2">
+                    <button type="submit" class="btn bg-olive btn-block">立即登录</button>  
+                </div>
+            </form>
+        </div>
+        <!-- jQuery 2.0.2 -->
+        <script src="__PUBLIC__/js/jquery.min.js"></script>
+        <!-- Bootstrap -->
+        <script src="__PUBLIC__/js/bootstrap.min.js" type="text/javascript"></script>     
+        <script src="__PUBLIC__/js/bootstrapValidator.min.js" type="text/javascript"></script>     
+        <script type="text/javascript">
+        	$(function(){
+        		$('#defaultForm').bootstrapValidator({
+        			 message: '必填字段',
+        			 feedbackIcons: {
+       		            valid: 'glyphicon glyphicon-ok',
+       		            invalid: 'glyphicon glyphicon-remove',
+       		            validating: 'glyphicon glyphicon-refresh'
+       		         },
+       		      	 fields: {
+       		      		 admin_account: {validators: {notEmpty: {message: '请输入账号'}}},
+       		      		 admin_pwd: {validators: {notEmpty: {message: '请输入密码'}}},
+       		      		 admin_code: {validators: {notEmpty: {message: '请输入密码'}}},
+       		      	 },
+        		});
+        	})
+	        function updateseccode() {
+	            $('#secpic').attr('src', '/admin/login/code?update=' + Math.random());
+	        }
+        </script>   
+
+    </body>
+</html>

+ 114 - 0
www.hanlinyuanonline.com/Application/Admin/View/Manager/edit.html

@@ -0,0 +1,114 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+		<link href="__PUBLIC__/css/bootstrapValidator.min.css" rel="stylesheet" type="text/css" />
+		<script src="__PUBLIC__/js/bootstrap.min.js" type="text/javascript"></script>     
+		<script src="__PUBLIC__/js/bootstrapValidator.min.js" type="text/javascript"></script>
+		<script type="text/javascript">
+        	$(function(){
+        		$('#defaultForm').bootstrapValidator({
+        			 message: '必填字段',
+        			 feedbackIcons: {
+       		            valid: 'glyphicon glyphicon-ok',
+       		            invalid: 'glyphicon glyphicon-remove',
+       		            validating: 'glyphicon glyphicon-refresh'
+       		         },
+       		      	 fields: {
+       		      		admin_account: {validators: {
+       		      			notEmpty: {message: '请输入账号'},
+       		      			stringLength: {min: 6,max: 20,message: '长度必须在6到30之间'},
+       		            }},
+       		      		new_pwd: {validators: {
+       		      			notEmpty: {message: '请输入新密码'},
+	       		      		stringLength: {min: 6,max: 20,message: '长度必须在6到30之间'},
+	                     	//different: {field: 'admin_account',message: '不能和用户名相同'},
+       		      		}},
+       		      		new_repwd: {validators: {
+       		      			notEmpty: {message: '请输入确认密码'},
+	       		      		stringLength: {min: 6,max: 20,message: '长度必须在6到30之间'},
+	       		      		identical: {field: 'new_pwd',message: '两次输入的新密码不一致,请重新输入'},
+	                     	//different: {field: 'admin_account',message: '不能和用户名相同'},
+       		      		}},
+       		      		
+       		      	 },
+        		});
+        	})
+        </script>
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post" id="defaultForm" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">新建账号</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                            	<div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">用户类型:</button>
+                                        </div><!-- /btn-group -->
+                                        <select name="group_id" class="form-control" required>
+                                        	<option value="1">超级管理员</option>
+                                        	<option value="2">管理员</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">账号:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="admin_account" value="<{$info['admin_account']}>" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">密码:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="password" name="new_pwd" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">确认密码:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="password" name="new_repwd" class="form-control" required/>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 93 - 0
www.hanlinyuanonline.com/Application/Admin/View/Manager/index.html

@@ -0,0 +1,93 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="row pad">
+					<form name="form1" method="get">
+						<div class="col-sm-11">
+							<div class="btn-group">
+								<input type="text" placeholder="账号" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+							</div>
+							<div class="btn-group">
+								<button class="btn btn-sm btn-primary" name="sub" type="submit">
+									<i class="fa fa-search"></i>
+								</button>
+							</div>
+						</div>
+						<div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/manager/edit" class="btn btn-primary">新增管理员</a>
+							</div>
+						</div>
+					</form>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>用户ID</th>
+									<th>用户名</th>
+									<th>角色</th>
+									<th>创建时间</th>
+									<th>操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['admin_id']}></td>
+									<td><{$val['admin_account']}></td>
+									<td><if condition="$val['group_id'] eq 1">超级管理员<else />管理员</if></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td>
+										<if condition="$val['admin_id'] neq 1">
+										&nbsp;<a href="/admin/manager/del?admin_id=<{$val['admin_id']}>">删除</a>
+										</if>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="6" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 65 - 0
www.hanlinyuanonline.com/Application/Admin/View/Notepad/edit.html

@@ -0,0 +1,65 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑自由记</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">自由记名称:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="course_name" value="<{$info['course_name']}>" placeholder="请输入自由记名称" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">自由记内容:</button>
+                                        </div><!-- /btn-group -->
+                                        <textarea class="form-control" rows="8" name="course_content" placeholder="请输入自由记内容"><{$info['course_content']}></textarea>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="course_id" id="course_id" value="<{$info['course_id']}>" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 113 - 0
www.hanlinyuanonline.com/Application/Admin/View/Notepad/index.html

@@ -0,0 +1,113 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                            <div class="btn-group">
+                                <select name="sort" class="form-control input-sm">
+                                	<volist name="orderList" id="v">
+                                    <option <if condition="$sort eq $v[2]">selected="selected"</if> value="<{$v[2]}>"><{$v[1]}></option>
+                                    </volist>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <select name="course_status" class="form-control input-sm">
+                                	<foreach name="statusList" item="r" key="k">
+                                    <option <if condition="$courseStatus eq $k">selected="selected"</if> value="<{$k}>"><{$r}></option>
+                                    </foreach>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入自由记ID或者名称" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/notepad/edit" class="btn btn-primary">新增自由记</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>自由记ID</th>
+									<th>自由记名称</th>
+									<th>加入量</th>
+									<th>创建时间</th>
+									<th>状态</th>
+									<th colspan="3">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['course_id']}></td>
+									<td><{$val['course_name']}></td>
+									<td><{$val['course_join']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><{$statusList[$val['course_status']]}></td>
+									<td>
+										<if condition="$val['course_status'] eq 3">
+										&nbsp;<a href="/admin/notepad/status?course_id=<{$val['course_id']}>&course_status=1" onclick="return confirm('确定下架吗?')">下架</a>
+										<else />
+										&nbsp;<a href="/admin/notepad/status?course_id=<{$val['course_id']}>&course_status=3" onclick="return confirm('确定上架吗?')">上架</a>
+										</if>
+										&nbsp;<a href="/admin/notepad/edit?course_id=<{$val['course_id']}>">编辑</a>
+										&nbsp;<a href="/admin/notepad/del?course_id=<{$val['course_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="9" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 106 - 0
www.hanlinyuanonline.com/Application/Admin/View/Notice/edit.html

@@ -0,0 +1,106 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑推送内容</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">推送内容:</button>
+                                        </div><!-- /btn-group -->
+                                        <textarea class="form-control" rows="8" name="notice_content" placeholder="请输入推送内容"><{$info['notice_content']}></textarea>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">推送对象:</button>
+                                        </div><!-- /btn-group -->
+                                        <div id="distpicker" class="form-inline  col-xs-12">
+	                                        <div class="form-group">
+	                                        	<div class="radio">
+	                                                <label>
+	                                                    <input type="radio" name="user_type" value="1" <if condition="$info['ref_user_id']==0">checked="checked"</if>>
+	                                                    所有用户
+	                                                </label>
+	                                            </div>
+	                                        </div>
+	                                        <div class="form-group">
+	                                        	<div class="radio">
+	                                                <label>
+	                                                    <input type="radio" name="user_type" value="2" <if condition="$info['ref_user_id']!=0">checked="checked"</if>>
+	                                                    指定用户
+	                                                </label>
+	                                            </div>
+	                                        </div>
+	                                	</div>
+                                    </div>
+                                </div>
+                                <div class="form-group" <if condition="$info['ref_user_id']==0">style="display:none;"</if> id="userIdDiv">
+                                	<div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">用户ID:</button>
+                                        </div><!-- /btn-group -->
+                                        <input name="ref_user_id" type="text" value="<{$info['ref_user_id']}>"  class="form-control" placeholder="请输入用户id,多个用户逗号隔开,例如:10000310,10000311">
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="notice_id" id="notice_id" value="<{$info['notice_id']}>" />
+                                <if condition="$info['notice_id'] ELT 0">
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                </if>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+<script type="text/javascript">
+<!--
+$(function(){
+	$('input[name="user_type"]').on('ifChecked',function(){
+		var user_type = $(this).val();
+		if(user_type==1){
+			$('#userIdDiv').hide();
+		}else{
+			$('#userIdDiv').show();
+		}
+	});
+});
+//-->
+</script>
+</body>
+</html>

+ 79 - 0
www.hanlinyuanonline.com/Application/Admin/View/Notice/index.html

@@ -0,0 +1,79 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<div class="box-header">
+						<h3 class="box-title">
+							<a href="/admin/notice/edit" class="btn btn-primary">新增通知</a>
+						</h3>
+					</div>
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>内容</th>
+									<th>通知对象</th>
+									<th>创建时间</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td title="<{$val['notice_content']}>"><{$val['notice_content']||msubstr=0,80,'utf-8'}></td>
+									<if condition="$val['ref_user_id']==0">
+									<td>所有人</td>
+									<else />
+									<td title="<{$val['ref_user_id']}>"><{$val['ref_user_id']||msubstr=0,19,'utf-8'}></td>
+									</if>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										&nbsp;<a href="/admin/notice/edit?notice_id=<{$val['notice_id']}>">查看</a>
+										&nbsp;<a href="/admin/notice/del?notice_id=<{$val['notice_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 10 - 0
www.hanlinyuanonline.com/Application/Admin/View/Public/bar.html

@@ -0,0 +1,10 @@
+<section class="content-header">
+    <h1>
+        <{$con_name}>
+        <small><{$func_name}></small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-dashboard"></i> </a></li>
+        <li class="active"></li>
+    </ol>
+</section>

+ 276 - 0
www.hanlinyuanonline.com/Application/Admin/View/Public/left.html

@@ -0,0 +1,276 @@
+<!-- sidebar: style can be found in sidebar.less -->
+<section class="sidebar">
+	<!-- Sidebar user panel -->
+	<div class="user-panel">
+		<div class="pull-left image">
+			<img src="__PUBLIC__/img/avatar3.png" class="img-circle"
+				alt="User Image" />
+		</div>
+		<div class="pull-left info">
+			<p>Hello, <{$Think.session.admin_account}></p>
+
+			<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
+		</div>
+	</div>
+	<!-- sidebar menu: : style can be found in sidebar.less -->
+	<ul class="sidebar-menu">
+
+		<if condition="($Think.session.group_id eq 1) and ($Think.session.admin_id eq 1)">
+		<li class="treeview <if condition="$className eq 'Index'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>首页管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/index/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>首页</a>
+				</li>
+			</ul>
+		</li>
+		
+		<li class="treeview <if condition="$className eq 'User'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>用户管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/user/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>用户列表</a>
+				</li>
+			</ul>
+		</li>
+		<li class="treeview <if condition="$className eq 'Coursetype'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>课程分类管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/coursetype/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>分类列表</a>
+				</li>
+				<li>
+					<a href="/admin/coursetype/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>分类添加</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+		<li class="treeview <if condition="($className eq 'Course') OR ($className eq 'Words')">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>课程管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+			
+				<li>
+					<a href="/admin/course/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>课程列表</a>
+				</li>
+			
+				<li>
+					<a href="/admin/course/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>课程添加</a>
+				</li>
+			</ul>
+		</li>
+		
+		<if condition="$Think.session.admin_id eq 1">
+		
+		<li class="treeview <if condition="($className eq 'Choice')">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>社区精选管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/choice/index?choice_type=1" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>社区列表</a>
+				</li>
+				<li>
+					<a href="/admin/choice/index?choice_type=2" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>精选列表</a>
+				</li>
+				<li>
+					<a href="/admin/choice/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>精选添加</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+		<if condition="($Think.session.group_id eq 1) and ($Think.session.admin_id eq 1)">
+		<li class="treeview <if condition="$className eq 'Notepad'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>自由记管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/notepad/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>自由记列表</a>
+				</li>
+				<li>
+					<a href="/admin/notepad/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>自由记添加</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+		<if condition="$Think.session.admin_id eq 1">
+		<li class="treeview <if condition="$className eq 'Square'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>单词广场管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/square/course" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>课程列表</a>
+				</li>
+				<li>
+					<a href="/admin/square/notepad" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>自由记列表</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+		<if condition="($Think.session.group_id eq 1) and ($Think.session.admin_id eq 1)">
+		<li class="treeview <if condition="$className eq 'Notice'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>通知管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/notice/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i> 通知列表</a>
+				</li>
+				<li>
+					<a href="/admin/notice/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i> 通知添加</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+
+		<if condition="$Think.session.admin_id eq 1">
+		<li class="treeview <if condition="$className eq 'Store'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>对战题库管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/store/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>题库列表</a>
+				</li>
+				<li>
+					<a href="/admin/store/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>题库添加</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+		<if condition="($Think.session.group_id eq 1) and ($Think.session.admin_id eq 1)">
+		<li class="treeview <if condition="$className eq 'Feedback'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>反馈管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/feedback/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i> 单词反馈</a>
+				</li>
+				<li>
+					<a href="/admin/feedback/sys" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i> 系统反馈</a>
+				</li>
+			</ul>
+		</li>
+		<li class="treeview <if condition="$className eq 'Soft'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>APP管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/soft/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>APP 列表</a>
+				</li>
+				<li>
+					<a href="/admin/soft/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i> APP添加</a>
+				</li>
+			</ul>
+		</li>
+		<li class="treeview <if condition="$className eq 'Manager'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>账号管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/manager/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>账号列表</a>
+				</li>
+				<li>
+					<a href="/admin/manager/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>账号添加</a>
+				</li>
+			</ul>
+		</li>
+		<li class="treeview <if condition="$className eq 'Good'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>精品课程管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/good/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>课程列表</a>
+				</li>
+				<li>
+					<a href="/admin/good/add" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>课程添加</a>
+				</li>
+			</ul>
+		</li>
+		<li class="treeview <if condition="$className eq 'Slider'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>官网banner管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/slider/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>banner列表</a>
+				</li>
+				<li>
+					<a href="/admin/slider/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>banner添加</a>
+				</li>
+			</ul>
+		</li>
+		<li class="treeview <if condition="$className eq 'Activity'">active</if>">
+			<a href="#"><i class="fa fa-folder"></i>
+			<span>活动管理</span>
+			<i class="fa fa-angle-left pull-right"></i>
+			</a>
+			<ul class="treeview-menu">
+				<li>
+					<a href="/admin/activity/index" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>活动列表</a>
+				</li>
+				<li>
+					<a href="/admin/activity/edit" style="margin-left: 10px;">
+					<i class="fa fa-angle-double-right"></i>活动添加</a>
+				</li>
+			</ul>
+		</li>
+		</if>
+	</ul>
+</section>
+<!-- /.sidebar -->

+ 104 - 0
www.hanlinyuanonline.com/Application/Admin/View/Public/top.html

@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>碰词儿后台管理系统</title>
+<meta
+	content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
+	name='viewport'>
+<!-- bootstrap 3.0.2 -->
+<link href="__PUBLIC__/css/bootstrap.css" rel="stylesheet"
+	type="text/css" />
+<!-- font Awesome -->
+<link href="__PUBLIC__/css/font-awesome.min.css"
+	rel="stylesheet" type="text/css" />
+<!-- Ionicons -->
+<link href="__PUBLIC__/css/ionicons.min.css" rel="stylesheet"
+	type="text/css" />
+
+<!-- Theme style -->
+<link href="__PUBLIC__/css/AdminLTE.css" rel="stylesheet"
+	type="text/css" />
+
+<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+<!--[if lt IE 9]>
+          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+          <script src="https://oss.maxcdn.com/libs/respond.__PUBLIC__/js/1.3.0/respond.min.js"></script>
+        <![endif]-->
+
+<!-- add new calendar event modal -->
+<!-- jQuery 2.0.2 -->
+<script src="__PUBLIC__/js/jquery.min.js"></script>
+<!-- jQuery UI 1.10.3 -->
+<script src="__PUBLIC__/js/jquery-ui-1.10.3.min.js"
+	type="text/javascript"></script>
+<!-- Bootstrap -->
+<script src="__PUBLIC__/js/bootstrap.min.js"
+	type="text/javascript"></script>
+
+<!-- AdminLTE App -->
+<script src="__PUBLIC__/js/AdminLTE/app.js"
+	type="text/javascript"></script>
+
+
+</head>
+<body class="skin-blue">
+	<!-- header logo: style can be found in header.less -->
+	<header class="header">
+		<a href="/admin/index/index" class="logo"> <!-- Add the class icon to your logo image or logo icon to add the margining -->
+			AdminLTE
+		</a>
+		<!-- Header Navbar: style can be found in header.less -->
+		<nav class="navbar navbar-static-top" role="navigation">
+			<!-- Sidebar toggle button-->
+			<a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas"
+				role="button"> <span class="sr-only">Toggle navigation</span> <span
+				class="icon-bar"></span> <span class="icon-bar"></span> <span
+				class="icon-bar"></span>
+			</a>
+			
+			<div class="navbar-right">
+				<div style="float: left;margin-right:15px;width:50px;height:50px;">
+					<a href="/admin/alarm/index" style="display:block;width:50px;height:50px;background:url(__PUBLIC__/img/alarm.png) no-repeat center center;background-size:25px 25px;">
+						<if condition="$Think.session.alarm gt 0">
+						<span style="border-radius: 50%;height: 20px;width: 20px;  display: inline-block;    background: #f30303;      vertical-align: top;float:right;margin-top:5px;margin-right:5px;">  
+							  <span style="display: block;    color: #FFFFFF;    height: 20px;    line-height: 20px;    text-align: center"> <{$Think.session.alarm}></span>  
+						</span>
+						</if>
+					</a>
+
+				</div>
+				<ul class="nav navbar-nav">
+					<!-- Messages: style can be found in dropdown.less-->
+					
+					<!-- User Account: style can be found in dropdown.less -->
+					<li class="dropdown user user-menu"><a href="#"
+						class="dropdown-toggle" data-toggle="dropdown"> <i
+							class="glyphicon glyphicon-user"></i> <span><{$Think.session.admin_account}><i
+								class="caret"></i></span>
+					</a>
+						<ul class="dropdown-menu">
+							<!-- User image -->
+							<li class="user-header bg-light-blue"><img
+								src="__PUBLIC__/img/avatar3.png" class="img-circle"
+								alt="User Image" />
+								<p>
+									<{$Think.session.admin_account}>
+								</p></li>
+							<!-- Menu Body -->
+
+							<!-- Menu Footer-->
+							<li class="user-footer">
+								<div class="pull-left">
+                                       <a href="/admin/index/pwd" class="btn btn-default btn-flat">修改密码</a>
+                                   </div>
+								<div class="pull-right">
+									<a href="/admin/login/logout" class="btn btn-default btn-flat">退出</a>
+								</div>
+							</li>
+						</ul></li>
+				</ul>
+			</div>
+		</nav>
+	</header>

+ 69 - 0
www.hanlinyuanonline.com/Application/Admin/View/Public/top1.html

@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>活动管理后台</title>
+<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">
+<link href="__PUBLIC__/fileinput/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
+<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" media="all" rel="stylesheet" type="text/css"/>
+<link href="__PUBLIC__/fileinput/themes/explorer-fa/theme.css" media="all" rel="stylesheet" type="text/css"/>
+<script src="__PUBLIC__/js/jquery.min.js"></script>
+<script src="__PUBLIC__/js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
+<script src="__PUBLIC__/fileinput/js/plugins/sortable.js" type="text/javascript"></script>
+<script src="__PUBLIC__/fileinput/js/fileinput.js" type="text/javascript"></script>
+<script src="__PUBLIC__/fileinput/js/locales/fr.js" type="text/javascript"></script>
+<script src="__PUBLIC__/fileinput/js/locales/es.js" type="text/javascript"></script>
+<script src="__PUBLIC__/fileinput/themes/explorer-fa/theme.js" type="text/javascript"></script>
+<script src="__PUBLIC__/fileinput/themes/fa/theme.js" type="text/javascript"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" type="text/javascript"></script>
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" type="text/javascript"></script>
+<link href="__PUBLIC__/css/AdminLTE.css" rel="stylesheet" type="text/css" />
+<link href="__PUBLIC__/css/ionicons.min.css" rel="stylesheet" type="text/css" />
+<script src="__PUBLIC__/js/AdminLTE/app.js" type="text/javascript"></script>
+</head>
+<body class="skin-blue">
+	<!-- header logo: style can be found in header.less -->
+	<header class="header">
+		<a href="index.html" class="logo"> <!-- Add the class icon to your logo image or logo icon to add the margining -->
+			AdminLTE
+		</a>
+		<!-- Header Navbar: style can be found in header.less -->
+		<nav class="navbar navbar-static-top" role="navigation">
+			<!-- Sidebar toggle button-->
+			<a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas"
+				role="button"> <span class="sr-only">Toggle navigation</span> <span
+				class="icon-bar"></span> <span class="icon-bar"></span> <span
+				class="icon-bar"></span>
+			</a>
+			<div class="navbar-right">
+				<ul class="nav navbar-nav">
+					<!-- Messages: style can be found in dropdown.less-->
+					
+					<!-- User Account: style can be found in dropdown.less -->
+					<li class="dropdown user user-menu"><a href="#"
+						class="dropdown-toggle" data-toggle="dropdown"> <i
+							class="glyphicon glyphicon-user"></i> <span><{$Think.session.admin_account}><i
+								class="caret"></i></span>
+					</a>
+						<ul class="dropdown-menu">
+							<!-- User image -->
+							<li class="user-header bg-light-blue"><img
+								src="__PUBLIC__/img/avatar3.png" class="img-circle"
+								alt="User Image" />
+								<p>
+									<{$Think.session.admin_account}>
+								</p></li>
+							<!-- Menu Body -->
+
+							<!-- Menu Footer-->
+							<li class="user-footer">
+								<div class="pull-right">
+									<a href="/admin/login/logout" class="btn btn-default btn-flat">退出</a>
+								</div>
+							</li>
+						</ul></li>
+				</ul>
+			</div>
+		</nav>
+	</header>

+ 81 - 0
www.hanlinyuanonline.com/Application/Admin/View/Public/topbak.html

@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>活动管理后台</title>
+<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
+<link href="__PUBLIC__/css/AdminLTE.css" rel="stylesheet" type="text/css" />
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">
+<!-- font Awesome -->
+<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" media="all" rel="stylesheet" type="text/css"/>
+<link href="__PUBLIC__/js/themes/explorer-fa/theme.css" media="all" rel="stylesheet" type="text/css"/>
+<!-- Ionicons -->
+<link href="__PUBLIC__/css/ionicons.min.css" rel="stylesheet" type="text/css" />
+<!-- Theme style -->
+
+<link href="__PUBLIC__/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
+<!-- add new calendar event modal -->
+<!-- jQuery 2.0.2 -->
+<script src="__PUBLIC__/js/jquery.min.js"></script>
+<!-- jQuery UI 1.10.3 -->
+<script src="__PUBLIC__/js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
+<!-- Bootstrap -->
+<script src="__PUBLIC__/js/bootstrap.min.js" type="text/javascript"></script>
+
+<!-- AdminLTE App -->
+<script src="__PUBLIC__/js/AdminLTE/app.js" type="text/javascript"></script>
+
+    <script src="__PUBLIC__/js/plugins/sortable.js" type="text/javascript"></script>
+    <script src="__PUBLIC__/js/fileinput.js" type="text/javascript"></script>
+    <script src="__PUBLIC__/js/locales/fr.js" type="text/javascript"></script>
+    <script src="__PUBLIC__/js/locales/es.js" type="text/javascript"></script>
+    <script src="__PUBLIC__/js/themes/explorer-fa/theme.js" type="text/javascript"></script>
+    <script src="__PUBLIC__/js/themes/fa/theme.js" type="text/javascript"></script>
+    <script src="__PUBLIC__/js/popper.min.js" type="text/javascript"></script>
+
+</head>
+<body class="skin-blue">
+	<!-- header logo: style can be found in header.less -->
+	<header class="header">
+		<a href="index.html" class="logo"> <!-- Add the class icon to your logo image or logo icon to add the margining -->
+			AdminLTE
+		</a>
+		<!-- Header Navbar: style can be found in header.less -->
+		<nav class="navbar navbar-static-top" role="navigation">
+			<!-- Sidebar toggle button-->
+			<a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas"
+				role="button"> <span class="sr-only">Toggle navigation</span> <span
+				class="icon-bar"></span> <span class="icon-bar"></span> <span
+				class="icon-bar"></span>
+			</a>
+			<div class="navbar-right">
+				<ul class="nav navbar-nav">
+					<!-- Messages: style can be found in dropdown.less-->
+					
+					<!-- User Account: style can be found in dropdown.less -->
+					<li class="dropdown user user-menu"><a href="#"
+						class="dropdown-toggle" data-toggle="dropdown"> <i
+							class="glyphicon glyphicon-user"></i> <span><{$Think.session.admin_account}><i
+								class="caret"></i></span>
+					</a>
+						<ul class="dropdown-menu">
+							<!-- User image -->
+							<li class="user-header bg-light-blue"><img
+								src="__PUBLIC__/img/avatar3.png" class="img-circle"
+								alt="User Image" />
+								<p>
+									<{$Think.session.admin_account}>
+								</p></li>
+							<!-- Menu Body -->
+
+							<!-- Menu Footer-->
+							<li class="user-footer">
+								<div class="pull-right">
+									<a href="/admin/login/logout" class="btn btn-default btn-flat">退出</a>
+								</div>
+							</li>
+						</ul></li>
+				</ul>
+			</div>
+		</nav>
+	</header>

+ 132 - 0
www.hanlinyuanonline.com/Application/Admin/View/Slider/edit.html

@@ -0,0 +1,132 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+            <!-- 右侧 -->
+	        <div class="col-md-12">
+                <form method="post">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑Banner</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                        <div class="box-body">
+                        
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-primary" type="button">链接:</button>
+                                    </div>
+                                    <input type="text" name="link_url" value="<{$info['link_url']}>" class="form-control"/>
+                                </div>
+                            </div>
+                            
+                        	<div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                        <button class="btn btn-primary" type="button">显示顺序:</button>
+                                    </div><!-- /btn-group -->
+                                    <input type="text" name="slider_sort" value="<{$info['slider_sort']}>" class="form-control"/>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div class="input-group margin col-xs-6">
+                                    <div class="input-group-btn">
+                                    	<button class="btn btn-primary" type="button">Banner图片:</button>
+                                    </div><!-- /btn-group -->
+                                    <div class="col-xs-10">
+                                    	<input name="slider_pic" type="hidden" id="slider_pic" value="<{$info['slider_pic']}>">
+                                    	<input id="upload" name="image" accept="image/*" type="file" style="display: none"/>
+                                    	<img id="headPic" src="<empty name="info['slider_pic']">__PUBLIC__/img/banner.jpg<else /><{$info['slider_pic']}></empty>" height="150px" style="padding: 5px">
+                                    	<button id="submit_btn" type="button" class="btn btn-primary" style="display: none;">确定修改</button>
+                                    	<label >点击图片即可修改<br/>建议上传尺寸:1920x960 px</label><br>
+                                    </div>
+                                </div>
+                            </div>
+                        </div><!-- /.box-body -->
+                        <div class="box-footer">
+                            <input type="hidden" name="step" id="step" value="2" />
+                            <input type="hidden" name="slider_id" id="slider_id" value="<{$info['slider_id']}>" />
+                            <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                            <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                            <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                        </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+	        <!-- 右侧 -->
+        </aside>
+        <!-- /.content -->
+    </div>
+    <!-- /.content-wrapper -->
+    <!-- Main Footer -->
+    <!-- 底部 -->
+    <script src="__PUBLIC__/js/ajaxfileupload.js" type="text/javascript"></script>
+	<script type="text/javascript">
+	<!--
+	$(function() {
+	    //头像预览
+	    $("#headPic").click(function () {
+	        $("#upload").click(); //隐藏了input:file样式后,点击头像就可以本地上传
+	        $("#upload").on("change",function(){
+	            var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径
+	            if (objUrl) {
+	                $("#headPic").attr("src", objUrl) ; //将图片路径存入src中,显示出图片
+	            }
+	            // 如果确认已经选择了一张图片, 则进行上传操作
+	            if ($.trim($(this).val())) {
+	                $("#submit_btn").trigger('click');
+	            }
+	        });
+	    });
+	
+	     //图片上传
+	    $("#submit_btn").click(function () {
+	        var imgurl = document.getElementById("upload").value;
+	        $.ajaxFileUpload({
+	            url:"/admin/slider/upload?dir=ad",
+	            fileElementId: "upload", //文件上传域的ID,这里是input的ID,而不是img的
+	            dataType: 'json', //返回值类型 一般设置为json
+	            contentType: "application/x-www-form-urlencoded; charset=utf-8",
+	            success: function (data) {
+	                if (data.code==0){
+	                    $("#imag").attr("src","/images/loading.gif");
+	                    //将图片换成默认的+图片
+	                    $("#imag").attr('src',data.path);
+	                    $('#slider_pic').val(data.path);
+	                }else{
+	                	alert(data.info);
+	                }
+	            }
+	        });
+	    });
+	});
+	
+	//建立一個可存取到該file的url
+	function getObjectURL(file) {
+	    var url = null ;
+	    if (window.createObjectURL!=undefined) { // basic
+	        url = window.createObjectURL(file) ;
+	    } else if (window.URL!=undefined) { // mozilla(firefox)
+	        url = window.URL.createObjectURL(file) ;
+	    } else if (window.webkitURL!=undefined) { // webkit or chrome
+	        url = window.webkitURL.createObjectURL(file) ;
+	    }
+	    return url ;
+	}
+	//-->
+	</script>
+   <!-- 底部 -->
+   </body>
+</html>

+ 75 - 0
www.hanlinyuanonline.com/Application/Admin/View/Slider/index.html

@@ -0,0 +1,75 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<div class="box-header">
+						<h3 class="box-title">
+							<a href="/admin/slider/edit" class="btn btn-primary">新增Banner</a>
+						</h3>
+					</div>
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>图片预览</th>
+									<th>所跳转链接</th>
+									<th>排序id</th>
+									<th colspan="3">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><img width="100" src="<{$val['slider_pic']}>"></td>
+									<td><{$val['link_url']}></td>
+									<td><{$val['slider_sort']}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										&nbsp;<a href="/admin/slider/edit?slider_id=<{$val['slider_id']}>">编辑</a>
+										&nbsp;<a href="/admin/slider/del?slider_id=<{$val['slider_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="6" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 113 - 0
www.hanlinyuanonline.com/Application/Admin/View/Soft/edit.html

@@ -0,0 +1,113 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑APP</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">APP类型:</button>
+                                        </div><!-- /btn-group -->
+                                        <select name="os" id="os" class="form-control">
+                                        	<option <if condition="$info['os'] eq 1">selected="selected"</if> value="1">安卓</option>
+                                        	<option <if condition="$info['os'] eq 2">selected="selected"</if> value="2">IOS</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">是否强制升级:</button>
+                                        </div><!-- /btn-group -->
+                                        <select name="force_up" class="form-control">
+                                        	<option <if condition="$info['force_up'] eq 2">selected="selected"</if> value="2">不强制</option>
+                                        	<option <if condition="$info['force_up'] eq 1">selected="selected"</if> value="1">强制</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">版本号:</button>
+                                        </div><!-- /btn-group -->
+                                        <input type="text" name="new_ver" value="<{$info['new_ver']}>" class="form-control" required/>
+                                    </div>
+                                </div>
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">更新内容:</button>
+                                        </div><!-- /btn-group -->
+                                        <textarea class="form-control" rows="8" name="up_info" placeholder="更新内容"><{$info['up_info']}></textarea>
+                                    </div>
+                                </div>
+                                
+                                <div class="form-group" id="andiv">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">APP链接:</button>
+                                        </div><!-- /btn-group -->
+                                         <input type="text" name="app_url" value="" class="form-control" />
+                                    </div>
+                                </div>
+                                
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="soft_id" id="soft_id" value="<{$info['soft_id']}>" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+<script type="text/javascript">
+<!--
+$(function(){
+	$('#os').on('change',function(){
+		os = $("#os").val();
+		if(os=='1'){
+			$('#andiv').show();
+			$('#iosdiv').hide();
+		}else{
+			$('#andiv').hide();
+			$('#iosdiv').show();
+		}
+	});
+});
+//-->
+</script>
+</body>
+</html>

+ 71 - 0
www.hanlinyuanonline.com/Application/Admin/View/Soft/index.html

@@ -0,0 +1,71 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-xs-12">
+				<div class="box">
+					<div class="box-header">
+						<h3 class="box-title">
+							<a href="/admin/soft/edit" class="btn btn-primary">新增APP版本</a>
+						</h3>
+					</div>
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>类型</th>
+									<th>版本号</th>
+									<th>是否强制升级</th>
+									<th>更新内容</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><if condition="$val['os'] eq 1">安卓<else />IOS</if></td>
+									<td><{$val['new_ver']}></td>
+									<td><if condition="$val['force_up'] eq 1">是<else />否</if></td>
+									<td><{$val['up_info']}></td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 116 - 0
www.hanlinyuanonline.com/Application/Admin/View/Square/course.html

@@ -0,0 +1,116 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-6">
+                            <div class="btn-group">
+                                <select name="sort" class="form-control input-sm">
+                                	<volist name="orderList" id="v">
+                                    <option <if condition="$sort eq $v[2]">selected="selected"</if> value="<{$v[2]}>"><{$v[1]}></option>
+                                    </volist>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <select name="course_status" class="form-control input-sm">
+                                	<foreach name="statusList" item="r" key="k">
+                                    <option <if condition="$courseStatus eq $k">selected="selected"</if> value="<{$k}>"><{$r}></option>
+                                    </foreach>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入课程ID或者名称" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>课程ID</th>
+									<th>课程名称</th>
+									<th>课程单词量</th>
+									<th>加入量</th>
+									<th>上传用户</th>
+									<th>用户手机号码</th>
+									<th>创建时间</th>
+									<th>状态</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/square/detailCourse?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$val['course_num']}></td>
+									<td><{$val['course_join']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['user_phone']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><{$statusList[$val['course_status']]}></td>
+									<td>
+										<a href="/admin/square/detailCourse?course_id=<{$val['course_id']}>">查看</a>
+										<if condition="$val['course_status'] eq 3">
+										<a href="/admin/square/statusCourse?course_id=<{$val['course_id']}>&course_status=2" onclick="return confirm('确定下架吗?')">下架</a>
+										<elseif condition="$val['course_status'] eq 2" />
+										<a href="/admin/square/unpass?course_id=<{$val['course_id']}>" onclick="return confirm('确定审核不通过吗?')">不通过</a>
+										<a href="/admin/square/statusCourse?course_id=<{$val['course_id']}>&course_status=3" onclick="return confirm('确定上架吗?')">上架</a>
+										<else />
+										<a href="/admin/square/unpass?course_id=<{$val['course_id']}>">失败原因</a>
+										</if>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="11" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 133 - 0
www.hanlinyuanonline.com/Application/Admin/View/Square/detailCourse.html

@@ -0,0 +1,133 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入单词" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+                            	<input name="course_id" type="hidden" value="<{$courseId}>">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+						<div class="col-sm-1">
+							<div class="col-sm-1">
+								<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+            <div class="col-xs-6">
+            	<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>单词</th>
+									<th>中文释义</th>
+									<th>操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val" mod='2'>
+								<eq name='mod' value='0'>
+								<tr>
+									<td><{$i}></td>
+									<td><a href="/admin/Square/show?words_id=<{$val['words_id']}>"><{$val['words_name']}></a></td>
+									<td title="<{$val['words_text']}>"><{$val['words_text']|msubstr=0,20,'utf-8'}></td>
+									<td>
+										&nbsp;<a href="/admin/Square/show?words_id=<{$val['words_id']}>">查看</a>
+									</td>
+								</tr>
+								</eq>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="4" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+				</div>
+            </div>
+            <div class="col-xs-6">
+            	<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>单词</th>
+									<th>中文释义</th>
+									<th>操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val" mod='2'>
+								<eq name='mod' value='1'>
+								<tr>
+									<td><{$i}></td>
+									<td><a href="/admin/Square/show?words_id=<{$val['words_id']}>"><{$val['words_name']}></a></td>
+									<td title="<{$val['words_text']}>"><{$val['words_text']|msubstr=0,20,'utf-8'}></td>
+									<td>
+										&nbsp;<a href="/admin/words/edit?course_id=<{$val['course_id']}>&words_id=<{$val['words_id']}>">查看</a>
+									</td>
+								</tr>
+								</eq>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="4" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+				</div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 61 - 0
www.hanlinyuanonline.com/Application/Admin/View/Square/detailNotepad.html

@@ -0,0 +1,61 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">查看自由记</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group  col-xs-6">
+			                            <span class="input-group-addon">自由记名称:</span>
+			                            <input type="text" name="course_name" value="<{$info['course_name']}>" readonly="readonly" class="form-control"/>
+			                        </div>
+                                </div>
+                                <div class="form-group">
+                                	<div class="input-group  col-xs-6">
+			                            <span class="input-group-addon">自由记内容:</span>
+			                            <textarea class="form-control" rows="8" name="course_content" readonly="readonly"><{$info['course_content']}></textarea>
+			                        </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="course_id" id="course_id" value="<{$info['course_id']}>" />
+                                <!-- <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button> -->
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 119 - 0
www.hanlinyuanonline.com/Application/Admin/View/Square/notepad.html

@@ -0,0 +1,119 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                            <div class="btn-group">
+                                <select name="sort" class="form-control input-sm">
+                                	<volist name="orderList" id="v">
+                                    <option <if condition="$sort eq $v[2]">selected="selected"</if> value="<{$v[2]}>"><{$v[1]}></option>
+                                    </volist>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <select name="course_status" class="form-control input-sm">
+                                	<foreach name="statusList" item="r" key="k">
+                                    <option <if condition="$notepadStatus eq $k">selected="selected"</if> value="<{$k}>"><{$r}></option>
+                                    </foreach>
+                                </select>
+                            </div>
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入自由记ID或者名称" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/notepad/edit" class="btn btn-primary">新增自由记</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>自由记ID</th>
+									<th>自由记名称</th>
+									<th>加入量</th>
+									<th>上传用户</th>
+									<th>用户手机号码</th>
+									<th>创建时间</th>
+									<th>状态</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/square/detailNotepad?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$val['course_join']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['user_phone']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td><{$statusList[$val['course_status']]}></td>
+									<td>
+										&nbsp;<a href="/admin/square/detailNotepad?course_id=<{$val['course_id']}>">查看</a>
+										<if condition="$val['course_status'] eq 3">
+										&nbsp;<a href="/admin/square/statusNotepad?course_id=<{$val['course_id']}>&course_status=2" onclick="return confirm('确定下架吗?')">下架</a>
+										<elseif condition="$val['course_status'] eq 2" />
+										<a href="/admin/square/unpass?course_id=<{$val['course_id']}>" onclick="return confirm('确定审核不通过吗?')">不通过</a>
+										<a href="/admin/square/statusNotepad?course_id=<{$val['course_id']}>&course_status=3" onclick="return confirm('确定上架吗?')">上架</a>
+										<else />
+										<a href="/admin/square/unpass?course_id=<{$val['course_id']}>">失败原因</a>
+										</if>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="10" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 155 - 0
www.hanlinyuanonline.com/Application/Admin/View/Square/show.html

@@ -0,0 +1,155 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+            <div class="col-md-12">
+            	<div class="box box-primary">
+	            	<div class="box-header">
+	            		<h3 class="box-title">单词详情</h3>
+	            	</div>
+	            	<div class="col-md-6">
+	            		<div class="form-group" style="padding-top: 20px;">
+		            		<div class="input-group">
+	                            <span class="input-group-addon">单词:</span>
+	                            <input type="text" name="words_name" value="<{$info['words_name']}>" readonly="readonly" class="form-control"/>
+	                        </div>
+                        </div>
+	                    <div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">读音:</h3>
+		                     </div>
+		                     <notempty name="info['words_voice1']">
+		                     <div class="box-body">
+		                     	<audio controls="controls"><source src="<{$info['words_voice1']}>" type="audio/mp3" /></audio>
+	            			</div>
+	            			</notempty>
+	            			<notempty name="info['words_voice2']">
+	            			<div class="box-body">
+		                    	<audio controls="controls"><source src="<{$info['words_voice2']}>" type="audio/mp3" /></audio>
+	            			</div>
+	            			</notempty>
+	            			<notempty name="info['words_voice3']">
+	            			<div class="box-body">
+		                    	<audio controls="controls"><source src="<{$info['words_voice3']}>" type="audio/mp3" /></audio>
+		                    </div>
+		                    </notempty>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">音标:</h3>
+		                     </div>
+		                     <notempty name="info['words_voice1']">
+		                     <div class="box-body">
+		                     	<input type="text" name="words_read" value="<{$info['words_read1']}>" readonly="readonly" class="form-control"/>
+	            			</div>
+	            			</notempty>
+	            			<notempty name="info['words_voice2']">
+	            			<div class="box-body">
+		                    	<input type="text" name="words_read" value="<{$info['words_read2']}>" readonly="readonly" class="form-control"/>
+	            			</div>
+	            			</notempty>
+	            			<notempty name="info['words_voice3']">
+	            			<div class="box-body">
+		                    	<<input type="text" name="words_read" value="<{$info['words_read3']}>" readonly="readonly" class="form-control"/>
+		                    </div>
+		                    </notempty>
+		        		</div>
+	                  	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">中文释义:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<foreach name="wordsKeys" item="val">
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon"><{$key}>.</span>
+		                             <input type="text" class="form-control" name="<{$val}>" value="<{$info[$val]}>" readonly="readonly">
+		                         </div>
+		                         </foreach>
+	            			</div>
+		        		</div>
+		        	</div>
+	            	<div class="col-md-6">
+		            	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句1:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" name="jz_en1" value="<{$info['jz_en1']}>" readonly="readonly"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" name="jz_cn1" value="<{$info['jz_cn1']}>" readonly="readonly">
+		                         </div>
+	            			</div>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句2:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" name="jz_en2" value="<{$info['jz_en2']}>" readonly="readonly"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" name="jz_cn2" value="<{$info['jz_cn2']}>" readonly="readonly"">
+		                         </div>
+	            			</div>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句3:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" name="jz_en3" value="<{$info['jz_en3']}>" readonly="readonly"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" name="jz_cn3" value="<{$info['jz_cn3']}>" readonly="readonly">
+		                         </div>
+	            			</div>
+		        		</div>
+                    	<div class="form-group">
+                    		<label>近义词:</label>
+                            <textarea class="form-control" rows="3" name="similar_cn" readonly="readonly"><{$info['similar_cn']}></textarea>
+                        </div>
+                        <div class="form-group">
+                            <label>英文释义:</label>
+                            <textarea class="form-control" rows="3" name="similar_en" readonly="readonly"><{$info['similar_en']}></textarea>
+                        </div>
+	            	</div>
+	            	<div class="col-md-12">
+		                <div class="box-footer">
+		                    <input type="hidden" name="step" id="step" value="2" />
+		                    <input type="hidden" name="words_id" value="<{$info['words_id']}>" />
+		                    <input type="hidden" name="course_id" value="<{$courseId}>" />
+		                    <!-- <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+		                    <button class="btn btn-primary" name="submit2" type="reset">重置</button> -->
+		                    <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+		                </div>
+		             </div>
+            	</div>
+           </div>
+            </form>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 60 - 0
www.hanlinyuanonline.com/Application/Admin/View/Square/unpass.html

@@ -0,0 +1,60 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">审核不通过原因</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-default" type="button">原因:</button>
+                                        </div><!-- /btn-group -->
+                                        <textarea class="form-control" rows="8" name="course_reason" placeholder="请输入推送内容"><{$info['course_reason']}></textarea>
+                                    </div>
+                                </div>
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="course_id" id="notice_id" value="<{$info['course_id']}>" />
+                                <input type="hidden" name="refererUrl" id="refererUrl" value="<{$refererUrl}>" />
+                                <if condition="$info['course_reason'] EQ ''">
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                </if>
+                                <a href="<{$refererUrl}>" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 140 - 0
www.hanlinyuanonline.com/Application/Admin/View/Store/detail.html

@@ -0,0 +1,140 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-10">
+                            <div class="btn-group">
+                                <input type="text" placeholder="请输入单词" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+                            </div>
+                            <div class="btn-group">
+                                <button class="btn btn-sm btn-primary" name="sub" type="submit">
+                                    <i class="fa fa-search"></i>
+                                </button>
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/store/words?store_id=<{$storeId}>" class="btn btn-primary">新增单词</a>
+							</div>
+						</div>
+						<div class="col-sm-1">
+							<div class="col-sm-1">
+								<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+							</div>
+                        </div>
+                        <input type="hidden" name="store_id" value="<{$storeId}>">
+                    </form>
+                </div>
+            </div>
+            <div class="col-xs-6">
+            	<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>单词</th>
+									<th>中文释义</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val" mod='2'>
+								<eq name='mod' value='0'>
+								<tr>
+									<td><{$i}></td>
+									<td><a href="/admin/store/words?store_id=<{$val['store_id']}>&words_id=<{$val['words_id']}>"><{$val['words_name']}></a></td>
+									<td title="<{$val['words_text']}>"><{$val['words_text']|msubstr=0,20,'utf-8'}></td>
+									<td>
+										&nbsp;<a href="/admin/store/words?store_id=<{$val['store_id']}>&words_id=<{$val['words_id']}>">编辑</a>
+										&nbsp;<a href="/admin/store/delWords?words_id=<{$val['words_id']}>&store_id=<{$val['store_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</eq>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+				</div>
+            </div>
+            <div class="col-xs-6">
+            	<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>单词</th>
+									<th>中文释义</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val" mod='2'>
+								<eq name='mod' value='1'>
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['words_name']}></td>
+									<td title="<{$val['words_text']}>"><{$val['words_text']|msubstr=0,20,'utf-8'}></td>
+									<td>
+										&nbsp;<a href="/admin/store/words?store_id=<{$val['store_id']}>&words_id=<{$val['words_id']}>">编辑</a>
+										&nbsp;<a href="/admin/store/delWords?store_id=<{$val['store_id']}>&words_id=<{$val['words_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</eq>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+				</div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 69 - 0
www.hanlinyuanonline.com/Application/Admin/View/Store/edit.html

@@ -0,0 +1,69 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <div class="col-md-12">
+                <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+                    <div class="box box-primary">
+                        <div class="box-header">
+                            <h3 class="box-title">编辑题库</h3>
+                        </div><!-- /.box-header -->
+                        <!-- form start -->
+                            <div class="box-body">
+                                <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">题库类型:</button>
+                                        </div><!-- /btn-group -->
+                                        <select name="level_id" class="form-control">
+                                        	<volist name="levelList" id="val">
+                                        	<option <if condition="$info['level_id'] eq $val['level_id']">selected="selected"</if> value="<{$val['level_id']}>"><{$val['level_name']}></option>
+                                        	</volist>
+                                        </select>
+                                    </div>
+                                </div>
+                                <!-- <div class="form-group">
+                                    <div class="input-group margin col-xs-6">
+                                        <div class="input-group-btn">
+                                            <button class="btn btn-danger" type="button">题库名称:</button>
+                                        </div>/btn-group
+                                        <input type="text" name="store_name" value="<{$info['store_name']}>" class="form-control" required/>
+                                    </div>
+                                </div> -->
+                            </div><!-- /.box-body -->
+                            <div class="box-footer">
+                                <input type="hidden" name="step" id="step" value="2" />
+                                <input type="hidden" name="store_id" id="store_id" value="<{$info['store_id']}>" />
+                                <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+                                <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+                                <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+                            </div>
+                    </div>
+                </form>
+                <!-- /.box -->
+            </div>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 88 - 0
www.hanlinyuanonline.com/Application/Admin/View/Store/index.html

@@ -0,0 +1,88 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+                <div class="row pad">
+                    <form name="form1" method="get">
+                        <div class="col-sm-11">
+                        </div>
+                        <div class="col-sm-1">
+                        	<div class="col-sm-1">
+								<a href="/admin/store/edit" class="btn btn-primary">新增题库</a>
+							</div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>题库ID</th>
+									<th>题库类型</th>
+									<!-- <th>题库名称</th> -->
+									<th>题库单词量</th>
+									<th>创建时间</th>
+									<th colspan="4">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['store_id']}></td>
+									<td><{$levelList[$val['level_id']]}></td>
+									<!-- <td><a href="/admin/store/detail?store_id=<{$val['store_id']}>"><{$val['store_name']}></a></td> -->
+									<td><{$val['store_num']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td>
+										&nbsp;<a href="/admin/store/detail?store_id=<{$val['store_id']}>">查看</a>
+										&nbsp;<a href="/admin/store/words?store_id=<{$val['store_id']}>">新增单词</a>
+										&nbsp;<a href="/admin/store/edit?store_id=<{$val['store_id']}>">编辑</a>
+										&nbsp;<a href="/admin/store/del?store_id=<{$val['store_id']}>" onclick="return confirm('确定删除吗?')">删除</a>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="10" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 86 - 0
www.hanlinyuanonline.com/Application/Admin/View/Store/words.html

@@ -0,0 +1,86 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<script language="javascript">
+	$(function(){
+		$('#words_name').on('blur',function(){
+			var words = $(this).val();
+			if(words.length>0){
+				var url = "/admin/words/dict";
+				$.post(url,{words_name:words},function(result){
+					for(var i=0;i<result.data.pos.length;i++){
+						$('#'+result.data.pos[i][0]).val(result.data.pos[i][1]);
+					}
+				},'json');
+			}
+		});
+	});
+</script>
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <form method="post"  onsubmit="return checkForm()" enctype="multipart/form-data">
+            <div class="col-md-12">
+            	<div class="box box-primary">
+	            	<div class="box-header">
+	            		<h3 class="box-title">编辑单词</h3>
+	            	</div>
+	            	<div class="col-md-6">
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">单词:</button>
+	                            </div><!-- /btn-group -->
+	                            <input type="text" name="words_name" id="words_name" value="<{$info['words_name']}>" class="form-control" placeholder="输入完毕后移开光标读取第三方信息" required/>
+	                        </div>
+	                    </div>
+	                  	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">中文释义:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<foreach name="wordsKeys" item="val">
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon"><{$key}>.</span>
+		                             <input type="text" class="form-control" id="<{$key}>" name="<{$val}>" value="<{$info[$val]}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+		                         </foreach>
+	            			</div>
+		        		</div>
+		        	</div>
+	            	<div class="col-md-12">
+		                <div class="box-footer">
+		                    <input type="hidden" name="step" id="step" value="2" />
+		                    <input type="hidden" name="words_id" value="<{$info['words_id']}>" />
+		                    <input type="hidden" name="store_id" value="<{$storeId}>" />
+		                    <button class="btn btn-primary" name="submit1" type="submit">提交</button>
+		                    <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+		                    <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+		                </div>
+		             </div>
+            	</div>
+           </div>
+            </form>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 71 - 0
www.hanlinyuanonline.com/Application/Admin/View/User/course.html

@@ -0,0 +1,71 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="row pad">
+					<div class="col-sm-1">
+						<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+					</div>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>课程ID</th>
+									<th>课程名称</th>
+									<th>课程单词量</th>
+									<th>课程累计加入量</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/square/detailCourse?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$val['course_num']}></td>
+									<td><{$val['course_join']}></td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="4" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 117 - 0
www.hanlinyuanonline.com/Application/Admin/View/User/detail.html

@@ -0,0 +1,117 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="row pad">
+					<div class="col-sm-1">
+						<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+					</div>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered">
+                        <tbody>
+                             <tr>
+                                 <td bgcolor="#F0F0F0" rowspan="2" width="25%">用户头像</td>
+                                 <td rowspan="2" width="25%"><img src="<{$userInfo['user_icon']}>" height="74px;"></td>
+                                 <td bgcolor="#F0F0F0" width="25%">昵称</td>
+                                 <td width="25%"><{$userInfo['user_name']}></td>
+                             </tr>
+                             <tr>
+                                 <td bgcolor="#F0F0F0">等级</td>
+                                 <td><{$userInfo['user_level']}></td>
+                             </tr>
+                             <tr>
+                                 <td bgcolor="#F0F0F0">手机号码</td>
+                                 <td><{$userInfo['user_phone']}></td>
+                                 <td bgcolor="#F0F0F0">称号</td>
+                                 <td><{$levelList[$userInfo['user_level']]}></td>
+                             </tr>
+                             <tr>
+                                 <td bgcolor="#F0F0F0">ID</td>
+                                 <td><{$userInfo['user_id']}></td>
+                                 <td bgcolor="#F0F0F0">注册时间</td>
+                                 <td><{$userInfo['operate_dt']|date='Y-m-d H:i:s',###}></td>
+                             </tr>
+                             <tr>
+                                 <td bgcolor="#F0F0F0">性别</td>
+                                 <td><if condition="$userInfo['user_sex'] eq 1">男<else />女</if></td>
+                                 <td bgcolor="#F0F0F0">出生日期</td>
+                                 <td><{$userInfo['user_birthdate']|date='Y-m-d',###}></td>
+                             </tr>
+                             <tr>
+                                 <td bgcolor="#F0F0F0">所在地</td>
+                                 <td><{$areaList[$userInfo['user_province']]}>-<{$areaList[$userInfo['user_city']]}>-<{$userInfo['user_address']}></td>
+                             </tr>
+                        	</tbody>
+						</table>
+					</div>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box box-primary">
+					<div class="box-header">
+						<h3 class="box-title">好友列表</h3>
+					</div>
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>好友ID</th>
+									<th>手机号</th>
+									<th>昵称</th>
+									<th>备注</th>
+									<th>注册时间</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="userList" id="val">
+								<tr>
+									<td><{$val['user_id']}></td>
+									<td><{$val['user_phone']}></td>
+									<td><{$val['user_nickname']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+								</tr>
+								</volist>
+								<empty name="userList">
+								<tr>
+									<td colspan="5" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 189 - 0
www.hanlinyuanonline.com/Application/Admin/View/User/index.html

@@ -0,0 +1,189 @@
+<!-- 头部 -->
+<include file="Public/top" />
+
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+	
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<script src="__PUBLIC__/js/layer/layer.js"
+	type="text/javascript"></script>
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="row pad">
+					<form name="form1" method="get">
+						<div class="col-sm-6">
+							<div class="btn-group">
+								<select name="is_admin">
+								  <option value ="2" <if condition="$is_admin eq 2"> selected</if>>身份选择</option>
+								  <option value ="1" <if condition="$is_admin eq 1"> selected</if>>管理员</option>
+								  <option value ="0" <if condition="$is_admin eq 0"> selected</if>>非管理员</option>
+								</select>
+							</div>
+							<div class="btn-group">
+								<select name="is_auth">
+								  <option value ="2" <if condition="$is_auth eq 2"> selected</if>>认证选择</option>
+								  <option value ="1" <if condition="$is_auth eq 1"> selected</if>>认证作者</option>
+								  <option value ="0" <if condition="$is_auth eq 0"> selected</if>>非认证作者</option>
+								</select>
+							</div>
+							<div class="btn-group">
+								<input type="text" placeholder="请输入用户ID、手机号码、昵称" name="keyword" value="<{$keyword}>" class="form-control input-sm">
+							</div>
+							<div class="btn-group">
+								<button class="btn btn-sm btn-primary" name="sub" type="submit">
+									<i class="fa fa-search"></i>
+								</button>
+							</div>
+						</div>
+					</form>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>序号</th>
+									<th>用户ID</th>
+									<th>手机号</th>
+									<th>昵称</th>
+									<th>等级</th>
+									<th>称号</th>
+									<th>性别</th>
+									<th>注册时间</th>
+									<th colspan="2">操作</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$i}></td>
+									<td><{$val['user_id']}></td>
+									<td><{$val['user_phone']}></td>
+									<td><{$val['user_name']}></td>
+									<td><{$val['user_level']}></td>
+									<if condition="in_array($val['user_id'],$pkUserIds)">
+									<td><{$levelList[$val['user_level']]}></td>
+									<else />
+									<td>暂无称号</td>
+									</if>
+									<td><if condition="$val['user_sex'] eq 1">男<else />女</if></td>
+									<td><{$val['operate_dt']|date='Y-m-d H:i:s',###}></td>
+									<td>
+										<!-- 用户详情、用户课程、用户自由记、上传的课程、上传的自由记 -->
+										&nbsp;<a href="/admin/user/detail?user_id=<{$val['user_id']}>">用户详情</a>
+										&nbsp;<a href="/admin/user/course?user_id=<{$val['user_id']}>">用户课程</a>
+										&nbsp;<a href="/admin/user/notepad?user_id=<{$val['user_id']}>">用户自由记</a>
+										&nbsp;<a href="/admin/user/course?user_id=<{$val['user_id']}>&course_status=2,3">上传的课程</a>
+										&nbsp;<a href="/admin/user/notepad?user_id=<{$val['user_id']}>&course_status=2,3">上传的自由记</a>
+										<if condition="$val['is_forbidden'] eq 1"><a href="javascript:cancle(<{$val['user_id']}>)">取消禁言(<{$val['str_forbidden']}>)</a><else /><a href="javascript:openlayer(<{$val['user_id']}>)">设置禁言</a></if>
+										<if condition="$val['admin_id'] gt 0"><a href="javascript:cancle_admin(<{$val['user_id']}>)">取消管理员</a><else /><a href="javascript:set_admin(<{$val['user_id']}>)">设置管理员</a></if>
+									</td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="9" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+			
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+<script>
+
+	function openlayer(uid){
+		$('#uid').val(uid);
+		layer.open({
+		  title:"用户禁言操作",
+		  type: 1,
+		  area: ['420px', '300px'], //宽高
+		  content: $('#hid').html()
+		});
+	}
+	var temp='';
+	function cancle(uid){
+		$.get("/admin/user/forbidden?user_id="+uid+"&days=0", function(result){
+			location.reload();
+	    });
+	}
+	function clear(){
+		layer.closeAll();
+	}
+	function textday(t){
+		$('#days').val($(t).val());
+	}
+	function submitform(){
+		if(!isNumber($('#days').val())||$('#days').val()==0){
+			alert('天数必须是数字');
+			return;
+		}
+		$.get("/admin/user/forbidden?user_id="+$('#uid').val()+"&days="+$('#days').val(), function(result){
+			location.reload();
+	    });
+	}
+	function isNumber(value) {
+		var patrn = /^[0-9]*$/;
+		if (patrn.exec(value) == null || value == "") {
+			return false
+		} else {
+			return true
+		}
+	}
+	function cancle_admin(uid){
+		$.get("/admin/user/cancle_admin?user_id="+uid, function(result){
+			location.reload();
+	    });
+	}
+	function set_admin(uid){
+		$.get("/admin/user/set_admin?user_id="+uid, function(result){
+			location.reload();
+	    });
+	}
+	
+
+
+</script>
+<input type="hidden" id="uid" value="0">
+<input type="hidden" id="days" value="0">
+<div style="display:none" id="hid">
+	<div style="width:80%;height:80%;margin:0 auto;">
+		<h3 style="width:100%;text-align:center;">填写禁言天数</h1>
+		<div style="width:80%;height:50%;margin:30px auto 0;">
+			禁言天数 <input type="text" onchange="textday(this)">天
+		</div>
+		<div style="width:40%;;margin:0 auto;">
+			<button class="btn btn-primary" onclick="submitform()" type="button" >提交</button>
+            <a href="javascript:clear()" class="btn btn-primary" >取消</a>
+	    </div>
+	</div>
+</div>
+
+</body>
+</html>

+ 69 - 0
www.hanlinyuanonline.com/Application/Admin/View/User/notepad.html

@@ -0,0 +1,69 @@
+<!-- 头部 -->
+<include file="Public/top" />
+<div class="wrapper row-offcanvas row-offcanvas-left">
+	<!-- Left side column. contains the logo and sidebar -->
+	<aside class="left-side sidebar-offcanvas">
+		<!-- 左边 -->
+		<include file="Public/left" />
+	</aside>
+
+	<!-- Right side column. Contains the navbar and content of the page -->
+	<aside class="right-side">
+		<!-- Content Header (Page header) -->
+		<!-- bar -->
+		<include file="Public/bar" />
+
+		<!-- Main content -->
+		<!-- 右侧 -->
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="row pad">
+					<div class="col-sm-1">
+						<a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+					</div>
+				</div>
+			</div>
+			<div class="col-xs-12">
+				<div class="box">
+					<!-- /.box-header -->
+					<div class="box-body table-responsive">
+						<table class="table table-bordered table-striped">
+							<thead>
+								<tr>
+									<th>自由记ID</th>
+									<th>自由记名称</th>
+									<th>累计加入量</th>
+								</tr>
+							</thead>
+							<tbody>
+								<volist name="list" id="val">
+								<tr>
+									<td><{$val['course_id']}></td>
+									<td><a href="/admin/square/detailNotepad?course_id=<{$val['course_id']}>"><{$val['course_name']}></a></td>
+									<td><{$val['course_join']}></td>
+								</tr>
+								</volist>
+								<empty name="list">
+								<tr>
+									<td colspan="3" align="center">没有记录</td>
+								</tr>
+								</empty>
+							</tbody>
+						</table>
+
+					</div>
+					<!-- /.box-body -->
+					<{$page}>
+				</div>
+				<!-- /.box -->
+			</div>
+		</div>
+		<!-- 右侧 -->
+		<!-- /.content -->
+	</aside>
+	<!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+
+</body>
+</html>

+ 353 - 0
www.hanlinyuanonline.com/Application/Admin/View/Words/edit.html

@@ -0,0 +1,353 @@
+<!-- 头部 -->
+<include file="Public/top" />
+
+<script src="__PUBLIC__/js/ajaxfileupload.js" type="text/javascript"></script>
+<script language="javascript">
+	$(function(){
+		var arr =[];
+		$('#words_name').on('blur',function(){
+			var words = $(this).val();
+			if(words.length>0){
+				var url = "/admin/words/dict";
+				$.post(url,{words_name:words},function(result){
+					var words_read = "";
+					var words_voice = "";
+					var words_audio = "";
+					for(var i=0;i<result.data.ps.length;i++){
+						words_read += '[' + result.data.ps[i] + '],';
+					}
+					for(var i=0;i<result.data.pron.length;i++){
+						words_audio += '<audio controls="controls"><source src="'+result.data.pron[i]+'" type="audio/mp3" /></audio>';
+						words_voice += result.data.pron[i]+',';
+					}
+					for(var i=0;i<result.data.pos.length;i++){
+						$('#'+result.data.pos[i][0]).val(result.data.pos[i][1]);
+					}
+					for(var i=0;i<result.data.sent.length;i++){
+						var j = i+1;
+						jz_en = 'jz_en'+j;
+						jz_cn = 'jz_cn'+j;
+						console.log(jz_en);
+						console.log(jz_cn);
+						$('#'+jz_en).val(result.data.sent[i][0]);
+						$('#'+jz_cn).val(result.data.sent[i][1]);
+					}
+					$('#words_read').val(words_read);
+					$('#words_voice').val(words_voice);
+					$('#words_audio').html(words_audio);
+				},'json');
+			}
+		});
+		//建立一個可存取到該file的url
+	function getObjectURL(file) {
+	    var url = null ;
+	    if (window.createObjectURL!=undefined) { // basic
+	        url = window.createObjectURL(file) ;
+	    } else if (window.URL!=undefined) { // mozilla(firefox)
+	        url = window.URL.createObjectURL(file) ;
+	    } else if (window.webkitURL!=undefined) { // webkit or chrome
+	        url = window.webkitURL.createObjectURL(file) ;
+	    }
+	    return url ;
+	}
+		
+		document.getElementById("upload1").value='';
+		
+	    $("#headPic1").click(function () {
+	        $("#upload1").click(); //隐藏了input:file样式后,点击头像就可以本地上传
+	        $("#upload1").on("change",function(){
+			
+				var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径
+				if (objUrl) {
+					$("#headPic1").attr("src", objUrl) ; //将图片路径存入src中,显示出图片
+				}
+	
+				// 如果确认已经选择了一张图片, 则进行上传操作
+				if ($.trim($(this).val())) {
+					$("#submit_btn1").trigger('click');
+				}
+			});
+	    });
+	
+	     //图片上传
+	    $("#submit_btn1").click(function () {
+	        var imgurl = document.getElementById("upload1").value;
+	        $.ajaxFileUpload({
+	            url:"/admin/slider/upload?dir=words",
+				secureuri:false,
+	            fileElementId: "upload1", //文件上传域的ID,这里是input的ID,而不是img的
+	            dataType: 'json', //返回值类型 一般设置为json
+	            contentType: "application/x-www-form-urlencoded; charset=utf-8",
+	            success: function (data) {
+	                if (data.code==0){
+	                 
+	                    $('#words_img1').val(data.path);
+	                }else{
+	                	alert(data.info);
+	                }
+	            }
+	        });
+	    });
+		
+		
+		document.getElementById("upload2").value='';
+		
+	    $("#headPic2").click(function () {
+	        $("#upload2").click(); //隐藏了input:file样式后,点击头像就可以本地上传
+	        $("#upload2").on("change",function(){
+			
+				var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径
+				if (objUrl) {
+					$("#headPic2").attr("src", objUrl) ; //将图片路径存入src中,显示出图片
+				}
+	
+				// 如果确认已经选择了一张图片, 则进行上传操作
+				if ($.trim($(this).val())) {
+					$("#submit_btn2").trigger('click');
+				}
+			});
+	    });
+	
+	     //图片上传
+	    $("#submit_btn2").click(function () {
+	        var imgurl = document.getElementById("upload2").value;
+	        $.ajaxFileUpload({
+	            url:"/admin/slider/upload?dir=words",
+				secureuri:false,
+	            fileElementId: "upload2", //文件上传域的ID,这里是input的ID,而不是img的
+	            dataType: 'json', //返回值类型 一般设置为json
+	            contentType: "application/x-www-form-urlencoded; charset=utf-8",
+	            success: function (data) {
+	                if (data.code==0){
+	                 
+	                    $('#words_img2').val(data.path);
+	                }else{
+	                	alert(data.info);
+	                }
+	            }
+	        });
+	    });
+		
+		
+		document.getElementById("upload3").value='';
+		
+	    $("#headPic3").click(function () {
+	        $("#upload3").click(); //隐藏了input:file样式后,点击头像就可以本地上传
+	        $("#upload3").on("change",function(){
+			
+				var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径,该路径不是图片在本地的路径
+				if (objUrl) {
+					$("#headPic3").attr("src", objUrl) ; //将图片路径存入src中,显示出图片
+				}
+	
+				// 如果确认已经选择了一张图片, 则进行上传操作
+				if ($.trim($(this).val())) {
+					$("#submit_btn3").trigger('click');
+				}
+			});
+	    });
+	
+	     //图片上传
+	    $("#submit_btn3").click(function () {
+	        var imgurl = document.getElementById("upload3").value;
+	        $.ajaxFileUpload({
+	            url:"/admin/slider/upload?dir=words",
+				secureuri:false,
+	            fileElementId: "upload3", //文件上传域的ID,这里是input的ID,而不是img的
+	            dataType: 'json', //返回值类型 一般设置为json
+	            contentType: "application/x-www-form-urlencoded; charset=utf-8",
+	            success: function (data) {
+	                if (data.code==0){
+	                 
+	                    $('#words_img3').val(data.path);
+	                }else{
+	                	alert(data.info);
+	                }
+	            }
+	        });
+	    });
+		
+	});
+	function changeBut(jumpId){
+		$('#jumpId').val(jumpId);
+	}
+	function remove_img(num){
+		$('#words_img'+num).val('');
+		$('#headPic'+num).attr('src','__PUBLIC__/img/add.jpg');
+	}
+</script>
+<div class="wrapper row-offcanvas row-offcanvas-left">
+    <!-- Left side column. contains the logo and sidebar -->
+    <aside class="left-side sidebar-offcanvas">
+        <!-- 左边 -->
+        <include file="Public/left" />
+    </aside>
+
+    <!-- Right side column. Contains the navbar and content of the page -->
+    <aside class="right-side">
+        <!-- Content Header (Page header) -->
+        <!-- bar -->
+        <include file="Public/bar" />
+
+        <!-- Main content -->
+        <!-- 右侧 -->
+        <div class="row">
+            <!-- left column -->
+            <form method="post"   enctype="multipart/form-data">
+            <div class="col-md-12">
+            	<div class="box box-primary">
+	            	<div class="box-header">
+	            		<h3 class="box-title">编辑单词</h3>
+	            	</div>
+	            	<div class="col-md-6">
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">单词:</button>
+	                            </div><!-- /btn-group -->
+	                            <input type="text" name="words_name" id="words_name" value="<{$info['words_name']}>" class="form-control" placeholder="输入完毕后移开光标读取第三方信息" required/>
+	                        </div>
+	                    </div>
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">读音:</button>
+	                            </div><!-- /btn-group -->
+								<span id="words_audio">
+									<empty name="info['words_voice1']"><else /><audio controls="controls"><source src="<{$info['words_voice1']}>" type="audio/mp3" /></audio></empty>
+									<empty name="info['words_voice2']"><else /><audio controls="controls"><source src="<{$info['words_voice2']}>" type="audio/mp3" /></audio></empty>
+									<empty name="info['words_voice3']"><else /><audio controls="controls"><source src="<{$info['words_voice3']}>" type="audio/mp3" /></audio></empty>
+								</span>
+	                            <input type="hidden" id="words_voice" name="words_voice" value="<{$info['words_voice']}>" class="form-control"/>
+	                        </div>
+	                    </div>
+	                    <div class="form-group">
+	                        <div class="input-group margin">
+	                            <div class="input-group-btn">
+	                                <button class="btn btn-danger" type="button">音标:</button>
+	                            </div><!-- /btn-group -->
+	                            <input type="text" id="words_read" name="words_read" value="<{$info['words_read']}>" readonly="readonly" class="form-control"/>
+	                        </div>
+	                    </div>
+	                  	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">中文释义:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<foreach name="wordsKeys" item="val">
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon"><{$key}>.</span>
+		                             <input type="text" class="form-control" id="<{$key}>" name="<{$val}>" value="<{$info[$val]}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+		                         </foreach>
+	            			</div>
+		        		</div>
+						
+		        	</div>
+	            	<div class="col-md-6">
+		            	<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句1:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" id="jz_en1" name="jz_en1" value="<{$info['jz_en1']}>" placeholder="多个释义间用逗号隔开"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" id="jz_cn1" name="jz_cn1" value="<{$info['jz_cn1']}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+	            			</div>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句2:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" id="jz_en2" name="jz_en2" value="<{$info['jz_en2']}>" placeholder="多个释义间用逗号隔开"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" id="jz_cn2" name="jz_cn2" value="<{$info['jz_cn2']}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+	            			</div>
+		        		</div>
+		        		<div class="box box-success">
+		                     <div class="box-header">
+		                         <h3 class="box-title">例句3:</h3>
+		                     </div>
+		                     <div class="box-body">
+		                     	<input type="text" class="form-control" id="jz_en3" name="jz_en3" value="<{$info['jz_en3']}>" placeholder="多个释义间用逗号隔开"><br/>
+		                         <div class="input-group" style="padding-bottom: 10px">
+		                             <span class="input-group-addon">释义:</span>
+		                             <input type="text" class="form-control" id="jz_cn3" name="jz_cn3" value="<{$info['jz_cn3']}>" placeholder="多个释义间用逗号隔开">
+		                         </div>
+	            			</div>
+		        		</div>
+                    	<div class="form-group">
+                    		<label>近义词:</label>
+                            <textarea class="form-control" rows="3" name="words_similar" placeholder="多个近义词直接逗号隔开"><{$info['words_similar']}></textarea>
+                        </div>
+                        <div class="form-group">
+                            <label>英文释义:</label>
+                            <textarea class="form-control" rows="3" name="similar_cn" placeholder="请输入英文释义"><{$info['similar_cn']}></textarea>
+                        </div>
+                        <div class="form-group">
+                            <label>注释:</label>
+                            <textarea class="form-control" rows="3" name="annotation_cn" placeholder="对单词的注释"><{$info['annotation_cn']}></textarea>
+                        </div>
+						<div class="form-group">
+                            <label>图片1(建议图片大小2M以内):<a href="javascript:remove_img(1);">X</a></label><br>
+                            <input name="words_img1" type="hidden" id="words_img1" value="<{$info['words_img1']}>">
+							<input id="upload1" name="image" accept="image/*" type="file" style="display: none"/>
+							<img id="headPic1" src="<empty name="info['words_img1']">__PUBLIC__/img/add.jpg<else /><{$info['words_img1']}></empty>" height="150px" style="padding: 5px">
+							<button id="submit_btn1" type="button" class="btn btn-primary" style="display: none;">确定修改</button>
+							<label >点击图片即可修改</label><br>
+                        </div>
+						<div class="form-group">
+                            <label>图片2(建议图片大小2M以内):<a href="javascript:remove_img(2);">X</a></label><br>
+                            <input name="words_img2" type="hidden" id="words_img2" value="<{$info['words_img2']}>">
+							<input id="upload2" name="image" accept="image/*" type="file" style="display: none"/>
+							<img id="headPic2" src="<empty name="info['words_img2']">__PUBLIC__/img/add.jpg<else /><{$info['words_img2']}></empty>" height="150px" style="padding: 5px">
+							<button id="submit_btn2" type="button" class="btn btn-primary" style="display: none;">确定修改</button>
+							<label >点击图片即可修改</label><br>
+                        </div>
+						<div class="form-group">
+                            <label>图片3(建议图片大小2M以内):<a href="javascript:remove_img(3);">X</a></label><br>
+                            <input name="words_img3" type="hidden" id="words_img3" value="<{$info['words_img3']}>">
+							<input id="upload3" name="image" accept="image/*" type="file" style="display: none"/>
+							<img id="headPic3" src="<empty name="info['words_img3']">__PUBLIC__/img/add.jpg<else /><{$info['words_img3']}></empty>" height="150px" style="padding: 5px">
+							<button id="submit_btn3" type="button" class="btn btn-primary" style="display: none;">确定修改</button>
+							<label >点击图片即可修改</label><br>
+                        </div>
+	            	</div>
+	            	<div class="col-md-12">
+		                <div class="box-footer">
+		                    <input type="hidden" name="step" id="step" value="2" />
+		                    <input type="hidden" name="words_id" value="<{$info['words_id']}>" />
+		                    <input type="hidden" name="course_id" value="<{$courseId}>" />
+		                    <input type="hidden" id="jumpId" name="jumpId" value="" />
+							<input type="hidden" name="words_img" value="<{$info['words_img']}>" />
+		                    <!--<button class="btn btn-primary" name="submit3" onclick="changeBut(2)" type="submit">上翻</button>
+		                    <button class="btn btn-primary" name="submit4" onclick="changeBut(3)" type="submit">下翻</button>-->
+							<if condition="$wordsPreId neq ''">
+							<a href="/admin/words/edit?course_id=<{$courseId}>&words_id=<{$wordsPreId}>" class="btn btn-primary">上翻</a>
+							</if>
+							<if condition="$wordsNextId neq ''">
+							<a href="/admin/words/edit?course_id=<{$courseId}>&words_id=<{$wordsNextId}>" class="btn btn-primary">下翻</a>
+							</if>
+		                    <button class="btn btn-primary" name="submit1" onclick="changeBut(1)" type="submit">提交</button>
+		                    <button class="btn btn-primary" name="submit2" type="reset">重置</button>
+		                    <a href="javascript:history.go(-1)" class="btn btn-primary">返回</a>
+		                </div>
+		             </div>
+            	</div>
+           </div>
+            </form>
+            <!--/.col (left) -->
+        </div>
+        <!-- 右侧 -->
+        <!-- /.content -->
+    </aside>
+    <!-- /.right-side -->
+</div>
+<!-- ./wrapper -->
+</body>
+</html>

+ 1 - 0
www.hanlinyuanonline.com/Application/Admin/View/index.html

@@ -0,0 +1 @@
+ 

+ 1 - 0
www.hanlinyuanonline.com/Application/Admin/index.html

@@ -0,0 +1 @@
+ 

+ 237 - 0
www.hanlinyuanonline.com/Application/Api/Common/function.php

@@ -0,0 +1,237 @@
+<?php
+/*
+    File: functions.php
+ */
+
+function media($content) //多媒体转换
+{
+	if(strstr($content,'murl')){//音乐
+		$a=array();
+		foreach (explode('#',$content) as $content)
+		{
+			list($k,$v)=explode('|',$content);
+			$a[$k]=$v;
+		}
+		$content = $a;
+	}              
+	elseif(strstr($content,'pic'))//多图文回复
+	{
+		$a=array();
+		$b=array();
+		$c=array();
+		$n=0;
+		$contents = $content;
+		foreach (explode('@t',$content) as $b[$n])
+		{
+			if(strstr($contents,'@t'))
+			{
+			$b[$n] = str_replace("itle","title",$b[$n]);
+			$b[$n] = str_replace("ttitle","title",$b[$n]);
+			}
+			
+			foreach (explode('#',$b[$n]) as $content)
+			{
+				list($k,$v)=explode('|',$content);
+				$a[$k]=$v;
+				$d.= $k;
+			}
+		$c[$n] = $a;
+		$n++;
+		
+		}
+		$content = $c ;
+	}
+	return $content;
+}
+
+function get_utf8_string($content)  //  将一些字符转化成utf8格式   
+{    
+	//  将一些字符转化成utf8格式   
+	$encoding = mb_detect_encoding($content, array('ASCII','UTF-8','GB2312','GBK','BIG5'));  
+	return  mb_convert_encoding($content, 'utf-8', $encoding);
+}
+
+
+function xiaojo($key,$from,$to) //小九接口函数,该函数可通用于其他程序
+{
+	global $yourdb,$yourpw;
+	//取全局变量
+	$yourdb = XIAOJO_DB ;
+	$yourpw = XIAOJO_PW ;
+	//转换编码格式
+	$key=urlencode($key);
+	$yourdb=urlencode($yourdb);
+	$from=urlencode($from);
+	$to=urlencode($to);
+	//调用小九API接口得到回复结果
+	$post= "chat=".$key."&db=".$yourdb."&pw=".$yourpw."&from=".$from."&to=".$to;
+	$api = "http://www.xiaojo.com/api5.php";
+	$replys = http_post($api,$post);
+	$reply = media(urldecode( $replys));//多媒体转换
+	return $reply;	
+}
+	
+//有道翻译
+function youdaoDic($word){
+	$keyfrom = "zhuojin";	//申请APIKEY时所填表的网站名称的内容
+	$apikey = "304804921";  //从有道申请的APIKEY
+	
+	/*/有道翻译-xml格式
+	$url_youdao = 'http://fanyi.youdao.com/fanyiapi.do?keyfrom='.$keyfrom.'&key='.$apikey.'&type=data&doctype=xml&version=1.1&q='.$word;	
+	$xmlStyle = simplexml_load_file($url_youdao);	
+	$errorCode = $xmlStyle->errorCode;
+	$paras = $xmlStyle->translation->paragraph;
+	if($errorCode == 0){
+		return $paras;
+	}else{
+		return "无法进行有效的翻译";
+	}
+	*/
+		
+	//有道翻译-json格式
+	$url_youdao = 'http://fanyi.youdao.com/fanyiapi.do?keyfrom='.$keyfrom.'&key='.$apikey.'&type=data&doctype=json&version=1.1&q='.$word;	
+	$jsonStyle = http_get($url_youdao);
+	$result = json_decode($jsonStyle,true);	
+	$errorCode = $result['errorCode'];	
+	$trans = '';
+	if(isset($errorCode)){
+		switch ($errorCode){
+			case 0:
+				$trans = $result['translation']['0'];
+				break;
+			case 20:
+				$trans = '要翻译的文本过长';
+				break;
+			case 30:
+				$trans = '无法进行有效的翻译';
+				break;
+			case 40:
+				$trans = '不支持的语言类型';
+				break;
+			case 50:
+				$trans = '无效的key';
+				break;
+			default:
+				$trans = '出现异常';
+				break;
+		}
+	}
+	return $trans;
+	
+}
+
+//百度翻译
+function baiduDic($word,$from="auto",$to="auto"){	
+	//首先对要翻译的文字进行 urlencode 处理
+	$word_code=urlencode($word);	
+	//注册的API Key
+	$appid="O1IyaDAfnLPAIemNuG9kSdwq";	
+	//生成翻译API的URL GET地址
+	$baidu_url = "http://openapi.baidu.com/public/2.0/bmt/translate?client_id=".$appid."&q=".$word_code."&from=".$from."&to=".$to;	
+	$text=json_decode(http_get($baidu_url));
+	$text = $text->trans_result;
+	return $text[0]->dst;
+}
+	
+
+
+/**
+ * GET 请求
+ * @param string $url
+ */
+function http_get($url){
+	//初始化一个cURL对象 
+	$oCurl = curl_init();
+	if(stripos($url,"https://")!==FALSE){
+		curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE);
+		curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, FALSE);
+	}
+	//设置需要抓取的URL
+	curl_setopt($oCurl, CURLOPT_URL, $url);
+	//设置cURL 参数,要求结果保存到字符串中还是输出到屏幕上
+	curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1 );
+	//在发起连接前等待的时间,如果设置为0,则无限等待。微信的一次连接最长为5秒	
+	$timeout = 5;   		
+	curl_setopt ($oCurl, CURLOPT_CONNECTTIMEOUT, $timeout);
+	//运行cURL,请求网页
+	$sContent = curl_exec($oCurl);
+	$aStatus = curl_getinfo($oCurl);
+	//关闭URL请求
+	curl_close($oCurl);
+	if(intval($aStatus["http_code"])==200){
+		return $sContent;
+	}else{
+		return false;
+	}
+}
+
+/**
+ * POST 请求
+ * @param string $url
+ * @param array $param
+ * @return string content
+ */
+function http_post($url,$param){
+	//初始化curl  
+	$oCurl = curl_init();
+	if(stripos($url,"https://")!==FALSE){
+		curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, FALSE);
+		curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, false);
+	}
+	if (is_string($param)) {
+		$strPOST = $param;
+	} else {
+		$aPOST = array();
+		foreach($param as $key=>$val){
+			$aPOST[] = $key."=".urlencode($val);
+		}
+		$strPOST =  join("&", $aPOST);
+	}
+	//在发起连接前等待的时间,如果设置为0,则无限等待。微信的一次连接最长为5秒	
+	$timeout = 5;   		
+	curl_setopt($oCurl, CURLOPT_CONNECTTIMEOUT, $timeout);
+	curl_setopt($oCurl, CURLOPT_URL, $url);  //抓取指定网页  
+	curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1 );  //要求结果为字符串且输出到屏幕上 
+	curl_setopt($oCurl, CURLOPT_POST,true);           //post提交方式  
+	curl_setopt($oCurl, CURLOPT_POSTFIELDS,$strPOST);
+	$sContent = curl_exec($oCurl);      //运行curl  
+	$aStatus = curl_getinfo($oCurl);
+	curl_close($oCurl);
+	if(intval($aStatus["http_code"])==200){
+		return $sContent;
+	}else{
+		return false;
+	}
+}
+
+
+/**
+ * 系统加密方法
+ * @param string $data 要加密的字符串
+ * @param string $key  加密密钥
+ * @param int $expire  过期时间 单位 秒
+ * @return string
+ */
+function think_encrypt($data, $key = '', $expire = 0) {
+    $key  = md5(empty($key) ? C('DATA_AUTH_KEY') : $key);
+    $data = base64_encode($data);
+    $x    = 0;
+    $len  = strlen($data);
+    $l    = strlen($key);
+    $char = '';
+
+    for ($i = 0; $i < $len; $i++) {
+        if ($x == $l) $x = 0;
+        $char .= substr($key, $x, 1);
+        $x++;
+    }
+
+    $str = sprintf('%010d', $expire ? $expire + time():0);
+
+    for ($i = 0; $i < $len; $i++) {
+        $str .= chr(ord(substr($data, $i, 1)) + (ord(substr($char, $i, 1)))%256);
+    }
+    return str_replace(array('+','/','='),array('-','_',''),base64_encode($str));
+}
+
+?>

+ 1 - 0
www.hanlinyuanonline.com/Application/Api/Common/index.html

@@ -0,0 +1 @@
+ 

+ 19 - 0
www.hanlinyuanonline.com/Application/Api/Conf/config.php

@@ -0,0 +1,19 @@
+<?php
+
+if($_SERVER['DEPLOY_ENV']=='DEVELOPMENT'){//本地开发环境
+    return array(
+        //'配置项'=>'配置值'
+        'LOAD_EXT_CONFIG' => 'development',
+    );
+}elseif($_SERVER['DEPLOY_ENV']=='ONLINE'){//线上环境
+    return array(
+        //'配置项'=>'配置值'
+        'LOAD_EXT_CONFIG' => 'online',
+    );
+}else{
+    return array(
+        //'配置项'=>'配置值'
+        'LOAD_EXT_CONFIG' => 'online',
+    );
+    //dump("请检查配置文件");die;
+}

+ 50 - 0
www.hanlinyuanonline.com/Application/Api/Conf/development.php

@@ -0,0 +1,50 @@
+<?php
+return array(
+    //'配置项'=>'配置值'
+    'DB_TYPE'       => 'mysql', //分布式数据库类型必须相同
+    'DB_HOST'       => 'localhost',
+    'DB_NAME'       => 'words', //如果相同可以不用定义多个
+    'DB_USER'       => 'root',
+    'DB_PWD'        => '',
+    'DB_PORT'       => '3306',
+    'DB_PREFIX'     => 't_',
+
+    'URL_CASE_INSENSITIVE'=>false,//设置url区分大小写
+
+    'TMPL_L_DELIM'          =>  '<{',// 模板引擎普通标签开始标记
+    'TMPL_R_DELIM'          =>  '}>',// 模板引擎普通标签结束标记
+    
+    'PK_SCORE' => 10,
+    'RED_SCORE'=>2,
+    
+    'MAX_SEND' => 20,
+    'IMG_PATH'=>'./Uploads/img/',
+    'DOMAIN'=>'http://words.my',
+    
+    'URL_HTML_SUFFIX'=>'',
+    'IMG_PATH'=>'./Uploads/img/',
+    'MUSIC_PATH'=>'./Uploads/music/',
+    
+    'TRANS' => 'http://dict-co.iciba.com/api/dictionary.php?key=293E92740629E0F44C315F64B9BDE4A6',
+    
+    'SESSION_OPTIONS'         =>  array(
+        'expire'      =>  604800,    //SESSION保存7天
+    ),
+    
+    //腾讯云短信
+    'SMS_CONFIG'=>array(
+        'appId' => '1400057818',
+        'appKey' => 'ecf717ba24800c95e42157f35bb6fca8',
+    ),
+    
+    'UMENG_IOS_APP_KEY'      => '5a81a1d9f29d9838f70002b9', //友盟ios AppKey
+    'UMENG_IOS_SECRET'       => 'oprhn6qr6kahg8baffxikycovtnoqjyx', //友盟ios App Master Secret
+    
+    'UMENG_ANDROID_APP_KEY'  => '5a5820c68f4a9d4c5400005c', //友盟android AppKey
+    'UMENG_ANDROID_SECRET'   => '4czr0eitvmowvge2txffyo0w9cqjgqrk', //友盟android App Master Secret
+    'UMENG_ANDROID_Message_SECRET'  => 'a5582cd026ef2e280c0aa3bcc5c6b50e', //友盟Umeng Message Secret
+    
+    
+    /* 数据缓存设置 */
+    'DATA_CACHE_TIME'       =>  604800,      // 数据缓存有效期 0表示永久缓存
+);

+ 1 - 0
www.hanlinyuanonline.com/Application/Api/Conf/index.html

@@ -0,0 +1 @@
+ 

+ 60 - 0
www.hanlinyuanonline.com/Application/Api/Conf/online.php

@@ -0,0 +1,60 @@
+<?php
+return array(
+    //'配置项'=>'配置值'
+    'DB_TYPE'       => 'mysql', //分布式数据库类型必须相同
+    'DB_HOST'       => 'localhost',
+    'DB_NAME'       => 'words', //如果相同可以不用定义多个
+    'DB_USER'       => 'root',
+    'DB_PWD'        => 'KeYpZrZx',
+    'DB_PORT'       => '3306',
+    'DB_PREFIX'     => 't_',
+
+    'URL_CASE_INSENSITIVE'=>true,//设置url区分大小写
+
+    'TMPL_L_DELIM'          =>  '<{',// 模板引擎普通标签开始标记
+    'TMPL_R_DELIM'          =>  '}>',// 模板引擎普通标签结束标记
+    
+    'PK_SCORE' => 10,
+    'RED_SCORE'=>2,
+    /* 'HTML_CACHE_ON' =>true,
+    'HTML_CACHE_TIME'   =>    86400,   // 全局静态缓存有效期(秒)
+    'HTML_FILE_SUFFIX'  =>    '.htm', // 设置静态缓存文件后缀
+    'HTML_CACHE_RULES'  =>     array(
+        '*'=>array('{$_SERVER.REQUEST_URI|md5}')
+    ), */
+    
+    'MAX_SEND' => 20,
+    'IMG_PATH'=>'./Uploads/img/',
+    'DOMAIN'=>'http://www.hanlinyuanonline.com',
+    
+    'URL_HTML_SUFFIX'=>'',
+    'IMG_PATH'=>'./Uploads/img/',
+    'MUSIC_PATH'=>'./Uploads/music/',
+    
+    'TRANS' => 'http://dict-co.iciba.com/api/dictionary.php?key=293E92740629E0F44C315F64B9BDE4A6',
+    
+    'SESSION_EXPIRE'        =>  604800,   //有效时间
+    'SESSION_OPTIONS'         =>  array(
+        'expire'      =>  604800,    //SESSION保存7天
+    ),
+    
+    //腾讯云短信
+    'SMS_CONFIG'=>array(
+        'appId' => '1400057818',
+        'appKey' => 'ecf717ba24800c95e42157f35bb6fca8',
+    ),
+    
+    'UMENG_IOS_APP_KEY'      => '5a81a1d9f29d9838f70002b9', //友盟ios AppKey
+    'UMENG_IOS_SECRET'       => 'oprhn6qr6kahg8baffxikycovtnoqjyx', //友盟ios App Master Secret
+    
+    'UMENG_ANDROID_APP_KEY'  => '5a5820c68f4a9d4c5400005c', //友盟android AppKey
+    'UMENG_ANDROID_SECRET'   => '4czr0eitvmowvge2txffyo0w9cqjgqrk', //友盟android App Master Secret
+    'UMENG_ANDROID_Message_SECRET'  => 'a5582cd026ef2e280c0aa3bcc5c6b50e', //友盟Umeng Message Secret
+    
+    /* 数据缓存设置 */
+    'DATA_CACHE_TIME'       =>  604800,      // 数据缓存有效期 0表示永久缓存
+    
+    
+    'WX_APPID'=>'wx5ebec3074397eb98',
+    'WX_APPSECRET'=>'3b84a40a2b1c22b7166523dc9043ccec',
+);

BIN
www.hanlinyuanonline.com/Application/Api/Controller/.UserController.class.php.swp


+ 62 - 0
www.hanlinyuanonline.com/Application/Api/Controller/AcfunController.class.php

@@ -0,0 +1,62 @@
+<?php
+namespace Api\Controller;
+use Common\Controller\ApiController;
+class AcfunController extends ApiController {
+    public function __construct(){
+        parent::__construct();
+    }
+    
+    //获取指定弹幕列表
+    public function index(){
+        $res = array('小样儿,你还是干不过我!','算你厉害!','这个不会吧~','叫你声loser你敢答应吗?',
+            '叫你上课不认证听!','词到用时方恨少!',);
+        $data = array('code'=>0,'msg'=>'','data'=>$res);
+        $this->returnData($data);exit;
+    }
+    
+    //获取弹幕
+    public function getAcfun(){
+        $lastId = I('last_id',0);
+        $pageSize = I('page_size',8);
+        $recordId = ('record_id');
+        if (empty($recordId)){
+            $data = array('code'=>1,'msg'=>'弹幕ID错误');
+            $this->returnData($data);exit;
+        }
+        $condition = array('record_id'=>$recordId);
+        if ($lastId>0){
+            $condition['acfun_id'] = array('GT',$lastId);
+        }
+        $res = M('PkAcfun')->where($condition)->order('acfun_id desc')->limit($pageSize)->select();
+        $data = array('code'=>0,'msg'=>'','data'=>$res);
+        $this->returnData($data);exit;
+    }
+    
+    //添加弹幕
+    public function add(){
+        $recordId = ('record_id');
+        $acfunContent = I('acfun_content');
+        if (empty($recordId)){
+            $data = array('code'=>1,'msg'=>'对战ID错误');
+            $this->returnData($data);exit;
+        }
+        if (mb_strlen($acfunContent,'UTF8')<2 || mb_strlen($acfunContent,'UTF8')>100){
+            $data = array('code'=>1,'msg'=>'弹幕2到100个汉字');
+            $this->returnData($data);exit;
+        }
+        $saveData = array(
+            'record_id'=>$recordId,
+            'user_id'=>$this->userId,
+            'acfun_content'=>$acfunContent,
+            'operate_dt'=>time(),
+        );
+        $acfunId = M('PkAcfun')->save($saveData);
+        if ($acfunId){
+            $data = array('code'=>0,'msg'=>'','data'=>$acfunId);
+            $this->returnData($data);exit;
+        }else{
+            $data = array('code'=>1,'msg'=>'弹幕添加失败');
+            $this->returnData($data);exit;
+        }
+    }
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 459 - 0
www.hanlinyuanonline.com/Application/Api/Controller/ChoiceController.class.php


+ 0 - 0
www.hanlinyuanonline.com/Application/Api/Controller/CourseController.class.php


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff