zhanqi 5 роки тому
коміт
a694eaf1b3
100 змінених файлів з 12474 додано та 0 видалено
  1. 3 0
      .gitignore
  2. 45 0
      common/pom.xml
  3. 26 0
      common/src/main/java/com/cie/common/constance/PramConstance.java
  4. 20 0
      common/src/main/java/com/cie/common/exception/DataSourceException.java
  5. 16 0
      common/src/main/java/com/cie/common/exception/ErrorCompanyException.java
  6. 16 0
      common/src/main/java/com/cie/common/exception/ErrorSignException.java
  7. 13 0
      common/src/main/java/com/cie/common/exception/IpAuthException.java
  8. 20 0
      common/src/main/java/com/cie/common/exception/OutOfBalanceException.java
  9. 20 0
      common/src/main/java/com/cie/common/exception/OutOfDayCallException.java
  10. 16 0
      common/src/main/java/com/cie/common/exception/ParamFormatErrorException.java
  11. 16 0
      common/src/main/java/com/cie/common/exception/ParamMissException.java
  12. 20 0
      common/src/main/java/com/cie/common/exception/RequestException.java
  13. 34 0
      common/src/main/java/com/cie/common/response/BusinessCode.java
  14. 84 0
      common/src/main/java/com/cie/common/response/JsonResponse.java
  15. 59 0
      common/src/main/java/com/cie/common/response/ReturnCode.java
  16. 175 0
      common/src/main/java/com/cie/common/util/EMailUtil.java
  17. 43 0
      common/src/main/java/com/cie/common/util/HttpUtil.java
  18. 318 0
      common/src/main/java/com/cie/common/util/IDCheckUtil.java
  19. 122 0
      common/src/main/java/com/cie/common/util/ParamUtil.java
  20. 36 0
      common/src/main/java/com/cie/common/util/SerialNoUtil.java
  21. 61 0
      common/src/main/java/com/cie/common/util/SignUtil.java
  22. 11 0
      common/src/main/java/com/cie/common/util/StringUtil.java
  23. 34 0
      data-api/pom.xml
  24. 4 0
      data-api/src/main/java/com/cie/data/api/InnerDataService.java
  25. 8 0
      data-api/src/main/java/com/cie/data/api/TwoItemService.java
  26. 22 0
      data-api/src/main/java/com/cie/data/api/constance/CompanyCode.java
  27. 92 0
      data-api/src/test/java/com/cie/demo/M1001Demo.java
  28. 0 0
      data-service-gw/README.md
  29. 53 0
      data-service-gw/pom.xml
  30. 15 0
      data-service-gw/src/main/java/com/cie/data/DataGWApplication.java
  31. 9 0
      data-service-gw/src/main/java/com/cie/data/service/impl/InnerDataServiceImpl.java
  32. 23 0
      data-service-gw/src/main/java/com/cie/data/util/DateUtil.java
  33. 56 0
      data-service-gw/src/main/resources/application.yml
  34. 52 0
      data-service/pom.xml
  35. 15 0
      data-service/src/main/java/com/cie/data/DataProviderApplication.java
  36. 7 0
      data-service/src/main/java/com/cie/data/dao/YuanJinDao.java
  37. 17 0
      data-service/src/main/java/com/cie/data/entity/Base.java
  38. 24 0
      data-service/src/main/java/com/cie/data/entity/DsYuanJin.java
  39. 69 0
      data-service/src/main/java/com/cie/data/proxy/YuanJinProxy.java
  40. 7 0
      data-service/src/main/java/com/cie/data/service/IdNameVerify.java
  41. 32 0
      data-service/src/main/java/com/cie/data/service/apiImpl/TwoItemServiceImpl.java
  42. 10 0
      data-service/src/main/java/com/cie/data/service/company/YuanJinService.java
  43. 21 0
      data-service/src/main/java/com/cie/data/service/company/YuanJinServiceImpl.java
  44. 61 0
      data-service/src/main/resources/application.yml
  45. 78 0
      isc-admin/pom.xml
  46. 15 0
      isc-admin/src/main/java/com/cie/isc/Application.java
  47. 16 0
      isc-admin/src/main/java/com/cie/isc/annotation/VerifySign.java
  48. 103 0
      isc-admin/src/main/java/com/cie/isc/aop/VerifySingAop.java
  49. 81 0
      isc-admin/src/main/java/com/cie/isc/api/SystemControllerAdvice.java
  50. 24 0
      isc-admin/src/main/java/com/cie/isc/api/Test.java
  51. 20 0
      isc-admin/src/main/java/com/cie/isc/config/MybatisPlusConfig.java
  52. 31 0
      isc-admin/src/main/java/com/cie/isc/controller/LoginController.java
  53. 27 0
      isc-admin/src/main/java/com/cie/isc/controller/UserController.java
  54. 7 0
      isc-admin/src/main/java/com/cie/isc/dao/UserDao.java
  55. 17 0
      isc-admin/src/main/java/com/cie/isc/entity/po/Base.java
  56. 13 0
      isc-admin/src/main/java/com/cie/isc/entity/po/User.java
  57. 27 0
      isc-admin/src/main/java/com/cie/isc/filter/CorsFilter.java
  58. 7 0
      isc-admin/src/main/java/com/cie/isc/service/UserService.java
  59. 14 0
      isc-admin/src/main/java/com/cie/isc/service/impl/UserServiceImpl.java
  60. 8 0
      isc-admin/src/main/java/com/cie/isc/util/IscPage.java
  61. 66 0
      isc-admin/src/main/resources/application.yml
  62. 196 0
      isc-admin/src/main/resources/logback-spring.xml
  63. 122 0
      isc-admin/src/test/java/com/cie/CodeGenerator.java
  64. 357 0
      isc-front/Documentation_1_1/css/documenter_style.css
  65. BIN
      isc-front/Documentation_1_1/css/img/body.jpg
  66. BIN
      isc-front/Documentation_1_1/css/img/bt_cubs.png
  67. BIN
      isc-front/Documentation_1_1/css/img/bt_cubs_a.png
  68. BIN
      isc-front/Documentation_1_1/css/img/info.png
  69. BIN
      isc-front/Documentation_1_1/css/img/logo.png
  70. BIN
      isc-front/Documentation_1_1/css/img/pre_bg.png
  71. BIN
      isc-front/Documentation_1_1/css/img/warning.png
  72. 226 0
      isc-front/Documentation_1_1/css/shCore.css
  73. 329 0
      isc-front/Documentation_1_1/css/shCoreDefault.css
  74. 931 0
      isc-front/Documentation_1_1/index.html
  75. 4 0
      isc-front/Documentation_1_1/js/jquery.1.6.4.js
  76. 205 0
      isc-front/Documentation_1_1/js/jquery.easing.js
  77. 11 0
      isc-front/Documentation_1_1/js/jquery.scrollTo-1.4.2-min.js
  78. 159 0
      isc-front/Documentation_1_1/js/script.js
  79. 91 0
      isc-front/Documentation_1_1/js/shBrushCss.js
  80. 52 0
      isc-front/Documentation_1_1/js/shBrushJScript.js
  81. 69 0
      isc-front/Documentation_1_1/js/shBrushXml.js
  82. 17 0
      isc-front/Documentation_1_1/js/shCore.js
  83. 55 0
      isc-front/assets/ajax_modal_content.html
  84. 23 0
      isc-front/assets/elfinder/MySQLStorage.sql
  85. 45 0
      isc-front/assets/elfinder/connector.php
  86. 1103 0
      isc-front/assets/elfinder/elFinder.class.php
  87. 133 0
      isc-front/assets/elfinder/elFinderConnector.class.php
  88. 3370 0
      isc-front/assets/elfinder/elFinderVolumeDriver.class.php
  89. 835 0
      isc-front/assets/elfinder/elFinderVolumeLocalFileSystem.class.php
  90. 896 0
      isc-front/assets/elfinder/elFinderVolumeMySQL.class.php
  91. 512 0
      isc-front/assets/elfinder/mime.types
  92. 44 0
      isc-front/assets/filetree/jqueryFileTree.asp
  93. 31 0
      isc-front/assets/filetree/jqueryFileTree.aspx
  94. 19 0
      isc-front/assets/filetree/jqueryFileTree.cf
  95. 49 0
      isc-front/assets/filetree/jqueryFileTree.jsp
  96. 43 0
      isc-front/assets/filetree/jqueryFileTree.php
  97. 102 0
      isc-front/assets/filetree/jqueryFileTree.pl
  98. 25 0
      isc-front/assets/filetree/jqueryFileTree.py
  99. 61 0
      isc-front/assets/filetree/jqueryFileTree.rb
  100. 0 0
      isc-front/assets/filetree/jqueryFileTree_huck.lasso

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+*.iml
+/.idea
+**/target

+ 45 - 0
common/pom.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>parent</artifactId>
+        <groupId>com.cie</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>common</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/javax.mail/mail -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 26 - 0
common/src/main/java/com/cie/common/constance/PramConstance.java

@@ -0,0 +1,26 @@
+package com.cie.common.constance;
+
+public class PramConstance {
+    /**
+     * <pre>
+     * 省、直辖市代码表:
+     *     11 : 北京  12 : 天津  13 : 河北       14 : 山西  15 : 内蒙古
+     *     21 : 辽宁  22 : 吉林  23 : 黑龙江  31 : 上海  32 : 江苏
+     *     33 : 浙江  34 : 安徽  35 : 福建       36 : 江西  37 : 山东
+     *     41 : 河南  42 : 湖北  43 : 湖南       44 : 广东  45 : 广西      46 : 海南
+     *     50 : 重庆  51 : 四川  52 : 贵州       53 : 云南  54 : 西藏
+     *     61 : 陕西  62 : 甘肃  63 : 青海       64 : 宁夏  65 : 新疆
+     *     71 : 台湾
+     *     81 : 香港  82 : 澳门
+     *     91 : 国外
+     * </pre>
+     */
+    // 身份证前两位省份代码
+    public static final Integer[] PRE_ID_PROVINCE_CODE = {11, 12, 13, 14, 15, 21, 22, 23, 31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 45, 46, 51, 52, 53, 54, 61, 62, 63, 64, 65, 71, 81, 82};
+    public static final String PRE_ID_PROVINCE_CODE_STR = "11,12,13,14,15,21,22,23,31,32,33,34,35,36,37,41,42,43,44,45,46,51,52,53,54,61,62,63,64,65,71,81,82";
+    public static final String PROVINCE_CODE[] = {"11", "12", "13", "14", "15", "21",
+            "22", "23", "31", "32", "33", "34", "35", "36", "37", "41", "42",
+            "43", "44", "45", "46", "50", "51", "52", "53", "54", "61", "62",
+            "63", "64", "65", "71", "81", "82", "91"};
+
+}

+ 20 - 0
common/src/main/java/com/cie/common/exception/DataSourceException.java

@@ -0,0 +1,20 @@
+package com.cie.common.exception;
+
+import lombok.Data;
+
+/**
+ * @author: zhanqi
+ * @description: 请求第三方数据源的异常
+ * @createDate: 2018/11/12 17:28
+ * @modifiedBy:
+ */
+@Data
+public class DataSourceException extends Exception {
+
+    public DataSourceException() {
+    }
+
+    public DataSourceException(String s) {
+        super(s);
+    }
+}

+ 16 - 0
common/src/main/java/com/cie/common/exception/ErrorCompanyException.java

@@ -0,0 +1,16 @@
+package com.cie.common.exception;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/14 12:47
+ * @modifiedBy:
+ */
+public class ErrorCompanyException extends Exception {
+    public ErrorCompanyException() {
+    }
+
+    public ErrorCompanyException(String s) {
+        super(s);
+    }
+}

+ 16 - 0
common/src/main/java/com/cie/common/exception/ErrorSignException.java

@@ -0,0 +1,16 @@
+package com.cie.common.exception;
+
+/**
+ * @author: zhanqi
+ * @description: 无效签名
+ * @createDate: 2018/11/15 19:06
+ * @modifiedBy:
+ */
+public class ErrorSignException extends Exception {
+    public ErrorSignException() {
+    }
+
+    public ErrorSignException(String s) {
+        super(s);
+    }
+}

+ 13 - 0
common/src/main/java/com/cie/common/exception/IpAuthException.java

@@ -0,0 +1,13 @@
+package com.cie.common.exception;
+
+/**
+ * ip不在白名单中
+ */
+public class IpAuthException extends Exception {
+    public IpAuthException() {
+    }
+
+    public IpAuthException(String message) {
+        super(message);
+    }
+}

+ 20 - 0
common/src/main/java/com/cie/common/exception/OutOfBalanceException.java

@@ -0,0 +1,20 @@
+package com.cie.common.exception;
+
+import lombok.Data;
+
+/**
+ * @author: zhanqi
+ * @description: 余额不足
+ * @createDate: 2018/11/12 17:28
+ * @modifiedBy:
+ */
+@Data
+public class OutOfBalanceException extends Exception {
+
+    public OutOfBalanceException() {
+    }
+
+    public OutOfBalanceException(String s) {
+        super(s);
+    }
+}

+ 20 - 0
common/src/main/java/com/cie/common/exception/OutOfDayCallException.java

@@ -0,0 +1,20 @@
+package com.cie.common.exception;
+
+import lombok.Data;
+
+/**
+ * @author: zhanqi
+ * @description: 单日请求量超出
+ * @createDate: 2018/11/12 17:28
+ * @modifiedBy:
+ */
+@Data
+public class OutOfDayCallException extends Exception {
+
+    public OutOfDayCallException() {
+    }
+
+    public OutOfDayCallException(String s) {
+        super(s);
+    }
+}

+ 16 - 0
common/src/main/java/com/cie/common/exception/ParamFormatErrorException.java

@@ -0,0 +1,16 @@
+package com.cie.common.exception;
+
+/**
+ * @author: zhanqi
+ * @description: 参数格式错误异常
+ * @createDate: 2018/11/14 12:47
+ * @modifiedBy:
+ */
+public class ParamFormatErrorException extends Exception {
+    public ParamFormatErrorException() {
+    }
+
+    public ParamFormatErrorException(String s) {
+        super(s);
+    }
+}

+ 16 - 0
common/src/main/java/com/cie/common/exception/ParamMissException.java

@@ -0,0 +1,16 @@
+package com.cie.common.exception;
+
+/**
+ * @author: zhanqi
+ * @description: 缺少必要参数异常
+ * @createDate: 2018/11/14 12:47
+ * @modifiedBy:
+ */
+public class ParamMissException extends Exception {
+    public ParamMissException() {
+    }
+
+    public ParamMissException(String s) {
+        super(s);
+    }
+}

+ 20 - 0
common/src/main/java/com/cie/common/exception/RequestException.java

@@ -0,0 +1,20 @@
+package com.cie.common.exception;
+
+import lombok.Data;
+
+/**
+ * @author: zhanqi
+ * @description: 请求发送异常
+ * @createDate: 2018/11/12 17:28
+ * @modifiedBy:
+ */
+@Data
+public class RequestException extends Exception {
+
+    public RequestException() {
+    }
+
+    public RequestException(String s) {
+        super(s);
+    }
+}

+ 34 - 0
common/src/main/java/com/cie/common/response/BusinessCode.java

@@ -0,0 +1,34 @@
+package com.cie.common.response;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/13 11:20
+ * @modifiedBy:
+ */
+
+public enum BusinessCode {
+
+    VERIFY_NO(0, "不一致"),
+    VERIFY_YES(1, "一致"),
+    VERIFY_EMPTY(2, "库无");
+
+
+    private int code;
+    private String msg;
+
+    BusinessCode() {
+    }
+
+    BusinessCode(int code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }}

+ 84 - 0
common/src/main/java/com/cie/common/response/JsonResponse.java

@@ -0,0 +1,84 @@
+package com.cie.common.response;
+
+import com.alibaba.fastjson.JSON;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 处理结果Vo
+ */
+@Data
+public class JsonResponse implements Serializable {
+
+    /**
+     * 系统码
+     */
+    private Integer status;
+    /**
+     * 错误信息
+     */
+    private String error;
+    /**
+     * 业务结果
+     */
+    private Object info;
+    /**
+     * 流水号
+     */
+    private String serialNo;
+    /**
+     * 时间戳
+     */
+    private String timestamp=System.currentTimeMillis()+"";
+
+    public JsonResponse() {
+    }
+
+    public JsonResponse(String serialNo) {
+        this.serialNo = serialNo;
+    }
+
+    public  JsonResponse(Object obj){
+        this.status =ReturnCode.SUCCESS.getStatus();
+        this.info = JSON.toJSON(obj);
+    }
+    /**
+     * 错误信息
+     * @param returnCode
+     */
+    public JsonResponse(ReturnCode returnCode) {
+        this.status = returnCode.getStatus();
+        this.error = returnCode.getError();
+    }
+    /**
+     * 错误信息
+     * @param returnCode
+     */
+    public JsonResponse(ReturnCode returnCode,String msg) {
+        this.status = returnCode.getStatus();
+        this.error = msg;
+    }
+    /**
+     * 错误信息
+     * @param returnCode
+     */
+    public void putError(ReturnCode returnCode) {
+        this.status = returnCode.getStatus();
+        this.error = returnCode.getError();
+    }
+    /**
+     * 业务返回
+     * @param info
+     */
+    public void putResult(Object info,ReturnCode returnCode){
+        this.status = returnCode.getStatus();
+        this.info = info;
+    }
+
+
+
+
+
+}

+ 59 - 0
common/src/main/java/com/cie/common/response/ReturnCode.java

@@ -0,0 +1,59 @@
+package com.cie.common.response;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/13 11:20
+ * @modifiedBy:
+ */
+
+public enum ReturnCode {
+
+    SUCCESS(0, "成功"),
+    Fail(1, "失败"),
+
+    SIGN_ERROR(-101, "签名错误"),
+    OUT_OF_DAY_REQUEST(-102, "接口单日访问量过大"),
+    OUT_OF_BALANCE(-103, "账号余额不足"),
+    OUT_OF_IP(-105, "IP访问限制"),
+
+    PARAM_MISS_ERROR(-201, "缺少必选参数"),
+    PARAM_FORMAT_ERROR(-201, "参数格式错误"),
+    REQUEST_FORMAT_ERROR(-204, "请求格式错误"),
+
+    SYSTEM_ERROR(-301, "系统异常");
+
+
+
+
+
+
+
+
+
+    private int status;
+    private String error;
+
+    ReturnCode() {
+    }
+
+    ReturnCode(int status, String error) {
+        this.status = status;
+        this.error = error;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public String getError() {
+        return error;
+    }
+
+    public void setError(String error) {
+        this.error = error;
+    }}

+ 175 - 0
common/src/main/java/com/cie/common/util/EMailUtil.java

@@ -0,0 +1,175 @@
+package com.cie.common.util;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.mail.*;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Properties;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/21 16:31
+ * @modifiedBy:
+ */
+public class EMailUtil {
+    private static final Logger logger = LoggerFactory.getLogger(EMailUtil.class);
+
+    /**
+     * 发送邮件到自己的阿里邮箱
+     * @param title 需要传输的标题
+     * @param body 需要传输的内容
+     * @return
+     */
+    public static boolean sendMailAli(String title, String body) {
+
+        //设置参数
+        Properties props = new Properties();
+        props.put("mail.smtp.ssl.enable", "true");
+        props.put("mail.smtp.auth", "true");
+        props.put("mail.smtp.host", "smtp.mxhichina.com");
+        props.put("mail.transport.protocol", "smtp");
+        props.put("mail.smtp.port", 465);
+        //自定义信息
+        //TODO 邮箱填写
+        props.put("username", "");//你的邮箱
+        props.put("password", "");//你的密码
+        props.put("to", "");//接收的邮箱
+
+        return EMailUtil.send(props,title,body);
+    }
+    /**
+     * 发送邮件到自己的163邮箱
+     * @param title 需要传输的标题
+     * @param body 需要传输的内容
+     * @return
+     */
+    public static boolean sendMail163(String title, String body) {
+
+        //设置参数
+        Properties props = new Properties();
+        props.put("mail.smtp.ssl.enable", "true");
+        props.put("mail.smtp.auth", "true");
+        props.put("mail.smtp.host", "smtp.163.com");
+        props.put("mail.transport.protocol", "smtp");
+        props.put("mail.smtp.port", 465);
+        //自定义信息
+        props.put("username", "xxxx@163.com");//你的邮箱
+        props.put("password", "xxxx");//你的密码
+        props.put("to", "xxxx@163.com");//接收的邮箱
+
+        return EMailUtil.send(props,title,body);
+    }
+
+    /**
+     *  发送邮件到gmail
+     *  国内网络无法访问(因为众所周知的原因)
+     * @param title 标题
+     * @param body  内容
+     * @return
+     */
+    public  static boolean sendMailGmail(String title, String body){
+
+        //设置参数
+        Properties props = new Properties();
+        props.put("mail.smtp.host", "smtp.gmail.com");
+        props.put("mail.smtp.auth", "true");
+        props.put("mail.smtp.ssl.enable", "true");
+        props.put("mail.smtp.port", "465");
+        props.put("mail.smtp.socketFactory.port", "465");
+        props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
+        //自定义信息
+        props.put("username", "xxxx@gmail.com");//你的邮箱
+        props.put("password", "xxxx");//你的密码
+        props.put("to", "xxxx@gmail.com");//接收的邮箱
+
+        return EMailUtil.send(props,title,body);
+
+    }
+    /**
+     *  发送邮件到outlook
+     * @param title 标题
+     * @param body  内容
+     * @return
+     */
+    public  static boolean sendMailOutLook(String title, String body){
+
+        //设置参数
+        Properties props = new Properties();
+        props.put("mail.smtp.auth", "true");
+        props.put("mail.smtp.starttls.enable", "true");
+        props.put("mail.smtp.host", "smtp.outlook.com");
+        props.put("mail.smtp.port", "587");
+        //自定义信息
+        props.put("username", "xxxx@outlook.com");//你的邮箱
+        props.put("password", "xxxx");//你的密码
+        props.put("to", "xxxx@outlook.com");//接收的邮箱
+
+        return EMailUtil.send(props,title,body);
+
+    }
+
+    /**
+     * 获取系统当前的时间
+     * 以传入时间格式返回,传空返回默认格式
+     * @param format 时间格式
+     * @return
+     */
+    private static String getTitleTimeFormat(String format){
+        if (format==null){
+            format="yyyy-MM-dd HH:mm:ss/SSS";
+        }
+        SimpleDateFormat df = new SimpleDateFormat(format);//设置日期格式
+        return df.format(new Date());// new Date()为获取当前系统时间
+    }
+
+    /**
+     * 发送邮件,获取参数,和标题还有内容
+     * @param props 参数
+     * @param title 标题
+     * @param body 内容
+     * @return
+     */
+    private static Boolean send(Properties props, String title, String body)  {
+        //发送邮件地址
+        final String username=props.getProperty("username");
+        //发送邮件名称
+        final String password=props.getProperty("password");
+        //接收邮件地址
+        String to=props.getProperty("to");
+
+        Session session = Session.getInstance(props,
+                new javax.mail.Authenticator() {
+                    protected PasswordAuthentication getPasswordAuthentication() {
+                        return new PasswordAuthentication(username, password);
+                    }
+                });
+
+        try {
+            Message message = new MimeMessage(session);
+
+            message.setFrom(new InternetAddress(username));
+            message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
+            message.setSubject(title+"("+EMailUtil.getTitleTimeFormat(null)+")");
+            message.setContent(body,"text/html;charset=utf-8");
+
+            Transport.send(message);
+        } catch (AddressException e) {
+            e.printStackTrace();
+            logger.error("邮件发送异常:"+e.toString());
+        } catch (javax.mail.MessagingException e) {
+            e.printStackTrace();
+            logger.error("邮件发送异常:"+e.toString());
+        }
+
+        System.out.println("发送完毕!");
+
+        return true;
+    }
+}

+ 43 - 0
common/src/main/java/com/cie/common/util/HttpUtil.java

@@ -0,0 +1,43 @@
+package com.cie.common.util;
+
+import com.cie.common.exception.RequestException;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+
+import java.io.IOException;
+
+public class HttpUtil {
+    public static final String CONTENT_TYPE_JSON = "application/json";
+    public static final String CONTENT_TYPE_XW = "application/x-www-form-urlencoded;charset=UTF-8";
+
+    /**
+     *  post请求
+     * @param url
+     * @param param
+     * @param contentType
+     * @return
+     * @throws IOException
+     * @throws RequestException
+     */
+    public static String doPost(String url, String param,String contentType) throws IOException, RequestException {
+
+        HttpPost post = new HttpPost(url);
+        String result = null;
+        StringEntity s = new StringEntity(param, "UTF-8"); // 中文乱码在此解决
+        s.setContentType(contentType);
+        post.setEntity(s);
+        HttpResponse res = HttpClients.createDefault().execute(post);
+        if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+            result = EntityUtils.toString(res.getEntity());// 返回String格式:
+        }else {
+
+            throw new RequestException("发送请求时,返回异常,状态码:"+res.getStatusLine().getStatusCode());
+        }
+
+        return result;
+    }
+}

+ 318 - 0
common/src/main/java/com/cie/common/util/IDCheckUtil.java

@@ -0,0 +1,318 @@
+package com.cie.common.util;
+
+import com.cie.common.constance.PramConstance;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.Calendar;
+import java.util.Date;
+
+public class IDCheckUtil {
+
+
+    /**
+     * 每位加权因子
+     */
+    private static int power[] = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5,8, 4, 2};
+
+
+    /**
+     * 验证所有的身份证的合法性
+     *
+     * @param idcard 身份证
+     * @return 合法返回true,否则返回false
+     */
+    public static boolean isValidatedAllIdcard(String idcard) {
+        if (idcard.length() == 15) {
+            return validate15IDCard(idcard);
+        }
+        return validate18Idcard(idcard);
+    }
+
+    /**
+     * <p>
+     * 判断18位身份证的合法性
+     * </p>
+     * 根据〖中华人民共和国国家标准GB11643-1999〗中有关公民身份号码的规定,公民身份号码是特征组合码,由十七位数字本体码和一位数字校验码组成。
+     * 排列顺序从左至右依次为:六位数字地址码,八位数字出生日期码,三位数字顺序码和一位数字校验码。
+     * <p>
+     * 顺序码: 表示在同一地址码所标识的区域范围内,对同年、同月、同 日出生的人编定的顺序号,顺序码的奇数分配给男性,偶数分配 给女性。
+     * </p>
+     * <p>
+     * 1.前1、2位数字表示:所在省份的代码; 2.第3、4位数字表示:所在城市的代码; 3.第5、6位数字表示:所在区县的代码;
+     * 4.第7~14位数字表示:出生年、月、日; 5.第15、16位数字表示:所在地的派出所的代码;
+     * 6.第17位数字表示性别:奇数表示男性,偶数表示女性;
+     * 7.第18位数字是校检码:也有的说是个人信息码,一般是随计算机的随机产生,用来检验身份证的正确性。校检码可以是0~9的数字,有时也用x表示。
+     * </p>
+     * <p>
+     * 第十八位数字(校验码)的计算方法为: 1.将前面的身份证号码17位数分别乘以不同的系数。从第一位到第十七位的系数分别为:7 9 10 5 8 4
+     * 2 1 6 3 7 9 10 5 8 4 2
+     * </p>
+     * <p>
+     * 2.将这17位数字和系数相乘的结果相加。
+     * </p>
+     * <p>
+     * 3.用加出来和除以11,看余数是多少
+     * </p>
+     * 4.余数只可能有0 1 2 3 4 5 6 7 8 9 10这11个数字。其分别对应的最后一位身份证的号码为1 0 X 9 8 7 6 5 4 3
+     * 2。
+     * <p>
+     * 5.通过上面得知如果余数是2,就会在身份证的第18位数字上出现罗马数字的Ⅹ。如果余数是10,身份证的最后一位号码就是2。
+     * </p>
+     *
+     * @param idcard
+     * @return
+     */
+    public static boolean validate18Idcard(String idcard) {
+        idcard=idcard.trim();
+        if (idcard == null || "".equals(idcard)) {
+            return false;
+        }
+
+        // 非18位为假
+        if (idcard.length() != 18) {
+            return false;
+        }
+        // 获取前17位
+        String idcard17 = idcard.substring(0, 17);
+
+        // 前17位全部为数字
+        if (!isDigital(idcard17)) {
+            return false;
+        }
+
+        String provinceid = idcard.substring(0, 2);
+        // 校验省份
+        if (!PramConstance.PRE_ID_PROVINCE_CODE_STR.contains(provinceid)) {
+            return false;
+        }
+        // 校验出生日期
+        if (!validateIDDate( idcard)){
+            return false;
+        }
+
+        // 将身份证的第18位与算出来的校码进行匹配,不相等就为假
+        if (!validateLastChar( idcard) ) {
+            return false;
+        }
+
+        return true;
+    }
+    public static boolean validateIDDate(String idcard) {
+        String birthday = idcard.substring(6, 14);
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+        try {
+            LocalDate date = LocalDate.parse(birthday, formatter);
+            if (date.isAfter(LocalDate.now())) {
+                return false;
+            }
+        } catch (Exception e) {
+            return false;
+        }
+        return true;
+    }
+    /**
+     * 身份证号最后一位校验
+     *
+     * @param idcard
+     * @return
+     */
+    public static boolean validateLastChar(String idcard) {
+
+        // 获取第18位
+        String idcard18Code = idcard.substring(17, 18);
+        String checkCode =caculateLastChar(idcard);
+        if (null == checkCode) {
+            return false;
+        }
+        // 将身份证的第18位与算出来的校码进行匹配,不相等就为假
+        if (!idcard18Code.equalsIgnoreCase(checkCode)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 校验15位身份证
+     *
+     * <pre>
+     * 只校验省份和出生年月日
+     * </pre>
+     *
+     * @param idcard
+     * @return
+     */
+
+    public static boolean validate15IDCard(String idcard) {
+        if (idcard == null || "".equals(idcard)) {
+            return false;
+        }
+        // 非15位为假
+        if (idcard.length() != 15) {
+            return false;
+        }
+
+        // 15全部为数字
+        if (!isDigital(idcard)) {
+            return false;
+        }
+
+        String provinceid = idcard.substring(0, 2);
+        // 校验省份
+        if (!PramConstance.PRE_ID_PROVINCE_CODE_STR.contains(provinceid)) {
+            return false;
+        }
+
+        // 校验出生日期
+        if (!validateIDDate( idcard)){
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * 将15位的身份证转成18位身份证
+     *
+     * @param idcard
+     * @return
+     */
+    public static String convertIdcarBy15bit(String idcard) {
+        if (idcard == null) {
+            return null;
+        }
+
+        // 非15位身份证
+        if (idcard.length() != 15) {
+            return null;
+        }
+
+        // 15全部为数字
+        if (!isDigital(idcard)) {
+            return null;
+        }
+
+        String provinceid = idcard.substring(0, 2);
+        // 校验省份
+        if (!PramConstance.PRE_ID_PROVINCE_CODE_STR.contains(provinceid)) {
+            return null;
+        }
+
+        String birthday = idcard.substring(6, 12);
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
+
+        Date birthdate = null;
+        try {
+            birthdate = sdf.parse(birthday);
+            String tmpDate = sdf.format(birthdate);
+            if (!tmpDate.equals(birthday)) {// 身份证日期错误
+                return null;
+            }
+
+        } catch (ParseException e1) {
+            return null;
+        }
+
+        Calendar cday = Calendar.getInstance();
+        cday.setTime(birthdate);
+        String year = String.valueOf(cday.get(Calendar.YEAR));
+
+        String idcard17 = idcard.substring(0, 6) + year + idcard.substring(8);
+
+        String checkCode = "";
+        // 获取和值与11取模得到余数进行校验码
+        checkCode = caculateLastChar(idcard17);
+
+        // 获取不到校验位
+        if (null == checkCode) {
+            return null;
+        }
+        // 将前17位与第18位校验码拼接
+        idcard17 += checkCode;
+        return idcard17;
+    }
+
+
+
+    /**
+     * 数字验证
+     *
+     * @param str
+     * @return
+     */
+    private static boolean isDigital(String str) {
+        return str.matches("^[0-9]*$");
+    }
+
+
+    /**
+     * 计算身份证的校验位
+     *
+     * @param idcard
+     * @return
+     */
+    private static String caculateLastChar(String idcard) {
+
+        String idcard17 = idcard.substring(0, 17);
+        String[] cArr = idcard17.split("");
+        int sumPower=0;
+        //各位*权重再求和
+        for (int i=0; i <= 16; i++) {
+            sumPower+=Integer.parseInt(cArr[i])*power[i];
+        }
+        // 将和值与11取模得到余数进行校验码判断
+        return  getCheckCodeBySum(sumPower);
+    }
+
+    /**
+     * 将和值与11取模得到余数进行校验码判断
+     *
+     * @param sum17
+     * @return 校验位
+     */
+    private static String getCheckCodeBySum(int sum17) {
+        String checkCode = null;
+        switch (sum17 % 11) {
+            case 10:
+                checkCode = "2";
+                break;
+            case 9:
+                checkCode = "3";
+                break;
+            case 8:
+                checkCode = "4";
+                break;
+            case 7:
+                checkCode = "5";
+                break;
+            case 6:
+                checkCode = "6";
+                break;
+            case 5:
+                checkCode = "7";
+                break;
+            case 4:
+                checkCode = "8";
+                break;
+            case 3:
+                checkCode = "9";
+                break;
+            case 2:
+                checkCode = "X";
+                break;
+            case 1:
+                checkCode = "0";
+                break;
+            case 0:
+                checkCode = "1";
+                break;
+        }
+        return checkCode;
+    }
+
+
+
+}

+ 122 - 0
common/src/main/java/com/cie/common/util/ParamUtil.java

@@ -0,0 +1,122 @@
+package com.cie.common.util;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/14 12:38
+ * @modifiedBy:
+ */
+public class ParamUtil {
+    /**
+     * 字符串是否非空
+     *
+     * @param str
+     * @return
+     */
+    public static boolean stringNotNull(String str) {
+        if (str != null && !"".equals(str.trim())) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * md5字符串格式校验
+     *
+     * @param str
+     * @return
+     */
+    public static boolean checkMd5Format(String str) {
+        if ("".equals(str)) {
+            return false;
+        }
+        Pattern pattern = Pattern.compile("^([a-fA-F0-9]{32})$");
+        Matcher isNum = pattern.matcher(str);
+        if (isNum.matches()) {
+            return true;
+        }
+        return false;
+    }
+
+
+    /**
+     * 验证字符串为数字
+     *
+     * @param str
+     * @return
+     */
+    public static boolean isNum(String str) {
+        Pattern pattern = Pattern.compile("[0-9]*");
+        Matcher isNum = pattern.matcher(str);
+        if (isNum.matches()) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * 验证手机号
+     *
+     * @param phoneNum
+     * @return
+     */
+    public static boolean phoneNumCheck(String phoneNum) {
+        if (phoneNum.length() != 11){
+            return false;
+        }
+
+        return isNum(phoneNum);
+    }
+
+    /**
+     * 数组是否包含某数
+     * @param arr
+     * @param str
+     * @return
+     */
+    public static boolean contains(Integer[] arr,String str) {
+
+        Integer find= null;
+        try {
+            find = Integer.parseInt(str);
+        } catch (NumberFormatException e) {
+            e.printStackTrace();
+            return false;
+        }
+        if (find==null){
+            return false;
+        }
+        for (Integer i : arr) {
+            if (find.equals(i)||find==i){
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     *
+     * @param parameterMap
+     * @return
+     */
+    public static Map<String, String> strArrToStrInMap(Map<String,String[]> parameterMap) {
+        //重新放入map
+        Map<String, String> sortMap = new HashMap<>();
+        for (Map.Entry<String, String[]> map : parameterMap.entrySet()) {
+            sortMap.put(map.getKey(), map.getValue()[0]);
+        }
+        return sortMap;
+    }
+
+    public static String getAppId(){
+        return "IA"+StringUtil.randomStr(8);
+    }
+    public static String getAppSecretKey(){
+        return StringUtil.randomStr(32);
+    }
+}

+ 36 - 0
common/src/main/java/com/cie/common/util/SerialNoUtil.java

@@ -0,0 +1,36 @@
+package com.cie.common.util;
+
+import java.util.UUID;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/15 20:36
+ * @modifiedBy:
+ */
+public class SerialNoUtil {
+
+    public static String getSerialNo(String appId) {
+//        //modify serial no 07.20
+//        $random = rand(1,1000);
+//        //echo time().$random;
+//        $rawSerialNo = md5(time().$random);
+//        //die($rawSerialNo);
+//
+//        $this->serial_no = substr($rawSerialNo,0,8)."-".
+//                substr($rawSerialNo,8,4)."-".
+//                substr($rawSerialNo,12,4)."-".
+//                substr($rawSerialNo,16,4)."-".
+//                substr($rawSerialNo,20);
+
+        return UUID.randomUUID().toString();
+    }
+
+    /**
+     * 秒级时间戳
+     * @return
+     */
+    public static String getTimestempBySecond(){
+        return System.currentTimeMillis()/1000+"";
+    }
+}

+ 61 - 0
common/src/main/java/com/cie/common/util/SignUtil.java

@@ -0,0 +1,61 @@
+package com.cie.common.util;
+
+import org.springframework.util.DigestUtils;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Comparator;
+import java.util.Map;
+
+/**
+ * @author: zhanqi
+ * @description: 签名
+ * @createDate: 2018/11/12 16:00
+ * @modifiedBy:
+ */
+public class SignUtil {
+
+
+    /**
+     * 按照key字典表降序,拼接value
+     *
+     * @param params
+     * @return
+     */
+    public static String sortValueByKey(Map<String, String> params) {
+        return params.entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey)).map(Map.Entry::getValue).reduce("", (a, b) -> a + b);
+    }
+
+    /**
+     * MD5小写
+     *
+     * @param str
+     * @return
+     */
+    public static String strToMd5(String str) {
+        String toLowerCase = null;
+        try {
+            toLowerCase = DigestUtils.md5DigestAsHex(str.getBytes("UTF-8")).toLowerCase();
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        return toLowerCase;
+    }
+
+    /**
+     * 拼接keyvalue
+     *
+     * @param map
+     * @return
+     */
+    public static String concatKeyValue(Map<String, Object> map) {
+        StringBuilder result = new StringBuilder();
+        for (Map.Entry<String, Object> entry : map.entrySet()) {
+            System.out.println(entry.getKey());
+            Object value = entry.getValue() == null ? "" : entry.getValue();
+            result.append(entry.getKey()).append(value);
+        }
+        return result.toString();
+    }
+
+
+}

+ 11 - 0
common/src/main/java/com/cie/common/util/StringUtil.java

@@ -0,0 +1,11 @@
+package com.cie.common.util;
+
+import org.apache.commons.lang3.RandomStringUtils;
+
+public class StringUtil {
+
+    public static  String randomStr(int lenth){
+        return RandomStringUtils.randomAlphanumeric(lenth);
+    }
+
+}

+ 34 - 0
data-api/pom.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>parent</artifactId>
+        <groupId>com.cie</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>data-api</artifactId>
+
+    <packaging>jar</packaging>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.cie</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>

+ 4 - 0
data-api/src/main/java/com/cie/data/api/InnerDataService.java

@@ -0,0 +1,4 @@
+package com.cie.data.api;
+
+public interface InnerDataService {
+}

+ 8 - 0
data-api/src/main/java/com/cie/data/api/TwoItemService.java

@@ -0,0 +1,8 @@
+package com.cie.data.api;
+
+import com.cie.common.response.BusinessCode;
+import com.cie.data.api.constance.CompanyCode;
+
+public interface TwoItemService {
+    BusinessCode twoItemVerify(String idNo, String name, CompanyCode code) throws Exception;
+}

+ 22 - 0
data-api/src/main/java/com/cie/data/api/constance/CompanyCode.java

@@ -0,0 +1,22 @@
+package com.cie.data.api.constance;
+
+public enum CompanyCode {
+
+    YUAN_JIN (2001,"爰金");
+
+    int code;
+    String companyName;
+
+    CompanyCode(int code, String companyName) {
+        this.code = code;
+        this.companyName = companyName;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+}

+ 92 - 0
data-api/src/test/java/com/cie/demo/M1001Demo.java

@@ -0,0 +1,92 @@
+package com.cie.demo;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.TrustStrategy;
+import org.apache.http.util.EntityUtils;
+import org.springframework.util.DigestUtils;
+
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+
+public class M1001Demo {
+    // <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
+    //     <dependency>
+    //         <groupId>org.apache.httpcomponents</groupId>
+    //         <artifactId>httpclient</artifactId>
+    //         <version>4.5.3</version>
+    //     </dependency>
+    public static CloseableHttpClient createSSLClientDefault() {
+        try {
+            SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
+                //信任所有
+                public boolean isTrusted(X509Certificate[] chain, String authType)  {
+                    return true;
+                }
+            }).build();
+            SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext);
+            return HttpClients.custom().setSSLSocketFactory(sslsf).build();
+        } catch (KeyManagementException e) {
+            e.printStackTrace();
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        } catch (KeyStoreException e) {
+            e.printStackTrace();
+        }
+        return HttpClients.createDefault();
+    }
+    private static final String APP_ID="";
+    private static final String APP_SECRET="";
+    public static void main(String[] args) throws IOException {
+        Map<String, String> param = new HashMap<>();
+        param.put("id", "");
+        param.put("name", "测试");
+        String timestamp=System.currentTimeMillis()+"";
+        //签名
+        //按照key的字典排序,排除digest后,拼接对应key的value
+        String sortValue = param.entrySet().stream()
+                .filter(e -> !e.getKey().equals("timestamp") && !e.getKey().equals("digest") && e.getValue() != null && !"".equals(e.getValue()))
+                .sorted(Comparator.comparing(Map.Entry::getKey))
+                .map(Map.Entry::getValue)
+                .reduce("", (a, b) -> a + b + "_") + timestamp + "_" + APP_SECRET;
+
+        //md5加密
+        String signByMd5 = DigestUtils.md5DigestAsHex((sortValue).getBytes("UTF-8")).toUpperCase();//md5大写
+
+        param.put("digest", signByMd5);
+        param.put("timestamp", timestamp);
+        //拼接请求参数
+        StringBuilder stringBuilder = new StringBuilder();
+        for (Map.Entry entry : param.entrySet()) {
+            stringBuilder.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
+        }
+        String paramString = stringBuilder.deleteCharAt(stringBuilder.length() - 1).toString();
+        System.out.println(paramString);
+
+        CloseableHttpClient hp = createSSLClientDefault();
+        String url="http://test.isc.cie-china.com/iscApi/smart/"+APP_ID+"/M1001";//宝盾云地址
+        HttpPost hg = new HttpPost(url);
+        hg.setHeader("Content-Type", "application/x-www-form-urlencoded");
+        StringEntity stringEntity = new StringEntity(paramString, "UTF-8");
+        hg.setEntity(stringEntity);
+        CloseableHttpResponse response = hp.execute(hg);
+        HttpEntity entity = response.getEntity();
+        String content = EntityUtils.toString(entity, "utf-8");
+        System.out.println(content);
+        hp.close();
+
+    }
+}

+ 0 - 0
data-service-gw/README.md


+ 53 - 0
data-service-gw/pom.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>parent</artifactId>
+        <groupId>com.cie</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>data-service-gw</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.boot</groupId>
+            <artifactId>dubbo-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+
+        <dependency>
+            <groupId>com.cie</groupId>
+            <artifactId>data-api</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+
+    </dependencies>
+</project>

+ 15 - 0
data-service-gw/src/main/java/com/cie/data/DataGWApplication.java

@@ -0,0 +1,15 @@
+package com.cie.data;
+
+import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@EnableDubbo
+@SpringBootApplication
+@MapperScan("com.cie.data.dao")
+public class DataGWApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(DataGWApplication.class,args);
+    }
+}

+ 9 - 0
data-service-gw/src/main/java/com/cie/data/service/impl/InnerDataServiceImpl.java

@@ -0,0 +1,9 @@
+package com.cie.data.service.impl;
+
+import com.alibaba.dubbo.config.annotation.Service;
+import com.cie.data.api.InnerDataService;
+
+@Service(version = "1.0.0")
+public class InnerDataServiceImpl implements InnerDataService {
+
+}

+ 23 - 0
data-service-gw/src/main/java/com/cie/data/util/DateUtil.java

@@ -0,0 +1,23 @@
+package com.cie.data.util;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/10/31 14:44
+ * @modifiedBy:
+ */
+public class DateUtil {
+
+    public static String intDateToString(Integer date){
+        String s = Integer.toString(date);
+        StringBuilder stringBuilder=new StringBuilder();
+        stringBuilder.append(s.substring(0,4));
+        stringBuilder.append("/");
+        stringBuilder.append(s.substring(4,6));
+        stringBuilder.append("/");
+        stringBuilder.append(s.substring(6,8));
+        return stringBuilder.toString();
+
+
+    }
+}

+ 56 - 0
data-service-gw/src/main/resources/application.yml

@@ -0,0 +1,56 @@
+## 数据源配置
+spring:
+  datasource:
+
+      url: jdbc:postgresql://localhost:5432/cie?characterEncoding=UTF-8
+      username:
+      password:
+      driver-class-name: org.postgresql.Driver
+      platform: postgres
+      type: com.alibaba.druid.pool.DruidDataSource
+      # 下面为连接池的补充设置,应用到上面所有数据源中
+      # 初始化大小,最小,最大
+      initialSize: 1
+      minIdle: 3
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 30000
+      validationQuery: select 'x'
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters: stat,wall,slf4j
+      # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+  servlet:
+    multipart:
+      enabled: true
+      max-request-size: 1000MB
+      max-file-size: 200MB
+      # 合并多个DruidDataSource的监控数据
+      #useGlobalDataSourceStat: true
+
+## Mybatis 配置
+mybatis:
+  typeAliasesPackage: org.spring.springboot.entity
+  mapperLocations: classpath:mapper/*.xml
+    ##开启驼峰映射
+  configuration:
+    map-underscore-to-camel-case: true
+server:
+  port: 9092
+
+dubbo:
+  application.name: data-service-gw
+  protocol.name: dubbo
+  protocol.port: 20880
+  registry.address: zookeeper://localhost:2181
+  provider.timeout: 1000

+ 52 - 0
data-service/pom.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>parent</artifactId>
+        <groupId>com.cie</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>data-service</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.boot</groupId>
+            <artifactId>dubbo-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>com.cie</groupId>
+            <artifactId>data-api</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+
+
+</project>

+ 15 - 0
data-service/src/main/java/com/cie/data/DataProviderApplication.java

@@ -0,0 +1,15 @@
+package com.cie.data;
+
+import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@EnableDubbo
+@SpringBootApplication
+@MapperScan("com.cie.data.dao")
+public class DataProviderApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(DataProviderApplication.class,args);
+    }
+}

+ 7 - 0
data-service/src/main/java/com/cie/data/dao/YuanJinDao.java

@@ -0,0 +1,7 @@
+package com.cie.data.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cie.data.entity.DsYuanJin;
+
+public interface YuanJinDao extends BaseMapper<DsYuanJin> {
+}

+ 17 - 0
data-service/src/main/java/com/cie/data/entity/Base.java

@@ -0,0 +1,17 @@
+package com.cie.data.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class Base {
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private Integer deleted;
+    private LocalDateTime createDate;
+    private LocalDateTime updateDate;
+
+}

+ 24 - 0
data-service/src/main/java/com/cie/data/entity/DsYuanJin.java

@@ -0,0 +1,24 @@
+package com.cie.data.entity;
+
+import lombok.Data;
+
+@Data
+public class DsYuanJin extends Base{
+    private String idNo;
+    private String name;
+    private Long resTime;//响应时间
+    private Integer businessCode;
+    private String responseCode;//数据源业务码
+    private String identifierResult;//验证结果
+    private String result;//全部返回值
+
+    public DsYuanJin(String idNo, String name,Integer businessCode, String responseCode, String identifierResult,Long resTime, String result) {
+        this.idNo = idNo;
+        this.name = name;
+        this.resTime = resTime;
+        this.businessCode = businessCode;
+        this.responseCode = responseCode;
+        this.identifierResult = identifierResult;
+        this.result = result;
+    }
+}

+ 69 - 0
data-service/src/main/java/com/cie/data/proxy/YuanJinProxy.java

@@ -0,0 +1,69 @@
+package com.cie.data.proxy;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.cie.common.exception.DataSourceException;
+import com.cie.common.response.BusinessCode;
+import com.cie.common.util.HttpUtil;
+import com.cie.common.util.SignUtil;
+import com.cie.data.service.IdNameVerify;
+import com.cie.data.service.company.YuanJinService;
+
+import javax.annotation.Resource;
+
+/**
+ * **信息服务有限公司
+ */
+public class YuanJinProxy implements IdNameVerify {
+    private static final String APP_ID = "";//
+    private static final String APP_KEY = "";//
+    private static final String URL_TWO_ITEM = "";//
+
+    @Resource
+    YuanJinService yuanJinService;
+
+    /**
+     *
+     * @param idNo
+     * @param name
+     * @return
+     */
+    @Override
+    public BusinessCode twoItemVerify(String idNo, String name) throws Exception {
+        String sign = SignUtil.strToMd5(SignUtil.strToMd5(idNo + APP_ID).toUpperCase() + APP_KEY).toUpperCase();
+        String postdata = new StringBuilder("IDNumber=").append(idNo)
+                .append("&Name=").append(name)
+                .append("&Account=").append(APP_ID)
+                .append("&Sign=").append(sign).toString();
+        long startTime = System.currentTimeMillis();
+        String result = HttpUtil.doPost(URL_TWO_ITEM, postdata, HttpUtil.CONTENT_TYPE_XW);
+        long endTime = System.currentTimeMillis();
+        long resTime = endTime - startTime;
+        JSONObject jsonRes = JSON.parseObject(result);
+        String responseCode = "";
+        String identifierResult = "";
+        BusinessCode businessCode = null;
+        if ("100".equals(jsonRes.getString("ResponseCode"))) {
+            JSONObject identifier = jsonRes.getJSONObject("Identifier");
+            if ("一致".equals(identifier.getString("Result"))) {
+                businessCode = BusinessCode.VERIFY_YES;
+            } else if ("不一致".equals(identifier.getString("Result"))) {
+                businessCode = BusinessCode.VERIFY_NO;
+            } else if ("库中无此号".equals(identifier.getString("Result"))) {
+                businessCode = BusinessCode.VERIFY_EMPTY;
+            } else {
+                //调用失败
+                throw new DataSourceException("返回结果异常,请求:" + postdata + ";返回:" + result);
+            }
+        } else {
+            //调用失败
+            throw new DataSourceException("调用失败,请求:" + postdata + ";返回:" + result);
+        }
+        //保调用记录
+        yuanJinService.add(idNo, name, businessCode, responseCode, identifierResult, resTime, result);
+        return businessCode;
+
+    }
+
+
+}

+ 7 - 0
data-service/src/main/java/com/cie/data/service/IdNameVerify.java

@@ -0,0 +1,7 @@
+package com.cie.data.service;
+
+import com.cie.common.response.BusinessCode;
+
+public interface IdNameVerify {
+    BusinessCode twoItemVerify(String idNo, String name) throws Exception;
+}

+ 32 - 0
data-service/src/main/java/com/cie/data/service/apiImpl/TwoItemServiceImpl.java

@@ -0,0 +1,32 @@
+package com.cie.data.service.apiImpl;
+
+import com.alibaba.dubbo.config.annotation.Service;
+import com.cie.common.response.BusinessCode;
+import com.cie.data.api.TwoItemService;
+import com.cie.data.api.constance.CompanyCode;
+import com.cie.data.proxy.YuanJinProxy;
+import com.cie.data.service.IdNameVerify;
+
+@Service(version = "1.0.0")
+public class TwoItemServiceImpl implements TwoItemService {
+    /**
+     *
+     * @param idNo
+     * @param name
+     * @param companyCode
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public BusinessCode twoItemVerify(String idNo, String name, CompanyCode companyCode) throws Exception {
+        int code = companyCode.getCode();
+        IdNameVerify idNameVerify=null;
+        if (code == CompanyCode.YUAN_JIN.getCode()) {
+            idNameVerify=new YuanJinProxy();
+        }
+        // else if (){
+        //
+        // }
+        return idNameVerify.twoItemVerify(idNo, name);
+    }
+}

+ 10 - 0
data-service/src/main/java/com/cie/data/service/company/YuanJinService.java

@@ -0,0 +1,10 @@
+package com.cie.data.service.company;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.cie.common.response.BusinessCode;
+import com.cie.data.entity.DsYuanJin;
+
+public interface YuanJinService extends IService<DsYuanJin> {
+
+    void add(String idNo, String name, BusinessCode businessCode, String responseCode, String identifierResult, Long resTime ,String result);
+}

+ 21 - 0
data-service/src/main/java/com/cie/data/service/company/YuanJinServiceImpl.java

@@ -0,0 +1,21 @@
+package com.cie.data.service.company;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.cie.common.response.BusinessCode;
+import com.cie.data.dao.YuanJinDao;
+import com.cie.data.entity.DsYuanJin;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+
+public class YuanJinServiceImpl extends ServiceImpl<YuanJinDao, DsYuanJin> implements YuanJinService {
+    @Resource
+    YuanJinDao yuanJinDao;
+    @Override
+    public void add(String idNo, String name, BusinessCode businessCode, String responseCode, String identifierResult,Long resTime , String result) {
+        DsYuanJin dsYuanJin = new DsYuanJin(idNo, name, businessCode.getCode(),responseCode, identifierResult, resTime,result);
+        dsYuanJin.setCreateDate(LocalDateTime.now());
+        yuanJinDao.insert(dsYuanJin);
+
+    }
+}

+ 61 - 0
data-service/src/main/resources/application.yml

@@ -0,0 +1,61 @@
+server.port: 9090
+
+
+dubbo:
+  application.name: data-provider
+  protocol.name: dubbo
+  protocol.port: 20880
+  registry.address: zookeeper://localhost:2181
+  provider.timeout: 1000
+
+## 数据源配置
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/***?characterEncoding=UTF-8
+    username:
+    password:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    platform: mysql
+    type: com.alibaba.druid.pool.DruidDataSource
+    # 下面为连接池的补充设置,应用到上面所有数据源中
+    # 初始化大小,最小,最大
+    initialSize: 1
+    minIdle: 3
+    maxActive: 20
+    # 配置获取连接等待超时的时间
+    maxWait: 60000
+    # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+    timeBetweenEvictionRunsMillis: 60000
+    # 配置一个连接在池中最小生存的时间,单位是毫秒
+    minEvictableIdleTimeMillis: 30000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    # 打开PSCache,并且指定每个连接上PSCache的大小
+    poolPreparedStatements: true
+    maxPoolPreparedStatementPerConnectionSize: 20
+    # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+    filters: stat,wall,slf4j
+    # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+  servlet:
+    multipart:
+      enabled: true
+      max-request-size: 1000MB
+      max-file-size: 200MB
+      # 合并多个DruidDataSource的监控数据
+      #useGlobalDataSourceStat: true
+
+# Mybatis 配置
+mybatis:
+  typeAliasesPackage: org.spring.springboot.entity
+  mapperLocations: classpath:mapper/*.xml
+#    ##开启驼峰映射
+#  configuration:
+#    map-underscore-to-camel-case: true
+mybatisplus:
+  enabled: true
+  generic:
+    enabled: true
+  dialectType: mysql

+ 78 - 0
isc-admin/pom.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>parent</artifactId>
+        <groupId>com.cie</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>isc-admin</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.boot</groupId>
+            <artifactId>dubbo-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!-- velocity 模板引擎, 默认 -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+        </dependency>
+        <!-- mp自动代码生成-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.cie</groupId>
+            <artifactId>data-api</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.cie</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 15 - 0
isc-admin/src/main/java/com/cie/isc/Application.java

@@ -0,0 +1,15 @@
+package com.cie.isc;
+
+import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@EnableDubbo
+@SpringBootApplication
+@MapperScan("com.cie.isc.dao")
+public class Application {
+    public static void main(String[] args) {
+        SpringApplication.run(Application.class,args);
+    }
+}

+ 16 - 0
isc-admin/src/main/java/com/cie/isc/annotation/VerifySign.java

@@ -0,0 +1,16 @@
+package com.cie.isc.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * @author: zhanqi
+ * @description:    签名校验
+ * @createDate: 2018/11/15 17:20
+ * @modifiedBy:
+ */
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface VerifySign {
+
+}

+ 103 - 0
isc-admin/src/main/java/com/cie/isc/aop/VerifySingAop.java

@@ -0,0 +1,103 @@
+package com.cie.isc.aop;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.cie.common.exception.ErrorSignException;
+import com.cie.common.exception.IpAuthException;
+import com.cie.common.exception.ParamMissException;
+import com.cie.common.util.SignUtil;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author: zhanqi
+ * @description:
+ * @createDate: 2018/11/14 18:21
+ * @modifiedBy:
+ */
+@Aspect
+@Component
+@Order(1)
+public class VerifySingAop {
+
+    private static final Logger logger = LoggerFactory.getLogger(VerifySingAop.class);
+
+
+    @Resource
+    DepartmentService appService;
+
+    /**
+     * 签名验证
+     *
+     * @param joinPoint
+     * @return
+     * @throws Throwable
+     */
+    @Around("@annotation(com.cie.isc.annotation.VerifySign)")
+    public Object doBeforeVerifySign(ProceedingJoinPoint joinPoint) throws Throwable {
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        HttpServletRequest request = servletRequestAttributes.getRequest();
+
+//        System.out.println("《----------签名校验---------》");
+        Map<String, String[]> parameterMap = request.getParameterMap();
+        if (parameterMap == null) {
+            throw new ParamMissException("缺少必要请求参数");
+        }
+        //重新放入map
+        Map<String, String> sortMap = new HashMap<>();
+        for (Map.Entry<String, String[]> map : parameterMap.entrySet()) {
+            sortMap.put(map.getKey(), map.getValue()[0]);
+        }
+        //url中提取appId
+        String appId = request.getRequestURI().split("/")[3];
+        String timestamp = request.getParameter("timestamp");
+        String digest = request.getParameter("digest");
+        if (appId == null || digest == null || timestamp == null) {
+            throw new ParamMissException("缺少必要请求参数");
+        }
+        //身份验证
+        Department companyApp = appService.getOne(new QueryWrapper<Department>().eq("app_id", appId));
+        if (companyApp == null) {
+            throw new ErrorSignException("签名错误");
+        }
+        //ip白名单
+        String remoteAddr = request.getRemoteAddr();
+        logger.debug("remoteAddr:" + remoteAddr);
+        String ipWhiterList = companyApp.getIpWhiteList();
+        if (ipWhiterList != null && !"".equals(ipWhiterList)) {
+            if (!ipWhiterList.contains(remoteAddr)) {
+                throw new IpAuthException("IP受限");
+            }
+        }
+//        按照key的字典排序,排除digest后,拼接对应key的value
+        String sortValue = sortMap.entrySet().stream()
+                .filter(e -> !e.getKey().equals("timestamp") && !e.getKey().equals("digest") && e.getValue() != null && !"".equals(e.getValue()))
+                .sorted(Comparator.comparing(Map.Entry::getKey))
+                .map(Map.Entry::getValue)
+                .reduce("", (a, b) -> a + b + "_") + timestamp + "_" + companyApp.getAppSecretKey();
+
+        //md5加密
+        String signByMd5 = SignUtil.strToMd5(sortValue).toUpperCase();//md5大写
+        if (!signByMd5.equals(digest)) {
+            throw new ErrorSignException("签名错误");
+        }
+        //传递请求者信息
+        request.setAttribute("companyApp", companyApp);
+
+        return joinPoint.proceed();
+    }
+
+
+}

+ 81 - 0
isc-admin/src/main/java/com/cie/isc/api/SystemControllerAdvice.java

@@ -0,0 +1,81 @@
+package com.cie.isc.api;
+
+import com.cie.common.exception.*;
+import com.cie.common.response.JsonResponse;
+import com.cie.common.response.ReturnCode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author: zhanqi
+ * @description: controller 增强器
+ * @createDate: 2018/11/13 11:15
+ * @modifiedBy:
+ */
+@ControllerAdvice
+public class SystemControllerAdvice {
+    private static final Logger logger = LoggerFactory.getLogger(SystemControllerAdvice.class);
+
+    /**
+     * 应用到所有@RequestMapping注解方法,在其执行之前初始化数据绑定器
+     *
+     * @param binder
+     */
+    @InitBinder
+    public void initBinder(WebDataBinder binder) {
+    }
+
+    /**
+     * 把值绑定到Model中,使全局@RequestMapping可以获取到该值
+     *
+     * @param model
+     */
+    @ModelAttribute
+    public void addAttributes(Model model) {
+        // model.addAttribute("author", "Magical Sam");
+    }
+
+    /**
+     * 全局异常捕捉处理
+     *
+     * @param ex
+     * @return
+     */
+    @ResponseBody
+    @ExceptionHandler(value = Exception.class)
+    public JsonResponse errorHandler(Exception ex) {
+        ex.printStackTrace();
+        StackTraceElement[] stackTrace = ex.getStackTrace();
+        StringBuilder stackTraceString = new StringBuilder();
+        for (StackTraceElement stackTraceElement : stackTrace) {
+            stackTraceString.append(stackTraceElement.toString());
+            stackTraceString.append("\n");
+        }
+        String stackTraceStr = stackTraceString.toString();
+        logger.error("----------------------异常分割线`--------------------------");
+        logger.error(ex.getMessage() + ": \n" + stackTraceStr);
+        if (ex instanceof ErrorSignException) {//签名错误
+            return new JsonResponse(ReturnCode.SIGN_ERROR);
+
+        } else if (ex instanceof ParamMissException) {//缺少必要参数错误
+            return new JsonResponse(ReturnCode.PARAM_MISS_ERROR);
+
+        }else if (ex instanceof IpAuthException) {//IP受限
+            return new JsonResponse(ReturnCode.OUT_OF_IP);
+
+        }else if (ex instanceof OutOfBalanceException) {//余额不足
+            return new JsonResponse(ReturnCode.OUT_OF_BALANCE);
+
+        }else if (ex instanceof OutOfDayCallException) {//接口单日访问量过大
+            return new JsonResponse(ReturnCode.OUT_OF_DAY_REQUEST);
+
+        }
+
+//            TODO 异常邮件
+//        EMailUtil.sendMailAli("系统异常-"+ex.getMessage(),stackTraceStr);
+        return new JsonResponse(ReturnCode.SYSTEM_ERROR);
+    }
+}

+ 24 - 0
isc-admin/src/main/java/com/cie/isc/api/Test.java

@@ -0,0 +1,24 @@
+package com.cie.isc.api;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.cie.data.api.InnerDataService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class Test  {
+
+    // @Reference(version = "1.0.0")
+    // private TwoItemService twoItemService;
+    @Reference(version = "1.0.0")
+    private InnerDataService innerDataService;
+
+    @RequestMapping("/test")
+    public String syHello(@RequestParam(value = "idMd5") String idMd5){
+        System.out.println(idMd5);
+
+
+        return idMd5;
+    }
+}

+ 20 - 0
isc-admin/src/main/java/com/cie/isc/config/MybatisPlusConfig.java

@@ -0,0 +1,20 @@
+package com.cie.isc.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@EnableTransactionManagement
+@Configuration
+@MapperScan("com.cie.isc.dao")
+public class MybatisPlusConfig {
+    /**
+     * 分页插件
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        return new PaginationInterceptor();
+    }
+}

+ 31 - 0
isc-admin/src/main/java/com/cie/isc/controller/LoginController.java

@@ -0,0 +1,31 @@
+package com.cie.isc.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.cie.common.response.JsonResponse;
+import com.cie.common.response.ReturnCode;
+import com.cie.isc.entity.po.User;
+import com.cie.isc.service.UserService;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+public class LoginController {
+
+    @Resource
+    UserService userService;
+
+    @RequestMapping("/login")
+    public JsonResponse login(@RequestBody User user) {
+
+        User userResult = userService.getOne(new QueryWrapper<User>().eq("username", user.getUsername()).eq("password",user.getPassword()));
+        if (userResult==null){
+            return new JsonResponse(ReturnCode.Fail,"账号或密码错误!");
+        }
+        return new JsonResponse(JSON.toJSON(userResult));
+    }
+
+}

+ 27 - 0
isc-admin/src/main/java/com/cie/isc/controller/UserController.java

@@ -0,0 +1,27 @@
+package com.cie.isc.controller;
+
+import com.cie.common.response.JsonResponse;
+import com.cie.common.response.ReturnCode;
+import com.cie.isc.entity.po.User;
+import com.cie.isc.service.UserService;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+public class UserController {
+
+    @Resource
+    UserService userService;
+
+    @RequestMapping(value = "/admin/user/new", method = RequestMethod.POST)
+    public JsonResponse addUser(@RequestBody User user) {
+
+        ReturnCode code = userService.save(user) ? ReturnCode.SUCCESS : ReturnCode.SYSTEM_ERROR;
+
+        return new JsonResponse(code);
+    }
+}

+ 7 - 0
isc-admin/src/main/java/com/cie/isc/dao/UserDao.java

@@ -0,0 +1,7 @@
+package com.cie.isc.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cie.isc.entity.po.User;
+
+public interface UserDao extends BaseMapper<User> {
+}

+ 17 - 0
isc-admin/src/main/java/com/cie/isc/entity/po/Base.java

@@ -0,0 +1,17 @@
+package com.cie.isc.entity.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class Base {
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    private Integer deleted;
+    private LocalDateTime createDate;
+    private LocalDateTime updateDate;
+
+}

+ 13 - 0
isc-admin/src/main/java/com/cie/isc/entity/po/User.java

@@ -0,0 +1,13 @@
+package com.cie.isc.entity.po;
+
+import lombok.Data;
+
+@Data
+public class User extends Base {
+    private String username;
+    private String password;
+    private String phone;
+    private String email;
+    private Long companyId;
+    private Long departmentId;
+}

+ 27 - 0
isc-admin/src/main/java/com/cie/isc/filter/CorsFilter.java

@@ -0,0 +1,27 @@
+package com.cie.isc.filter;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@Component
+public class CorsFilter  implements Filter {
+    private static final Logger logger = LoggerFactory.getLogger(CorsFilter.class);
+
+    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
+        HttpServletResponse response = (HttpServletResponse) res;
+        response.setHeader("Access-Control-Allow-Origin", "*");
+        response.setHeader("Access-Control-Allow-Methods", "*");
+        response.setHeader("Access-Control-Max-Age", "3600");
+        // response.setHeader("Access-Control-Allow-Headers", "Content-Type,XFILENAME,XFILECATEGORY,XFILESIZE,token");
+        response.setHeader("Access-Control-Allow-Headers", "*");
+        System.out.println("*********************************过滤器被使用**************************");
+        chain.doFilter(req, res);
+    }
+    public void init(FilterConfig filterConfig) {}
+    public void destroy() {}
+}

+ 7 - 0
isc-admin/src/main/java/com/cie/isc/service/UserService.java

@@ -0,0 +1,7 @@
+package com.cie.isc.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.cie.isc.entity.po.User;
+
+public interface UserService extends IService<User> {
+}

+ 14 - 0
isc-admin/src/main/java/com/cie/isc/service/impl/UserServiceImpl.java

@@ -0,0 +1,14 @@
+package com.cie.isc.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.cie.isc.dao.UserDao;
+import com.cie.isc.entity.po.User;
+import com.cie.isc.service.UserService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class UserServiceImpl extends ServiceImpl<UserDao,User> implements UserService {
+    public void test(){
+        // Wrapper
+    }
+}

+ 8 - 0
isc-admin/src/main/java/com/cie/isc/util/IscPage.java

@@ -0,0 +1,8 @@
+package com.cie.isc.util;
+
+import lombok.Data;
+
+@Data
+public class IscPage<T> extends com.baomidou.mybatisplus.extension.plugins.pagination.Page<T> {
+    private T t;//分页条件
+}

+ 66 - 0
isc-admin/src/main/resources/application.yml

@@ -0,0 +1,66 @@
+## 数据源配置
+spring:
+  datasource:
+      url: jdbc:mysql://localhost:3306/****?characterEncoding=UTF-8
+      username:
+      password:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      type: com.alibaba.druid.pool.DruidDataSource
+      # 下面为连接池的补充设置,应用到上面所有数据源中
+      # 初始化大小,最小,最大
+      initialSize: 1
+      minIdle: 3
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 30000
+      validationQuery: select 'x'
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters: stat,wall,slf4j
+      # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+  servlet:
+    multipart:
+      enabled: true
+      max-request-size: 1000MB
+      max-file-size: 200MB
+      # 合并多个DruidDataSource的监控数据
+      #useGlobalDataSourceStat: true
+
+# Mybatis 配置
+mybatis:
+  typeAliasesPackage: org.spring.springboot.entity
+  mapperLocations: classpath:mapper/*.xml
+#    ##开启驼峰映射
+#  configuration:
+#    map-underscore-to-camel-case: true
+mybatisplus:
+  enabled: true
+  generic:
+    enabled: true
+  dialectType: mysql
+
+#dubbo配置
+dubbo:
+  application.name: isc-api
+  protocol.name: dubbo
+  protocol.port: 20880
+  registry.address: zookeeper://localhost:2181
+  consumer.timeout: 1000
+
+#端口
+server:
+  port: 9092
+#日志
+logging:
+  config: classpath:logback-spring.xml

+ 196 - 0
isc-admin/src/main/resources/logback-spring.xml

@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
+<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
+<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
+<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
+<configuration  scan="true" scanPeriod="10 seconds">
+
+    <!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
+
+    <contextName>logback</contextName>
+    <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
+    <property name="log.path" value="log" />
+
+    <!-- 彩色日志 -->
+    <!-- 彩色日志依赖的渲染类 -->
+    <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
+    <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
+    <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
+    <!-- 彩色日志格式 -->
+    <property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
+
+
+    <!--输出到控制台-->
+    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+        <!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>debug</level>
+        </filter>
+        <encoder>
+            <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
+            <!-- 设置字符集 -->
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+
+
+    <!--输出到文件-->
+
+    <!-- 时间滚动输出 level为 DEBUG 日志 -->
+    <appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${log.path}/log_debug.log</file>
+        <!--日志文件输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 日志归档 -->
+            <fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文件保留天数-->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文件只记录debug级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>debug</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 时间滚动输出 level为 INFO 日志 -->
+    <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${log.path}/log_info.log</file>
+        <!--日志文件输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <!-- 每天日志归档路径以及格式 -->
+            <fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文件保留天数-->
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文件只记录info级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>info</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 时间滚动输出 level为 WARN 日志 -->
+    <appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${log.path}/log_warn.log</file>
+        <!--日志文件输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 此处设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文件保留天数-->
+            <maxHistory>15</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文件只记录warn级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>warn</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 时间滚动输出 level为 ERROR 日志 -->
+    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${log.path}/log_error.log</file>
+        <!--日志文件输出格式-->
+        <encoder>
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+            <charset>UTF-8</charset> <!-- 此处设置字符集 -->
+        </encoder>
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>100MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+            <!--日志文件保留天数-->
+            <maxHistory>15</maxHistory>
+        </rollingPolicy>
+        <!-- 此日志文件只记录ERROR级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>ERROR</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!--
+        <logger>用来设置某一个包或者具体的某一个类的日志打印级别、
+        以及指定<appender>。<logger>仅有一个name属性,
+        一个可选的level和一个可选的addtivity属性。
+        name:用来指定受此logger约束的某一个包或者具体的某一个类。
+        level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
+              还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
+              如果未设置此属性,那么当前logger将会继承上级的级别。
+        addtivity:是否向上级logger传递打印信息。默认是true。
+    -->
+    <!--<logger name="org.springframework.web" level="info"/>-->
+    <!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
+    <!--
+        使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
+        第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
+        第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
+     -->
+
+
+    <!--
+        root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
+        level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
+        不能设置为INHERITED或者同义词NULL。默认是DEBUG
+        可以包含零个或多个元素,标识这个appender将会添加到这个logger。
+    -->
+
+    <!--开发环境:打印控制台-->
+    <!--<springProfile name="dev">-->
+        <!--<logger name="com.nmys.view" level="debug"/>-->
+    <!--</springProfile>-->
+
+    <root level="debug">
+        <appender-ref ref="CONSOLE" />
+        <!--<appender-ref ref="DEBUG_FILE" />-->
+        <appender-ref ref="INFO_FILE" />
+        <!--<appender-ref ref="WARN_FILE" />-->
+        <appender-ref ref="ERROR_FILE" />
+    </root>
+
+    <!--生产环境:输出到文件-->
+    <!--<springProfile name="pro">-->
+    <!--<root level="info">-->
+    <!--<appender-ref ref="CONSOLE" />-->
+    <!--<appender-ref ref="DEBUG_FILE" />-->
+    <!--<appender-ref ref="INFO_FILE" />-->
+    <!--<appender-ref ref="ERROR_FILE" />-->
+    <!--<appender-ref ref="WARN_FILE" />-->
+    <!--</root>-->
+    <!--</springProfile>-->
+
+</configuration>

+ 122 - 0
isc-admin/src/test/java/com/cie/CodeGenerator.java

@@ -0,0 +1,122 @@
+package com.cie;
+
+import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.InjectionConfig;
+import com.baomidou.mybatisplus.generator.config.*;
+import com.baomidou.mybatisplus.generator.config.po.TableInfo;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+import com.baomidou.mybatisplus.generator.engine.VelocityTemplateEngine;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Scanner;
+
+public class CodeGenerator {
+    /**
+     * <p>
+     * 读取控制台内容
+     * </p>
+     */
+    public static String scanner(String tip) {
+        Scanner scanner = new Scanner(System.in);
+        StringBuilder help = new StringBuilder();
+        help.append("请输入" + tip + ":");
+        System.out.println(help.toString());
+        if (scanner.hasNext()) {
+            String ipt = scanner.next();
+            if (StringUtils.isNotEmpty(ipt)) {
+                return ipt;
+            }
+        }
+        throw new MybatisPlusException("请输入正确的" + tip + "!");
+    }
+
+    public static void main(String[] args) {
+        // 代码生成器
+        AutoGenerator mpg = new AutoGenerator();
+
+        // 全局配置
+        GlobalConfig gc = new GlobalConfig();
+        String projectPath = System.getProperty("user.dir")+"/api";
+        gc.setOutputDir(projectPath + "/src/main/java");
+        gc.setAuthor("jobob");
+        gc.setOpen(false);
+        // gc.setSwagger2(true); 实体属性 Swagger2 注解
+        mpg.setGlobalConfig(gc);
+
+        // 数据源配置
+        DataSourceConfig dsc = new DataSourceConfig();
+        dsc.setUrl("jdbc:mysql://localhost:3306/api?useUnicode=true&useSSL=false&characterEncoding=utf8");
+        // dsc.setSchemaName("public");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("");
+        dsc.setPassword("");
+        mpg.setDataSource(dsc);
+
+        // 包配置
+        PackageConfig pc = new PackageConfig();
+        pc.setModuleName(scanner("模块名"));
+        pc.setParent("com.api");
+        mpg.setPackageInfo(pc);
+
+        // 自定义配置
+        InjectionConfig cfg = new InjectionConfig() {
+            @Override
+            public void initMap() {
+                // to do nothing
+            }
+        };
+
+        // 如果模板引擎是 freemarker
+        // String templatePath = "/templates/mapper.xml.ftl";
+        // 如果模板引擎是 velocity
+        String templatePath = "/templates/mapper.xml.vm";
+
+        // 自定义输出配置
+        List<FileOutConfig> focList = new ArrayList<>();
+        // 自定义配置会被优先输出
+        focList.add(new FileOutConfig(templatePath) {
+            @Override
+            public String outputFile(TableInfo tableInfo) {
+                // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
+                return projectPath + "/src/main/resources/mapper/" + pc.getModuleName()
+                        + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+            }
+        });
+
+        cfg.setFileOutConfigList(focList);
+        mpg.setCfg(cfg);
+
+        // 配置模板
+        TemplateConfig templateConfig = new TemplateConfig();
+
+        // 配置自定义输出模板
+        //指定自定义模板路径,注意不要带上.ftl/.vm, 会根据使用的模板引擎自动识别
+        // templateConfig.setEntity("templates/entity2.java");
+        // templateConfig.setService();
+        // templateConfig.setController();
+
+        templateConfig.setXml(null);
+        mpg.setTemplate(templateConfig);
+
+        // 策略配置
+        StrategyConfig strategy = new StrategyConfig();
+        strategy.setNaming(NamingStrategy.underline_to_camel);
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+        strategy.setSuperEntityClass("com.entity.po.Base");
+        strategy.setEntityLombokModel(true);
+        strategy.setRestControllerStyle(true);
+        // strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
+        strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
+        strategy.setSuperEntityColumns("id");
+        strategy.setControllerMappingHyphenStyle(true);
+        strategy.setTablePrefix(pc.getModuleName() + "_");
+        mpg.setStrategy(strategy);
+        mpg.setTemplateEngine(new VelocityTemplateEngine()
+        );
+        mpg.execute();
+    }
+}

+ 357 - 0
isc-front/Documentation_1_1/css/documenter_style.css

@@ -0,0 +1,357 @@
+/*!
+ * Documenter 1.6
+ * http://rxa.li/documenter
+ *
+ * Copyright 2011, Xaver Birsak
+ * http://revaxarts.com
+ *
+ */
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{
+	margin:0;
+	padding:0;
+	border:0;
+	outline:0;
+	font-weight:inherit;
+	font-style:inherit;
+	font-size:100%;
+	font-family:inherit;
+	vertical-align:baseline;
+}
+html { 
+	font-size:101%;
+	font-family:Arial,verdana,arial,sans-serif;
+	font-size:12px;
+	-webkit-text-size-adjust:none;
+	color:#333;
+}
+body{
+	min-height:100%;
+	height:auto;
+	width:100%;
+        background: #FFF;
+}
+footer, header, section {
+	display:block;
+}
+a{ color:#6F6F6F; text-decoration:none; cursor:pointer; }
+a:hover { text-decoration:underline }
+p, ul, ol{
+	margin:18px 0;
+	line-height:1.5em;
+}
+li{
+	list-style:none;
+}
+li.placeholder{
+	height:70px;
+	width:100%;
+	font-size:16px;
+}
+hr { 
+	display:block;
+	height:0px;
+	line-height:0px;
+	border:0;
+	border-top:1px solid #ddd;
+	border-bottom:1px solid #aaa;
+	margin:16px 0;
+	padding:0;
+}
+hr.notop{
+	margin-top:0;
+}
+strong{
+	font-weight:700;
+}
+#documenter_content{
+	position:absolute;
+	right:18px;
+	left:218px;
+	padding-left:10px;
+	padding-bottom:800px;
+	min-height:100%;
+	height:auto;
+	z-index:1;
+}
+#documenter_sidebar{
+	-moz-box-shadow:0 0 6px rgba(3,3,3,0.6);
+	-webkit-box-shadow:0 0 6px rgba(3,3,3,0.6);
+	box-shadow:0 0 6px rgba(3,3,3,0.6);
+	position:fixed;
+	left:0;
+	width:200px;
+	height:100%;
+	min-height:100%;
+	z-index:100;
+}
+#documenter_sidebar a{
+	position:relative;
+	z-index:100;
+}
+img{
+	border:0;
+}
+#documenter_copyright{
+	position:absolute;
+	bottom:10px;
+	font-size:10px;
+	right:15px;
+	width:200px;
+	text-align:right;
+	z-index:1
+}
+noscript{
+	display:block;
+	position:absolute;
+	top:238px;
+	margin:0 auto;
+	width:800px;
+	bottom:0;
+	z-index:20;
+}
+noscript p{
+	width:800px;
+	font-size:20px;
+	padding-top:20px;
+	margin:0 auto;
+	color:#4D4D4D;
+}
+.small{
+	font-size:10px;
+	letter-spacing:0;
+}
+
+/*----------------------------------------------------------------------*/
+/* Sidebar
+/*----------------------------------------------------------------------*/
+
+#documenter_sidebar #documenter_logo{
+	display:block;
+	height:20%;
+	max-height:200px;
+	min-height:70px;
+	width:200px;
+	background-position:center center;
+	background-repeat:no-repeat;
+}
+#documenter_sidebar ol{
+	font-size:12px;
+	font-weight:700;
+	min-height:150px;
+	height:75%;
+	overflow:auto;
+}
+
+#documenter_sidebar ol li{
+	text-align:right;
+	padding:0;
+}
+#documenter_sidebar ol a{
+	display:block;
+	border-top:1px solid #ddd;
+	border-bottom:1px solid #aaa;
+	padding:6px 15px 7px 0;
+	text-align:right;
+}
+#documenter_sidebar ol a:hover,#documenter_sidebar ol a.current{
+	-webkit-text-shadow:none;
+	-moz-text-shadow:none;
+	text-shadow:none;
+	text-decoration:none;
+}
+#documenter_sidebar ol li ol{
+	border-top:0;
+	font-size:10px;
+	min-height:10px;
+	height:auto;
+	overflow:auto;
+	margin:0;
+	display:none;
+}
+#documenter_sidebar ol li ol li a{
+	display:block;
+	padding:4px 15px 5px 0;
+	text-align:right;
+}
+
+/*----------------------------------------------------------------------*/
+/* Content
+/*----------------------------------------------------------------------*/
+
+#documenter_cover{
+	height:800px;
+	padding-top:200px !important;
+}
+#documenter_cover li{
+	list-style:none !important;
+	margin-left:0 !important;
+}
+#documenter_cover p{
+	width:500px;
+}
+#documenter_content section{
+	padding-top:70px;
+}
+#documenter_content h1{
+	font-size:30px;
+	font-weight:700;
+}
+#documenter_content h2{
+	font-size:20px;
+	margin-bottom:18px;
+	font-weight:100;
+}
+#documenter_content h3{	
+	margin:18px 0 0;
+	font-weight:200;
+        color: #315680;
+        font-size: 29px;        
+}
+#documenter_content h4{
+	font-size:20px;
+	margin:18px 0;
+	font-weight:100;
+}
+#documenter_content h5{
+	font-size:16px;
+	margin:18px 0;
+	font-weight:100;
+}
+#documenter_content h6{
+	font-size:14px;
+	margin:18px 0;
+	font-weight:100;
+}
+#documenter_content p{
+	margin:18px 0;
+}
+#documenter_content ol li{
+	list-style:decimal;
+	margin-left:36px;
+}
+#documenter_content ul li{
+	list-style:square;
+	margin-left:36px;
+}
+#documenter_content dl{
+}
+#documenter_content dl dt{
+	padding-top:12px;
+	font-weight:700;
+	font-size:14px;
+}
+#documenter_content dl dd{
+	padding-top:3px;
+	margin-left:18px;
+}
+#documenter_content table{
+	border-collapse:collapse;
+}
+#documenter_content table th{
+	font-weight:700;
+}
+#documenter_content table th, #documenter_content table td{
+	padding:3px;
+	text-align:left;
+}
+#documenter_content code, #documenter_content pre{
+	font-family:"Courier New", Courier, monospace;
+	font-size:12px;
+}
+#documenter_content .warning{
+	padding:10px 10px 10px 30px;
+	border:1px solid #D5D458;
+	background-color:#F0FEB1;
+	background-image:url(img/warning.png);
+	background-repeat:no-repeat;
+	background-position: 8px 11px;
+}
+#documenter_content .info{
+	padding:10px 10px 10px 30px;
+	border:1px solid #6AB3FF;
+	background-color:#A3D0FF;
+	background-image:url(img/info.png);
+	background-repeat:no-repeat;
+	background-position: 8px 11px;
+}
+#documenter_content pre{
+	background-image:url(img/pre_bg.png);
+	line-height:19px;
+}
+
+
+
+
+/*----------------------------------------------------------------------*/
+/* Print Styles
+/*----------------------------------------------------------------------*/
+
+@media print {
+	 * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
+	-ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
+	a, a:visited { color: #444 !important; text-decoration: underline; }
+	a[href]:after { content: " (" attr(href) ")"; }
+	abbr[title]:after { content: " (" attr(title) ")"; }
+	.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  /* Don't show links for images, or javascript/internal links */
+	pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+	thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
+	tr, img { page-break-inside: avoid; }
+	@page { margin: 0.5cm; }
+	p, h2, h3 { orphans: 3; widows: 3; }
+	h2, h3{ page-break-after: avoid; }
+	hr { border-top:1px solid #000 !important;border-bottom:0 !important; }
+	
+	#documenter_sidebar{
+		-moz-box-shadow:none;
+		-webkit-box-shadow:none;
+		box-shadow:none;
+		position:absolute;
+		left:10px;
+		top:0;
+		width:100%;
+		margin-top:500px;
+	}
+	#documenter_sidebar ol:before { content: "Table of Contents"; }
+	
+	#documenter_sidebar ol{
+		border:0 !important;
+	}
+	#documenter_sidebar ol li{
+		border:0 !important;
+		text-align:left;
+	}
+	#documenter_sidebar ol li a{
+		border:0 !important;
+		text-align:left;
+		padding:4px;
+	}
+	#documenter_sidebar ol li a:hover{
+		border:0 !important;
+	}
+	#documenter_sidebar #documenter_logo{
+		display:none;
+	}
+	#documenter_sidebar #documenter_copyright{
+		display:none;
+	}
+	#documenter_content{
+		left:10px;
+	}
+	#documenter_cover{
+		margin-bottom:300px;
+	}
+	#documenter_content .warning{
+		background-image:url(img/warning.png) !important;
+		background-repeat:no-repeat !important;
+		background-position: 8px 11px !important;
+	}
+	#documenter_content .info{
+		background-image:url(img/info.png) !important;
+		background-repeat:no-repeat !important;
+		background-position: 8px 11px !important;
+	}
+	#documenter_content pre{
+		background-image:url(img/pre_bg.png) !important;
+		line-height:19px;
+	}
+}

BIN
isc-front/Documentation_1_1/css/img/body.jpg


BIN
isc-front/Documentation_1_1/css/img/bt_cubs.png


BIN
isc-front/Documentation_1_1/css/img/bt_cubs_a.png


BIN
isc-front/Documentation_1_1/css/img/info.png


BIN
isc-front/Documentation_1_1/css/img/logo.png


BIN
isc-front/Documentation_1_1/css/img/pre_bg.png


BIN
isc-front/Documentation_1_1/css/img/warning.png


+ 226 - 0
isc-front/Documentation_1_1/css/shCore.css

@@ -0,0 +1,226 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ * 
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+  -moz-border-radius: 0 0 0 0 !important;
+  -webkit-border-radius: 0 0 0 0 !important;
+  background: none !important;
+  border: 0 !important;
+  bottom: auto !important;
+  float: none !important;
+  height: auto !important;
+  left: auto !important;
+  line-height: 1.1em !important;
+  margin: 0 !important;
+  outline: 0 !important;
+  overflow: visible !important;
+  padding: 0 !important;
+  position: static !important;
+  right: auto !important;
+  text-align: left !important;
+  top: auto !important;
+  vertical-align: baseline !important;
+  width: auto !important;
+  box-sizing: content-box !important;
+  font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+  font-weight: normal !important;
+  font-style: normal !important;
+  font-size: 1em !important;
+  min-height: inherit !important;
+  min-height: auto !important;
+}
+
+.syntaxhighlighter {
+  width: 100% !important;
+  margin: 1em 0 1em 0 !important;
+  position: relative !important;
+  overflow: auto !important;
+  font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+  overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+  font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+  font-style: italic !important;
+}
+.syntaxhighlighter .line {
+  white-space: pre !important;
+}
+.syntaxhighlighter table {
+  width: 100% !important;
+}
+.syntaxhighlighter table caption {
+  text-align: left !important;
+  padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+  width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+  position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+  box-sizing: border-box !important;
+  position: absolute !important;
+  left: 0 !important;
+  top: 0 !important;
+  width: 100% !important;
+  height: 100% !important;
+  border: none !important;
+  background: white !important;
+  padding-left: 1em !important;
+  overflow: hidden !important;
+  white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+  text-align: right !important;
+  padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+  padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+  padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+  display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+  display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+  padding: 0.1em 0.8em 0em 0.8em !important;
+  font-size: 1em !important;
+  position: static !important;
+  width: auto !important;
+  height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+  display: inline !important;
+  margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+  padding: 0 !important;
+  display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+  display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+  position: absolute !important;
+  right: 1px !important;
+  top: 1px !important;
+  width: 11px !important;
+  height: 11px !important;
+  font-size: 10px !important;
+  z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+  display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+  display: block !important;
+  text-align: center !important;
+  text-decoration: none !important;
+  padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+  display: none !important;
+}
+.syntaxhighlighter.ie {
+  font-size: .9em !important;
+  padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+  line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+  padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+  background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+  color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+  color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+  display: none !important;
+}
+.syntaxhighlighter.printing a {
+  text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+  color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+  color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+  color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+  color: #006699 !important;
+  font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+  color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+  color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+  color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+  color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+  color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+  font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+  color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+  color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+  color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+  color: black !important;
+}

+ 329 - 0
isc-front/Documentation_1_1/css/shCoreDefault.css

@@ -0,0 +1,329 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ * 
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+.syntaxhighlighter a,
+.syntaxhighlighter div,
+.syntaxhighlighter code,
+.syntaxhighlighter table,
+.syntaxhighlighter table td,
+.syntaxhighlighter table tr,
+.syntaxhighlighter table tbody,
+.syntaxhighlighter table thead,
+.syntaxhighlighter table caption,
+.syntaxhighlighter textarea {
+  -moz-border-radius: 0 0 0 0 !important;
+  -webkit-border-radius: 0 0 0 0 !important;
+  background: none !important;
+  border: 0 !important;
+  bottom: auto !important;
+  float: none !important;
+  height: auto !important;
+  left: auto !important;
+  line-height: 1.1em !important;
+  margin: 0 !important;
+  outline: 0 !important;
+  overflow: visible !important;
+  padding: 0 !important;
+  position: static !important;
+  right: auto !important;
+  text-align: left !important;
+  top: auto !important;
+  vertical-align: baseline !important;
+  width: auto !important;
+  box-sizing: content-box !important;
+  font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+  font-weight: normal !important;
+  font-style: normal !important;
+  font-size: 1em !important;
+  min-height: inherit !important;
+  min-height: auto !important;
+}
+
+.syntaxhighlighter {
+  width: 100% !important;
+  margin: 1em 0 1em 0 !important;
+  position: relative !important;
+  overflow: auto !important;
+  font-size: 1em !important;
+}
+.syntaxhighlighter.source {
+  overflow: hidden !important;
+}
+.syntaxhighlighter .bold {
+  font-weight: bold !important;
+}
+.syntaxhighlighter .italic {
+  font-style: italic !important;
+}
+.syntaxhighlighter .line {
+  white-space: pre !important;
+}
+.syntaxhighlighter table {
+  width: 100% !important;
+}
+.syntaxhighlighter table caption {
+  text-align: left !important;
+  padding: .5em 0 0.5em 1em !important;
+}
+.syntaxhighlighter table td.code {
+  width: 100% !important;
+}
+.syntaxhighlighter table td.code .container {
+  position: relative !important;
+}
+.syntaxhighlighter table td.code .container textarea {
+  box-sizing: border-box !important;
+  position: absolute !important;
+  left: 0 !important;
+  top: 0 !important;
+  width: 100% !important;
+  height: 100% !important;
+  border: none !important;
+  background: white !important;
+  padding-left: 1em !important;
+  overflow: hidden !important;
+  white-space: pre !important;
+}
+.syntaxhighlighter table td.gutter .line {
+  text-align: right !important;
+  padding: 0 0.5em 0 1em !important;
+}
+.syntaxhighlighter table td.code .line {
+  padding: 0 1em !important;
+}
+.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
+  padding-left: 0em !important;
+}
+.syntaxhighlighter.show {
+  display: block !important;
+}
+.syntaxhighlighter.collapsed table {
+  display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+  padding: 0.1em 0.8em 0em 0.8em !important;
+  font-size: 1em !important;
+  position: static !important;
+  width: auto !important;
+  height: auto !important;
+}
+.syntaxhighlighter.collapsed .toolbar span {
+  display: inline !important;
+  margin-right: 1em !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a {
+  padding: 0 !important;
+  display: none !important;
+}
+.syntaxhighlighter.collapsed .toolbar span a.expandSource {
+  display: inline !important;
+}
+.syntaxhighlighter .toolbar {
+  position: absolute !important;
+  right: 1px !important;
+  top: 1px !important;
+  width: 11px !important;
+  height: 11px !important;
+  font-size: 10px !important;
+  z-index: 10 !important;
+}
+.syntaxhighlighter .toolbar span.title {
+  display: inline !important;
+}
+.syntaxhighlighter .toolbar a {
+  display: block !important;
+  text-align: center !important;
+  text-decoration: none !important;
+  padding-top: 1px !important;
+}
+.syntaxhighlighter .toolbar a.expandSource {
+  display: none !important;
+}
+.syntaxhighlighter.ie {
+  font-size: .9em !important;
+  padding: 1px 0 1px 0 !important;
+}
+.syntaxhighlighter.ie .toolbar {
+  line-height: 8px !important;
+}
+.syntaxhighlighter.ie .toolbar a {
+  padding-top: 0px !important;
+}
+.syntaxhighlighter.printing .line.alt1 .content,
+.syntaxhighlighter.printing .line.alt2 .content,
+.syntaxhighlighter.printing .line.highlighted .number,
+.syntaxhighlighter.printing .line.highlighted.alt1 .content,
+.syntaxhighlighter.printing .line.highlighted.alt2 .content {
+  background: none !important;
+}
+.syntaxhighlighter.printing .line .number {
+  color: #bbbbbb !important;
+}
+.syntaxhighlighter.printing .line .content {
+  color: black !important;
+}
+.syntaxhighlighter.printing .toolbar {
+  display: none !important;
+}
+.syntaxhighlighter.printing a {
+  text-decoration: none !important;
+}
+.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
+  color: black !important;
+}
+.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
+  color: #008200 !important;
+}
+.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
+  color: blue !important;
+}
+.syntaxhighlighter.printing .keyword {
+  color: #006699 !important;
+  font-weight: bold !important;
+}
+.syntaxhighlighter.printing .preprocessor {
+  color: gray !important;
+}
+.syntaxhighlighter.printing .variable {
+  color: #aa7700 !important;
+}
+.syntaxhighlighter.printing .value {
+  color: #009900 !important;
+}
+.syntaxhighlighter.printing .functions {
+  color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .constants {
+  color: #0066cc !important;
+}
+.syntaxhighlighter.printing .script {
+  font-weight: bold !important;
+}
+.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
+  color: gray !important;
+}
+.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
+  color: #ff1493 !important;
+}
+.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
+  color: red !important;
+}
+.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
+  color: black !important;
+}
+
+.syntaxhighlighter {
+  background-color: white !important;
+  padding: 10px 0px;
+}
+.syntaxhighlighter .line.alt1 {
+  background-color: white !important;
+}
+.syntaxhighlighter .line.alt2 {
+  background-color: white !important;
+}
+.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
+  background-color: #e0e0e0 !important;
+}
+.syntaxhighlighter .line.highlighted.number {
+  color: black !important;
+}
+.syntaxhighlighter table caption {
+  color: black !important;
+}
+.syntaxhighlighter .gutter {
+  color: #afafaf !important;
+}
+.syntaxhighlighter .gutter .line {
+  border-right: 3px solid #6ce26c !important;
+}
+.syntaxhighlighter .gutter .line.highlighted {
+  background-color: #6ce26c !important;
+  color: white !important;
+}
+.syntaxhighlighter.printing .line .content {
+  border: none !important;
+}
+.syntaxhighlighter.collapsed {
+  overflow: visible !important;
+}
+.syntaxhighlighter.collapsed .toolbar {
+  color: blue !important;
+  background: white !important;
+  border: 1px solid #6ce26c !important;
+}
+.syntaxhighlighter.collapsed .toolbar a {
+  color: blue !important;
+}
+.syntaxhighlighter.collapsed .toolbar a:hover {
+  color: red !important;
+}
+.syntaxhighlighter .toolbar {
+  color: white !important;
+  background: #6ce26c !important;
+  border: none !important;
+}
+.syntaxhighlighter .toolbar a {
+  color: white !important;
+}
+.syntaxhighlighter .toolbar a:hover {
+  color: black !important;
+}
+.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
+  color: black !important;
+}
+.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
+  color: #008200 !important;
+}
+.syntaxhighlighter .string, .syntaxhighlighter .string a {
+  color: blue !important;
+}
+.syntaxhighlighter .keyword {
+  color: #006699 !important;
+}
+.syntaxhighlighter .preprocessor {
+  color: gray !important;
+}
+.syntaxhighlighter .variable {
+  color: #aa7700 !important;
+}
+.syntaxhighlighter .value {
+  color: #009900 !important;
+}
+.syntaxhighlighter .functions {
+  color: #ff1493 !important;
+}
+.syntaxhighlighter .constants {
+  color: #0066cc !important;
+}
+.syntaxhighlighter .script {
+  font-weight: bold !important;
+  color: #006699 !important;
+  background-color: none !important;
+}
+.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
+  color: gray !important;
+}
+.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
+  color: #ff1493 !important;
+}
+.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
+  color: red !important;
+}
+
+.syntaxhighlighter .keyword {
+  font-weight: bold !important;
+}

+ 931 - 0
isc-front/Documentation_1_1/index.html

@@ -0,0 +1,931 @@
+<!doctype html>  
+<!--[if IE 6 ]><html lang="en-us" class="ie6"> <![endif]-->
+<!--[if IE 7 ]><html lang="en-us" class="ie7"> <![endif]-->
+<!--[if IE 8 ]><html lang="en-us" class="ie8"> <![endif]-->
+<!--[if (gt IE 7)|!(IE)]><!-->
+<html lang="en-us"><!--<![endif]-->
+<head>
+	<meta charset="utf-8">
+	
+	<title>Taurus - Responsive Bootstrap3 Admin Template</title>
+	
+	<meta name="description" content="">
+	<meta name="author" content="Dmitry Ivaniuk">
+	<meta name="copyright" content="Dmitry Ivaniuk">
+	<meta name="generator" content="Documenter v1.6 http://rxa.li/documenter">
+	<meta name="date" content="2012-12-21T00:00:00+01:00">
+
+        
+        
+        <link rel="stylesheet" href="css/shCoreDefault.css"  media="all"/>     
+        <link rel="stylesheet" href="css/shThemeDefault.css"  media="all"/>                
+        
+	<link rel="stylesheet" href="css/documenter_style.css" media="all">
+	
+	
+	<script src="js/jquery.1.6.4.js"></script>
+	        
+	<script src="js/jquery.scrollTo-1.4.2-min.js"></script>
+	<script src="js/jquery.easing.js"></script>	        
+        
+        <script src="js/shCore.js"></script>
+	
+	<script src="js/shBrushCss.js"></script>
+	<script src="js/shBrushXml.js"></script>
+	<script src="js/shBrushJScript.js"></script>
+        
+
+        
+	<script>SyntaxHighlighter.defaults['toolbar'] = false;SyntaxHighlighter.all();</script>
+	
+	<script>document.createElement('section');var duration=500,easing='swing';</script>
+	<script src="js/script.js"></script>
+	
+	<style>		
+		::-moz-selection{background:#BBBBBB;color:#222222;}
+		::selection{background:#BBBBBB;color:#222222;}
+		#documenter_sidebar #documenter_logo{background-image:url("css/img/logo.png");}
+		a{color:#335A85;}
+		hr{border-top: 1px solid #666; border-bottom:1px solid #FFF;}
+		#documenter_sidebar, #documenter_sidebar ol a{background: url("css/img/bt_cubs.png") left top repeat #133959;color:#FFF;}
+		#documenter_sidebar ol a{}
+		#documenter_sidebar ol{}
+		#documenter_sidebar ol a{border-top:1px solid #2B5A74;border-bottom:1px solid #0e2c44;color:#FFF;}
+		#documenter_sidebar ol a:hover{background: url("css/img/bt_cubs_a.png") left top repeat #133959;color:#FFF;border-top:1px solid #2B5A74;}
+		#documenter_sidebar ol a.current{background: url("css/img/bt_cubs_a.png") left top repeat #133959;color:#FFF;border-top:1px solid #2B5A74;}                
+		#documenter_copyright{display:block !important;visibility:visible !important;}
+                #documenter_copyright a{color: #fff;}
+                .abtn{display: block; float: left; padding: 10px; color: #333; border: 1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;}
+                    .abtn:hover{text-decoration: none; background: #F1F1F1;}
+	</style>
+	
+</head>
+<body>
+	<div id="documenter_sidebar">
+		<a href="#documenter_cover" id="documenter_logo"></a>
+		<ol id="documenter_nav">
+			<li><a class="current" href="#documenter_cover">Start</a></li>						
+			<li><a href="#html_structure">HTML structure</a></li>
+			<li><a href="#css_structure">CSS structure</a></li>
+			<li><a href="#javascript_structure">Javascript structure</a></li>                        
+			<li><a href="#how_to">How-to...?</a></li>                        
+                        <li><a href="#credits">Credits</a></li>
+                        <li><a href="#changelog">Changelog</a></li>
+		</ol>
+		<div id="documenter_copyright">Copyright Dmitry Ivaniuk 2013<br>
+		made with the <a href="http://rxa.li/documenter">Documenter v1.6</a> 
+		</div>
+	</div>
+	<div id="documenter_content">
+	<section id="documenter_cover">
+            <h1>Taurus - Responsive Bootstrap3 Admin Template</h1><h2>Clean and responsive flat design</h2><hr><ul><li>Created: 06/11/2013</li><li>latest Update: 18/11/2013</li><li>By: Dmitry Ivaniuk</li><li>Email: <a href="mailto:&#97;&#113;&#118;&#97;&#116;&#97;&#114;&#105;&#117;&#115;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;">&#97;&#113;&#118;&#97;&#116;&#97;&#114;&#105;&#117;&#115;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</a></li></ul>
+            <a href="#hts" class="abtn">How to start use template?</a>
+        </section>
+
+        
+<section id="html_structure">
+	<h3>HTML structure</h3><hr class="notop">
+        <h4>Structure of default document</h4>
+<pre class="brush: xml">
+    &lt;body><!-- Add classes to change background -->
+        <div class="container"><!-- Add classes to theme options -->
+            <!-- here your content -->
+        </div>
+    &lt;/body>
+</pre>        
+        
+        <h4 id="cnl">Structure of document with custom navigation</h4>
+<pre class="brush: xml">
+    &lt;body><!-- Add classes to change background -->
+
+        <div class="page-container"><!-- page container -->
+            <div class="page-sidebar"><!-- side bar -->
+                <!-- place for navigation -->
+            </div>
+            <div class="page-content"><!-- page content wrapper -->                
+                <div class="container">
+                    <!-- here your content -->
+                </div>                
+            </div>
+        </div>
+
+
+    &lt;/body>
+</pre>        
+        <p><strong>Check "How to..." section to get more information about themes usage</strong></p>
+        
+        <h4>Header structure</h4>
+        
+<pre class="brush: xml">
+
+    <div class="row">                   
+        <div class="col-md-12">
+            
+            <nav class="navbar brb" role="navigation">
+                <div class="navbar-header">
+                    <!-- Here your logo or another info -->
+                </div>
+                <div class="collapse navbar-collapse navbar-ex1-collapse"> <!-- Top navigation -->                    
+                    <ul class="nav navbar-nav">                        
+                        
+                        <li class="active"><!-- simple active element -->
+                            <a href="#">Item</a>
+                        </li>                            
+                        
+                        <li class="dropdown"><!-- dropdown element -->
+                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Item</a><!-- link -->
+                            <ul class="dropdown-menu"><!-- sub items -->                                    
+                                <li><a href="#">Item</a></li><!-- subitem -->
+                            </ul>                                
+                        </li>
+                        
+                    </ul>                    
+                </div>                
+            </nav>
+            
+        </div>    
+    </div>
+
+</pre>          
+
+    <h4>Block usage</h4>
+<pre class="brush: xml">                        
+    
+    <div class="block">
+        <div class="header"><!-- or head(more customisable) -->
+            <h2>Title</h2>                        
+        </div>                   
+        <div class="toolbar">
+            Toolbar
+        </div>                     
+        <div class="content">
+            Content
+        </div>
+        <div class="footer">
+            Footer
+        </div>
+    </div>    
+
+</pre>
+    <p>This is sample of default block usage. Also available custom block backgrounds and backgrounds of each element.</p>
+    <p>Block helpers:</p>
+<pre class="brush: xml">                            
+    .block .block-transparent // each element in block will be transparent
+    .block .block-white // each element in block will be white
+    .block .block-fill-white // each element in block will be with white(without transparency)        
+</pre>    
+    <p id="header_colors">Header helpers:</p>
+<pre class="brush: xml">                            
+    .header .header-default // Default header
+    .header .header-transparent // Transparent header
+    .header .header-white // Transparent white header
+    .header .header-fill-white // White background
+</pre>
+    <p>Toolbar helpers:</p>
+<pre class="brush: xml">                            
+    .toolbar .toolbar-default // Default toolbar
+    .toolbar .toolbar-transparent // Transparent toolbar
+    .toolbar .toolbar-white // Transparent white toolbar
+    .toolbar .toolbar-fill-white // White background
+</pre>    
+    <p>Content helpers:</p>
+<pre class="brush: xml">                            
+    .content .content-default // Default content
+    .content .content-transparent // Transparent content
+    .content .content-white // Transparent white content
+    .content .content-fill-white // White background
+</pre>    
+    <p>Footer helpers:</p>
+<pre class="brush: xml">                            
+    .footer .toolbar-default // Default footer
+    .footer .toolbar-transparent // Transparent footer
+    .footer .toolbar-white // Transparent white footer
+    .footer .toolbar-fill-white // White background
+</pre>     
+    
+    <h4>List structure</h4>    
+    <p>Custom list structure(Check official site of bootstrap to get information about bootstrap listing)</p>
+    <p>Simple list:</p>
+<pre class="brush: xml">                            
+    <div class="list">  
+        ...
+        <div class="list-item"><!-- new item -->                         
+            <div class="list-text">Description</div><!-- text in item -->
+        </div> 
+        ...
+    </div>
+</pre> 
+    <p>Best way to use it, is include list into block > content</p>
+    <p>List with elements:</p>
+<pre class="brush: xml">                            
+    <div class="list">                        
+        ...
+        <div class="list-item"><!-- new item -->
+            <div class="list-datetime"><!-- date and time -->
+                <div class="date">00.00</div>
+                <div class="time">00:00 am</div>
+            </div>
+            <div class="list-info"><!-- image -->
+                <img src="path/to.img" class="img-circle img-thumbnail"/>
+            </div>
+            <div class="list-text"><!-- text description of item -->
+                <a href="#" class="list-text-name">Title</a>
+                <p>Description</p>
+            </div>
+            <div class="list-controls"><!-- controls of item-->
+                <a href="#" class="widget-icon widget-icon-circle"><!-- controls element -->
+                    <span class="icon-remove"></span><!-- icon -->
+                </a>
+            </div>                            
+        </div><!-- end of item -->       
+        ...
+    </div>
+</pre>    
+    <h4>Contacts structure</h4>
+    <pre class="brush: xml">                            
+        <div class="list list-contacts">
+            ...
+            <a href="#" class="list-item"><!-- new item -->                                
+                <div class="list-text">John Doe</div><!-- text in item -->                                
+            </a>                                      
+            ...
+        </div>
+    </pre>     
+    <p>Contacts with elements:</p>
+    <pre class="brush: xml">
+        <div class="list list-contacts">
+            ...
+            <div class="list-item"><!-- new item -->
+                <div class="list-info"><!-- image -->
+                    <img src="path/to.img" class="img-circle img-thumbnail">
+                </div>                                                            
+                <div class="list-text"><!-- title and description -->
+                    <span class="list-text-name">Title</span>
+                    <div class="list-text-info">Description</div>
+                </div>
+                <div class="list-status list-status-online"></div><!-- Status -->
+                <div class="list-controls"><!-- controls of item -->                           
+                    <a href="#" class="widget-icon widget-icon-circle"><!-- controls element -->
+                        <span class="icon-comment"></span><!-- icon -->
+                    </a>                    
+                </div>
+            </div><!-- end of item -->        
+            ...
+        </div>
+    </pre>
+    <p>List statuses:</p>
+    <pre class="brush: xml">
+        <div class="list-status list-status-online"></div><!-- green dot -->
+        <div class="list-status list-status-offline"></div><!-- red dot -->
+        <div class="list-status list-status-away"></div><!-- yellow dot -->
+    </pre>
+    
+    <h4>Messages structure</h4>
+    
+    <pre class="brush: xml">
+        <div class="messages"><!-- messages block -->               
+            ...
+            <div class="messages-item"><!-- messages item -->
+                <img src="link/to.img" class="img-circle img-thumbnail"><!-- messages image logo -->
+                <div class="messages-item-text"><!-- messages  text-->
+                    text
+                    <div class="messages-attachment"><!-- messages attachment info(not important)-->
+                        <a href="#">text</a><!-- attachment item -->                      
+                    </div>
+                </div>
+                <div class="messages-item-date">00:00 00.00.0000</div><!-- messages date -->
+            </div>           
+            ...
+        </div>
+    </pre>
+    <h4>Gallery structure</h4>
+    <p>Simple:</p>
+    <pre class="brush: xml">
+        <div class="gallery"><!-- new gallery -->
+            ...
+            <a class="fancybox" rel="group" href="path/to.img"><!-- gallery item -->
+                <img src="path/to.img" class="img-thumbnail"><!-- image -->
+            </a>
+            ...
+        </div>
+    </pre>    
+    <p>Gallery list:</p>
+    <pre class="brush: xml">
+        <div class="gallery-list"><!-- new Gallery list -->
+            ...
+            <div class="gallery-item"><!-- gallery item -->
+                <div class="gallery-image"><!-- gallery image -->
+                    <a class="fancybox" rel="group" href="path/to.img"><!-- image preview -->
+                        <img src="path/to.img" class="img-thumbnail"><!-- img -->
+                    </a>
+                </div>
+                <div class="gallery-controls"><!-- img controls -->                    
+                    <a href="#"><span class="icon-pencil"></span></a><!-- controls item -->
+                </div>
+            </div>                                                            
+            ...
+        </div>
+    </pre>
+    <p>Thumbnails:</p>
+    <pre class="brush: xml">
+        <div class="gallery-list"><!-- new gallery -->
+            ...
+            <div class="gallery-item"><!-- new item -->
+                <div class="gallery-image"><!-- item image -->
+                    <a class="fancybox" rel="group" href="path/to.img"><!-- image preview -->
+                        <img src="path/to.img" class="img-thumbnail"><!-- image -->
+                    </a>
+                </div>
+                <div class="gallery-content"><!-- item description -->
+                    <div class="title">Title</div><!-- title -->
+                    <div class="text">Text</div><!-- text -->
+                </div>                            
+            </div> 
+            ...
+        </div>
+    </pre>
+</section>
+<section id="css_structure">
+	<h3>CSS structure</h3><hr class="notop">
+        <p><strong>stylesheets.css</strong> is the main CSS file that includes:</p>
+<pre class="brush: css">        
+    @import "bootstrap/bootstrap.min.css";
+    @import "jquery/jquery-ui.min.css";
+
+    @import "icons/font-awesome.min.css";
+
+    @import "mcustomscrollbar/jquery.mCustomScrollbar.css";
+    @import "select2/select2.css";
+
+    @import "shbrush/shCoreDefault.css";
+    @import "shbrush/shThemeDefault.css";
+
+    @import "cleditor/jquery.cleditor.css";
+    @import "codemirror/codemirror.css";
+    @import "validationengine/validationEngine.css";
+
+    @import "fancybox/jquery.fancybox.css";
+
+    @import "fullcalendar/fullcalendar.css";
+
+    @import "elfinder/elfinder.min.css";
+    @import "filetree/jqueryFileTree.css";
+
+    @import "stylesheet.css";
+    @import "backgrounds.css";
+    @import "themes.css";
+    @import "mystyles.css";
+</pre>        
+        <ul>            
+            <li><strong>bootstrap/bootstrap.min.css</strong> - bootstrap stylesheets</li>
+            <li><strong>jquery/jquery-ui.min.css</strong> - jQuery UI custom stylesheets</li>
+            <li><strong>icons/font-awesome.min.css</strong> - font awesome icons stylesheets</li>            
+            <li><strong>fullcalendar/fullcalendar.css</strong> - full calendar plugin stylesheets</li>                        
+            <li><strong>fancybox/jquery.fancybox.css</strong> - fancybox plugin stylesheets</li>            
+            <li><strong>select2/select2.css</strong> - Select2 stylesheets</li>                                          
+            <li><strong>validationengine/validationEngine.css</strong> - Validation engine stylesheets</li>            
+            <li><strong>mcustomscrollbar/jquery.mCustomScrollbar.css</strong> - Custom scrollbar stylesheets</li>            
+            <li><strong>cleditor/jquery.cleditor.css</strong> - WYSIWYG plugin stylesheets</li>
+            <li><strong>shCoreDefault.css, shThemeDefault.css</strong> - SyntaxHighlight plugin stylesheets</li>                        
+            <li><strong>elfinder/elfinder.min.css</strong> - Elfinder plugin stylesheets</li>                        
+            <li><strong>filetree/jqueryFileTree.css</strong> - File Tree plugin stylesheets</li>                        
+                        
+            <li><strong>stylesheet.css</strong> - <strong>Taurus styleshets</strong></li>
+            <li><strong>backgrounds.css</strong> - backgrounds stylesheet</li>                                    
+            <li><strong>themes.css</strong> - <strong>Themes styleshets(can be cleaned after choose of theme)</strong></li>
+            <li><strong>mystyles.css</strong> - <strong>Your own styles</strong></li>
+        </ul>
+</section>
+        
+<section id="javascript_structure">
+	<h3>Javascript structure</h3><hr class="notop">
+
+        <h4>Basics</h4>
+<pre class="brush: xml">    
+    &lt;script type='text/javascript' src='js/plugins/jquery/jquery.min.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/jquery/jquery-ui.min.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/jquery/jquery-migrate.min.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/jquery/globalize.js'>&lt;/script>    
+    &lt;script type='text/javascript' src='js/plugins/bootstrap/bootstrap.min.js'>&lt;/script>
+    
+    &lt;script type='text/javascript' src='js/plugins.js'>&lt;/script>    
+    &lt;script type='text/javascript' src='js/actions.js'>&lt;/script>      
+</pre>
+        
+        <h4>Uniform plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/uniform/jquery.uniform.min.js'>&lt;/script>
+</pre>
+        <p>Designed form elements: input:checkbox,input:radio</p>
+
+        <h4>Custom scrollbar</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/mcustomscrollbar/jquery.mCustomScrollbar.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use custom content scroller</p>        
+
+        <h4>iButton plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/ibutton/jquery.ibutton.js'>&lt;/script>
+</pre>
+        <p>Allows you to use iButton plugin(styleed checkbox/radio)</p>                
+        
+    <h4>Select2 plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/select2/select2.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use custom select element(custom design of select/select:multiple with search)</p>
+
+        <h4>Tags input plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/tagsinput/jquery.tagsinput.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use field with tags</p>
+        
+        <h4>Timepicker addon</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/jquery/jquery-ui-timepicker-addon.js'>&lt;/script>
+</pre>
+        <p>Allows you to use addon for jquery-ui. Timepicker or date-and-time picker.</p>
+        
+        <h4>Notify plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/noty/jquery.noty.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/noty/layouts/topCenter.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/noty/layouts/topLeft.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/noty/layouts/topRight.js'>&lt;/script>    
+    &lt;script type='text/javascript' src='js/plugins/noty/themes/default.js'>&lt;/script>
+</pre>
+        <p>Allows you to use notify massages. Also check official site of plugin to get more information about usage(direction etc.)</p>
+        
+        <h4>Fancybox plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/fancybox/jquery.fancybox.pack.js'>&lt;/script>
+</pre>
+        <p>Allows you to use popup preview of large image</p>
+
+        <h4>Knob plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/knob/jquery.knob.js'>&lt;/script>
+</pre>
+        <p>Allows you to use knob circle charts</p>
+
+        <h4>Flot charts plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/flot/jquery.flot.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/flot/jquery.flot.pie.js'>&lt;/script>    
+    &lt;script type='text/javascript' src='js/plugins/flot/jquery.flot.resize.js'>&lt;/script>
+</pre>
+        <p>Allows you to use flot charts</p>
+        
+        <h4>Sparkline charts plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/sparkline/jquery.sparkline.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use sparkline charts</p>        
+        
+        <h4>Fullcalendar plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/fullcalendar/fullcalendar.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use fullcalendar plugin</p>
+        
+        <h4>Google maps plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places">&lt;/script>
+</pre>
+        <p>Allows you to use Google maps plugin</p>        
+
+        <h4>Datatables plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/datatables/jquery.dataTables.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use datatables plugin(sortable tables, with paging, search and other controls).</p>        
+        
+        <h4>Google maps plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places">&lt;/script>
+</pre>
+        <p>Allows you to use Google maps plugin</p>                
+
+        <h4>ShBrush plugin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/shbrush/XRegExp.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/shbrush/shCore.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/shbrush/shBrushXml.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/shbrush/shBrushJScript.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/shbrush/shBrushCss.js'>&lt;/script>
+</pre>
+        <p>Allows you to use ShBrush plugin(SyntaxHighlighter).</p>         
+
+        <h4>ClEditor plguin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/cleditor/jquery.cleditor.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use ClEditor plguin(WYSIWYG editor).</p>                 
+
+        <h4>Codemirror plguin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/codemirror/codemirror.js'>&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/addon/edit/matchbrackets.js">&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/mode/htmlmixed/htmlmixed.js">&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/mode/xml/xml.js">&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/mode/javascript/javascript.js">&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/mode/css/css.js">&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/mode/clike/clike.js">&lt;/script>
+    &lt;script type='text/javascript' src="js/plugins/codemirror/mode/php/php.js">&lt;/script>
+</pre>
+        <p>Allows you to use Codemirror plguin(WYSIWYG code editor).</p>                 
+        
+        <h4>Plupload plguin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.gears.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.silverlight.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.flash.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.browserplus.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.html4.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/plupload.html5.js'>&lt;/script>
+    &lt;script type='text/javascript' src='js/plugins/plupload/jquery.plupload.queue/jquery.plupload.queue.js'>&lt;/script> 
+</pre>
+        <p>Allows you to use Plupload plguin(File uploads plugin).</p>
+
+        <h4>Elfinder plguin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/elfinder/elfinder.min.js'>&lt;/script>
+</pre>
+        <p>Allows you to use Elfinder plguin(File manager plugin).</p>
+        
+        <h4>jQuery File Tree plguin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/filetree/jqueryFileTree.js'>&lt;/script>    
+</pre>
+        <p>Allows you to use File Tree plguin.</p>        
+        
+        <h4>TinyMCE plguin</h4>
+<pre class="brush: xml">                    
+    &lt;script type='text/javascript' src='js/plugins/tinymce/tinymce.min.js'>&lt;/script>    
+</pre>
+        <p>Allows you to use TinyMCE plguin(wysiwyg editro).</p>
+        
+        <h4>Taurus javascript</h4>
+<pre class="brush: xml">                    
+    <script type='text/javascript' src='js/plugins.js'></script><!-- inits of plugins - important -->
+    <script type='text/javascript' src='js/actions.js'></script><!-- scripts - important -->    
+    <script type='text/javascript' src='js/charts.js'></script><!-- chart examples -->
+    <script type='text/javascript' src='js/maps.js'></script><!-- map examples -->
+    <script type='text/javascript' src='js/settings.js'></script><!-- template settings -->
+</pre>
+        
+</section>
+
+        
+        
+<section id="how_to">
+	<h3>How-to...?</h3><hr class="notop">
+        
+        <h4 id="hts">How to start using Taurus template?</h4>
+        <ol>
+            <li> Chose theme and background that you will use, and set default controls. <a href="#htdt">How to do this check it in next part</a></li>
+            <li> Remove from plugins.js all code that commented with <strong>(demo)</strong>(samples)</li>
+            <li> Remove from /js folder files: charts.js, maps.js, settings.js(smaples)</li>
+            <li> Remove from /img examples folder. Replace logo with your own. Also You can remove all backgrounds and wallpapers that you doesnt use</li>
+            <li> Open css/stylesheet.css and remove part of code commented with /* site settings */ (not important). Also find <strong>.container.container-fixed</strong> and set width for fixed version of site(by default 1200px)</li>
+            <li> Open css/themes.css and remove themes that you doesnt use</li>
+            <li> Use <strong>component_layout_blank.html</strong> as basic HTML file</li>
+        </ol>
+        
+        <h4 id="htdt">How to use themes?</h4>
+        <p>All themes you can find in css/themes.css, all background options in backgrounds.css. For example if you choose theme .theme-black and wallpaper .wall-num6:</p>
+<pre class="brush: xml">    
+    &lt;body class="wall-num6"><!-- add background/wallpaper class to body tag -->
+        
+        <div class="container theme-black"><!-- add theme class to container element -->
+            ...
+        </div>
+    
+    &lt;/body>    
+</pre>        
+        <p>If you need to use fixed content, you should add to .container class .container-fixed</p>
+<pre class="brush: xml">    
+    &lt;body class="wall-num6"><!-- add background/wallpaper class to body tag -->
+        
+        <div class="container theme-black container-fixed"><!-- add theme class to container element -->
+            ...
+        </div>
+    
+    &lt;/body>    
+</pre>        
+        <p>Dont forget to change width of fixed content in stylesheet.css(<strong>.container.container-fixed</strong>)</p>
+        
+        
+        <h4>How to white content?</h4>
+        <p>There two types. 1st is use <strong>.block.block-fill-white</strong>. 2nd is use custom layout with "white" background(<strong>.page-content.page-content-white</strong>), there you also shoud use <strong>block.block-fill-white</strong>, but in this case more available elements.</p>        
+        <p>Also you should to know, that white content support only form elements(example you can find on form_elements.html).</p>
+        <p>Structure of block with white background same as in default block:</p>
+<pre class="brush: xml">
+    <div class="block block-fill-white">        
+        <div class="header">...</div>
+        <div class="head">...</div>
+        <div class="toolbar">...</div>
+        <div class="content">...</div>
+        <div class="footer">...</div>
+    </div>
+</pre>        
+        <p>Structure of page with white content same as custom navigation content, but you should also add .page-content-white to .page-content:</p>
+        
+<pre class="brush: xml">
+    &lt;body><!-- Add classes to change background -->
+
+        <div class="page-container"><!-- page container -->
+            <div class="page-sidebar"><!-- side bar -->
+                <!-- place for navigation -->
+            </div>
+            <div class="page-content page-content-white"><!-- page content wrapper, and white background -->                
+                <div class="container">
+                    <!-- here your content -->
+                </div>                
+            </div>
+        </div>
+
+
+    &lt;/body>
+</pre> 
+        
+        
+        <h4>How to use horizontal navigation?</h4>
+        <p>Horizontal navigation based on Bootstrap3 Navbar. All except second and lower level dropdown. Use <strong>ul.dropdown-submenu</strong>:</p>
+<pre class="brush: xml">
+    ...
+    <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">link name</a>
+        <ul class="dropdown-menu">
+            ...
+            <li>
+                <a href="#">link name</a>
+                <ul class="dropdown-submenu"><!-- this is second and lower level navigation block -->
+                    ...
+                    <li><a href="#">link name</a></li>                    
+                    ...
+                </ul>
+            </li> 
+            ...
+        </ul>
+    </li>
+    ...
+</pre>
+        <p>For more information how to use Navbar <a href="http://getbootstrap.com/components/#navbar" target="_blank">check this page</a></p>
+        
+        
+        <h4>How to use vertical navigation?</h4>
+<pre class="brush: xml">
+    <ul class="page-navigation"><!-- navigation block -->
+        ...
+        <li><!-- first level item -->
+             <a href="#"><span class="icon-*"></span> Firstlevel</a><!-- first level item link with icon -->
+                <ul><!-- second level block -->
+                    ...
+                    <li><!-- second level item -->
+                        <a href="#">Second and lower level</a><!-- second level item link -->
+                    </li>
+                    ...
+                </ul>             
+        </li>
+        ...
+    </ul>
+</pre>  
+
+        <h4>How to collapse vertical navigation?</h4>
+        <p>Vertical navigation collapse available only in <a href="#cnl">Custom Navigation Layout</a>. Collapse controller: .psn-control. Also navigation auto-collapse if width of window is lower than 768, and expand if more than 768.</p>
+        <p>Check example from component_layout_custom.html:</p>
+<pre class="brush: xml">
+    <div class="page-sidebar">
+        ...
+        <div class="page-navigation-panel">
+            ...
+            <div class="control"><!-- block floated to left and minor controls-->
+                <a href="#" class="psn-control"><span class="icon-reorder"></span></a><!-- controller with icon -->
+            </div>
+            ...
+        </div>
+        ...
+    </div>
+</pre>        
+        
+        <h4>How to hide elements in panel-sidebar when it collapsed?</h4>
+        <p>You should add class <strong>page-navigation-hide</strong> to element you want to hide.</p>
+<pre class="brush: xml">
+    <div class="page-sidebar">
+        ...
+        <div class="block page-navigation-hide">
+            ...
+        </div>
+        ...
+    </div>
+</pre>        
+
+    <h4>How to use header/head in block?</h4>
+    <p>All available items in <strong>header</strong>:</p>
+<pre class="brush: xml">
+
+    <div class="block"><!-- some content box -->        
+        <div class="header"><!-- header -->
+            <h2>Title</h2><!-- header title -->
+            <ul class="buttons pull-right"><!-- buttons panel -->
+                <li><a href="#">Button</a></li><!-- panel item -->
+            </ul>
+        </div>        
+        ...
+    </div>                                                 
+
+</pre>        
+    <p>Also you can change background of header. <a href="header_colors">Check this for more information</a>.</p>
+    
+    <p>All available items in <strong>head</strong>:</p>
+<pre class="brush: xml">
+
+    <div class="block"><!-- some content box -->        
+        <div class="head"><!-- head -->
+            
+            <h2>Title</h2><!-- head title -->
+            
+            <ul class="buttons pull-right"><!-- buttons panel -->
+                <li><a href="#">Button</a></li><!-- panel item -->
+            </ul>
+            
+            <div class="head-subtitle">Subtitle</div><!-- subtitle block -->
+            
+            <div class="head-panel"><!-- head panel -->
+                
+                <div class="hp-info"><!-- information block -->
+                    <div class="hp-icon"><!-- icon block -->
+                        <span class="icon-thumbs-up-alt"></span><!-- icon -->
+                    </div>
+                    <span class="hp-main">text</span><!-- main info -->
+                    <span class="hp-sm">other text</span><!-- submain info -->
+                </div>                
+                
+                <a href="#" class="hp-info hp-one pull-right"><!-- hp-info also available as link. hp-one - is information block with hp-main only -->
+                    <div class="hp-icon"><!-- icon block -->
+                        <span class="icon-refresh"></span><!-- icon -->
+                    </div>                                                 
+                    <span class="hp-main">Text</span><!-- main info -->                                
+                </a>
+                <div class="hp-info hp-simple hp-inline"><!-- hp-inline is information block in one line. hp-simple - without image -->
+                    ...
+                </div>
+                
+            </div>
+            
+        </div>        
+        ...
+    </div>                                                 
+
+</pre>    
+    <p><strong>head</strong> doesnt have default background. So dont forget to set it:</p>        
+<pre class="brush: xml">
+    ...
+    <div class="block">        
+        <div class="head bg-default"><!-- bg-default is default background of theme. -->
+            ...
+        </div>
+    </div>
+    ...
+</pre>    
+    
+    <h4>How to use backgrounds?</h4>
+    <p>First of all let's see all available customisible backgrounds(backgrounds.css):</p>
+<pre class="brush: css">
+/* eof background images */
+...
+.bg-light{background-image: url('../img/background/blight.png'); background-position: center top; background-repeat: no-repeat;}
+.bg-light-ltr{background-image: url('../img/background/blight_ltr.png'); background-position: left top; background-repeat: no-repeat;}
+.bg-light-rtl{background-image: url('../img/background/blight_rtl.png'); background-position: right top; background-repeat: no-repeat;}
+.bg-splash-white{background-image: url('../img/background/splash_white.png'); background-position: center top; background-repeat: no-repeat;}
+.bg-splash-blue{background-image: url('../img/background/splash_blue.png'); background-position: center top; background-repeat: no-repeat;}
+...
+/* eof background images */
+
+/* background colors */
+.bg-white{background-color: #FFFFFF !important;}
+.bg-lblue{background-color: #34A6C8 !important;}
+.bg-blue{background-color: #2F80A6 !important;}
+.bg-dblue,.bg-default{background-color: #133959 !important;}
+.bg-turquoise{background-color: #40BABD !important;}
+/* eof background colors */    
+</pre>    
+    <p>So, to build your own background you can use class="bg-blue bg-light-ltr" to get blue background with light from left to right.</p>
+    <p>Also you can add your own colors, and use it for page background or for block > head elements.</p>
+    
+    <h4>How to create a custom scrollbar in block?</h4>        
+<pre class="brush: xml">
+
+    <div class="block"><!-- some content box -->
+        
+        <div class="scroll" style="height: 300px;"> <!-- new content wrapper with custom scroll -->
+            ...
+        </div>
+        
+    </div>                                                 
+
+</pre>        
+    <p>Important thing to use scrollbar is add for wrapper personal div, and set for it height as on example above.</p>
+
+    <h4>How to use plugins?</h4>    
+    <p>Almost all plugins in template can be called with classes. Samples:</p>
+    <pre class="brush: xml">
+        <!-- iButton(switch) -->
+        <input type="checkbox" class="ibutton"/>
+        <input type="radio" class="ibutton"/><!-- use class .ibutton -->
+
+        <!-- Select2 -->
+        <select class="select2" style="width: 100%;">...</select>
+        <select class="select2" multiple="multiple" style="width: 100%;" tabindex="-1"></select><!-- use class .select2 -->
+
+        <!-- Tags Input -->
+        <input type="text" class="tags"/><!-- use class .tags -->
+
+        <!-- Date and time pickers -->
+        <input type="text" class="datepicker form-control"/><!-- use class .datepicker to call Datepicker -->
+        <input type="text" class="mdatepicker form-control"/><!-- use class .mdatepicker to call Multiple Datepicker -->
+        <input type="text" class="timepicker form-control"/><!-- use class .timepicker to call Timepciker -->
+        <input type="text" class="datetimepicker form-control"/><!-- use class .datetimepicker to call Date and Time picker -->
+
+        <!-- ClEditor -->
+        <textarea class="cle"></textarea><!-- use class .cle to call editor -->
+        <textarea class="scle"></textarea><!-- use class .scle to call simple editor -->
+
+        <!-- TinyMCE -->
+        <textarea class="tmce"></textarea><!-- use class .tmce to call editor -->
+        <textarea class="stmce"></textarea><!-- use class .stmce to call simple editor -->
+
+    </pre>     
+    
+</section>
+<section id="credits">
+	<h3>Credits</h3><hr class="notop">
+        
+        <ul>
+            <li><a href="http://jqueryui.com/">jQuery</a></li>
+            <li><a href="http://jqueryui.com/">jQuery UI</a></li>
+            <li><a href="http://getbootstrap.com/">Twitter Bootstrap</a></li>            
+            <li><a href="http://fancybox.net/">jQuery fancybox</a></li>            
+            <li><a href="http://omnipotent.net/jquery.sparkline/#s-about">jQuery Sparkline charts</a></li>
+            <li><a href="http://anthonyterrien.com/knob/">jQuery Knob charts</a></li>
+            <li><a href="http://needim.github.io/noty/">Notify plugin</a></li>
+            <li><a href="http://datatables.net/">jQuery DataTables</a></li>                        
+            <li><a href="http://manos.malihu.gr/jquery-custom-content-scroller/">jQuery custom content scroller</a></li>
+            <li><a href="http://uniformjs.com/">jQuery Uniform plugin</a></li>
+            <li><a href="http://ivaynberg.github.io/select2/">jQuery Select2 plugin</a></li>
+            <li><a href="http://xoxco.com/projects/code/tagsinput/">jQuery TagsInput plugin</a></li>
+            <li><a href="http://digitalbush.com/projects/masked-input-plugin/">jQuery maskedinput plugin</a></li>            
+            <li><a href="http://www.position-absolute.com/">jQuery Validation Engine plugin</a></li>
+            <li><a href="http://wbotelhos.com/stepy">jQuery Stepy</a></li>                        
+            <li><a href="http://premiumsoftware.net/cleditor/">jQuery CLEditor plugin</a></li>            
+            <li><a href="http://alexgorbatchev.com/SyntaxHighlighter/">SyntaxHighlighter plugin</a></li>            
+            <li><a href="http://www.plupload.com/">jQuery Plupload</a></li>                                             
+            <li><a href="http://www.givainc.com/labs/ibutton_jquery_plugin.htm">jQuery iButton</a></li>
+            <li><a href="http://codemirror.net"/>Codemirror plugin</a></li>
+            <li><a href="http://arshaw.com/fullcalendar/"/>Fullcalendar plugin</a></li>            
+            <li><a href="http://elfinder.org/"/>Elfinder file manager plugin</a></li>
+            <li><a href="http://www.abeautifulsite.net/blog/2008/03/jquery-file-tree/"/>File tree plugin</a></li>
+            <li><a href="http://www.tinymce.com/"/>TinyMCE plugin</a></li>
+        </ul>        
+        
+</section>    
+<section id="changelog">
+        <h3>Changelog</h3><hr class="notop">
+        
+        <ul>                    
+            <li>
+                <strong>Version 1.0</strong> - 10.11.2013
+                <ul>
+                    <li>Initial release</li>
+                </ul>
+            </li>
+            <li>
+                <strong>Version 1.1</strong> - 18.11.2013
+                <ul>
+                    <li>Added Tinymce wysiwyg editor</li>
+                    <li>Added Elfinder file manager</li>
+                    <li>Added File Tree plugin</li>
+                    <li>Added sortable and selectable element samples</li>
+                    <li>Added support form elements on white background</li>
+                    <li>Added new layout with white background</li>
+                    <li>Added modal with ajax load content sample</li>
+                    <li>Added full size modal</li>
+                    <li>Added draggable modal</li>
+                    <li>Added modal with white content</li>
+                    <li>Added messages with white background</li>
+                    <li>Added on/off series chart sample</li>
+                    <li>Added auto save site settings(now you can choose theme one per session)</li>
+                    <li>Updated documentation to v1.1</li>
+                </ul>
+            </li>            
+        </ul>
+         
+</section>
+</div>
+
+</body>
+</html>

Різницю між файлами не показано, бо вона завелика
+ 4 - 0
isc-front/Documentation_1_1/js/jquery.1.6.4.js


+ 205 - 0
isc-front/Documentation_1_1/js/jquery.easing.js

@@ -0,0 +1,205 @@
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright © 2008 George McGinley Smith
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+jQuery.easing['jswing'] = jQuery.easing['swing'];
+
+jQuery.extend( jQuery.easing,
+{
+	def: 'easeOutQuad',
+	swing: function (x, t, b, c, d) {
+		//alert(jQuery.easing.default);
+		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
+	},
+	easeInQuad: function (x, t, b, c, d) {
+		return c*(t/=d)*t + b;
+	},
+	easeOutQuad: function (x, t, b, c, d) {
+		return -c *(t/=d)*(t-2) + b;
+	},
+	easeInOutQuad: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t + b;
+		return -c/2 * ((--t)*(t-2) - 1) + b;
+	},
+	easeInCubic: function (x, t, b, c, d) {
+		return c*(t/=d)*t*t + b;
+	},
+	easeOutCubic: function (x, t, b, c, d) {
+		return c*((t=t/d-1)*t*t + 1) + b;
+	},
+	easeInOutCubic: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t*t + b;
+		return c/2*((t-=2)*t*t + 2) + b;
+	},
+	easeInQuart: function (x, t, b, c, d) {
+		return c*(t/=d)*t*t*t + b;
+	},
+	easeOutQuart: function (x, t, b, c, d) {
+		return -c * ((t=t/d-1)*t*t*t - 1) + b;
+	},
+	easeInOutQuart: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+		return -c/2 * ((t-=2)*t*t*t - 2) + b;
+	},
+	easeInQuint: function (x, t, b, c, d) {
+		return c*(t/=d)*t*t*t*t + b;
+	},
+	easeOutQuint: function (x, t, b, c, d) {
+		return c*((t=t/d-1)*t*t*t*t + 1) + b;
+	},
+	easeInOutQuint: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+		return c/2*((t-=2)*t*t*t*t + 2) + b;
+	},
+	easeInSine: function (x, t, b, c, d) {
+		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+	},
+	easeOutSine: function (x, t, b, c, d) {
+		return c * Math.sin(t/d * (Math.PI/2)) + b;
+	},
+	easeInOutSine: function (x, t, b, c, d) {
+		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+	},
+	easeInExpo: function (x, t, b, c, d) {
+		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+	},
+	easeOutExpo: function (x, t, b, c, d) {
+		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+	},
+	easeInOutExpo: function (x, t, b, c, d) {
+		if (t==0) return b;
+		if (t==d) return b+c;
+		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+	},
+	easeInCirc: function (x, t, b, c, d) {
+		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+	},
+	easeOutCirc: function (x, t, b, c, d) {
+		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+	},
+	easeInOutCirc: function (x, t, b, c, d) {
+		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+	},
+	easeInElastic: function (x, t, b, c, d) {
+		var s=1.70158;var p=0;var a=c;
+		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
+		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+	},
+	easeOutElastic: function (x, t, b, c, d) {
+		var s=1.70158;var p=0;var a=c;
+		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
+		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+	},
+	easeInOutElastic: function (x, t, b, c, d) {
+		var s=1.70158;var p=0;var a=c;
+		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
+		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+	},
+	easeInBack: function (x, t, b, c, d, s) {
+		if (s == undefined) s = 1.70158;
+		return c*(t/=d)*t*((s+1)*t - s) + b;
+	},
+	easeOutBack: function (x, t, b, c, d, s) {
+		if (s == undefined) s = 1.70158;
+		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+	},
+	easeInOutBack: function (x, t, b, c, d, s) {
+		if (s == undefined) s = 1.70158; 
+		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+	},
+	easeInBounce: function (x, t, b, c, d) {
+		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+	},
+	easeOutBounce: function (x, t, b, c, d) {
+		if ((t/=d) < (1/2.75)) {
+			return c*(7.5625*t*t) + b;
+		} else if (t < (2/2.75)) {
+			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+		} else if (t < (2.5/2.75)) {
+			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+		} else {
+			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+		}
+	},
+	easeInOutBounce: function (x, t, b, c, d) {
+		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+	}
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright © 2001 Robert Penner
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+ */

Різницю між файлами не показано, бо вона завелика
+ 11 - 0
isc-front/Documentation_1_1/js/jquery.scrollTo-1.4.2-min.js


+ 159 - 0
isc-front/Documentation_1_1/js/script.js

@@ -0,0 +1,159 @@
+/*!
+ * Documenter 1.6
+ * http://rxa.li/documenter
+ *
+ * Copyright 2011, Xaver Birsak
+ * http://revaxarts.com
+ *
+ */
+//if Cufon replace headings
+if(typeof Cufon == 'function') Cufon.replace('h1, h2, h3, h4, h5, h6');
+ 
+$(document).ready(function() {
+	var timeout,
+		sections = new Array(),
+		sectionscount = 0,
+		win = $(window),
+		sidebar = $('#documenter_sidebar'),
+		nav = $('#documenter_nav'),
+		logo = $('#documenter_logo'),
+		navanchors = nav.find('a'),
+		timeoffset = 50,
+		hash = location.hash || null;
+		iDeviceNotOS4 = (navigator.userAgent.match(/iphone|ipod|ipad/i) && !navigator.userAgent.match(/OS 5/i)) || false,
+		badIE = $('html').prop('class').match(/ie(6|7|8)/)|| false;
+		
+	//handle external links (new window)
+	$('a[href^=http]').bind('click',function(){
+		window.open($(this).attr('href'));
+		return false;
+	});
+	
+	//IE 8 and lower doesn't like the smooth pagescroll
+	if(!badIE){
+		window.scroll(0,0);
+		
+		$('a[href^=#]').bind('click touchstart',function(){
+			hash = $(this).attr('href');
+			$.scrollTo.window().queue([]).stop();
+			goTo(hash);
+			return false;
+		});
+		
+		//if a hash is set => go to it
+		if(hash){
+			setTimeout(function(){
+				goTo(hash);
+			},500);
+		}
+	}
+	
+	
+	//We need the position of each section until the full page with all images is loaded
+	win.bind('load',function(){
+		
+		var sectionselector = 'section';
+		
+		//Documentation has subcategories		
+		if(nav.find('ol').length){
+			sectionselector = 'section, h4';
+		}
+		//saving some information
+		$(sectionselector).each(function(i,e){
+			var _this = $(this);
+			var p = {
+				id: this.id,
+				pos: _this.offset().top
+			};
+			sections.push(p);
+		});
+		
+		
+		//iPhone, iPod and iPad don't trigger the scroll event
+		if(iDeviceNotOS4){
+			nav.find('a').bind('click',function(){
+				setTimeout(function(){
+					win.trigger('scroll');				
+				},duration);
+				
+			});
+			//scroll to top
+			window.scroll(0,0);
+		}
+
+		//how many sections
+		sectionscount = sections.length;
+		
+		//bind the handler to the scroll event
+		win.bind('scroll',function(event){
+			clearInterval(timeout);
+			//should occur with a delay
+			timeout = setTimeout(function(){
+				//get the position from the very top in all browsers
+				pos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
+				
+				//iDeviceNotOS4s don't know the fixed property so we fake it
+				if(iDeviceNotOS4){
+					sidebar.css({height:document.height});
+					logo.css({'margin-top':pos});
+				}
+				//activate Nav element at the current position
+				activateNav(pos);
+			},timeoffset);
+		}).trigger('scroll');
+
+	});
+	
+	//the function is called when the hash changes
+	function hashchange(){
+		goTo(location.hash, false);
+	}
+	
+	//scroll to a section and set the hash
+	function goTo(hash,changehash){
+		win.unbind('hashchange', hashchange);
+		hash = hash.replace(/!\//,'');
+		win.stop().scrollTo(hash,duration,{
+			easing:easing,
+			axis:'y'			
+		});
+		if(changehash !== false){
+			var l = location;
+			location.href = (l.protocol+'//'+l.host+l.pathname+'#!/'+hash.substr(1));
+		}
+		win.bind('hashchange', hashchange);
+	}
+	
+	
+	//activate current nav element
+	function activateNav(pos){
+		var offset = 100,
+		current, next, parent, isSub, hasSub;
+		win.unbind('hashchange', hashchange);
+		for(var i=sectionscount;i>0;i--){
+			if(sections[i-1].pos <= pos+offset){
+				navanchors.removeClass('current');
+				current = navanchors.eq(i-1);
+				current.addClass('current');
+				
+				parent = current.parent().parent();
+				next = current.next();
+				
+				hasSub = next.is('ol');
+				isSub = !parent.is('#documenter_nav');
+				
+				nav.find('ol:visible').not(parent).slideUp('fast');
+				if(isSub){
+					parent.prev().addClass('current');
+					parent.stop().slideDown('fast');
+				}else if(hasSub){
+					next.stop().slideDown('fast');
+				}
+				win.bind('hashchange', hashchange);
+				break;
+			};
+		}	
+	}
+	
+	
+});

+ 91 - 0
isc-front/Documentation_1_1/js/shBrushCss.js

@@ -0,0 +1,91 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ * 
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+	// CommonJS
+	typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+	function Brush()
+	{
+		function getKeywordsCSS(str)
+		{
+			return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
+		};
+	
+		function getValuesCSS(str)
+		{
+			return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
+		};
+
+		var keywords =	'ascent azimuth background-attachment background-color background-image background-position ' +
+						'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
+						'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
+						'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
+						'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
+						'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
+						'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
+						'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
+						'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
+						'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
+						'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
+						'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
+						'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
+						'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
+
+		var values =	'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
+						'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
+						'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
+						'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
+						'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
+						'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
+						'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
+						'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
+						'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
+						'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
+						'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
+						'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
+						'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
+						'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
+
+		var fonts =		'[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
+	
+		this.regexList = [
+			{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comments' },	// multiline comments
+			{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'string' },	// double quoted strings
+			{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },	// single quoted strings
+			{ regex: /\#[a-fA-F0-9]{3,6}/g,								css: 'value' },		// html colors
+			{ regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g,				css: 'value' },		// sizes
+			{ regex: /!important/g,										css: 'color3' },	// !important
+			{ regex: new RegExp(getKeywordsCSS(keywords), 'gm'),		css: 'keyword' },	// keywords
+			{ regex: new RegExp(getValuesCSS(values), 'g'),				css: 'value' },		// values
+			{ regex: new RegExp(this.getKeywords(fonts), 'g'),			css: 'color1' }		// fonts
+			];
+
+		this.forHtmlScript({ 
+			left: /(&lt;|<)\s*style.*?(&gt;|>)/gi, 
+			right: /(&lt;|<)\/\s*style\s*(&gt;|>)/gi 
+			});
+	};
+
+	Brush.prototype	= new SyntaxHighlighter.Highlighter();
+	Brush.aliases	= ['css'];
+
+	SyntaxHighlighter.brushes.CSS = Brush;
+
+	// CommonJS
+	typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();

+ 52 - 0
isc-front/Documentation_1_1/js/shBrushJScript.js

@@ -0,0 +1,52 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ * 
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+	// CommonJS
+	typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+	function Brush()
+	{
+		var keywords =	'break case catch continue ' +
+						'default delete do else false  ' +
+						'for function if in instanceof ' +
+						'new null return super switch ' +
+						'this throw true try typeof var while with'
+						;
+
+		var r = SyntaxHighlighter.regexLib;
+		
+		this.regexList = [
+			{ regex: r.multiLineDoubleQuotedString,					css: 'string' },			// double quoted strings
+			{ regex: r.multiLineSingleQuotedString,					css: 'string' },			// single quoted strings
+			{ regex: r.singleLineCComments,							css: 'comments' },			// one line comments
+			{ regex: r.multiLineCComments,							css: 'comments' },			// multiline comments
+			{ regex: /\s*#.*/gm,									css: 'preprocessor' },		// preprocessor tags like #region and #endregion
+			{ regex: new RegExp(this.getKeywords(keywords), 'gm'),	css: 'keyword' }			// keywords
+			];
+	
+		this.forHtmlScript(r.scriptScriptTags);
+	};
+
+	Brush.prototype	= new SyntaxHighlighter.Highlighter();
+	Brush.aliases	= ['js', 'jscript', 'javascript'];
+
+	SyntaxHighlighter.brushes.JScript = Brush;
+
+	// CommonJS
+	typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();

+ 69 - 0
isc-front/Documentation_1_1/js/shBrushXml.js

@@ -0,0 +1,69 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ * 
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+	// CommonJS
+	typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+	function Brush()
+	{
+		function process(match, regexInfo)
+		{
+			var constructor = SyntaxHighlighter.Match,
+				code = match[0],
+				tag = new XRegExp('(&lt;|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
+				result = []
+				;
+		
+			if (match.attributes != null) 
+			{
+				var attributes,
+					regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
+										'\\s*=\\s*' +
+										'(?<value> ".*?"|\'.*?\'|\\w+)',
+										'xg');
+
+				while ((attributes = regex.exec(code)) != null) 
+				{
+					result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
+					result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
+				}
+			}
+
+			if (tag != null)
+				result.push(
+					new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
+				);
+
+			return result;
+		}
+	
+		this.regexList = [
+			{ regex: new XRegExp('(\\&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\&gt;|>)', 'gm'),			css: 'color2' },	// <![ ... [ ... ]]>
+			{ regex: SyntaxHighlighter.regexLib.xmlComments,												css: 'comments' },	// <!-- ... -->
+			{ regex: new XRegExp('(&lt;|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(&gt;|>)', 'sg'), func: process }
+		];
+	};
+
+	Brush.prototype	= new SyntaxHighlighter.Highlighter();
+	Brush.aliases	= ['xml', 'xhtml', 'xslt', 'html'];
+
+	SyntaxHighlighter.brushes.Xml = Brush;
+
+	// CommonJS
+	typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();

Різницю між файлами не показано, бо вона завелика
+ 17 - 0
isc-front/Documentation_1_1/js/shCore.js


+ 55 - 0
isc-front/assets/ajax_modal_content.html

@@ -0,0 +1,55 @@
+                    <div class="list list-controls">
+                        <div class="list-item">
+                            <div class="list-datetime">
+                                <div class="time">8:16 am</div>
+                            </div>
+                            <div class="list-info">
+                                <img src="img/example/user/alexey.jpg" class="img-circle img-thumbnail"/>
+                            </div>
+                            <div class="list-text">
+                                <a href="#" class="list-text-name">Brad Pitt</a>
+                                <p>Duis eu libero pellentesque, dapibus ante eu, vehicula leo. Nulla gravida rutrum neque.</p>
+                            </div>
+                            <div class="list-controls">
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-rotate-right"></span></a>
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-pushpin"></span></a>
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-remove"></span></a>
+                            </div>                            
+                        </div>
+                        <div class="list-item">
+                            <div class="list-datetime">
+                                <div class="date">27.08</div>
+                                <div class="time">21:59 pm</div>
+                            </div>
+                            <div class="list-info">
+                                <img src="img/example/user/olga.jpg" class="img-circle img-thumbnail"/>
+                            </div>
+                            <div class="list-text">
+                                <a href="#" class="list-text-name">Angelina Jolie</a>
+                                <p>Morbi tincidunt, tellus ut fermentum accumsan, est justo pretium enim, eget.</p>
+                            </div>
+                            <div class="list-controls">
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-rotate-right"></span></a>
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-pushpin"></span></a>
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-remove"></span></a>
+                            </div>                            
+                        </div>
+                        <div class="list-item">
+                            <div class="list-datetime">
+                                <div class="date">27.08</div>
+                                <div class="time">16:34 pm</div>
+                            </div>
+                            <div class="list-info">
+                                <img src="img/example/user/helen.jpg" class="img-circle img-thumbnail"/>
+                            </div>
+                            <div class="list-text">
+                                <a href="#" class="list-text-name">Keira Knightley</a>
+                                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque condimentum nisl velit.</p>
+                            </div>
+                            <div class="list-controls">
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-rotate-right"></span></a>
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-pushpin"></span></a>
+                                <a href="#" class="widget-icon widget-icon-circle"><span class="icon-remove"></span></a>
+                            </div>                            
+                        </div>                        
+                    </div>

+ 23 - 0
isc-front/assets/elfinder/MySQLStorage.sql

@@ -0,0 +1,23 @@
+DROP TABLE IF EXISTS `elfinder_file`;
+CREATE TABLE IF NOT EXISTS `elfinder_file` (
+  `id`        int(7) unsigned NOT NULL auto_increment,
+  `parent_id` int(7) unsigned NOT NULL,
+  `name`      varchar(256) NOT NULL,
+  `content`   longblob NOT NULL,
+  `size`      int(10) unsigned NOT NULL default '0',
+  `mtime`     int(10) unsigned NOT NULL,
+  `mime`      varchar(256) NOT NULL default 'unknown',
+  `read`      enum('1', '0') NOT NULL default '1',
+  `write`     enum('1', '0') NOT NULL default '1',
+  `locked`    enum('1', '0') NOT NULL default '0',
+  `hidden`    enum('1', '0') NOT NULL default '0',
+  `width`     int(5) NOT NULL,
+  `height`    int(5) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY  `parent_name` (`parent_id`, `name`),
+  KEY         `parent_id`   (`parent_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
+
+INSERT INTO `elfinder_file`
+(`id`, `parent_id`, `name`,     `content`, `size`, `mtime`, `mime`,      `read`, `write`, `locked`, `hidden`, `width`, `height`) VALUES 
+('1',  '0',         'DATABASE', '',        '0',    '0',     'directory', '1',    '1',     '0',      '0',      '0',     '0');

+ 45 - 0
isc-front/assets/elfinder/connector.php

@@ -0,0 +1,45 @@
+<?php
+
+error_reporting(0); // Set E_ALL for debuging
+
+include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderConnector.class.php';
+include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinder.class.php';
+include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderVolumeDriver.class.php';
+include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderVolumeLocalFileSystem.class.php';
+// Required for MySQL storage connector
+// include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderVolumeMySQL.class.php';
+// Required for FTP connector support
+// include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderVolumeFTP.class.php';
+
+
+/**
+ * Simple function to demonstrate how to control file access using "accessControl" callback.
+ * This method will disable accessing files/folders starting from  '.' (dot)
+ *
+ * @param  string  $attr  attribute name (read|write|locked|hidden)
+ * @param  string  $path  file path relative to volume root directory started with directory separator
+ * @return bool|null
+ **/
+function access($attr, $path, $data, $volume) {
+	return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
+		? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
+		:  null;                                    // else elFinder decide it itself
+}
+
+$opts = array(
+	// 'debug' => true,
+	'roots' => array(
+		array(
+			'driver'        => 'LocalFileSystem',   // driver for accessing file system (REQUIRED)
+			'path'          => '../uploads/',         // path to files (REQUIRED)
+			'URL'           => dirname($_SERVER['PHP_SELF']) . '/../uploads/', // URL to files (REQUIRED)
+			'accessControl' => 'access',             // disable and hide dot starting files (OPTIONAL)
+                        'uploadAllow' => array('image')
+		)
+	)
+);
+
+// run elFinder
+$connector = new elFinderConnector(new elFinder($opts));
+$connector->run();
+

Різницю між файлами не показано, бо вона завелика
+ 1103 - 0
isc-front/assets/elfinder/elFinder.class.php


+ 133 - 0
isc-front/assets/elfinder/elFinderConnector.class.php

@@ -0,0 +1,133 @@
+<?php
+
+/**
+ * Default elFinder connector
+ *
+ * @author Dmitry (dio) Levashov
+ **/
+class elFinderConnector {
+	/**
+	 * elFinder instance
+	 *
+	 * @var elFinder
+	 **/
+	protected $elFinder;
+	
+	/**
+	 * Options
+	 *
+	 * @var aray
+	 **/
+	protected $options = array();
+	
+	/**
+	 * undocumented class variable
+	 *
+	 * @var string
+	 **/
+	protected $header = 'Content-Type: application/json';
+	
+	
+	/**
+	 * Constructor
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	public function __construct($elFinder, $debug=false) {
+		
+		$this->elFinder = $elFinder;
+		if ($debug) {
+			$this->header = 'Content-Type: text/html; charset=utf-8';
+		}
+	}
+	
+	/**
+	 * Execute elFinder command and output result
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	public function run() {
+		$isPost = $_SERVER["REQUEST_METHOD"] == 'POST';
+		$src    = $_SERVER["REQUEST_METHOD"] == 'POST' ? $_POST : $_GET;
+		$cmd    = isset($src['cmd']) ? $src['cmd'] : '';
+		$args   = array();
+		
+		if (!function_exists('json_encode')) {
+			$error = $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_JSON);
+			$this->output(array('error' => '{"error":["'.implode('","', $error).'"]}', 'raw' => true));
+		}
+		
+		if (!$this->elFinder->loaded()) {
+			$this->output(array('error' => $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_VOL), 'debug' => $this->elFinder->mountErrors));
+		}
+		
+		// telepat_mode: on
+		if (!$cmd && $isPost) {
+			$this->output(array('error' => $this->elFinder->error(elFinder::ERROR_UPLOAD, elFinder::ERROR_UPLOAD_TOTAL_SIZE), 'header' => 'Content-Type: text/html'));
+		}
+		// telepat_mode: off
+		
+		if (!$this->elFinder->commandExists($cmd)) {
+			$this->output(array('error' => $this->elFinder->error(elFinder::ERROR_UNKNOWN_CMD)));
+		}
+		
+		// collect required arguments to exec command
+		foreach ($this->elFinder->commandArgsList($cmd) as $name => $req) {
+			$arg = $name == 'FILES' 
+				? $_FILES 
+				: (isset($src[$name]) ? $src[$name] : '');
+				
+			if (!is_array($arg)) {
+				$arg = trim($arg);
+			}
+			if ($req && (!isset($arg) || $arg === '')) {
+				$this->output(array('error' => $this->elFinder->error(elFinder::ERROR_INV_PARAMS, $cmd)));
+			}
+			$args[$name] = $arg;
+		}
+		
+		$args['debug'] = isset($src['debug']) ? !!$src['debug'] : false;
+		
+		$this->output($this->elFinder->exec($cmd, $args));
+	}
+	
+	/**
+	 * Output json
+	 *
+	 * @param  array  data to output
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function output(array $data) {
+		$header = isset($data['header']) ? $data['header'] : $this->header;
+		unset($data['header']);
+		if ($header) {
+			if (is_array($header)) {
+				foreach ($header as $h) {
+					header($h);
+				}
+			} else {
+				header($header);
+			}
+		}
+		
+		if (isset($data['pointer'])) {
+			rewind($data['pointer']);
+			fpassthru($data['pointer']);
+			if (!empty($data['volume'])) {
+				$data['volume']->close($data['pointer'], $data['info']['hash']);
+			}
+			exit();
+		} else {
+			if (!empty($data['raw']) && !empty($data['error'])) {
+				exit($data['error']);
+			} else {
+				exit(json_encode($data));
+			}
+		}
+		
+	}
+	
+}// END class 

Різницю між файлами не показано, бо вона завелика
+ 3370 - 0
isc-front/assets/elfinder/elFinderVolumeDriver.class.php


+ 835 - 0
isc-front/assets/elfinder/elFinderVolumeLocalFileSystem.class.php

@@ -0,0 +1,835 @@
+<?php
+
+/**
+ * elFinder driver for local filesystem.
+ *
+ * @author Dmitry (dio) Levashov
+ * @author Troex Nevelin
+ **/
+class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
+	
+	/**
+	 * Driver id
+	 * Must be started from letter and contains [a-z0-9]
+	 * Used as part of volume id
+	 *
+	 * @var string
+	 **/
+	protected $driverId = 'l';
+	
+	/**
+	 * Required to count total archive files size
+	 *
+	 * @var int
+	 **/
+	protected $archiveSize = 0;
+	
+	/**
+	 * Constructor
+	 * Extend options with required fields
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	public function __construct() {
+		$this->options['alias']    = '';              // alias to replace root dir name
+		$this->options['dirMode']  = 0755;            // new dirs mode
+		$this->options['fileMode'] = 0644;            // new files mode
+		$this->options['quarantine'] = '.quarantine';  // quarantine folder name - required to check archive (must be hidden)
+		$this->options['maxArcFilesSize'] = 0;        // max allowed archive files size (0 - no limit)
+	}
+	
+	/*********************************************************************/
+	/*                        INIT AND CONFIGURE                         */
+	/*********************************************************************/
+	
+	/**
+	 * Configure after successfull mount.
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function configure() {
+		$this->aroot = realpath($this->root);
+		$root = $this->stat($this->root);
+		
+		if ($this->options['quarantine']) {
+			$this->attributes[] = array(
+				'pattern' => '~^'.preg_quote(DIRECTORY_SEPARATOR.$this->options['quarantine']).'$~',
+				'read'    => false,
+				'write'   => false,
+				'locked'  => true,
+				'hidden'  => true
+			);
+		}
+		
+		// chek thumbnails path
+		if ($this->options['tmbPath']) {
+			$this->options['tmbPath'] = strpos($this->options['tmbPath'], DIRECTORY_SEPARATOR) === false
+				// tmb path set as dirname under root dir
+				? $this->root.DIRECTORY_SEPARATOR.$this->options['tmbPath']
+				// tmb path as full path
+				: $this->_normpath($this->options['tmbPath']);
+		}
+
+		parent::configure();
+		
+		// if no thumbnails url - try detect it
+		if ($root['read'] && !$this->tmbURL && $this->URL) {
+			if (strpos($this->tmbPath, $this->root) === 0) {
+				$this->tmbURL = $this->URL.str_replace(DIRECTORY_SEPARATOR, '/', substr($this->tmbPath, strlen($this->root)+1));
+				if (preg_match("|[^/?&=]$|", $this->tmbURL)) {
+					$this->tmbURL .= '/';
+				}
+			}
+		}
+
+		// check quarantine dir
+		if (!empty($this->options['quarantine'])) {
+			$this->quarantine = $this->root.DIRECTORY_SEPARATOR.$this->options['quarantine'];
+			if ((!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine'])) || !is_writable($this->quarantine)) {
+				$this->archivers['extract'] = array();
+				$this->disabled[] = 'extract';
+			}
+		} else {
+			$this->archivers['extract'] = array();
+			$this->disabled[] = 'extract';
+		}
+		
+	}
+	
+	/*********************************************************************/
+	/*                               FS API                              */
+	/*********************************************************************/
+
+	/*********************** paths/urls *************************/
+	
+	/**
+	 * Return parent directory path
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _dirname($path) {
+		return dirname($path);
+	}
+
+	/**
+	 * Return file name
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _basename($path) {
+		return basename($path);
+	}
+
+	/**
+	 * Join dir name and file name and retur full path
+	 *
+	 * @param  string  $dir
+	 * @param  string  $name
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _joinPath($dir, $name) {
+		return $dir.DIRECTORY_SEPARATOR.$name;
+	}
+	
+	/**
+	 * Return normalized path, this works the same as os.path.normpath() in Python
+	 *
+	 * @param  string  $path  path
+	 * @return string
+	 * @author Troex Nevelin
+	 **/
+	protected function _normpath($path) {
+		if (empty($path)) {
+			return '.';
+		}
+
+		if (strpos($path, '/') === 0) {
+			$initial_slashes = true;
+		} else {
+			$initial_slashes = false;
+		}
+			
+		if (($initial_slashes) 
+		&& (strpos($path, '//') === 0) 
+		&& (strpos($path, '///') === false)) {
+			$initial_slashes = 2;
+		}
+			
+		$initial_slashes = (int) $initial_slashes;
+
+		$comps = explode('/', $path);
+		$new_comps = array();
+		foreach ($comps as $comp) {
+			if (in_array($comp, array('', '.'))) {
+				continue;
+			}
+				
+			if (($comp != '..') 
+			|| (!$initial_slashes && !$new_comps) 
+			|| ($new_comps && (end($new_comps) == '..'))) {
+				array_push($new_comps, $comp);
+			} elseif ($new_comps) {
+				array_pop($new_comps);
+			}
+		}
+		$comps = $new_comps;
+		$path = implode('/', $comps);
+		if ($initial_slashes) {
+			$path = str_repeat('/', $initial_slashes) . $path;
+		}
+		
+		return $path ? $path : '.';
+	}
+	
+	/**
+	 * Return file path related to root dir
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _relpath($path) {
+		return $path == $this->root ? '' : substr($path, strlen($this->root)+1);
+	}
+	
+	/**
+	 * Convert path related to root dir into real path
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _abspath($path) {
+		return $path == DIRECTORY_SEPARATOR ? $this->root : $this->root.DIRECTORY_SEPARATOR.$path;
+	}
+	
+	/**
+	 * Return fake path started from root dir
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _path($path) {
+		return $this->rootName.($path == $this->root ? '' : $this->separator.$this->_relpath($path));
+	}
+	
+	/**
+	 * Return true if $path is children of $parent
+	 *
+	 * @param  string  $path    path to check
+	 * @param  string  $parent  parent path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _inpath($path, $parent) {
+		return $path == $parent || strpos($path, $parent.DIRECTORY_SEPARATOR) === 0;
+	}
+	
+	
+	
+	/***************** file stat ********************/
+
+	/**
+	 * Return stat for given path.
+	 * Stat contains following fields:
+	 * - (int)    size    file size in b. required
+	 * - (int)    ts      file modification time in unix time. required
+	 * - (string) mime    mimetype. required for folders, others - optionally
+	 * - (bool)   read    read permissions. required
+	 * - (bool)   write   write permissions. required
+	 * - (bool)   locked  is object locked. optionally
+	 * - (bool)   hidden  is object hidden. optionally
+	 * - (string) alias   for symlinks - link target path relative to root path. optionally
+	 * - (string) target  for symlinks - link target path. optionally
+	 *
+	 * If file does not exists - returns empty array or false.
+	 *
+	 * @param  string  $path    file path 
+	 * @return array|false
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _stat($path) {
+		$stat = array();
+
+		if (!file_exists($path)) {
+			return $stat;
+		}
+
+		if ($path != $this->root && is_link($path)) {
+			if (($target = $this->readlink($path)) == false 
+			|| $target == $path) {
+				$stat['mime']  = 'symlink-broken';
+				$stat['read']  = false;
+				$stat['write'] = false;
+				$stat['size']  = 0;
+				return $stat;
+			}
+			$stat['alias']  = $this->_path($target);
+			$stat['target'] = $target;
+			$path  = $target;
+			$lstat = lstat($path);
+			$size  = $lstat['size'];
+		} else {
+			$size = @filesize($path);
+		}
+		
+		$dir = is_dir($path);
+		
+		$stat['mime']  = $dir ? 'directory' : $this->mimetype($path);
+		$stat['ts']    = filemtime($path);
+		$stat['read']  = is_readable($path);
+		$stat['write'] = is_writable($path);
+		if ($stat['read']) {
+			$stat['size'] = $dir ? 0 : $size;
+		}
+		
+		return $stat;
+	}
+	
+
+	/**
+	 * Return true if path is dir and has at least one childs directory
+	 *
+	 * @param  string  $path  dir path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _subdirs($path) {
+
+		if (($dir = dir($path))) {
+			$dir = dir($path);
+			while (($entry = $dir->read()) !== false) {
+				$p = $dir->path.DIRECTORY_SEPARATOR.$entry;
+				if ($entry != '.' && $entry != '..' && is_dir($p) && !$this->attr($p, 'hidden')) {
+					$dir->close();
+					return true;
+				}
+			}
+			$dir->close();
+		}
+		return false;
+	}
+	
+	/**
+	 * Return object width and height
+	 * Ususaly used for images, but can be realize for video etc...
+	 *
+	 * @param  string  $path  file path
+	 * @param  string  $mime  file mime type
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _dimensions($path, $mime) {
+		clearstatcache();
+		return strpos($mime, 'image') === 0 && ($s = @getimagesize($path)) !== false 
+			? $s[0].'x'.$s[1] 
+			: false;
+	}
+	/******************** file/dir content *********************/
+	
+	/**
+	 * Return symlink target file
+	 *
+	 * @param  string  $path  link path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function readlink($path) {
+		if (!($target = @readlink($path))) {
+			return false;
+		}
+		
+		if (substr($target, 0, 1) != DIRECTORY_SEPARATOR) {
+			$target = dirname($path).DIRECTORY_SEPARATOR.$target;
+		}
+		
+		$atarget = realpath($target);
+		
+		if (!$atarget) {
+			return false;
+		}
+		
+		$root  = $this->root;
+		$aroot = $this->aroot;
+
+		if ($this->_inpath($atarget, $this->aroot)) {
+			return $this->_normpath($this->root.DIRECTORY_SEPARATOR.substr($atarget, strlen($this->aroot)+1));
+		}
+
+		return false;
+	}
+		
+	/**
+	 * Return files list in directory.
+	 *
+	 * @param  string  $path  dir path
+	 * @return array
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _scandir($path) {
+		$files = array();
+		
+		foreach (scandir($path) as $name) {
+			if ($name != '.' && $name != '..') {
+				$files[] = $path.DIRECTORY_SEPARATOR.$name;
+			}
+		}
+		return $files;
+	}
+		
+	/**
+	 * Open file and return file pointer
+	 *
+	 * @param  string  $path  file path
+	 * @param  bool    $write open file for writing
+	 * @return resource|false
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _fopen($path, $mode='rb') {
+		return @fopen($path, 'r');
+	}
+	
+	/**
+	 * Close opened file
+	 *
+	 * @param  resource  $fp  file pointer
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _fclose($fp, $path='') {
+		return @fclose($fp);
+	}
+	
+	/********************  file/dir manipulations *************************/
+	
+	/**
+	 * Create dir and return created dir path or false on failed
+	 *
+	 * @param  string  $path  parent dir path
+	 * @param string  $name  new directory name
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _mkdir($path, $name) {
+		$path = $path.DIRECTORY_SEPARATOR.$name;
+
+		if (@mkdir($path)) {
+			@chmod($path, $this->options['dirMode']);
+			return $path;
+		}
+
+		return false;
+	}
+	
+	/**
+	 * Create file and return it's path or false on failed
+	 *
+	 * @param  string  $path  parent dir path
+	 * @param string  $name  new file name
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _mkfile($path, $name) {
+		$path = $path.DIRECTORY_SEPARATOR.$name;
+		
+		if (($fp = @fopen($path, 'w'))) {
+			@fclose($fp);
+			@chmod($path, $this->options['fileMode']);
+			return $path;
+		}
+		return false;
+	}
+	
+	/**
+	 * Create symlink
+	 *
+	 * @param  string  $source     file to link to
+	 * @param  string  $targetDir  folder to create link in
+	 * @param  string  $name       symlink name
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _symlink($source, $targetDir, $name) {
+		return @symlink($source, $targetDir.DIRECTORY_SEPARATOR.$name);
+	}
+	
+	/**
+	 * Copy file into another file
+	 *
+	 * @param  string  $source     source file path
+	 * @param  string  $targetDir  target directory path
+	 * @param  string  $name       new file name
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _copy($source, $targetDir, $name) {
+		return copy($source, $targetDir.DIRECTORY_SEPARATOR.$name);
+	}
+	
+	/**
+	 * Move file into another parent dir.
+	 * Return new file path or false.
+	 *
+	 * @param  string  $source  source file path
+	 * @param  string  $target  target dir path
+	 * @param  string  $name    file name
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _move($source, $targetDir, $name) {
+		$target = $targetDir.DIRECTORY_SEPARATOR.$name;
+		return @rename($source, $target) ? $target : false;
+	}
+		
+	/**
+	 * Remove file
+	 *
+	 * @param  string  $path  file path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _unlink($path) {
+		return @unlink($path);
+	}
+
+	/**
+	 * Remove dir
+	 *
+	 * @param  string  $path  dir path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _rmdir($path) {
+		return @rmdir($path);
+	}
+	
+	/**
+	 * Create new file and write into it from file pointer.
+	 * Return new file path or false on error.
+	 *
+	 * @param  resource  $fp   file pointer
+	 * @param  string    $dir  target dir path
+	 * @param  string    $name file name
+	 * @return bool|string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _save($fp, $dir, $name, $mime, $w, $h) {
+		$path = $dir.DIRECTORY_SEPARATOR.$name;
+
+		if (!($target = @fopen($path, 'wb'))) {
+			return false;
+		}
+
+		while (!feof($fp)) {
+			fwrite($target, fread($fp, 8192));
+		}
+		fclose($target);
+		@chmod($path, $this->options['fileMode']);
+		clearstatcache();
+		return $path;
+	}
+	
+	/**
+	 * Get file contents
+	 *
+	 * @param  string  $path  file path
+	 * @return string|false
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _getContents($path) {
+		return file_get_contents($path);
+	}
+	
+	/**
+	 * Write a string to a file
+	 *
+	 * @param  string  $path     file path
+	 * @param  string  $content  new file content
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _filePutContents($path, $content) {
+		if (@file_put_contents($path, $content, LOCK_EX) !== false) {
+			clearstatcache();
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Detect available archivers
+	 *
+	 * @return void
+	 **/
+	protected function _checkArchivers() {
+		if (!function_exists('exec')) {
+			$this->options['archivers'] = $this->options['archive'] = array();
+			return;
+		}
+		$arcs = array(
+			'create'  => array(),
+			'extract' => array()
+			);
+		
+		//exec('tar --version', $o, $ctar);
+		$this->procExec('tar --version', $o, $ctar);
+
+		if ($ctar == 0) {
+			$arcs['create']['application/x-tar']  = array('cmd' => 'tar', 'argc' => '-cf', 'ext' => 'tar');
+			$arcs['extract']['application/x-tar'] = array('cmd' => 'tar', 'argc' => '-xf', 'ext' => 'tar');
+			//$test = exec('gzip --version', $o, $c);
+			unset($o);
+			$test = $this->procExec('gzip --version', $o, $c);
+
+			if ($c == 0) {
+				$arcs['create']['application/x-gzip']  = array('cmd' => 'tar', 'argc' => '-czf', 'ext' => 'tgz');
+				$arcs['extract']['application/x-gzip'] = array('cmd' => 'tar', 'argc' => '-xzf', 'ext' => 'tgz');
+			}
+			unset($o);
+			//$test = exec('bzip2 --version', $o, $c);
+			$test = $this->procExec('bzip2 --version', $o, $c);
+			if ($c == 0) {
+				$arcs['create']['application/x-bzip2']  = array('cmd' => 'tar', 'argc' => '-cjf', 'ext' => 'tbz');
+				$arcs['extract']['application/x-bzip2'] = array('cmd' => 'tar', 'argc' => '-xjf', 'ext' => 'tbz');
+			}
+		}
+		unset($o);
+		//exec('zip --version', $o, $c);
+		$this->procExec('zip -v', $o, $c);
+		if ($c == 0) {
+			$arcs['create']['application/zip']  = array('cmd' => 'zip', 'argc' => '-r9', 'ext' => 'zip');
+		}
+		unset($o);
+		$this->procExec('unzip --help', $o, $c);
+		if ($c == 0) {
+			$arcs['extract']['application/zip'] = array('cmd' => 'unzip', 'argc' => '',  'ext' => 'zip');
+		} 
+		unset($o);
+		//exec('rar --version', $o, $c);
+		$this->procExec('rar --version', $o, $c);
+		if ($c == 0 || $c == 7) {
+			$arcs['create']['application/x-rar']  = array('cmd' => 'rar', 'argc' => 'a -inul', 'ext' => 'rar');
+			$arcs['extract']['application/x-rar'] = array('cmd' => 'rar', 'argc' => 'x -y',    'ext' => 'rar');
+		} else {
+			unset($o);
+			//$test = exec('unrar', $o, $c);
+			$test = $this->procExec('unrar', $o, $c);
+			if ($c==0 || $c == 7) {
+				$arcs['extract']['application/x-rar'] = array('cmd' => 'unrar', 'argc' => 'x -y', 'ext' => 'rar');
+			}
+		}
+		unset($o);
+		//exec('7za --help', $o, $c);
+		$this->procExec('7za --help', $o, $c);
+		if ($c == 0) {
+			$arcs['create']['application/x-7z-compressed']  = array('cmd' => '7za', 'argc' => 'a', 'ext' => '7z');
+			$arcs['extract']['application/x-7z-compressed'] = array('cmd' => '7za', 'argc' => 'e -y', 'ext' => '7z');
+			
+			if (empty($arcs['create']['application/x-gzip'])) {
+				$arcs['create']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'a -tgzip', 'ext' => 'tar.gz');
+			}
+			if (empty($arcs['extract']['application/x-gzip'])) {
+				$arcs['extract']['application/x-gzip'] = array('cmd' => '7za', 'argc' => 'e -tgzip -y', 'ext' => 'tar.gz');
+			}
+			if (empty($arcs['create']['application/x-bzip2'])) {
+				$arcs['create']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2', 'ext' => 'tar.bz');
+			}
+			if (empty($arcs['extract']['application/x-bzip2'])) {
+				$arcs['extract']['application/x-bzip2'] = array('cmd' => '7za', 'argc' => 'a -tbzip2 -y', 'ext' => 'tar.bz');
+			}
+			if (empty($arcs['create']['application/zip'])) {
+				$arcs['create']['application/zip'] = array('cmd' => '7za', 'argc' => 'a -tzip -l', 'ext' => 'zip');
+			}
+			if (empty($arcs['extract']['application/zip'])) {
+				$arcs['extract']['application/zip'] = array('cmd' => '7za', 'argc' => 'e -tzip -y', 'ext' => 'zip');
+			}
+			if (empty($arcs['create']['application/x-tar'])) {
+				$arcs['create']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'a -ttar -l', 'ext' => 'tar');
+			}
+			if (empty($arcs['extract']['application/x-tar'])) {
+				$arcs['extract']['application/x-tar'] = array('cmd' => '7za', 'argc' => 'e -ttar -y', 'ext' => 'tar');
+			}
+		}
+		
+		$this->archivers = $arcs;
+	}
+
+	/**
+	 * Unpack archive
+	 *
+	 * @param  string  $path  archive path
+	 * @param  array   $arc   archiver command and arguments (same as in $this->archivers)
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 * @author Alexey Sukhotin
+	 **/
+	protected function _unpack($path, $arc) {
+		$cwd = getcwd();
+		$dir = $this->_dirname($path);
+		chdir($dir);
+		$cmd = $arc['cmd'].' '.$arc['argc'].' '.escapeshellarg($this->_basename($path));
+		$this->procExec($cmd, $o, $c);
+		chdir($cwd);
+	}
+
+	/**
+	 * Recursive symlinks search
+	 *
+	 * @param  string  $path  file/dir path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _findSymlinks($path) {
+		if (is_link($path)) {
+			return true;
+		}
+		
+		if (is_dir($path)) {
+			foreach (scandir($path) as $name) {
+				if ($name != '.' && $name != '..') {
+					$p = $path.DIRECTORY_SEPARATOR.$name;
+					if (is_link($p)) {
+						return true;
+					}
+					if (is_dir($p) && $this->_findSymlinks($p)) {
+						return true;
+					} elseif (is_file($p)) {
+						$this->archiveSize += filesize($p);
+					}
+				}
+			}
+		} else {
+			$this->archiveSize += filesize($path);
+		}
+		
+		return false;
+	}
+
+	/**
+	 * Extract files from archive
+	 *
+	 * @param  string  $path  archive path
+	 * @param  array   $arc   archiver command and arguments (same as in $this->archivers)
+	 * @return true
+	 * @author Dmitry (dio) Levashov, 
+	 * @author Alexey Sukhotin
+	 **/
+	protected function _extract($path, $arc) {
+		
+		if ($this->quarantine) {
+			$dir     = $this->quarantine.DIRECTORY_SEPARATOR.str_replace(' ', '_', microtime()).basename($path);
+			$archive = $dir.DIRECTORY_SEPARATOR.basename($path);
+			
+			if (!@mkdir($dir)) {
+				return false;
+			}
+			
+			chmod($dir, 0777);
+			
+			// copy in quarantine
+			if (!copy($path, $archive)) {
+				return false;
+			}
+			
+			// extract in quarantine
+			$this->_unpack($archive, $arc);
+			@unlink($archive);
+			
+			// get files list
+			$ls = array();
+			foreach (scandir($dir) as $i => $name) {
+				if ($name != '.' && $name != '..') {
+					$ls[] = $name;
+				}
+			}
+			
+			// no files - extract error ?
+			if (empty($ls)) {
+				return false;
+			}
+			
+			$this->archiveSize = 0;
+			
+			// find symlinks
+			$symlinks = $this->_findSymlinks($dir);
+			// remove arc copy
+			$this->remove($dir);
+			
+			if ($symlinks) {
+				return $this->setError(elFinder::ERROR_ARC_SYMLINKS);
+			}
+
+			// check max files size
+			if ($this->options['maxArcFilesSize'] > 0 && $this->options['maxArcFilesSize'] < $this->archiveSize) {
+				return $this->setError(elFinder::ERROR_ARC_MAXSIZE);
+			}
+			
+			
+			
+			// archive contains one item - extract in archive dir
+			if (count($ls) == 1) {
+				$this->_unpack($path, $arc);
+				$result = dirname($path).DIRECTORY_SEPARATOR.$ls[0];
+				
+
+			} else {
+				// for several files - create new directory
+				// create unique name for directory
+				$name = basename($path);
+				if (preg_match('/\.((tar\.(gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(gz|bz2)|[a-z0-9]{1,4})$/i', $name, $m)) {
+					$name = substr($name, 0,  strlen($name)-strlen($m[0]));
+				}
+				$test = dirname($path).DIRECTORY_SEPARATOR.$name;
+				if (file_exists($test) || is_link($test)) {
+					$name = $this->uniqueName(dirname($path), $name, '-', false);
+				}
+				
+				$result  = dirname($path).DIRECTORY_SEPARATOR.$name;
+				$archive = $result.DIRECTORY_SEPARATOR.basename($path);
+
+				if (!$this->_mkdir(dirname($path), $name) || !copy($path, $archive)) {
+					return false;
+				}
+				
+				$this->_unpack($archive, $arc);
+				@unlink($archive);
+			}
+			
+			return file_exists($result) ? $result : false;
+		}
+	}
+	
+	/**
+	 * Create archive and return its path
+	 *
+	 * @param  string  $dir    target dir
+	 * @param  array   $files  files names list
+	 * @param  string  $name   archive name
+	 * @param  array   $arc    archiver options
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov, 
+	 * @author Alexey Sukhotin
+	 **/
+	protected function _archive($dir, $files, $name, $arc) {
+		$cwd = getcwd();
+		chdir($dir);
+		
+		$files = array_map('escapeshellarg', $files);
+		
+		$cmd = $arc['cmd'].' '.$arc['argc'].' '.escapeshellarg($name).' '.implode(' ', $files);
+		$this->procExec($cmd, $o, $c);
+		chdir($cwd);
+
+		$path = $dir.DIRECTORY_SEPARATOR.$name;
+		return file_exists($path) ? $path : false;
+	}
+	
+} // END class 

+ 896 - 0
isc-front/assets/elfinder/elFinderVolumeMySQL.class.php

@@ -0,0 +1,896 @@
+<?php
+
+/**
+ * Simple elFinder driver for MySQL.
+ *
+ * @author Dmitry (dio) Levashov
+ **/
+class elFinderVolumeMySQL extends elFinderVolumeDriver {
+	
+	/**
+	 * Driver id
+	 * Must be started from letter and contains [a-z0-9]
+	 * Used as part of volume id
+	 *
+	 * @var string
+	 **/
+	protected $driverId = 'm';
+	
+	/**
+	 * Database object
+	 *
+	 * @var mysqli
+	 **/
+	protected $db = null;
+	
+	/**
+	 * Tables to store files
+	 *
+	 * @var string
+	 **/
+	protected $tbf = '';
+	
+	/**
+	 * Directory for tmp files
+	 * If not set driver will try to use tmbDir as tmpDir
+	 *
+	 * @var string
+	 **/
+	protected $tmpPath = '';
+	
+	/**
+	 * Numbers of sql requests (for debug)
+	 *
+	 * @var int
+	 **/
+	protected $sqlCnt = 0;
+	
+	/**
+	 * Last db error message
+	 *
+	 * @var string
+	 **/
+	protected $dbError = '';
+	
+	/**
+	 * Constructor
+	 * Extend options with required fields
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	public function __construct() {
+		$opts = array(
+			'host'          => 'localhost',
+			'user'          => '',
+			'pass'          => '',
+			'db'            => '',
+			'port'          => null,
+			'socket'        => null,
+			'files_table'   => 'elfinder_file',
+			'tmbPath'       => '',
+			'tmpPath'       => ''
+		);
+		$this->options = array_merge($this->options, $opts);
+		$this->options['mimeDetect'] = 'internal';
+	}
+	
+	/*********************************************************************/
+	/*                        INIT AND CONFIGURE                         */
+	/*********************************************************************/
+	
+	/**
+	 * Prepare driver before mount volume.
+	 * Connect to db, check required tables and fetch root path
+	 *
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function init() {
+		
+		if (!($this->options['host'] || $this->options['socket'])
+		||  !$this->options['user'] 
+		||  !$this->options['pass'] 
+		||  !$this->options['db']
+		||  !$this->options['path']
+		||  !$this->options['files_table']) {
+			return false;
+		}
+		
+		
+		$this->db = new mysqli($this->options['host'], $this->options['user'], $this->options['pass'], $this->options['db'], $this->options['port'], $this->options['socket']);
+		if ($this->db->connect_error || @mysqli_connect_error()) {
+			return false;
+		}
+		
+		$this->db->set_charset('utf8');
+
+		if ($res = $this->db->query('SHOW TABLES')) {
+			while ($row = $res->fetch_array()) {
+				if ($row[0] == $this->options['files_table']) {
+					$this->tbf = $this->options['files_table'];
+					break;
+				}
+			}
+		}
+
+		if (!$this->tbf) {
+			return false;
+		}
+
+		$this->updateCache($this->options['path'], $this->_stat($this->options['path']));
+
+		return true;
+	}
+
+
+
+	/**
+	 * Set tmp path
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function configure() {
+		parent::configure();
+
+		if (($tmp = $this->options['tmpPath'])) {
+			if (!file_exists($tmp)) {
+				if (@mkdir($tmp)) {
+					@chmod($tmp, $this->options['tmbPathMode']);
+				}
+			}
+			
+			$this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false;
+		}
+		
+		if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
+			$this->tmpPath = $this->tmbPath;
+		}
+
+		$this->mimeDetect = 'internal';
+	}
+	
+	/**
+	 * Close connection
+	 *
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 **/
+	public function umount() {
+		$this->db->close();
+	}
+	
+	/**
+	 * Return debug info for client
+	 *
+	 * @return array
+	 * @author Dmitry (dio) Levashov
+	 **/
+	public function debug() {
+		$debug = parent::debug();
+		$debug['sqlCount'] = $this->sqlCnt;
+		if ($this->dbError) {
+			$debug['dbError'] = $this->dbError;
+		}
+		return $debug;
+	}
+
+	/**
+	 * Perform sql query and return result.
+	 * Increase sqlCnt and save error if occured
+	 *
+	 * @param  string  $sql  query
+	 * @return misc
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function query($sql) {
+		$this->sqlCnt++;
+		$res = $this->db->query($sql);
+		if (!$res) {
+			$this->dbError = $this->db->error;
+		}
+		return $res;
+	}
+
+	/**
+	 * Create empty object with required mimetype
+	 *
+	 * @param  string  $path  parent dir path
+	 * @param  string  $name  object name
+	 * @param  string  $mime  mime type
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function make($path, $name, $mime) {
+		$sql = 'INSERT INTO %s (`parent_id`, `name`, `size`, `mtime`, `mime`, `content`, `read`, `write`) VALUES ("%s", "%s", 0, %d, "%s", "", "%d", "%d")';
+		$sql = sprintf($sql, $this->tbf, $path, $this->db->real_escape_string($name), time(), $mime, $this->defaults['read'], $this->defaults['write']);
+		// echo $sql;
+		return $this->query($sql) && $this->db->affected_rows > 0;
+	}
+
+	/**
+	 * Return temporary file path for required file
+	 *
+	 * @param  string  $path   file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function tmpname($path) {
+		return $this->tmpPath.DIRECTORY_SEPARATOR.md5($path);
+	}
+
+	/**
+	 * Resize image
+	 *
+	 * @param  string   $hash    image file
+	 * @param  int      $width   new width
+	 * @param  int      $height  new height
+	 * @param  bool     $crop    crop image
+	 * @return array|false
+	 * @author Dmitry (dio) Levashov
+	 * @author Alexey Sukhotin
+	 **/
+	public function resize($hash, $width, $height, $x, $y, $mode = 'resize', $bg = '', $degree = 0) {
+		if ($this->commandDisabled('resize')) {
+			return $this->setError(elFinder::ERROR_PERM_DENIED);
+		}
+		
+		if (($file = $this->file($hash)) == false) {
+			return $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
+		}
+		
+		if (!$file['write'] || !$file['read']) {
+			return $this->setError(elFinder::ERROR_PERM_DENIED);
+		}
+		
+		$path = $this->decode($hash);
+		
+		if (!$this->canResize($path, $file)) {
+			return $this->setError(elFinder::ERROR_UNSUPPORT_TYPE);
+		}
+
+		$img = $this->tmpname($path);
+		
+		if (!($fp = @fopen($img, 'w+'))) {
+			return false;
+		}
+
+		if (($res = $this->query('SELECT content FROM '.$this->tbf.' WHERE id="'.$path.'"'))
+		&& ($r = $res->fetch_assoc())) {
+			fwrite($fp, $r['content']);
+			rewind($fp);
+			fclose($fp);
+		} else {
+			return false;
+		}
+
+
+		switch($mode) {
+			
+			case 'propresize':
+				$result = $this->imgResize($img, $width, $height, true, true);
+				break;
+
+			case 'crop':
+				$result = $this->imgCrop($img, $width, $height, $x, $y);
+				break;
+
+			case 'fitsquare':
+				$result = $this->imgSquareFit($img, $width, $height, 'center', 'middle', $bg ? $bg : $this->options['tmbBgColor']);
+				break;
+			
+			default:
+				$result = $this->imgResize($img, $width, $height, false, true);
+				break;				
+    	}
+		
+		if ($result) {
+			
+			$sql = sprintf('UPDATE %s SET content=LOAD_FILE("%s"), mtime=UNIX_TIMESTAMP() WHERE id=%d', $this->tbf, $this->loadFilePath($img), $path);
+			
+			if (!$this->query($sql)) {
+				$content = file_get_contents($img);
+				$sql = sprintf('UPDATE %s SET content="%s", mtime=UNIX_TIMESTAMP() WHERE id=%d', $this->tbf, $this->db->real_escape_string($content), $path);
+				if (!$this->query($sql)) {
+					@unlink($img);
+					return false;
+				}
+			}
+			@unlink($img);
+			if (!empty($file['tmb']) && $file['tmb'] != "1") {
+				$this->rmTmb($file['tmb']);
+			}
+			$this->clearcache();
+			return $this->stat($path);
+		}
+		
+   		return false;
+	}
+	
+
+	/*********************************************************************/
+	/*                               FS API                              */
+	/*********************************************************************/
+	
+	/**
+	 * Cache dir contents
+	 *
+	 * @param  string  $path  dir path
+	 * @return void
+	 * @author Dmitry Levashov
+	 **/
+	protected function cacheDir($path) {
+		$this->dirsCache[$path] = array();
+
+		$sql = 'SELECT f.id, f.parent_id, f.name, f.size, f.mtime AS ts, f.mime, f.read, f.write, f.locked, f.hidden, f.width, f.height, IF(ch.id, 1, 0) AS dirs 
+				FROM '.$this->tbf.' AS f 
+				LEFT JOIN '.$this->tbf.' AS ch ON ch.parent_id=f.id AND ch.mime="directory"
+				WHERE f.parent_id="'.$path.'"
+				GROUP BY f.id';
+				
+		$res = $this->query($sql);
+		if ($res) {
+			while ($row = $res->fetch_assoc()) {
+				// debug($row);
+				$id = $row['id'];
+				if ($row['parent_id']) {
+					$row['phash'] = $this->encode($row['parent_id']);
+				} 
+				
+				if ($row['mime'] == 'directory') {
+					unset($row['width']);
+					unset($row['height']);
+				} else {
+					unset($row['dirs']);
+				}
+				
+				unset($row['id']);
+				unset($row['parent_id']);
+				
+				
+				
+				if (($stat = $this->updateCache($id, $row)) && empty($stat['hidden'])) {
+					$this->dirsCache[$path][] = $id;
+				}
+			}
+		}
+		
+		return $this->dirsCache[$path];
+	}
+
+	/**
+	 * Return array of parents paths (ids)
+	 *
+	 * @param  int   $path  file path (id)
+	 * @return array
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function getParents($path) {
+		$parents = array();
+
+		while ($path) {
+			if ($file = $this->stat($path)) {
+				array_unshift($parents, $path);
+				$path = isset($file['phash']) ? $this->decode($file['phash']) : false;
+			}
+		}
+		
+		if (count($parents)) {
+			array_pop($parents);
+		}
+		return $parents;
+	}
+
+	/**
+	 * Return correct file path for LOAD_FILE method
+	 *
+	 * @param  string $path  file path (id)
+	 * @return string
+	 * @author Troex Nevelin
+	 **/
+	protected function loadFilePath($path) {
+		$realPath = realpath($path);
+		if (DIRECTORY_SEPARATOR == '\\') { // windows
+			$realPath = str_replace('\\', '\\\\', $realPath);
+		}
+		return $this->db->real_escape_string($realPath);
+	}
+
+	/*********************** paths/urls *************************/
+	
+	/**
+	 * Return parent directory path
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _dirname($path) {
+		return ($stat = $this->stat($path)) ? ($stat['phash'] ? $this->decode($stat['phash']) : $this->root) : false;
+	}
+
+	/**
+	 * Return file name
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _basename($path) {
+		return ($stat = $this->stat($path)) ? $stat['name'] : false;
+	}
+
+	/**
+	 * Join dir name and file name and return full path
+	 *
+	 * @param  string  $dir
+	 * @param  string  $name
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _joinPath($dir, $name) {
+		$sql = 'SELECT id FROM '.$this->tbf.' WHERE parent_id="'.$dir.'" AND name="'.$this->db->real_escape_string($name).'"';
+
+		if (($res = $this->query($sql)) && ($r = $res->fetch_assoc())) {
+			$this->updateCache($r['id'], $this->_stat($r['id']));
+			return $r['id'];
+		}
+		return -1;
+	}
+	
+	/**
+	 * Return normalized path, this works the same as os.path.normpath() in Python
+	 *
+	 * @param  string  $path  path
+	 * @return string
+	 * @author Troex Nevelin
+	 **/
+	protected function _normpath($path) {
+		return $path;
+	}
+	
+	/**
+	 * Return file path related to root dir
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _relpath($path) {
+		return $path;
+	}
+	
+	/**
+	 * Convert path related to root dir into real path
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _abspath($path) {
+		return $path;
+	}
+	
+	/**
+	 * Return fake path started from root dir
+	 *
+	 * @param  string  $path  file path
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _path($path) {
+		if (($file = $this->stat($path)) == false) {
+			return '';
+		}
+		
+		$parentsIds = $this->getParents($path);
+		$path = '';
+		foreach ($parentsIds as $id) {
+			$dir = $this->stat($id);
+			$path .= $dir['name'].$this->separator;
+		}
+		return $path.$file['name'];
+	}
+	
+	/**
+	 * Return true if $path is children of $parent
+	 *
+	 * @param  string  $path    path to check
+	 * @param  string  $parent  parent path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _inpath($path, $parent) {
+		return $path == $parent
+			? true
+			: in_array($parent, $this->getParents($path));
+	}
+	
+	/***************** file stat ********************/
+	/**
+	 * Return stat for given path.
+	 * Stat contains following fields:
+	 * - (int)    size    file size in b. required
+	 * - (int)    ts      file modification time in unix time. required
+	 * - (string) mime    mimetype. required for folders, others - optionally
+	 * - (bool)   read    read permissions. required
+	 * - (bool)   write   write permissions. required
+	 * - (bool)   locked  is object locked. optionally
+	 * - (bool)   hidden  is object hidden. optionally
+	 * - (string) alias   for symlinks - link target path relative to root path. optionally
+	 * - (string) target  for symlinks - link target path. optionally
+	 *
+	 * If file does not exists - returns empty array or false.
+	 *
+	 * @param  string  $path    file path 
+	 * @return array|false
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _stat($path) {
+		$sql = 'SELECT f.id, f.parent_id, f.name, f.size, f.mtime AS ts, f.mime, f.read, f.write, f.locked, f.hidden, f.width, f.height, IF(ch.id, 1, 0) AS dirs
+				FROM '.$this->tbf.' AS f 
+				LEFT JOIN '.$this->tbf.' AS p ON p.id=f.parent_id
+				LEFT JOIN '.$this->tbf.' AS ch ON ch.parent_id=f.id AND ch.mime="directory"
+				WHERE f.id="'.$path.'"
+				GROUP BY f.id';
+
+		$res = $this->query($sql);
+		
+		if ($res) {
+			$stat = $res->fetch_assoc();
+			if ($stat['parent_id']) {
+				$stat['phash'] = $this->encode($stat['parent_id']);
+			} 
+			if ($stat['mime'] == 'directory') {
+				unset($stat['width']);
+				unset($stat['height']);
+			} else {
+				unset($stat['dirs']);
+			}
+			unset($stat['id']);
+			unset($stat['parent_id']);
+			return $stat;
+			
+		}
+		return array();
+	}
+	
+	/**
+	 * Return true if path is dir and has at least one childs directory
+	 *
+	 * @param  string  $path  dir path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _subdirs($path) {
+		return ($stat = $this->stat($path)) && isset($stat['dirs']) ? $stat['dirs'] : false;
+	}
+	
+	/**
+	 * Return object width and height
+	 * Usualy used for images, but can be realize for video etc...
+	 *
+	 * @param  string  $path  file path
+	 * @param  string  $mime  file mime type
+	 * @return string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _dimensions($path, $mime) {
+		return ($stat = $this->stat($path)) && isset($stat['width']) && isset($stat['height']) ? $stat['width'].'x'.$stat['height'] : '';
+	}
+	
+	/******************** file/dir content *********************/
+		
+	/**
+	 * Return files list in directory.
+	 *
+	 * @param  string  $path  dir path
+	 * @return array
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _scandir($path) {
+		return isset($this->dirsCache[$path])
+			? $this->dirsCache[$path]
+			: $this->cacheDir($path);
+	}
+		
+	/**
+	 * Open file and return file pointer
+	 *
+	 * @param  string  $path  file path
+	 * @param  string  $mode  open file mode (ignored in this driver)
+	 * @return resource|false
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _fopen($path, $mode='rb') {
+		$fp = $this->tmbPath
+			? @fopen($this->tmpname($path), 'w+')
+			: @tmpfile();
+		
+		
+		if ($fp) {
+			if (($res = $this->query('SELECT content FROM '.$this->tbf.' WHERE id="'.$path.'"'))
+			&& ($r = $res->fetch_assoc())) {
+				fwrite($fp, $r['content']);
+				rewind($fp);
+				return $fp;
+			} else {
+				$this->_fclose($fp, $path);
+			}
+		}
+		
+		return false;
+	}
+	
+	/**
+	 * Close opened file
+	 *
+	 * @param  resource  $fp  file pointer
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _fclose($fp, $path='') {
+		@fclose($fp);
+		if ($path) {
+			@unlink($this->tmpname($path));
+		}
+	}
+	
+	/********************  file/dir manipulations *************************/
+	
+	/**
+	 * Create dir and return created dir path or false on failed
+	 *
+	 * @param  string  $path  parent dir path
+	 * @param string  $name  new directory name
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _mkdir($path, $name) {
+		return $this->make($path, $name, 'directory') ? $this->_joinPath($path, $name) : false;
+	}
+	
+	/**
+	 * Create file and return it's path or false on failed
+	 *
+	 * @param  string  $path  parent dir path
+	 * @param string  $name  new file name
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _mkfile($path, $name) {
+		return $this->make($path, $name, 'text/plain') ? $this->_joinPath($path, $name) : false;
+	}
+	
+	/**
+	 * Create symlink. FTP driver does not support symlinks.
+	 *
+	 * @param  string  $target  link target
+	 * @param  string  $path    symlink path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _symlink($target, $path, $name) {
+		return false;
+	}
+	
+	/**
+	 * Copy file into another file
+	 *
+	 * @param  string  $source     source file path
+	 * @param  string  $targetDir  target directory path
+	 * @param  string  $name       new file name
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _copy($source, $targetDir, $name) {
+		$this->clearcache();
+		$id = $this->_joinPath($targetDir, $name);
+
+		$sql = $id > 0
+			? sprintf('REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height, `read`, `write`, `locked`, `hidden`) (SELECT %d, %d, name, content, size, mtime, mime, width, height, `read`, `write`, `locked`, `hidden` FROM %s WHERE id=%d)', $this->tbf, $id, $this->_dirname($id), $this->tbf, $source)
+			: sprintf('INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height, `read`, `write`, `locked`, `hidden`) SELECT %d, "%s", content, size, %d, mime, width, height, `read`, `write`, `locked`, `hidden` FROM %s WHERE id=%d', $this->tbf, $targetDir, $this->db->real_escape_string($name), time(), $this->tbf, $source);
+
+		return $this->query($sql);
+	}
+	
+	/**
+	 * Move file into another parent dir.
+	 * Return new file path or false.
+	 *
+	 * @param  string  $source  source file path
+	 * @param  string  $target  target dir path
+	 * @param  string  $name    file name
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _move($source, $targetDir, $name) {
+		$sql = 'UPDATE %s SET parent_id=%d, name="%s" WHERE id=%d LIMIT 1';
+		$sql = sprintf($sql, $this->tbf, $targetDir, $this->db->real_escape_string($name), $source);
+		return $this->query($sql) && $this->db->affected_rows > 0;
+	}
+		
+	/**
+	 * Remove file
+	 *
+	 * @param  string  $path  file path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _unlink($path) {
+		return $this->query(sprintf('DELETE FROM %s WHERE id=%d AND mime!="directory" LIMIT 1', $this->tbf, $path)) && $this->db->affected_rows;
+	}
+
+	/**
+	 * Remove dir
+	 *
+	 * @param  string  $path  dir path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _rmdir($path) {
+		return $this->query(sprintf('DELETE FROM %s WHERE id=%d AND mime="directory" LIMIT 1', $this->tbf, $path)) && $this->db->affected_rows;
+	}
+	
+	/**
+	 * undocumented function
+	 *
+	 * @return void
+	 * @author Dmitry Levashov
+	 **/
+	protected function _setContent($path, $fp) {
+		rewind($fp);
+		$fstat = fstat($fp);
+		$size = $fstat['size'];
+		
+		
+	}
+	
+	/**
+	 * Create new file and write into it from file pointer.
+	 * Return new file path or false on error.
+	 *
+	 * @param  resource  $fp   file pointer
+	 * @param  string    $dir  target dir path
+	 * @param  string    $name file name
+	 * @return bool|string
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _save($fp, $dir, $name, $mime, $w, $h) {
+		$this->clearcache();
+		
+		$id = $this->_joinPath($dir, $name);
+		rewind($fp);
+		$stat = fstat($fp);
+		$size = $stat['size'];
+		
+		if (($tmpfile = tempnam($this->tmpPath, $this->id))) {
+			if (($trgfp = fopen($tmpfile, 'wb')) == false) {
+				unlink($tmpfile);
+			} else {
+				while (!feof($fp)) {
+					fwrite($trgfp, fread($fp, 8192));
+				}
+				fclose($trgfp);
+				
+				$sql = $id > 0
+					? 'REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height) VALUES ('.$id.', %d, "%s", LOAD_FILE("%s"), %d, %d, "%s", %d, %d)'
+					: 'INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height) VALUES (%d, "%s", LOAD_FILE("%s"), %d, %d, "%s", %d, %d)';
+				$sql = sprintf($sql, $this->tbf, $dir, $this->db->real_escape_string($name), $this->loadFilePath($tmpfile), $size, time(), $mime, $w, $h);
+
+				$res = $this->query($sql);
+				unlink($tmpfile);
+				
+				if ($res) {
+					return $id > 0 ? $id : $this->db->insert_id;
+				}
+			}
+		}
+
+		
+		$content = '';
+		rewind($fp);
+		while (!feof($fp)) {
+			$content .= fread($fp, 8192);
+		}
+		
+		$sql = $id > 0
+			? 'REPLACE INTO %s (id, parent_id, name, content, size, mtime, mime, width, height) VALUES ('.$id.', %d, "%s", "%s", %d, %d, "%s", %d, %d)'
+			: 'INSERT INTO %s (parent_id, name, content, size, mtime, mime, width, height) VALUES (%d, "%s", "%s", %d, %d, "%s", %d, %d)';
+		$sql = sprintf($sql, $this->tbf, $dir, $this->db->real_escape_string($name), $this->db->real_escape_string($content), $size, time(), $mime, $w, $h);
+		
+		unset($content);
+
+		if ($this->query($sql)) {
+			return $id > 0 ? $id : $this->db->insert_id;
+		}
+		
+		return false;
+	}
+	
+	/**
+	 * Get file contents
+	 *
+	 * @param  string  $path  file path
+	 * @return string|false
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _getContents($path) {
+		return ($res = $this->query(sprintf('SELECT content FROM %s WHERE id=%d', $this->tbf, $path))) && ($r = $res->fetch_assoc()) ? $r['content'] : false;
+	}
+	
+	/**
+	 * Write a string to a file
+	 *
+	 * @param  string  $path     file path
+	 * @param  string  $content  new file content
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _filePutContents($path, $content) {
+		return $this->query(sprintf('UPDATE %s SET content="%s", size=%d, mtime=%d WHERE id=%d LIMIT 1', $this->tbf, $this->db->real_escape_string($content), strlen($content), time(), $path));
+	}
+
+	/**
+	 * Detect available archivers
+	 *
+	 * @return void
+	 **/
+	protected function _checkArchivers() {
+		return;
+	}
+
+	/**
+	 * Unpack archive
+	 *
+	 * @param  string  $path  archive path
+	 * @param  array   $arc   archiver command and arguments (same as in $this->archivers)
+	 * @return void
+	 * @author Dmitry (dio) Levashov
+	 * @author Alexey Sukhotin
+	 **/
+	protected function _unpack($path, $arc) {
+		return;
+	}
+
+	/**
+	 * Recursive symlinks search
+	 *
+	 * @param  string  $path  file/dir path
+	 * @return bool
+	 * @author Dmitry (dio) Levashov
+	 **/
+	protected function _findSymlinks($path) {
+		return false;
+	}
+
+	/**
+	 * Extract files from archive
+	 *
+	 * @param  string  $path  archive path
+	 * @param  array   $arc   archiver command and arguments (same as in $this->archivers)
+	 * @return true
+	 * @author Dmitry (dio) Levashov, 
+	 * @author Alexey Sukhotin
+	 **/
+	protected function _extract($path, $arc) {
+		return false;
+	}
+	
+	/**
+	 * Create archive and return its path
+	 *
+	 * @param  string  $dir    target dir
+	 * @param  array   $files  files names list
+	 * @param  string  $name   archive name
+	 * @param  array   $arc    archiver options
+	 * @return string|bool
+	 * @author Dmitry (dio) Levashov, 
+	 * @author Alexey Sukhotin
+	 **/
+	protected function _archive($dir, $files, $name, $arc) {
+		return false;
+	}
+	
+} // END class 

+ 512 - 0
isc-front/assets/elfinder/mime.types

@@ -0,0 +1,512 @@
+# This file controls what Internet media types are sent to the client for
+# given file extension(s).  Sending the correct media type to the client
+# is important so they know how to handle the content of the file.
+# For more information about Internet media types, please read 
+# RFC 2045, 2046, 2047, 2048, and 2077.  The Internet media type
+# registry is at <ftp://ftp.iana.org/assignments/media-types/>.
+
+# MIME type			Extension
+application/andrew-inset ez
+application/chemtool cht
+application/dicom dcm
+application/docbook+xml docbook
+application/ecmascript ecma
+application/flash-video flv
+application/illustrator ai
+application/javascript js
+application/mac-binhex40
+application/mathematica nb
+application/msword doc
+application/octet-stream bin
+application/oda oda
+application/ogg ogg
+application/pdf pdf
+application/pgp pgp
+application/pgp-encrypted
+application/pgp-encrypted pgp gpg
+application/pgp-keys
+application/pgp-keys skr pkr
+application/pgp-signature
+application/pgp-signature sig
+application/pkcs7-mime
+application/pkcs7-signature p7s
+application/postscript ps
+application/rtf rtf
+application/sdp sdp
+application/smil smil smi sml
+application/stuffit sit
+application/vnd.corel-draw cdr
+application/vnd.hp-hpgl hpgl
+application/vnd.hp-pcl pcl
+application/vnd.lotus-1-2-3 123 wk1 wk3 wk4 wks
+application/vnd.mozilla.xul+xml xul
+application/vnd.ms-excel xls xlc xll xlm xlw xla xlt xld
+application/vnd.ms-powerpoint ppz ppt pps pot
+application/vnd.oasis.opendocument.chart odc
+application/vnd.oasis.opendocument.database odb
+application/vnd.oasis.opendocument.formula odf
+application/vnd.oasis.opendocument.graphics odg
+application/vnd.oasis.opendocument.graphics-template otg
+application/vnd.oasis.opendocument.image odi
+application/vnd.oasis.opendocument.presentation odp
+application/vnd.oasis.opendocument.presentation-template otp
+application/vnd.oasis.opendocument.spreadsheet ods
+application/vnd.oasis.opendocument.spreadsheet-template ots
+application/vnd.oasis.opendocument.text odt
+application/vnd.oasis.opendocument.text-master odm
+application/vnd.oasis.opendocument.text-template ott
+application/vnd.oasis.opendocument.text-web oth
+application/vnd.palm pdb
+application/vnd.rn-realmedia
+application/vnd.rn-realmedia rm
+application/vnd.rn-realmedia-secure rms
+application/vnd.rn-realmedia-vbr rmvb
+application/vnd.stardivision.calc sdc
+application/vnd.stardivision.chart sds
+application/vnd.stardivision.draw sda
+application/vnd.stardivision.impress sdd sdp
+application/vnd.stardivision.mail smd
+application/vnd.stardivision.math smf
+application/vnd.stardivision.writer sdw vor sgl
+application/vnd.sun.xml.calc sxc
+application/vnd.sun.xml.calc.template stc
+application/vnd.sun.xml.draw sxd
+application/vnd.sun.xml.draw.template std
+application/vnd.sun.xml.impress sxi
+application/vnd.sun.xml.impress.template sti
+application/vnd.sun.xml.math sxm
+application/vnd.sun.xml.writer sxw
+application/vnd.sun.xml.writer.global sxg
+application/vnd.sun.xml.writer.template stw
+application/vnd.wordperfect wpd
+application/x-abiword abw abw.CRASHED abw.gz zabw
+application/x-amipro sam
+application/x-anjuta-project prj
+application/x-applix-spreadsheet as
+application/x-applix-word aw
+application/x-arc
+application/x-archive a
+application/x-arj arj
+application/x-asax asax
+application/x-ascx ascx
+application/x-ashx ashx
+application/x-asix asix
+application/x-asmx asmx
+application/x-asp asp
+application/x-awk
+application/x-axd axd
+application/x-bcpio bcpio
+application/x-bittorrent torrent
+application/x-blender blender blend BLEND
+application/x-bzip bz bz2
+application/x-bzip bz2 bz
+application/x-bzip-compressed-tar tar.bz tar.bz2
+application/x-bzip-compressed-tar tar.bz tar.bz2 tbz tbz2
+application/x-cd-image iso
+application/x-cgi cgi
+application/x-chess-pgn pgn
+application/x-chm chm
+application/x-class-file
+application/x-cmbx cmbx
+application/x-compress Z
+application/x-compressed-tar tar.gz tar.Z tgz taz
+application/x-compressed-tar tar.gz tgz
+application/x-config config
+application/x-core
+application/x-cpio cpio
+application/x-cpio-compressed cpio.gz
+application/x-csh csh
+application/x-cue cue
+application/x-dbase dbf
+application/x-dbm
+application/x-dc-rom dc
+application/x-deb deb
+application/x-designer ui
+application/x-desktop desktop kdelnk
+application/x-devhelp devhelp
+application/x-dia-diagram dia
+application/x-disco disco
+application/x-dvi dvi
+application/x-e-theme etheme
+application/x-egon egon
+application/x-executable exe
+application/x-font-afm afm
+application/x-font-bdf bdf
+application/x-font-dos
+application/x-font-framemaker
+application/x-font-libgrx
+application/x-font-linux-psf psf
+application/x-font-otf
+application/x-font-pcf pcf
+application/x-font-pcf pcf.gz
+application/x-font-speedo spd
+application/x-font-sunos-news
+application/x-font-tex
+application/x-font-tex-tfm
+application/x-font-ttf ttc TTC
+application/x-font-ttf ttf
+application/x-font-type1 pfa pfb gsf pcf.Z
+application/x-font-vfont
+application/x-frame
+application/x-frontline aop
+application/x-gameboy-rom gb
+application/x-gdbm
+application/x-gdesklets-display display
+application/x-genesis-rom gen md
+application/x-gettext-translation gmo
+application/x-glabels glabels
+application/x-glade glade
+application/x-gmc-link
+application/x-gnome-db-connection connection
+application/x-gnome-db-database database
+application/x-gnome-stones caves
+application/x-gnucash gnucash gnc xac
+application/x-gnumeric gnumeric
+application/x-graphite gra
+application/x-gtar gtar
+application/x-gtktalog
+application/x-gzip gz
+application/x-gzpostscript ps.gz
+application/x-hdf hdf
+application/x-ica ica
+application/x-ipod-firmware
+application/x-jamin jam
+application/x-jar jar
+application/x-java class
+application/x-java-archive jar ear war
+
+application/x-jbuilder-project jpr jpx
+application/x-karbon karbon
+application/x-kchart chrt
+application/x-kformula kfo
+application/x-killustrator kil
+application/x-kivio flw
+application/x-kontour kon
+application/x-kpovmodeler kpm
+application/x-kpresenter kpr kpt
+application/x-krita kra
+application/x-kspread ksp
+application/x-kspread-crypt
+application/x-ksysv-package
+application/x-kugar kud
+application/x-kword kwd kwt
+application/x-kword-crypt
+application/x-lha lha lzh
+application/x-lha lzh
+application/x-lhz lhz
+application/x-linguist ts
+application/x-lyx lyx
+application/x-lzop lzo
+application/x-lzop-compressed-tar tar.lzo tzo
+application/x-macbinary
+application/x-machine-config
+application/x-magicpoint mgp
+application/x-master-page master
+application/x-matroska mkv
+application/x-mdp mdp
+application/x-mds mds
+application/x-mdsx mdsx
+application/x-mergeant mergeant
+application/x-mif mif
+application/x-mozilla-bookmarks
+application/x-mps mps
+application/x-ms-dos-executable exe
+application/x-mswinurl
+application/x-mswrite wri
+application/x-msx-rom msx
+application/x-n64-rom n64
+application/x-nautilus-link
+application/x-nes-rom nes
+application/x-netcdf cdf nc
+application/x-netscape-bookmarks
+application/x-object o
+application/x-ole-storage
+application/x-oleo oleo
+application/x-palm-database
+application/x-palm-database pdb prc
+application/x-par2 PAR2 par2
+application/x-pef-executable
+application/x-perl pl pm al perl
+application/x-php php php3 php4
+application/x-pkcs12 p12 pfx
+application/x-planner planner mrproject
+application/x-planperfect pln
+application/x-prjx prjx
+application/x-profile
+application/x-ptoptimizer-script pto
+application/x-pw pw
+application/x-python-bytecode pyc pyo
+application/x-quattro-pro wb1 wb2 wb3
+application/x-quattropro wb1 wb2 wb3
+application/x-qw qif
+application/x-rar rar
+application/x-rar-compressed rar
+application/x-rdp rdp
+application/x-reject rej
+application/x-remoting rem
+application/x-resources resources
+application/x-resourcesx resx
+application/x-rpm rpm
+application/x-ruby
+application/x-sc
+application/x-sc sc
+application/x-scribus sla sla.gz scd scd.gz
+application/x-shar shar
+application/x-shared-library-la la
+application/x-sharedlib so
+application/x-shellscript sh
+application/x-shockwave-flash swf
+application/x-siag siag
+application/x-slp
+application/x-smil kino
+application/x-smil smi smil
+application/x-sms-rom sms gg
+application/x-soap-remoting soap
+application/x-streamingmedia ssm
+application/x-stuffit
+application/x-stuffit bin sit
+application/x-sv4cpio sv4cpio
+application/x-sv4crc sv4crc
+application/x-tar tar
+application/x-tarz tar.Z
+application/x-tex-gf gf
+application/x-tex-pk k
+application/x-tgif obj
+application/x-theme theme
+application/x-toc toc
+application/x-toutdoux
+application/x-trash   bak old sik
+application/x-troff tr roff t
+application/x-troff-man man
+application/x-troff-man-compressed
+application/x-tzo tar.lzo tzo
+application/x-ustar ustar
+application/x-wais-source src
+application/x-web-config
+application/x-wpg wpg
+application/x-wsdl wsdl
+application/x-x509-ca-cert der cer crt cert pem
+application/x-xbel xbel
+application/x-zerosize
+application/x-zoo zoo
+application/xhtml+xml xhtml
+application/zip zip
+audio/ac3 ac3
+audio/basic au snd
+audio/midi mid midi
+audio/mpeg mp3
+audio/prs.sid sid psid
+audio/vnd.rn-realaudio ra
+audio/x-aac aac
+audio/x-adpcm
+audio/x-aifc
+audio/x-aiff aif aiff
+audio/x-aiff aiff aif aifc
+audio/x-aiffc
+audio/x-flac flac
+audio/x-m4a m4a
+audio/x-mod mod ult uni XM m15 mtm 669
+audio/x-mp3-playlist
+audio/x-mpeg
+audio/x-mpegurl m3u
+audio/x-ms-asx
+audio/x-pn-realaudio ra ram rm
+audio/x-pn-realaudio ram rmm
+audio/x-riff
+audio/x-s3m s3m
+audio/x-scpls pls
+audio/x-scpls pls xpl
+audio/x-stm stm
+audio/x-voc voc
+audio/x-wav wav
+audio/x-xi xi
+audio/x-xm xm
+image/bmp bmp
+image/cgm cgm
+image/dpx
+image/fax-g3 g3
+image/g3fax
+image/gif gif
+image/ief ief
+image/jpeg jpeg jpg jpe
+image/jpeg2000 jp2
+image/png png
+image/rle rle
+image/svg+xml svg
+image/tiff tif tiff
+image/vnd.djvu djvu djv
+image/vnd.dwg dwg
+image/vnd.dxf dxf
+image/x-3ds 3ds
+image/x-applix-graphics ag
+image/x-cmu-raster ras
+image/x-compressed-xcf xcf.gz xcf.bz2
+image/x-dcraw bay BAY bmq BMQ cr2 CR2 crw CRW cs1 CS1 dc2 DC2 dcr DCR fff FFF k25 K25 kdc KDC mos MOS mrw MRW nef NEF orf ORF pef PEF raf RAF rdc RDC srf SRF x3f X3F
+image/x-dib
+image/x-eps eps epsi epsf
+image/x-fits fits
+image/x-fpx
+image/x-icb icb
+image/x-ico ico
+image/x-iff iff
+image/x-ilbm ilbm
+image/x-jng jng
+image/x-lwo lwo lwob
+image/x-lws lws
+image/x-msod msod
+image/x-niff
+image/x-pcx
+image/x-photo-cd pcd
+image/x-pict pict pict1 pict2
+image/x-portable-anymap pnm
+image/x-portable-bitmap pbm
+image/x-portable-graymap pgm
+image/x-portable-pixmap ppm
+image/x-psd psd
+image/x-rgb rgb
+image/x-sgi sgi
+image/x-sun-raster sun
+image/x-tga tga
+image/x-win-bitmap cur
+image/x-wmf wmf
+image/x-xbitmap xbm
+image/x-xcf xcf
+image/x-xfig fig
+image/x-xpixmap xpm
+image/x-xwindowdump xwd
+inode/blockdevice
+inode/chardevice
+inode/directory
+inode/fifo
+inode/mount-point
+inode/socket
+inode/symlink
+message/delivery-status
+message/disposition-notification
+message/external-body
+message/news
+message/partial
+message/rfc822
+message/x-gnu-rmail
+model/vrml wrl
+multipart/alternative
+multipart/appledouble
+multipart/digest
+multipart/encrypted
+multipart/mixed
+multipart/related
+multipart/report
+multipart/signed
+multipart/x-mixed-replace
+text/calendar vcs ics
+text/css css CSSL
+text/directory vcf vct gcrd
+text/enriched
+text/html html htm
+text/htmlh
+text/mathml mml
+text/plain txt asc
+text/rdf rdf
+text/rfc822-headers
+text/richtext rtx
+text/rss rss
+text/sgml sgml sgm
+text/spreadsheet sylk slk
+text/tab-separated-values tsv
+text/vnd.rn-realtext rt
+text/vnd.wap.wml wml
+text/x-adasrc adb ads
+text/x-authors
+text/x-bibtex bib
+text/x-boo boo
+text/x-c++hdr hh
+text/x-c++src cpp cxx cc C c++
+text/x-chdr h h++ hp
+text/x-comma-separated-values csv
+text/x-copying
+text/x-credits
+text/x-csrc c
+text/x-dcl dcl
+text/x-dsl dsl
+text/x-dsrc d
+text/x-dtd dtd
+text/x-emacs-lisp el
+text/x-fortran f
+text/x-gettext-translation po
+text/x-gettext-translation-template pot
+text/x-gtkrc
+text/x-haskell hs
+text/x-idl idl
+text/x-install
+text/x-java java
+text/x-js js
+text/x-ksysv-log
+text/x-literate-haskell lhs
+text/x-log log
+text/x-makefile
+text/x-moc moc
+text/x-msil il
+text/x-nemerle n
+text/x-objcsrc m
+text/x-pascal p pas
+text/x-patch diff patch
+text/x-python py
+text/x-readme
+text/x-rng rng
+text/x-scheme scm
+text/x-setext etx
+text/x-speech
+text/x-sql sql
+text/x-suse-ymp ymp
+text/x-suse-ymu ymu
+text/x-tcl tcl tk
+text/x-tex tex ltx sty cls
+text/x-texinfo texi texinfo
+text/x-texmacs tm ts
+text/x-troff-me me
+text/x-troff-mm mm
+text/x-troff-ms ms
+text/x-uil uil
+text/x-uri uri url
+text/x-vb vb
+text/x-xds xds
+text/x-xmi xmi
+text/x-xsl xsl
+text/x-xslfo fo xslfo
+text/x-xslt xslt xsl
+text/xmcd
+text/xml xml
+video/3gpp 3gp
+video/dv dv dif
+video/isivideo
+video/mpeg mpeg mpg mp2 mpe vob dat
+video/quicktime qt mov moov qtvr
+video/vivo
+video/vnd.rn-realvideo rv
+video/wavelet
+video/x-3gpp2 3g2
+video/x-anim anim[1-9j]
+video/x-avi
+video/x-flic fli flc
+video/x-mng mng
+video/x-ms-asf asf asx
+video/x-ms-wmv wmv
+video/x-msvideo avi
+video/x-nsv nsv NSV
+video/x-real-video
+video/x-sgi-movie movie
+application/x-java-jnlp-file      jnlp
+application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
+application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
+application/vnd.ms-word.document.macroEnabled.12 docm
+application/vnd.ms-word.template.macroEnabled.12 dotm
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
+application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
+application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
+application/vnd.ms-excel.template.macroEnabled.12 xltm
+application/vnd.ms-excel.addin.macroEnabled.12 xlam
+application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
+application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
+application/vnd.openxmlformats-officedocument.presentationml.template potx
+application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
+application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam

+ 44 - 0
isc-front/assets/filetree/jqueryFileTree.asp

@@ -0,0 +1,44 @@
+<%
+'
+' jQuery File Tree ASP (VBS) Connector
+' Copyright 2008 Chazzuka
+' programmer@chazzuka.com
+' http://www.chazzuka.com/
+'
+' retrive base directory
+dim BaseFileDir:BaseFileDir=Request.Form("dir")
+' if blank give default value
+if len(BaseFileDir)=0 then BaseFileDir="/userfiles/"
+
+dim ObjFSO,BaseFile,Html
+' resolve the absolute path
+BaseFile = Server.MapPath(BaseFileDir)&"\"
+' create FSO
+Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject")
+' if given folder is exists
+if ObjFSO.FolderExists(BaseFile) then
+       dim ObjFolder,ObjSubFolder,ObjFile,i__Name,i__Ext
+       Html = Html +  "<ul class=""jqueryFileTree"" style=""display: none;"">"&VBCRLF
+       Set ObjFolder = ObjFSO.GetFolder(BaseFile)
+       ' LOOP THROUGH SUBFOLDER
+       For Each ObjSubFolder In ObjFolder.SubFolders
+               i__Name=ObjSubFolder.name
+               Html = Html + "<li class=""directory collapsed"">"&_
+                                         "<a href=""#"" rel="""+(BaseFileDir+i__Name+"/")+""">"&_
+                                         (i__Name)+"</a></li>"&VBCRLF
+       Next
+       'LOOP THROUGH FILES
+       For Each ObjFile In ObjFolder.Files
+               ' name
+               i__Name=ObjFile.name
+               ' extension
+               i__Ext = LCase(Mid(i__Name, InStrRev(i__Name, ".", -1, 1) + 1))
+               Html = Html + "<li class=""file ext_"&i__Ext&""">"&_
+                                         "<a href=""#"" rel="""+(BaseFileDir+i__Name)+""">"&_
+                                         (i__name)+"</a></li>"&VBCRLF
+       Next
+       Html = Html +  "</ul>"&VBCRLF
+end if
+
+Response.Write Html
+%>

+ 31 - 0
isc-front/assets/filetree/jqueryFileTree.aspx

@@ -0,0 +1,31 @@
+<%@ Page Language="C#" AutoEventWireup="true" %>
+
+<%
+	//
+	// jQuery File Tree ASP Connector
+	//
+	// Version 1.0
+	//
+	// Copyright (c)2008 Andrew Sweeny
+	// asweeny@fit.edu
+	// 24 March 2008
+	//
+	string dir;
+	if(Request.Form["dir"] == null || Request.Form["dir"].Length <= 0)
+		dir = "/";
+	else
+		dir = Server.UrlDecode(Request.Form["dir"]);
+	System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(dir);
+	Response.Write("<ul class=\"jqueryFileTree\" style=\"display: none;\">\n");
+	foreach (System.IO.DirectoryInfo di_child in di.GetDirectories())
+		Response.Write("\t<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + di_child.Name + "/\">" + di_child.Name + "</a></li>\n");
+	foreach (System.IO.FileInfo fi in di.GetFiles())
+	{
+		string ext = ""; 
+		if(fi.Extension.Length > 1)
+			ext = fi.Extension.Substring(1).ToLower();
+			
+		Response.Write("\t<li class=\"file ext_" + ext + "\"><a href=\"#\" rel=\"" + dir + fi.Name + "\">" + fi.Name + "</a></li>\n");		
+	}
+	Response.Write("</ul>");
+ %>

+ 19 - 0
isc-front/assets/filetree/jqueryFileTree.cf

@@ -0,0 +1,19 @@
+<!---
+
+jQuery File Tree
+ColdFusion connector script
+By Tjarko Rikkerink (http://carlosgallupa.com/)
+
+--->
+<cfparam name="form.dir" default="/somedir" />
+<cfdirectory action="LIST" directory="#expandpath('#URLDecode(form.dir)#')#" name="qDir" sort="type, name" type="all" listinfo="all" recurse="no">
+
+<ul class="jqueryFileTree" style="display: none;">
+       <cfoutput query="qDir">
+               <cfif type eq "dir">
+                   <li class="directory collapsed"><a href="##" rel="#URLDecode(form.dir)##name#/">#name#</a></li>
+               <cfelseif type eq "file">
+               <li class="file ext_#listLast(name,'.')#"><a href="##" rel="#URLDecode(form.dir)##name#">#name# (#round(size/1024)#KB)</a></li>
+               </cfif>
+       </cfoutput>
+</ul>

+ 49 - 0
isc-front/assets/filetree/jqueryFileTree.jsp

@@ -0,0 +1,49 @@
+<%@ page
+	import="java.io.File,java.io.FilenameFilter,java.util.Arrays"%>
+<%
+/**
+  * jQuery File Tree JSP Connector
+  * Version 1.0
+  * Copyright 2008 Joshua Gould
+  * 21 April 2008
+*/	
+    String dir = request.getParameter("dir");
+    if (dir == null) {
+    	return;
+    }
+	
+	if (dir.charAt(dir.length()-1) == '\\') {
+    	dir = dir.substring(0, dir.length()-1) + "/";
+	} else if (dir.charAt(dir.length()-1) != '/') {
+	    dir += "/";
+	}
+	
+	dir = java.net.URLDecoder.decode(dir, "UTF-8");	
+	
+    if (new File(dir).exists()) {
+		String[] files = new File(dir).list(new FilenameFilter() {
+		    public boolean accept(File dir, String name) {
+				return name.charAt(0) != '.';
+		    }
+		});
+		Arrays.sort(files, String.CASE_INSENSITIVE_ORDER);
+		out.print("<ul class=\"jqueryFileTree\" style=\"display: none;\">");
+		// All dirs
+		for (String file : files) {
+		    if (new File(dir, file).isDirectory()) {
+				out.print("<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + file + "/\">"
+					+ file + "</a></li>");
+		    }
+		}
+		// All files
+		for (String file : files) {
+		    if (!new File(dir, file).isDirectory()) {
+				int dotIndex = file.lastIndexOf('.');
+				String ext = dotIndex > 0 ? file.substring(dotIndex + 1) : "";
+				out.print("<li class=\"file ext_" + ext + "\"><a href=\"#\" rel=\"" + dir + file + "\">"
+					+ file + "</a></li>");
+		    	}
+		}
+		out.print("</ul>");
+    }
+%>

+ 43 - 0
isc-front/assets/filetree/jqueryFileTree.php

@@ -0,0 +1,43 @@
+<?php
+//
+// jQuery File Tree PHP Connector
+//
+// Version 1.01
+//
+// Cory S.N. LaViska
+// A Beautiful Site (http://abeautifulsite.net/)
+// 24 March 2008
+//
+// History:
+//
+// 1.01 - updated to work with foreign characters in directory/file names (12 April 2008)
+// 1.00 - released (24 March 2008)
+//
+// Output a list of files for jQuery File Tree
+//
+$root = '/home/aqva2/domains/aqvatarius.com/public_html/themes/leo_v12/php/uploads/';
+$_POST['dir'] = urldecode($_POST['dir']);
+
+if( file_exists($root . $_POST['dir']) ) {
+	$files = scandir($root . $_POST['dir']);
+	natcasesort($files);
+	if( count($files) > 2 ) { /* The 2 accounts for . and .. */
+		echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
+		// All dirs
+		foreach( $files as $file ) {
+			if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file) && substr($file, 0, 1) != '.') {
+				echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
+			}
+		}
+		// All files
+		foreach( $files as $file ) {
+			if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_POST['dir'] . $file) ) {
+				$ext = preg_replace('/^.*\./', '', $file);
+				echo "<li class=\"file ext_$ext\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
+			}
+		}
+		echo "</ul>";	
+	}
+}
+
+?>

+ 102 - 0
isc-front/assets/filetree/jqueryFileTree.pl

@@ -0,0 +1,102 @@
+#!/usr/bin/perl
+use strict;
+use HTML::Entities ();
+
+#-----------------------------------------------------------
+#  jQuery File Tree Perl Connector
+#
+#  Version 1.0
+#
+#  Oleg Burlaca
+#  http://www.burlaca.com/2009/02/jquery-file-tree-connector/
+#  12 February 2009
+#-----------------------------------------------------------
+
+# for security reasons,  specify a root folder 
+# to prevent the whole filesystem to be shown
+# for ex: the root folder of your webbrowser
+ 
+my $root = "/var/www/html/";
+
+#----------------------------------------------------------
+
+my $params = &getCGIParams();
+print "Content-type: text/html\n\n";
+
+my $dir = $params->{dir};
+my $fullDir = $root . $dir;
+
+exit if ! -e $fullDir;
+
+opendir(BIN, $fullDir) or die "Can't open $dir: $!";
+my (@folders, @files);
+my $total = 0;
+while( defined (my $file = readdir BIN) ) {
+    next if $file eq '.' or $file eq '..';
+    $total++;
+    if (-d "$fullDir/$file") {
+	push (@folders, $file);
+    } else {
+	push (@files, $file);
+    }
+}
+closedir(BIN);
+
+return if $total == 0;
+print "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
+
+# print Folders
+foreach my $file (sort @folders) {
+    next if ! -e  $fullDir . $file;
+    
+    print '<li class="directory collapsed"><a href="#" rel="' . 
+          &HTML::Entities::encode($dir . $file) . '/">' . 
+          &HTML::Entities::encode($file) . '</a></li>';
+}
+
+# print Files
+foreach my $file (sort @files) {
+    next if ! -e  $fullDir . $file;
+
+    $file =~ /\.(.+)$/;
+    my $ext = $1;
+    print '<li class="file ext_' . $ext . '"><a href="#" rel="' . 
+    &HTML::Entities::encode($dir . $file) . '/">' .
+    &HTML::Entities::encode($file) . '</a></li>';
+}
+
+print "</ul>\n";
+
+
+
+
+#--------------------------------------------------------------------------------------------------
+sub getCGIParams {
+    my $line;
+    
+    if ($ENV{'REQUEST_METHOD'} eq "POST") {
+        read(STDIN, $line, $ENV{'CONTENT_LENGTH'});
+    } else {
+        $line = $ENV{'QUERY_STRING'};
+    }
+
+    my (@pairs) = split(/&/, $line);
+    my ($name, $value, %F);
+        
+    foreach (@pairs) {
+        ($name, $value) = split(/=/);
+        $value =~ tr/+/ /;
+        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
+        
+        if (! exists $F{$name}) {
+            $F{$name} = $value;
+        } elsif (exists $F{$name} and ref($F{$name}) ne 'ARRAY') {
+            my $prev_value = $F{$name};
+            delete $F{$name};
+            $F{$name} = [ $prev_value, $value ];
+	} else { push @{ $F{$name} }, $value }
+    }
+    return \%F;
+}
+#--------------------------------------------------------------------------------------------------                                                                                        
+                                                                    

+ 25 - 0
isc-front/assets/filetree/jqueryFileTree.py

@@ -0,0 +1,25 @@
+#
+# jQuery File Tree
+# Python/Django connector script
+# By Martin Skou
+#
+import os
+import urllib
+
+def dirlist(request):
+   r=['<ul class="jqueryFileTree" style="display: none;">']
+   try:
+       r=['<ul class="jqueryFileTree" style="display: none;">']
+       d=urllib.unquote(request.POST.get('dir','c:\\temp'))
+       for f in os.listdir(d):
+           ff=os.path.join(d,f)
+           if os.path.isdir(ff):
+               r.append('<li class="directory collapsed"><a href="#" rel="%s/">%s</a></li>' % (ff,f))
+           else:
+               e=os.path.splitext(f)[1][1:] # get .ext and remove dot
+               r.append('<li class="file ext_%s"><a href="#" rel="%s">%s</a></li>' % (e,ff,f))
+       r.append('</ul>')
+   except Exception,e:
+       r.append('Could not load directory: %s' % str(e))
+   r.append('</ul>')
+   return HttpResponse(''.join(r))

+ 61 - 0
isc-front/assets/filetree/jqueryFileTree.rb

@@ -0,0 +1,61 @@
+#
+# jQuery File Tree Ruby Connector
+#
+# Version 1.01
+#
+# Erik Lax
+# http://datahack.se
+# 13 July 2008
+#
+# History
+#
+# 1.01 Initial Release
+#
+# Output a list of files for jQuery File Tree
+#
+
+#<settings>
+#root = "/absolute/path/"
+# or
+root = File.expand_path(".")
+#</settings>
+
+#<code>
+require "cgi"
+cgi = CGI.new
+cgi.header("type" => "text/html")
+dir = cgi.params["dir"].to_s
+
+puts "<ul class=\"jqueryFileTree\" style=\"display: none;\">"
+begin
+	path = root + "/" + dir 
+
+	# chdir() to user requested dir (root + "/" + dir) 
+	Dir.chdir(File.expand_path(path).untaint);
+	
+	# check that our base path still begins with root path
+	if Dir.pwd[0,root.length] == root then
+
+		#loop through all directories
+		Dir.glob("*") {
+			|x|
+			if not File.directory?(x.untaint) then next end 
+			puts "<li class=\"directory collapsed\"><a href=\"#\" rel=\"#{dir}#{x}/\">#{x}</a></li>";
+		}
+
+		#loop through all files
+		Dir.glob("*") {
+			|x|
+			if not File.file?(x.untaint) then next end 
+			ext = File.extname(x)[1..-1]
+			puts "<li class=\"file ext_#{ext}\"><a href=\"#\" rel=\"#{dir}#{x}\">#{x}</a></li>"
+		}
+	else
+		#only happens when someone tries to go outside your root directory...
+		puts "You are way out of your league"
+	end 
+rescue 
+	puts "Internal Error"
+end
+puts "</ul>"
+#</code>

+ 0 - 0
isc-front/assets/filetree/jqueryFileTree_huck.lasso


Деякі файли не було показано, через те що забагато файлів було змінено