qiuzijian пре 3 година
комит
e5b36c91b7
100 измењених фајлова са 6178 додато и 0 уклоњено
  1. 4 0
      .idea/encodings.xml
  2. 5 0
      .idea/inspectionProfiles/Project_Default.xml
  3. 44 0
      .idea/misc.xml
  4. 8 0
      .idea/modules.xml
  5. 6 0
      .idea/vcs.xml
  6. 840 0
      .idea/workspace.xml
  7. 8 0
      .idea/xinhu.iml
  8. 60 0
      README.md
  9. 39 0
      api.php
  10. 102 0
      config/config.php
  11. 12 0
      config/iplist.php
  12. 88 0
      config/iplogs.php
  13. 3 0
      config/version.php
  14. BIN
      favicon.ico
  15. BIN
      images/adddk.png
  16. BIN
      images/apply.png
  17. BIN
      images/back.png
  18. BIN
      images/bq.png
  19. BIN
      images/bwl.png
  20. BIN
      images/bwl2.png
  21. BIN
      images/calendar.png
  22. BIN
      images/checkbox0.png
  23. BIN
      images/checkbox1.png
  24. BIN
      images/close.gif
  25. BIN
      images/crm.png
  26. BIN
      images/daiban.png
  27. BIN
      images/daily.png
  28. BIN
      images/del.png
  29. BIN
      images/email.png
  30. BIN
      images/error.png
  31. BIN
      images/ewml.png
  32. BIN
      images/fawen.png
  33. BIN
      images/file.png
  34. BIN
      images/files.png
  35. BIN
      images/fkuan.png
  36. BIN
      images/flow.png
  37. BIN
      images/folder.png
  38. BIN
      images/gong.png
  39. BIN
      images/group.png
  40. BIN
      images/gw.png
  41. BIN
      images/gzt.png
  42. BIN
      images/helpbg.png
  43. BIN
      images/hetong.png
  44. BIN
      images/i.gif
  45. BIN
      images/jia.png
  46. BIN
      images/jian1.gif
  47. BIN
      images/jian2.gif
  48. BIN
      images/jiank.png
  49. BIN
      images/jwcl.png
  50. BIN
      images/kaoqin.png
  51. BIN
      images/kaoshi.png
  52. BIN
      images/loading.gif
  53. BIN
      images/loadings.gif
  54. BIN
      images/logo.png
  55. BIN
      images/meet.png
  56. BIN
      images/mloading.gif
  57. BIN
      images/nav_chat0.png
  58. BIN
      images/nav_chat1.png
  59. BIN
      images/nav_my0.png
  60. BIN
      images/nav_my1.png
  61. BIN
      images/nav_user0.png
  62. BIN
      images/nav_user1.png
  63. BIN
      images/nav_ying0.png
  64. BIN
      images/nav_ying1.png
  65. BIN
      images/new.gif
  66. BIN
      images/news.png
  67. BIN
      images/noface.png
  68. BIN
      images/noimg.jpg
  69. BIN
      images/nologo.png
  70. BIN
      images/project.png
  71. BIN
      images/sale.png
  72. BIN
      images/shouwen.png
  73. BIN
      images/skuan.png
  74. BIN
      images/sousuo.png
  75. BIN
      images/taolun.png
  76. BIN
      images/tiku.png
  77. BIN
      images/todo.png
  78. BIN
      images/tongxunlu.png
  79. BIN
      images/waichu.png
  80. BIN
      images/wclose.png
  81. BIN
      images/white.gif
  82. BIN
      images/wjj.png
  83. BIN
      images/work.png
  84. BIN
      images/xh829.png
  85. BIN
      images/xiangyou1.png
  86. BIN
      images/zhishi.png
  87. 209 0
      include/Action.php
  88. 47 0
      include/Chajian.php
  89. 182 0
      include/Model.php
  90. 2320 0
      include/PHPMailer/class.phpmailer.php
  91. 407 0
      include/PHPMailer/class.pop3.php
  92. 814 0
      include/PHPMailer/class.smtp.php
  93. 90 0
      include/View.php
  94. 98 0
      include/chajian/JPushChajian.php
  95. 383 0
      include/chajian/PHPExcelChajian.php
  96. 65 0
      include/chajian/PHPExcelReaderChajian.php
  97. 69 0
      include/chajian/PHPWordChajian.php
  98. 180 0
      include/chajian/alismsChajian.php
  99. 95 0
      include/chajian/arrayChajian.php
  100. 0 0
      include/chajian/cacheChajian.php

+ 4 - 0
.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
+</project>

+ 5 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,5 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0" is_locked="false">
+    <option name="myName" value="Project Default" />
+  </profile>
+</component>

+ 44 - 0
.idea/misc.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+  <component name="ProjectInspectionProfilesVisibleTreeState">
+    <entry key="Project Default">
+      <profile-state>
+        <expanded-state>
+          <State />
+          <State>
+            <id>Angular</id>
+          </State>
+          <State>
+            <id>Cucumber</id>
+          </State>
+          <State>
+            <id>Dockerfile</id>
+          </State>
+          <State>
+            <id>File Watchers</id>
+          </State>
+          <State>
+            <id>PHP</id>
+          </State>
+          <State>
+            <id>Probable bugsPHP</id>
+          </State>
+          <State>
+            <id>Type compatibilityPHP</id>
+          </State>
+          <State>
+            <id>docker-compose</id>
+          </State>
+        </expanded-state>
+        <selected-state>
+          <State>
+            <id>Angular</id>
+          </State>
+        </selected-state>
+      </profile-state>
+    </entry>
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/xinhu.iml" filepath="$PROJECT_DIR$/.idea/xinhu.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 840 - 0
.idea/workspace.xml

@@ -0,0 +1,840 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="5b620213-6142-4839-a88c-acb9f130e070" name="Default Changelist" comment="" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/flow/page/rock_page_user.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="1028">
+              <caret line="137" column="18" selection-start-line="137" selection-start-column="9" selection-end-line="137" selection-end-column="18" />
+              <folding>
+                <element signature="n#style#0;n#td#0;n#tr#0;n#table#0;n#div#0;n#!!top" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/flow/page/rock_page.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="365">
+              <caret line="175" column="58" selection-start-line="175" selection-start-column="53" selection-end-line="175" selection-end-column="58" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/flow/input/mode_userAction.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="272">
+              <caret line="36" column="31" lean-forward="true" selection-start-line="36" selection-start-column="31" selection-end-line="36" selection-end-column="31" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/include/Action.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="126">
+              <caret line="16" column="11" selection-start-line="16" selection-start-column="11" selection-end-line="16" selection-end-column="11" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/flow/input/rock_input_daoru.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="627">
+              <caret line="77" column="17" selection-start-line="77" selection-start-column="17" selection-end-line="77" selection-end-column="17" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/webmain/flow/input/inputAction.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="-109">
+              <caret line="1048" column="30" selection-start-line="1048" selection-start-column="30" selection-end-line="1048" selection-end-column="30" />
+              <folding>
+                <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/main/customer/customerAction.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="209">
+              <caret line="98" column="31" selection-start-line="98" selection-start-column="31" selection-end-line="98" selection-end-column="31" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/main/flow/tpl_flow_input.html">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="254">
+              <caret line="93" column="30" lean-forward="true" selection-start-line="93" selection-start-column="30" selection-end-line="93" selection-end-column="30" />
+              <folding>
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="e#70#76#1" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/js/js.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="382">
+              <caret line="187" column="39" lean-forward="true" selection-start-line="187" selection-start-column="39" selection-end-line="187" selection-end-column="39" />
+              <folding>
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#font#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#font#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#table#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#td#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#button#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#button#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#textarea#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="e#72#78#1" expanded="true" />
+                <element signature="e#34#40#1" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+                <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/webmain/main/flow/rock_flow_element.php">
+          <provider selected="true" editor-type-id="text-editor" />
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FindInProjectRecents">
+    <findStrings>
+      <find>getrows</find>
+      <find>var</find>
+      <find>入职日期</find>
+      <find>flowfieldarr</find>
+      <find>手机号</find>
+      <find>indexscript</find>
+      <find>showview_</find>
+      <find>flow_element</find>
+      <find>m('flow_element')</find>
+      <find>职位</find>
+      <find>导入</find>
+      <find>下载Ex</find>
+      <find>daorudataA</find>
+      <find>msgview_</find>
+      <find>邮箱/手机号不能同时为空</find>
+      <find>日志</find>
+      <find>操作</find>
+      <find>m('admin')</find>
+      <find>viewuser_</find>
+      <find>提交</find>
+      <find>所属单位</find>
+      <find>daoruA</find>
+      <find>daoru</find>
+      <find>daor</find>
+      <find>daorudata</find>
+      <find>getcompanyid()</find>
+      <find>createid</find>
+      <find>下载Excel</find>
+      <find>downxz</find>
+      <find>daoruexcel</find>
+    </findStrings>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/webmain/model/flow/flow.php" />
+        <option value="$PROJECT_DIR$/webmain/model/workModel.php" />
+        <option value="$PROJECT_DIR$/include/View.php" />
+        <option value="$PROJECT_DIR$/index.php" />
+        <option value="$PROJECT_DIR$/webmain/login/loginscript.js" />
+        <option value="$PROJECT_DIR$/js/js.js" />
+        <option value="$PROJECT_DIR$/config/config.php" />
+        <option value="$PROJECT_DIR$/include/class/mysql.php" />
+        <option value="$PROJECT_DIR$/webmain/login/tpl_login.html" />
+        <option value="$PROJECT_DIR$/webmain/login/loginAction.php" />
+        <option value="$PROJECT_DIR$/webmain/webmainConfig.php" />
+        <option value="$PROJECT_DIR$/webmain/index/indexAction.php" />
+        <option value="$PROJECT_DIR$/webmain/main/flow/flowAction.php" />
+        <option value="$PROJECT_DIR$/webmain/main/flow/tpl_flow_input.html" />
+        <option value="$PROJECT_DIR$/webmain/flow/input/tpl_input_lu.html" />
+        <option value="$PROJECT_DIR$/webmain/flow/input/inputjs/input.js" />
+        <option value="$PROJECT_DIR$/webmain/main/flow/rock_flow_element.php" />
+        <option value="$PROJECT_DIR$/webmain/model/optionModel.php" />
+        <option value="$PROJECT_DIR$/include/rockFun.php" />
+        <option value="$PROJECT_DIR$/webmain/flow/page/rock_page_user.php" />
+        <option value="$PROJECT_DIR$/webmain/index/indexscript.js" />
+        <option value="$PROJECT_DIR$/webmain/flow/page/input_user.html" />
+        <option value="$PROJECT_DIR$/webmain/system/admin/adminAction.php" />
+        <option value="$PROJECT_DIR$/webmain/flow/input/mode_userAction.php" />
+        <option value="$PROJECT_DIR$/webmain/system/group/rock_group.php" />
+        <option value="$PROJECT_DIR$/webmain/flow/page/input_userinfo.html" />
+        <option value="$PROJECT_DIR$/webmain/flow/input/rock_input_daoru.php" />
+        <option value="$PROJECT_DIR$/webmain/flow/input/inputAction.php" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectFrameBounds" fullScreen="true">
+    <option name="width" value="714" />
+    <option name="height" value="900" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="xinhu" type="b2602c69:ProjectViewProjectNode" />
+              <item name="xinhu" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="xinhu" type="b2602c69:ProjectViewProjectNode" />
+              <item name="xinhu" type="462c0819:PsiDirectoryNode" />
+              <item name="config" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="xinhu" type="b2602c69:ProjectViewProjectNode" />
+              <item name="xinhu" type="462c0819:PsiDirectoryNode" />
+              <item name="webmain" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="xinhu" type="b2602c69:ProjectViewProjectNode" />
+              <item name="xinhu" type="462c0819:PsiDirectoryNode" />
+              <item name="webmain" type="462c0819:PsiDirectoryNode" />
+              <item name="index" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="xinhu" type="b2602c69:ProjectViewProjectNode" />
+              <item name="xinhu" type="462c0819:PsiDirectoryNode" />
+              <item name="webmain" type="462c0819:PsiDirectoryNode" />
+              <item name="login" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+      <pane id="Scope" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
+    <property name="options.lastSelected" value="configurable.group.appearance" />
+    <property name="options.splitter.details.proportions" value="0.2" />
+    <property name="options.splitter.main.proportions" value="0.3" />
+    <property name="settings.editor.selected.configurable" value="preferences.sourceCode.HTML" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration>$USER_HOME$/.subversion</configuration>
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="5b620213-6142-4839-a88c-acb9f130e070" name="Default Changelist" comment="" />
+      <created>1638777225976</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1638777225976</updated>
+      <workItem from="1638777227189" duration="13617000" />
+      <workItem from="1640681620018" duration="15846000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="29463000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
+    <editor active="true" />
+    <layout>
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21173105" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
+      <window_info anchor="bottom" id="Database Changes" order="8" />
+      <window_info anchor="bottom" id="Version Control" order="9" />
+      <window_info anchor="bottom" id="Terminal" order="10" />
+      <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info anchor="right" id="Database" order="3" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/webmain/model/flow/assetmModel.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-647">
+          <caret line="5" column="42" lean-forward="true" selection-start-line="5" selection-start-column="42" selection-end-line="5" selection-end-column="42" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/model/workModel.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="273">
+          <caret line="13" column="1" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/Core/Core.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="260">
+          <caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/home/desktop/items_bianjian.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#font#1;n#div#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/reim/login/tpl_login.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="197">
+          <caret line="54" column="7" lean-forward="true" selection-start-line="54" selection-start-column="7" selection-end-line="54" selection-end-column="7" />
+          <folding>
+            <element signature="n#style#0;n#a#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#a#1;n#!!top" expanded="true" />
+            <element signature="e#4#10#0" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#img#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#1;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/js/jsm.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="63">
+          <caret line="3" column="4" selection-start-line="3" selection-start-column="4" selection-end-line="3" selection-end-column="4" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#iframe#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/chajian/jmChajian.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="273">
+          <caret line="13" column="5" lean-forward="true" selection-start-line="13" selection-start-column="5" selection-end-line="13" selection-end-column="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/class/rockClass.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="63">
+          <caret line="3" column="19" lean-forward="true" selection-start-line="3" selection-start-column="19" selection-end-line="3" selection-end-column="19" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/index.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="168">
+          <caret line="8" column="6" selection-start-line="8" selection-end-line="8" selection-end-column="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/login/tpl_login.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="172">
+          <caret line="90" column="10" lean-forward="true" selection-start-line="90" selection-start-column="10" selection-end-line="90" selection-end-column="10" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/login/loginAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="336">
+          <caret line="16" column="53" selection-start-line="16" selection-start-column="53" selection-end-line="16" selection-end-column="53" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/system/cog/cogAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1200">
+          <caret line="204" column="51" selection-start-line="204" selection-start-column="51" selection-end-line="204" selection-end-column="51" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/system/cog/rock_cog_set.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="460">
+          <caret line="270" column="132" selection-start-line="270" selection-start-column="132" selection-end-line="270" selection-end-column="132" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#70#76#1" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/webmainConfig.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="483">
+          <caret line="23" column="21" selection-start-line="23" selection-start-column="21" selection-end-line="23" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/class/mysql.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="444">
+          <caret line="60" column="42" selection-start-line="60" selection-start-column="42" selection-end-line="60" selection-end-column="42" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/index/indexAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="514">
+          <caret line="48" column="38" lean-forward="true" selection-start-line="48" selection-start-column="38" selection-end-line="48" selection-end-column="38" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/login/loginscript.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="42">
+          <caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
+          <folding>
+            <element signature="e#4#10#0" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#1;n#div#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/standard/standard_5.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="260">
+          <caret line="1057" column="9" selection-start-line="1057" selection-start-column="9" selection-end-line="1057" selection-end-column="9" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/task.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="378">
+          <caret line="18" column="30" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="30" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/View.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="73">
+          <caret line="57" column="7" selection-start-line="57" selection-start-column="7" selection-end-line="57" selection-end-column="7" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/index/tpl_index.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1654" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/model/flow/flow.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="592">
+          <caret line="2241" column="58" selection-start-line="2241" selection-start-column="58" selection-end-line="2241" selection-end-column="58" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#td#0;n#tr#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#td#1;n#tr#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#td#2;n#tr#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/main/flow/tpl_flow_inputzs.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="88">
+          <caret line="56" column="4" selection-start-line="56" selection-start-column="4" selection-end-line="56" selection-end-column="4" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/Model.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="656">
+          <caret line="181" column="6" selection-start-line="181" selection-start-column="6" selection-end-line="181" selection-end-column="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/model/optionModel.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="302">
+          <caret line="259" column="24" lean-forward="true" selection-start-line="259" selection-start-column="24" selection-end-line="259" selection-end-column="24" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/rockFun.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="546">
+          <caret line="36" column="39" selection-start-line="36" selection-start-column="39" selection-end-line="36" selection-end-column="39" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/input/tpl_input_lu.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1668">
+          <caret line="19" column="33" selection-start-line="19" selection-start-column="23" selection-end-line="19" selection-end-column="33" />
+          <folding>
+            <element signature="n#style#0;n#input#0;n#span#1;n#div#2;n#div#0;n#body#0;n#html#0;n#!!top" expanded="true" />
+            <element signature="e#6989#6995#0" expanded="true" />
+            <element signature="e#6996#7002#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/input/inputjs/input.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="367">
+          <caret line="196" column="29" lean-forward="true" selection-start-line="196" selection-start-column="29" selection-end-line="196" selection-end-column="29" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external/lib.dom.d.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="21">
+          <caret line="17249" column="12" selection-start-line="17249" selection-start-column="12" selection-end-line="17249" selection-end-column="12" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/model/flow/hrsalaryModel.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="272">
+          <caret line="256" column="29" selection-start-line="256" selection-start-column="29" selection-end-line="256" selection-end-column="29" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/index/indexpublic.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="270">
+          <caret line="118" column="23" selection-start-line="118" selection-start-column="23" selection-end-line="118" selection-end-column="23" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#input#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#51#57#1" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#75#81#0" expanded="true" />
+            <element signature="e#81#87#0" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#input#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#input#1;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#input#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#input#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#input#1;n#!!top" expanded="true" />
+            <element signature="e#88#94#0" expanded="true" />
+            <element signature="e#94#100#0" expanded="true" />
+            <element signature="e#100#106#0" expanded="true" />
+            <element signature="e#109#115#0" expanded="true" />
+            <element signature="n#style#0;n#input#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#212#218#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/index/indexscript.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="121">
+          <caret line="393" column="13" selection-start-line="393" selection-start-column="13" selection-end-line="393" selection-end-column="13" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#font#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#a#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#a#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#0#6#0" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#259#265#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/webmainAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-3217">
+          <caret line="14" column="17" lean-forward="true" selection-start-line="14" selection-start-column="17" selection-end-line="14" selection-end-column="17" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/main/flow/flowAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="355">
+          <caret line="573" column="59" selection-start-line="573" selection-start-column="59" selection-end-line="573" selection-end-column="59" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#1;n#!!top" expanded="true" />
+            <element signature="e#134#138#0" expanded="true" />
+            <element signature="n#style#0;n#td#0;n#tr#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/main/view/viewAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="189">
+          <caret line="9" column="47" selection-start-line="9" selection-start-column="30" selection-end-line="9" selection-end-column="47" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/page/input_user.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="1064" lean-forward="true" selection-start-column="1064" selection-end-column="1064" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/system/admin/adminAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="460">
+          <caret line="67" column="53" selection-start-line="67" selection-start-column="53" selection-end-line="67" selection-end-column="53" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/config/config.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1050">
+          <caret line="50" column="42" selection-start-line="50" selection-start-column="40" selection-end-line="50" selection-end-column="42" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/input/mode_userAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="272">
+          <caret line="36" column="31" lean-forward="true" selection-start-line="36" selection-start-column="31" selection-end-line="36" selection-end-column="31" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/system/group/rock_group.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1029">
+          <caret line="49" column="20" selection-start-line="49" selection-start-column="20" selection-end-line="49" selection-end-column="20" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/system/reimplat/reimplatAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="282">
+          <caret line="138" column="18" selection-start-line="138" selection-start-column="18" selection-end-line="138" selection-end-column="18" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/page/input_userinfo.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="1133" selection-start-column="1133" selection-end-column="1133" />
+          <folding>
+            <element signature="n#style#0;n#table#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#table#0;n#div#1;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#div#1;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/main/flow/tpl_flow_input.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="254">
+          <caret line="93" column="30" lean-forward="true" selection-start-line="93" selection-start-column="30" selection-end-line="93" selection-end-column="30" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#70#76#1" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/main/flow/rock_flow_element.php">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/page/rock_page_user.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1028">
+          <caret line="137" column="18" selection-start-line="137" selection-start-column="9" selection-end-line="137" selection-end-column="18" />
+          <folding>
+            <element signature="n#style#0;n#td#0;n#tr#0;n#table#0;n#div#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/page/rock_page.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="365">
+          <caret line="175" column="58" selection-start-line="175" selection-start-column="53" selection-end-line="175" selection-end-column="58" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/include/Action.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="126">
+          <caret line="16" column="11" selection-start-line="16" selection-start-column="11" selection-end-line="16" selection-end-column="11" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/main/customer/customerAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="209">
+          <caret line="98" column="31" selection-start-line="98" selection-start-column="31" selection-end-line="98" selection-end-column="31" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/input/rock_input_daoru.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="627">
+          <caret line="77" column="17" selection-start-line="77" selection-start-column="17" selection-end-line="77" selection-end-column="17" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/js/js.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="382">
+          <caret line="187" column="39" lean-forward="true" selection-start-line="187" selection-start-column="39" selection-end-line="187" selection-end-column="39" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#font#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#font#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#table#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#td#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#button#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#button#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#textarea#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="e#72#78#1" expanded="true" />
+            <element signature="e#34#40#1" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/webmain/flow/input/inputAction.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-109">
+          <caret line="1048" column="30" selection-start-line="1048" selection-start-column="30" selection-end-line="1048" selection-end-column="30" />
+          <folding>
+            <element signature="n#style#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+            <element signature="n#style#0;n#td#0;n#!!top" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ScopeChooserConfigurable.UI">
+        <settings>
+          <splitter-proportions>
+            <option name="proportions">
+              <list>
+                <option value="0.2" />
+              </list>
+            </option>
+          </splitter-proportions>
+        </settings>
+      </state>
+    </states>
+  </component>
+</project>

+ 8 - 0
.idea/xinhu.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 60 - 0
README.md

@@ -0,0 +1,60 @@
+# 信呼,免费开源的办公OA系统
+
+开发者:雨中磐石(rainrock)  
+邮箱:admin@rockoa.com  
+公司团队:信呼开发团队  
+官网网站:http://www.rockoa.com/  
+源码仅供学习二次开发使用,禁止二次发布,禁止用于商业用途出售等(违者必究)  
+版权:Copyright @2016-2021 信呼开发团队  
+版本整理时间:2021-12-03 23:59:59  
+版本号:V2.3.3   
+
+
+### V2.3.3更新说明
+1、完善系统安全性。  
+2、更多升级日志详见:http://www.rockoa.com/view_core.html  
+
+
+### 安装说明
+1、环境要求:可以运行在Win/Linux系统下,php5.2+,mysql5.3+  
+2、测试环境搭建详见:http://www.rockoa.com/view_install.html  
+3、自己手动安装详见:http://www.rockoa.com/view_anzz.html  
+4、配置文件:webmain/webmainConfig.php,也可到【系统→系统工具→系统设置】下修改  
+5、打开浏览器访问:http://您的地址/  
+6、您使用此系统时,请务必遵守我们的开源思想,请尊重我们的劳动成果,谢谢!
+
+### 开发帮助文档
+地址:http://www.rockoa.com/help.html  
+
+### 信呼相关产品
+1、信呼OA系统(后台/手机网页版/REIM)  
+2、安卓APP  
+3、信呼服务端(即时通信,计划任务使用)  
+4、REIM即时通信PC客户端  
+5、以上下载地址:http://www.rockoa.com/view_down.html  
+
+
+
+### 信呼声明 
+1、没有一款系统是100%安全,信呼也是如此,任何暴露在公网中的系统,都有数据泄露的风险,一旦您决定将信呼OA部署在公网环境中,请仔细评估可能由此带来的风险,并尽可能的加强安全措施。  
+2、或许您觉得此系统不好有缺陷或漏洞等,欢迎提意见和您的想法给我们,或者发邮件给我们:admin@rockoa.com。  
+
+### 声明感谢  
+系统有用到一些开源的项目,特别感谢他们提供奉献,不分先后顺序。    
+1、PHP后端语言:http://www.php.net/   
+2、MySql数据库:https://www.mysql.com/    
+3、Bootstrap后台样式组件:http://v3.bootcss.com/components/  
+4、字体图标:http://www.bootcss.com/p/font-awesome/  
+5、Jquery框架:http://jquery.com/  
+6、PHPMailer邮件发送组件:https://github.com/PHPMailer/PHPMailer  
+7、kindeditor富文本编辑器:http://kindeditor.net/  
+8、pdfjs预览pdf:http://mozilla.github.io/pdf.js/  
+9、weui手机端框架:https://weui.io/0.4.x/#/  
+10、phpqrcode生成二维码:http://phpqrcode.sourceforge.net/    
+11、JPush极光推送:https://www.jiguang.cn/  
+12、小米推送:https://dev.mi.com/console/appservice/push.html  
+13、workerman服务端phpsocket框架:http://www.workerman.net/  
+14、nwjs的PC客户端框架:https://nwjs.io/  
+15、iconfont图标库:http://www.iconfont.cn/   
+16、腾讯地图:http://map.qq.com/  
+16、nodejs:https://nodejs.org/ 

+ 39 - 0
api.php

@@ -0,0 +1,39 @@
+<?php
+/**
+*	api的入口地址请求访问,访问方法:http://我的域名/api.php?m=index&a=方法
+*	主页:http://www.rockoa.com/
+*	软件:信呼
+*	作者:雨中磐石(rainrock)
+*/
+define('ENTRANCE', 'api');
+include_once('config/config.php');
+$_paths = '';
+$d		= 'task';$m	= 'index';$a = 'index';
+if(isset($_GET['m'])){
+	$m  = $rock->get('m');
+	$a  = $rock->get('a', $a);
+}else{
+	if(isset($_SERVER['PHP_SELF']))$_paths=$_SERVER['PHP_SELF'];
+	if($_paths==''&&isset($_SERVER['ORIG_PATH_INFO']))$_paths=$_SERVER['ORIG_PATH_INFO'];
+	$_patha = explode('api.php', $_paths);
+	$_paths = '/index/index';
+	if(isset($_patha[1])){
+		$_paths = $_patha[1];
+	}else{
+		if(isset($_SERVER['PATH_INFO']))$_paths=$_SERVER['PATH_INFO'];
+	}
+}
+unset($_GET['d']);
+unset($_GET['m']);
+unset($_GET['a']);
+if($_paths){
+	$_pa = explode('/', $_paths);
+	if(isset($_pa[1])&&$_pa[1])$m=$_pa[1];
+	if(isset($_pa[2])&&$_pa[2])$a=$_pa[2];
+}
+if(substr($m,0,4)=='open'){
+	$m 	= ''.$m.'|openapi';
+}else{
+	$m 	= ''.$m.'|api';
+}
+include_once('include/View.php');

+ 102 - 0
config/config.php

@@ -0,0 +1,102 @@
+<?php
+/**
+*	来自:信呼开发团队
+*	作者:磐石(rainrock)
+*	网址:http://www.rockoa.com/
+*	系统默认配置文件,请不要去修改
+*	要修改配置文件在:webmain/webmainConfig.php
+*/
+@session_start();
+if(function_exists('date_default_timezone_set'))date_default_timezone_set('Asia/Shanghai'); //设置默认时区
+header('Content-Type:text/html;charset=utf-8');
+define('ROOT_PATH',str_replace('\\','/',dirname(dirname(__FILE__))));	//系统跟目录路径
+
+include_once(''.ROOT_PATH.'/include/rockFun.php');
+include_once(''.ROOT_PATH.'/include/Chajian.php');
+include_once(''.ROOT_PATH.'/include/class/rockClass.php');
+$rock 		= new rockClass();
+
+$db			= null;		
+$smarty		= false;
+define('HOST', $rock->host);
+define('REWRITE', 'true');
+if(!defined('PROJECT'))define('PROJECT', $rock->get('p', 'webmain'));
+if(!defined('ENTRANCE'))define('ENTRANCE', 'index');
+
+$config		= array(
+	'title'		=> '信呼',
+	'url'		=> '',
+	'urly'		=> 'http://www.rockoa.com/',	//官网域名地址,修改后就无法提供在线升级了。
+	'db_host'	=> '127.0.0.1',
+	'db_user'	=> 'root',
+	'db_pass'	=> '123456',
+	'db_base'	=> 'rockxinhu',
+	'perfix'	=> '',
+	'qom'		=> '',
+	'highpass'	=> '',
+	'install'	=> false,
+	'version'	=> require('version.php'),
+	'path'		=> 'index',
+	'updir'		=> 'upload',
+	'dbencrypt'	=> false,
+	'sqllog'	=> false,
+	'checksign'	=> false,			//列表请求是否验证
+	'memory_limit'	=> '',			//运行内存大小
+	'timeout'		=> -1,			//抄送时间(秒),-1默认的
+	'db_drive'		=> 'mysqli',	//数据库操作驱动
+	'db_engine'		=> 'MyISAM',	//数据库默认引擎
+	'debug'			=> true,	//默认debug模式
+	'reim_show' 	=> true,	//首页是否显示REIM
+	'mobile_show' 	=> true,	//首页是否显示手机版
+	'accesslogs' 	=> false,	//是否记录访问日志和限制IP
+	'upurl'			=> '', 		//上传文件附件地址(还不能使用)
+	'authorkey'		=> '', 		//系统授权的key,请联系官网获取
+	'companymode'	=> false 	//是否开启多单位模式切换
+);
+
+//引入配置文件
+$_confpath		= $rock->strformat('?0/?1/?1Config.php', ROOT_PATH, PROJECT);
+if(file_exists($_confpath)){
+	$_tempconf	= require($_confpath);
+	foreach($_tempconf as $_tkey=>$_tvs)$config[$_tkey] = $_tvs;
+	if(isempt($config['url']))$config['url'] = $rock->url();
+	if(!isempt($config['memory_limit']) && function_exists('ini_set'))
+		ini_set('memory_limit', $config['memory_limit']);
+	if($config['timeout']>-1 && function_exists('set_time_limit'))set_time_limit($config['timeout']);	
+}
+
+$_confpath	= ''.ROOT_PATH.'/config/author.php';
+if(file_exists($_confpath)){
+	$config['authorkey'] = require($_confpath);
+}
+
+$_confpath	= ''.ROOT_PATH.'/config/xinhuplat.php';
+if(file_exists($_confpath))include_once($_confpath);
+if(!defined('COMPANYNUM'))define('COMPANYNUM', '');
+
+define('DEBUG', $config['debug']);
+error_reporting(DEBUG ? E_ALL : 0);
+
+define('TITLE', $config['title']);
+define('URL', $config['url']);
+define('URLY', $config['urly']);
+define('PATH', $config['path']);
+
+define('DB_DRIVE', $config['db_drive']);
+define('DB_HOST', $config['db_host']);
+define('DB_USER', $config['db_user']);
+define('DB_PASS', $config['db_pass']);
+define('DB_BASE', $config['db_base']);
+
+define('UPDIR', $config['updir']);
+define('PREFIX', $config['perfix']);
+define('QOM', $config['qom']);
+define('VERSION', $config['version']);
+define('HIGHPASS', $config['highpass']);
+define('SYSURL', ''.URL.PATH.'.php');
+define('UPURL', $config['upurl']);
+define('ISMORECOM', $config['companymode']);
+
+$_confpath	= ''.ROOT_PATH.'/config/iplogs.php'; //这个用来限制IP访问的
+if(file_exists($_confpath) && PHP_SAPI != 'cli')include_once($_confpath);
+$rock->initRock();

+ 12 - 0
config/iplist.php

@@ -0,0 +1,12 @@
+<?php
+/**
+*	这个页面是设置黑白名单访问的
+*/
+return array(
+
+	//黑名单IP,多个,分开如:127.0.0.1,192.168.1.100,也可以写192.168.1这样就是现在192.168.1.*所有的
+	'blackip' 	=> '',
+	
+	 //白名单
+	'whiteip'	=> ''
+);

+ 88 - 0
config/iplogs.php

@@ -0,0 +1,88 @@
+<?php
+/**
+*	添加方法日志,和IP限制判断
+*/
+function ipwhiteshow($ip, $rock){
+	$iplist = ''.ROOT_PATH.'/config/iplist.php';
+	$bool 	= 0;
+	if(file_exists($iplist)){
+		$iparr 	= require($iplist);
+	}else{
+		$iparr 	= array(
+			'blackip' 	=> '',
+			'whiteip'	=> '' 
+		);
+	}
+
+	//白名单判断
+	$whiteip = $iparr['whiteip'];
+	if($whiteip!=''){
+		$whiteipa = explode(',', $whiteip);
+		foreach($whiteipa as $ips){
+			$bo = strpos($ip, $ips);
+			if($bo===0 || $ips=='*'){
+				$bool = 1; //可以访问
+				break;
+			}
+		}
+	}
+	
+	//黑名单判断
+	if($bool==0){
+		$blackip = $iparr['blackip'];
+		if($blackip!=''){
+			$blackipa = explode(',', $blackip);
+			foreach($blackipa as $ips){
+				$bo = strpos($ip, $ips);
+				if($bo===0 || $ips=='*'){
+					$bool = 2;//不能访问
+					break;
+				}
+			}
+		}
+	}
+
+	//创建访问日志
+	if(getconfig('accesslogs')){
+		$str = '';
+		foreach($_SERVER as $k=>$v)$str.='['.$k.']:'.$v.chr(10).'';
+		
+		$str1 = '';
+		foreach($_GET as $k=>$v)$str1.='['.$k.']:'.$v.chr(10).'';
+		
+		$str2 = '';
+		foreach($_POST as $k=>$v)$str2.='['.$k.']:'.$v.chr(10).'';
+		$act  = arrvalue($_SERVER,'REQUEST_METHOD');
+		if($act=='POST' && $str2==''){
+			$str2 = arrvalue($GLOBALS, 'HTTP_RAW_POST_DATA');
+		}
+
+		$logs = ''.UPDIR.'/logs/'.date('Y-m-d').'/'.date('H').'/'.date('H.i.s').'_'.$act.'_'.$ip.'_'.rand(100,999).'.log';
+$logstr = '[datetime]:'.$rock->now.'
+[URL]:'.$rock->nowurl().'	
+[ACTION]:'.$act.'
+[IP]:'.$ip.'
+[GET]
+'.$str1.'
+[POST]
+'.$str2.'
+[SERVER]
+'.$str.'	
+';
+		$rock->createtxt($logs, $logstr);
+	}
+	
+	
+	if($bool==2){
+		$logs = ''.UPDIR.'/logs_access/'.date('YmdHis').'_'.rand(100,999).'.log';
+		$logstr = '[datetime]:'.$rock->now.''.chr(10).'[URL]:'.$rock->nowurl().''.chr(10).'[IP]:'.$ip.'';		
+		$rock->createtxt($logs, $logstr);
+		exit('您IP['.$ip.']禁止访问我们站点,有问题请联系我们');
+	}
+}
+
+function ipwhiteshows($ips, $rock){
+	$ipa = explode(',', $ips); 
+	foreach($ipa as $ip)ipwhiteshow($ip, $rock);
+}
+ipwhiteshows($rock->ip, $rock);

+ 3 - 0
config/version.php

@@ -0,0 +1,3 @@
+<?php
+//版本2.3.3最新完整2021
+return '2.3.3';








BIN
images/calendar.png


BIN
images/checkbox0.png


BIN
images/checkbox1.png




BIN
images/daiban.png












BIN
images/folder.png






BIN
images/helpbg.png


BIN
images/hetong.png








BIN
images/kaoqin.png


BIN
images/kaoshi.png


BIN
images/loading.gif


BIN
images/loadings.gif




BIN
images/mloading.gif


BIN
images/nav_chat0.png


BIN
images/nav_chat1.png


BIN
images/nav_my0.png


BIN
images/nav_my1.png


BIN
images/nav_user0.png


BIN
images/nav_user1.png


BIN
images/nav_ying0.png


BIN
images/nav_ying1.png




BIN
images/noface.png



BIN
images/nologo.png


BIN
images/project.png



BIN
images/shouwen.png



BIN
images/sousuo.png


BIN
images/taolun.png




BIN
images/tongxunlu.png


BIN
images/waichu.png


BIN
images/wclose.png






BIN
images/xiangyou1.png


BIN
images/zhishi.png


+ 209 - 0
include/Action.php

@@ -0,0 +1,209 @@
+<?php 
+/**
+	*****************************************************************
+	* 联系QQ: 290802026/1073744729									*
+	* 版  本: V2.0													*
+	* 开发者:雨中磐石工作室										*
+	* 邮  箱: admin@rockoa.com										*
+	* 网  址: http://www.rockoa.com/								*
+	* 说  明: 主控制器处理											*
+	* 备  注: 未经允许不得商业出售,代码欢迎参考纠正				*
+	*****************************************************************
+*/
+
+abstract class mainAction{
+	
+	public $rock;
+	public $db;
+	public $smarty;
+	public $smartydata	= array();	//模版数据
+	public $assigndata	= array();
+	public $display		= true;		//是否显示模板	
+	public $bodytitle	= '';		//副标题
+	public $keywords	= '';		//关键词
+	public $description	= '';		//说明
+	public $linkdb		= true;		//是否连接数据库
+	public $params		= array();	//参数
+	public $now;
+	public $date;
+	public $ip;
+	public $web;
+	public $title		= TITLE;
+	public $titles		= '';
+	public $option;
+	public $jm;
+	
+	public $table;
+	public $extentid	= 0;
+	public $importjs	= '';
+	public $perfix		= '';
+	public $tplname		= '';		//模板文件
+	public $tplpath		= '';		//模板文件路径
+	public $tpltype		= 'tpl';
+	public $tpldom		= 'html';
+	public $displayfile	= '';
+	
+	public $bodyMessage	= '';		//返回的内容
+	
+	public function __construct()
+	{
+		$this->rock		= $GLOBALS['rock'];
+		$this->smarty	= $GLOBALS['smarty'];
+		$this->jm		= c('jm', true);
+		$_obj = c('lang');if($_obj!=NULL && method_exists($_obj,'initLang'))$_obj->initLang();
+		$this->now		= $this->rock->now();
+		$this->date		= $this->rock->date;
+		$this->ip		= $this->rock->ip;
+		$this->web		= $this->rock->web;
+		$this->perfix	= PREFIX;
+		$this->display	= true;
+		$this->initMysql();	
+		$this->initConstruct();
+		$this->initProject();
+		$this->initAction();
+	}
+	
+	public function defaultAction(){}
+	public function initAction(){}
+	public function initProject(){}
+	public function afterAction(){}
+	public function initMysql(){}
+	public function beforeAction(){}
+	
+	public function T($n)
+	{
+		return $this->perfix.''.$n;
+	}
+	
+	public function assign($k, $v)
+	{
+		$this->assigndata[$k]=$v;
+	}
+
+	private function initConstruct()
+	{
+		$linkdb			= $this->rock->get('linkdb','true');
+		$this->params	= explode('-', $this->rock->get('s'));	//参数
+		if($linkdb == 'true' && $this->linkdb){
+			$this->initMysqllink();
+		}
+	}
+
+	private function initMysqllink()
+	{
+		$this->db		= import(DB_DRIVE);
+		$GLOBALS['db']	= $this->db;
+		include_once(''.ROOT_PATH.'/include/Model.php');
+		$this->option	= m('option');
+	}
+	
+	private function setBasedata()
+	{
+		$this->smartydata['bodytitle']	= $this->bodytitle;
+		$this->smartydata['keywords']	= $this->keywords;
+		$this->smartydata['description']= $this->description;
+		$this->smartydata['title']		= $this->title;
+		$this->smartydata['titles']		= $this->titles;
+		$this->smartydata['rewrite']	= REWRITE;
+		$this->smartydata['now']		= $this->now;
+		$this->smartydata['web']		= $this->rock->web;
+		$this->smartydata['ip']			= $this->ip;
+		$this->smartydata['url']		= URL;
+		$this->smartydata['urly']		= URLY;
+		$web 	= $this->rock->web;
+		$this->assign('web', $web);
+		$showheader	= 1;
+		$hide 	= $this->get('hideheader', $this->getsession('hideheader'));
+		if($hide=='true')$this->rock->savesession(array('hideheader' => $hide));
+		if($this->rock->iswebbro(0)
+			|| $this->rock->iswebbro(1)
+			|| $this->rock->iswebbro(4)
+			|| $this->rock->iswebbro(7)
+			|| $hide=='true'
+			|| $this->get('headerhide')=='true'
+			|| $this->rock->iswebbro(2))$showheader = 0; //隐藏头部
+		if($this->get('showheader')=='true')$showheader = 1;
+		$this->assign('showheader', $showheader);
+	}
+
+	public function setSmartyData()
+	{
+		$this->setBasedata();
+	}
+	
+	public function setHtmlData()
+	{
+		$this->setBasedata();
+		
+	}
+
+	public function getsession($name,$dev='')
+	{
+		return $this->rock->session($name, $dev);
+	}
+	
+	public function post($na, $dev='', $lx=0)
+	{
+		return $this->rock->post($na, $dev, $lx);
+	}
+	
+	public function get($na, $dev='', $lx=0)
+	{
+		return $this->rock->get($na, $dev, $lx);
+	}
+	
+	public function request($na, $dev='', $lx=0)
+	{
+		return $this->rock->request($na, $dev, $lx);
+	}
+	
+	public function isempt($str)
+	{
+		return $this->rock->isempt($str);
+	}
+	
+	public function contain($str, $a)
+	{
+		return $this->rock->contain($str, $a);
+	}
+	
+	public function getcookie($name, $dev='')
+	{
+		return $this->rock->cookie($name, $dev);
+	}
+	
+	public function stringformat($str, $arr=array())
+	{
+		return $this->rock->stringformat($str, $arr);
+	}
+	
+	public function getcan($i,$dev='')
+	{
+		$val	= '';
+		if(isset($this->params[$i]))$val=$this->params[$i];
+		if($this->rock->isempt($val)){
+			$val=$dev;
+		}else{
+			$val=str_replace('[a]','-',$val);
+		}
+		return $val;
+	}
+	
+	public function getmnumAjax()
+	{
+		$mnum	= $this->rock->request('mnum');
+		$rows	= $this->option->getmnum($mnum);
+		echo json_encode($rows);
+	}
+	
+	public function returnjson($arr)
+	{
+		echo json_encode($arr);
+		exit();
+	}
+		
+	public function showreturn($arr='', $msg='', $code=200)
+	{
+		showreturn($arr, $msg, $code);
+	}
+}

+ 47 - 0
include/Chajian.php

@@ -0,0 +1,47 @@
+<?php 
+/**
+	*****************************************************************
+	* 联系QQ: 290802026/1073744729									*
+	* 版  本: V2.0													*
+	* 开发者:雨中磐石工作室										*
+	* 邮  箱: qqqq2900@126.com										*
+	* 网  址: http://www.rockoa.com/								*
+	* 说  明: 插件主类												*
+	* 备  注: 未经允许不得商业出售,代码欢迎参考纠正			*
+	* 创建时间: 2014-08-30											*
+	*****************************************************************
+*/
+abstract class Chajian{
+	
+	public	$rock;
+	public 	$db;
+	public 	$adminname;
+	public 	$adminid;
+	
+	public function __construct()
+	{
+		$this->rock			= $GLOBALS['rock'];
+		$this->db			= $GLOBALS['db'];
+		$this->adminid		= $this->rock->adminid;
+		$this->adminname	= $this->rock->adminname;
+		$this->initChajian();
+	}
+	
+	public function __destruct()
+	{
+		$this->destChajian();
+	}
+	
+	public function isempt($str)
+	{
+		return $this->rock->isempt($str);
+	}
+	
+	public function contain($str, $s1)
+	{
+		return $this->rock->contain($str, $s1);
+	}
+		
+	protected function initChajian(){}
+	protected function destChajian(){}
+}

+ 182 - 0
include/Model.php

@@ -0,0 +1,182 @@
+<?php 
+/**
+	*****************************************************************
+	* 联系QQ: 290802026											*
+	* 版  本: V2.0													*
+	* 开发者:雨中磐石工作室										*
+	* 邮  箱: admin@rockoa.com										*
+	* 网  址: http://www.rockoa.com/								*
+	* 说  明: 数据模型												*
+	* 备  注: 未经允许不得商业出售,代码欢迎参考纠正				*
+	*****************************************************************
+*/
+
+abstract class Model{
+	
+	public 	$perfix		= PREFIX;
+	public	$rock;
+	public 	$db;
+	public  $table;
+	public 	$adminname;
+	public 	$adminid;
+	
+	public function __construct($table='')
+	{
+		$this->rock			= $GLOBALS['rock'];
+		$this->db			= $GLOBALS['db'];
+		$this->adminid		= $this->rock->adminid;
+		$this->adminname	= $this->rock->adminname;
+		$this->settable($table);
+		$this->initModel();
+	}
+	
+	public function settable($table, $qzbo=true)
+	{
+		$this->table	= ''.$this->perfix.''.$table.'';
+		if(!$qzbo)$this->table = $table;
+	}
+	
+	public function initModel(){}
+	
+
+	public function getmou($fields, $where, $order='')
+	{
+		return $this->db->getmou($this->table, $fields, $where, $order);
+	}
+
+	public function getone($where, $fields='*', $order='')
+	{
+		return $this->db->getone($this->table, $where, $fields, $order);
+	}
+	
+	public function getrows($where, $fields='*', $order='', $limit='')
+	{
+		return $this->db->getrows($this->table, $where, $fields, $order, $limit);
+	}
+	
+	public function getall($where, $fields='*', $order='', $limit='')
+	{
+		$sql	= $this->db->getsql(array(
+			'fields'	=> $fields,
+			'table'		=> $this->table,
+			'where'		=> $where,
+			'order'		=> $order,
+			'limit'		=> $limit
+		));
+		return $this->db->getall($sql);
+	}
+	
+	public function getarr($where, $fields='*', $kfied='id')
+	{
+		return $this->db->getarr($this->table, $where, $fields, $kfied);
+	}
+	public function rows($where)
+	{
+		return $this->db->rows($this->table, $where);
+	}
+
+	public function query($where, $fields='*', $order='', $limit='')
+	{
+		$sql	= $this->db->getsql(array(
+			'fields'	=> $fields,
+			'table'		=> $this->table,
+			'where'		=> $where,
+			'order'		=> $order,
+			'limit'		=> $limit
+		));
+		return $this->db->query($sql);
+	}
+	
+	public function record($arr, $where='')
+	{
+		return $this->db->record($this->table, $arr, $where);
+	}
+	
+	public function update($arr,$where)
+	{
+		return $this->record($arr, $where);
+	}
+	
+	public function insert($arr)
+	{
+		$nid = 0;
+		if($this->record($arr, ''))$nid = $this->db->insert_id();
+		return $nid;
+	}
+	
+	public function insertAll($arr)
+	{
+		$name 	= $values = '';
+		foreach($arr as $k=>$rs){
+			$cont = '';
+			foreach($rs as $i=>$v){
+				if($k==0)$name.=',`'.$i.'`';
+				$cont.=",".$this->db->toaddval($v)."";
+			}
+			$cont = substr($cont, 1);
+			if($k>0)$values.=',';
+			$values.='('.$cont.')';
+		}
+		return $this->db->insert($this->table, substr($name, 1),'values '.$values.'', true);
+	}
+	
+	public function getwhere($where='')
+	{
+		return $this->db->getwhere($where);
+	}
+	
+	public function getfields()
+	{
+		return $this->db->getallfields($this->table);
+	}
+	
+	public function delete($where)
+	{
+		return  $this->db->delete($this->table, $where);
+	}
+	
+	public function getlimit($where, $page=1, $fields='*', $order='', $limit=20, $table='')
+	{
+		if($order != '')$order = 'order by '.$order.'';
+		$where  	= $this->getwhere($where);
+		if($table == '')$table = $this->table;
+		$sql 		= "select $fields from $table where $where $order ";
+		$count 		= $this->db->rows($table, $where);
+		if($page <= 0)$page=1;
+		$sql	.= "limit ".($page-1)*$limit.",$limit";
+		$rows	 = $this->db->getall($sql);
+		$maxpage = ceil($count/$limit);
+		return array(
+			'rows'		=> $rows,
+			'count'		=> $count,
+			'maxpage'  	=> $maxpage,
+			'page'		=> $page,
+			'limit'		=> $limit,
+			'prevpage'	=> $page-1,
+			'nextpage'	=> $page+1,
+			'url'		=> ''
+		);
+	}
+	
+	public function isempt($str)
+	{
+		return $this->rock->isempt($str);
+	}
+	
+	public function contain($str, $s1)
+	{
+		return $this->rock->contain($str, $s1);
+	}
+	
+	public function getLastSql()
+	{
+		return $this->db->getLastSql();
+	}
+	
+	public function count($where='1=1')
+	{
+		return $this->rows($where);
+	}
+}
+
+class sModel extends Model{}

Разлика између датотеке није приказан због своје велике величине
+ 2320 - 0
include/PHPMailer/class.phpmailer.php


+ 407 - 0
include/PHPMailer/class.pop3.php

@@ -0,0 +1,407 @@
+<?php
+/*~ class.pop3.php
+.---------------------------------------------------------------------------.
+|  Software: PHPMailer - PHP email class                                    |
+|   Version: 5.1                                                            |
+|   Contact: via sourceforge.net support pages (also www.codeworxtech.com)  |
+|      Info: http://phpmailer.sourceforge.net                               |
+|   Support: http://sourceforge.net/projects/phpmailer/                     |
+| ------------------------------------------------------------------------- |
+|     Admin: Andy Prevost (project admininistrator)                         |
+|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
+|          : Marcus Bointon (coolbru) coolbru@users.sourceforge.net         |
+|   Founder: Brent R. Matzelle (original founder)                           |
+| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |
+| Copyright (c) 2001-2003, Brent R. Matzelle                                |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+| ------------------------------------------------------------------------- |
+| We offer a number of paid services (www.codeworxtech.com):                |
+| - Web Hosting on highly optimized fast and secure servers                 |
+| - Technology Consulting                                                   |
+| - Oursourcing (highly qualified programmers and graphic designers)        |
+'---------------------------------------------------------------------------'
+*/
+
+/**
+ * PHPMailer - PHP POP Before SMTP Authentication Class
+ * NOTE: Designed for use with PHP version 5 and up
+ * @package PHPMailer
+ * @author Andy Prevost
+ * @author Marcus Bointon
+ * @copyright 2004 - 2009 Andy Prevost
+ * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
+ * @version $Id: class.pop3.php 444 2009-05-05 11:22:26Z coolbru $
+ */
+
+/**
+ * POP Before SMTP Authentication Class
+ * Version 5.0.0
+ *
+ * Author: Richard Davey (rich@corephp.co.uk)
+ * Modifications: Andy Prevost
+ * License: LGPL, see PHPMailer License
+ *
+ * Specifically for PHPMailer to allow POP before SMTP authentication.
+ * Does not yet work with APOP - if you have an APOP account, contact Richard Davey
+ * and we can test changes to this script.
+ *
+ * This class is based on the structure of the SMTP class originally authored by Chris Ryan
+ *
+ * This class is rfc 1939 compliant and implements all the commands
+ * required for POP3 connection, authentication and disconnection.
+ *
+ * @package PHPMailer
+ * @author Richard Davey
+ */
+
+class POP3 {
+  /**
+   * Default POP3 port
+   * @var int
+   */
+  public $POP3_PORT = 110;
+
+  /**
+   * Default Timeout
+   * @var int
+   */
+  public $POP3_TIMEOUT = 30;
+
+  /**
+   * POP3 Carriage Return + Line Feed
+   * @var string
+   */
+  public $CRLF = "\r\n";
+
+  /**
+   * Displaying Debug warnings? (0 = now, 1+ = yes)
+   * @var int
+   */
+  public $do_debug = 2;
+
+  /**
+   * POP3 Mail Server
+   * @var string
+   */
+  public $host;
+
+  /**
+   * POP3 Port
+   * @var int
+   */
+  public $port;
+
+  /**
+   * POP3 Timeout Value
+   * @var int
+   */
+  public $tval;
+
+  /**
+   * POP3 Username
+   * @var string
+   */
+  public $username;
+
+  /**
+   * POP3 Password
+   * @var string
+   */
+  public $password;
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PRIVATE AND PROTECTED
+  /////////////////////////////////////////////////
+
+  private $pop_conn;
+  private $connected;
+  private $error;     //  Error log array
+
+  /**
+   * Constructor, sets the initial values
+   * @access public
+   * @return POP3
+   */
+  public function __construct() {
+    $this->pop_conn  = 0;
+    $this->connected = false;
+    $this->error     = null;
+  }
+
+  /**
+   * Combination of public events - connect, login, disconnect
+   * @access public
+   * @param string $host
+   * @param integer $port
+   * @param integer $tval
+   * @param string $username
+   * @param string $password
+   */
+  public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
+    $this->host = $host;
+
+    //  If no port value is passed, retrieve it
+    if ($port == false) {
+      $this->port = $this->POP3_PORT;
+    } else {
+      $this->port = $port;
+    }
+
+    //  If no port value is passed, retrieve it
+    if ($tval == false) {
+      $this->tval = $this->POP3_TIMEOUT;
+    } else {
+      $this->tval = $tval;
+    }
+
+    $this->do_debug = $debug_level;
+    $this->username = $username;
+    $this->password = $password;
+
+    //  Refresh the error log
+    $this->error = null;
+
+    //  Connect
+    $result = $this->Connect($this->host, $this->port, $this->tval);
+
+    if ($result) {
+      $login_result = $this->Login($this->username, $this->password);
+
+      if ($login_result) {
+        $this->Disconnect();
+
+        return true;
+      }
+
+    }
+
+    //  We need to disconnect regardless if the login succeeded
+    $this->Disconnect();
+
+    return false;
+  }
+
+  /**
+   * Connect to the POP3 server
+   * @access public
+   * @param string $host
+   * @param integer $port
+   * @param integer $tval
+   * @return boolean
+   */
+  public function Connect ($host, $port = false, $tval = 30) {
+    //  Are we already connected?
+    if ($this->connected) {
+      return true;
+    }
+
+    /*
+    On Windows this will raise a PHP Warning error if the hostname doesn't exist.
+    Rather than supress it with @fsockopen, let's capture it cleanly instead
+    */
+
+    set_error_handler(array(&$this, 'catchWarning'));
+
+    //  Connect to the POP3 server
+    $this->pop_conn = fsockopen($host,    //  POP3 Host
+                  $port,    //  Port #
+                  $errno,   //  Error Number
+                  $errstr,  //  Error Message
+                  $tval);   //  Timeout (seconds)
+
+    //  Restore the error handler
+    restore_error_handler();
+
+    //  Does the Error Log now contain anything?
+    if ($this->error && $this->do_debug >= 1) {
+      $this->displayErrors();
+    }
+
+    //  Did we connect?
+    if ($this->pop_conn == false) {
+      //  It would appear not...
+      $this->error = array(
+        'error' => "Failed to connect to server $host on port $port",
+        'errno' => $errno,
+        'errstr' => $errstr
+      );
+
+      if ($this->do_debug >= 1) {
+        $this->displayErrors();
+      }
+
+      return false;
+    }
+
+    //  Increase the stream time-out
+
+    //  Check for PHP 4.3.0 or later
+    if (version_compare(phpversion(), '5.0.0', 'ge')) {
+      stream_set_timeout($this->pop_conn, $tval, 0);
+    } else {
+      //  Does not work on Windows
+      if (substr(PHP_OS, 0, 3) !== 'WIN') {
+        socket_set_timeout($this->pop_conn, $tval, 0);
+      }
+    }
+
+    //  Get the POP3 server response
+    $pop3_response = $this->getResponse();
+
+    //  Check for the +OK
+    if ($this->checkResponse($pop3_response)) {
+    //  The connection is established and the POP3 server is talking
+    $this->connected = true;
+      return true;
+    }
+
+  }
+
+  /**
+   * Login to the POP3 server (does not support APOP yet)
+   * @access public
+   * @param string $username
+   * @param string $password
+   * @return boolean
+   */
+  public function Login ($username = '', $password = '') {
+    if ($this->connected == false) {
+      $this->error = 'Not connected to POP3 server';
+
+      if ($this->do_debug >= 1) {
+        $this->displayErrors();
+      }
+    }
+
+    if (empty($username)) {
+      $username = $this->username;
+    }
+
+    if (empty($password)) {
+      $password = $this->password;
+    }
+
+    $pop_username = "USER $username" . $this->CRLF;
+    $pop_password = "PASS $password" . $this->CRLF;
+
+    //  Send the Username
+    $this->sendString($pop_username);
+    $pop3_response = $this->getResponse();
+
+    if ($this->checkResponse($pop3_response)) {
+      //  Send the Password
+      $this->sendString($pop_password);
+      $pop3_response = $this->getResponse();
+
+      if ($this->checkResponse($pop3_response)) {
+        return true;
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  /**
+   * Disconnect from the POP3 server
+   * @access public
+   */
+  public function Disconnect () {
+    $this->sendString('QUIT');
+
+    fclose($this->pop_conn);
+  }
+
+  /////////////////////////////////////////////////
+  //  Private Methods
+  /////////////////////////////////////////////////
+
+  /**
+   * Get the socket response back.
+   * $size is the maximum number of bytes to retrieve
+   * @access private
+   * @param integer $size
+   * @return string
+   */
+  private function getResponse ($size = 128) {
+    $pop3_response = fgets($this->pop_conn, $size);
+
+    return $pop3_response;
+  }
+
+  /**
+   * Send a string down the open socket connection to the POP3 server
+   * @access private
+   * @param string $string
+   * @return integer
+   */
+  private function sendString ($string) {
+    $bytes_sent = fwrite($this->pop_conn, $string, strlen($string));
+
+    return $bytes_sent;
+  }
+
+  /**
+   * Checks the POP3 server response for +OK or -ERR
+   * @access private
+   * @param string $string
+   * @return boolean
+   */
+  private function checkResponse ($string) {
+    if (substr($string, 0, 3) !== '+OK') {
+      $this->error = array(
+        'error' => "Server reported an error: $string",
+        'errno' => 0,
+        'errstr' => ''
+      );
+
+      if ($this->do_debug >= 1) {
+        $this->displayErrors();
+      }
+
+      return false;
+    } else {
+      return true;
+    }
+
+  }
+
+  /**
+   * If debug is enabled, display the error message array
+   * @access private
+   */
+  private function displayErrors () {
+    echo '<pre>';
+
+    foreach ($this->error as $single_error) {
+      print_r($single_error);
+    }
+
+    echo '</pre>';
+  }
+
+  /**
+   * Takes over from PHP for the socket warning handler
+   * @access private
+   * @param integer $errno
+   * @param string $errstr
+   * @param string $errfile
+   * @param integer $errline
+   */
+  private function catchWarning ($errno, $errstr, $errfile, $errline) {
+    $this->error[] = array(
+      'error' => "Connecting to the POP3 server raised a PHP warning: ",
+      'errno' => $errno,
+      'errstr' => $errstr
+    );
+  }
+
+  //  End of class
+}
+?>

+ 814 - 0
include/PHPMailer/class.smtp.php

@@ -0,0 +1,814 @@
+<?php
+/*~ class.smtp.php
+.---------------------------------------------------------------------------.
+|  Software: PHPMailer - PHP email class                                    |
+|   Version: 5.1                                                            |
+|   Contact: via sourceforge.net support pages (also www.codeworxtech.com)  |
+|      Info: http://phpmailer.sourceforge.net                               |
+|   Support: http://sourceforge.net/projects/phpmailer/                     |
+| ------------------------------------------------------------------------- |
+|     Admin: Andy Prevost (project admininistrator)                         |
+|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
+|          : Marcus Bointon (coolbru) coolbru@users.sourceforge.net         |
+|   Founder: Brent R. Matzelle (original founder)                           |
+| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |
+| Copyright (c) 2001-2003, Brent R. Matzelle                                |
+| ------------------------------------------------------------------------- |
+|   License: Distributed under the Lesser General Public License (LGPL)     |
+|            http://www.gnu.org/copyleft/lesser.html                        |
+| This program is distributed in the hope that it will be useful - WITHOUT  |
+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
+| FITNESS FOR A PARTICULAR PURPOSE.                                         |
+| ------------------------------------------------------------------------- |
+| We offer a number of paid services (www.codeworxtech.com):                |
+| - Web Hosting on highly optimized fast and secure servers                 |
+| - Technology Consulting                                                   |
+| - Oursourcing (highly qualified programmers and graphic designers)        |
+'---------------------------------------------------------------------------'
+*/
+
+/**
+ * PHPMailer - PHP SMTP email transport class
+ * NOTE: Designed for use with PHP version 5 and up
+ * @package PHPMailer
+ * @author Andy Prevost
+ * @author Marcus Bointon
+ * @copyright 2004 - 2008 Andy Prevost
+ * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
+ * @version $Id: class.smtp.php 444 2009-05-05 11:22:26Z coolbru $
+ */
+
+/**
+ * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP
+ * commands except TURN which will always return a not implemented
+ * error. SMTP also provides some utility methods for sending mail
+ * to an SMTP server.
+ * original author: Chris Ryan
+ */
+
+class SMTP {
+  /**
+   *  SMTP server port
+   *  @var int
+   */
+  public $SMTP_PORT = 25;
+
+  /**
+   *  SMTP reply line ending
+   *  @var string
+   */
+  public $CRLF = "\r\n";
+
+  /**
+   *  Sets whether debugging is turned on
+   *  @var bool
+   */
+  public $do_debug;       // the level of debug to perform
+
+  /**
+   *  Sets VERP use on/off (default is off)
+   *  @var bool
+   */
+  public $do_verp = false;
+
+  /////////////////////////////////////////////////
+  // PROPERTIES, PRIVATE AND PROTECTED
+  /////////////////////////////////////////////////
+
+  private $smtp_conn; // the socket to the server
+  private $error;     // error if any on the last call
+  private $helo_rply; // the reply the server sent to us for HELO
+
+  /**
+   * Initialize the class so that the data is in a known state.
+   * @access public
+   * @return void
+   */
+  public function __construct() {
+    $this->smtp_conn = 0;
+    $this->error = null;
+    $this->helo_rply = null;
+
+    $this->do_debug = 0;
+  }
+
+  /////////////////////////////////////////////////
+  // CONNECTION FUNCTIONS
+  /////////////////////////////////////////////////
+
+  /**
+   * Connect to the server specified on the port specified.
+   * If the port is not specified use the default SMTP_PORT.
+   * If tval is specified then a connection will try and be
+   * established with the server for that number of seconds.
+   * If tval is not specified the default is 30 seconds to
+   * try on the connection.
+   *
+   * SMTP CODE SUCCESS: 220
+   * SMTP CODE FAILURE: 421
+   * @access public
+   * @return bool
+   */
+  public function Connect($host, $port = 0, $tval = 30) {
+    // set the error val to null so there is no confusion
+    $this->error = null;
+
+    // make sure we are __not__ connected
+    if($this->connected()) {
+      // already connected, generate error
+      $this->error = array("error" => "Already connected to a server");
+      return false;
+    }
+
+    if(empty($port)) {
+      $port = $this->SMTP_PORT;
+    }
+
+    // connect to the smtp server
+    $this->smtp_conn = @fsockopen($host,    // the host of the server
+                                 $port,    // the port to use
+                                 $errno,   // error number if any
+                                 $errstr,  // error message if any
+                                 $tval);   // give up after ? secs
+    // verify we connected properly
+    if(empty($this->smtp_conn)) {
+      $this->error = array("error" => "Failed to connect to server",
+                           "errno" => $errno,
+                           "errstr" => $errstr);
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    // SMTP server can take longer to respond, give longer timeout for first read
+    // Windows does not have support for this timeout function
+    if(substr(PHP_OS, 0, 3) != "WIN")
+     socket_set_timeout($this->smtp_conn, $tval, 0);
+
+    // get any announcement
+    $announce = $this->get_lines();
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $announce . $this->CRLF . '<br />';
+    }
+
+    return true;
+  }
+
+  /**
+   * Initiate a TLS communication with the server.
+   *
+   * SMTP CODE 220 Ready to start TLS
+   * SMTP CODE 501 Syntax error (no parameters allowed)
+   * SMTP CODE 454 TLS not available due to temporary reason
+   * @access public
+   * @return bool success
+   */
+  public function StartTLS() {
+    $this->error = null; # to avoid confusion
+
+    if(!$this->connected()) {
+      $this->error = array("error" => "Called StartTLS() without being connected");
+      return false;
+    }
+
+    fputs($this->smtp_conn,"STARTTLS" . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 220) {
+      $this->error =
+         array("error"     => "STARTTLS not accepted from server",
+               "smtp_code" => $code,
+               "smtp_msg"  => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    // Begin encrypted connection
+    if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Performs SMTP authentication.  Must be run after running the
+   * Hello() method.  Returns true if successfully authenticated.
+   * @access public
+   * @return bool
+   */
+  public function Authenticate($username, $password) {
+    // Start authentication
+    fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($code != 334) {
+      $this->error =
+        array("error" => "AUTH not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    // Send encoded username
+    fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($code != 334) {
+      $this->error =
+        array("error" => "Username not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    // Send encoded password
+    fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($code != 235) {
+      $this->error =
+        array("error" => "Password not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Returns true if connected to a server otherwise false
+   * @access public
+   * @return bool
+   */
+  public function Connected() {
+    if(!empty($this->smtp_conn)) {
+      $sock_status = socket_get_status($this->smtp_conn);
+      if($sock_status["eof"]) {
+        // the socket is valid but we are not connected
+        if($this->do_debug >= 1) {
+            echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected";
+        }
+        $this->Close();
+        return false;
+      }
+      return true; // everything looks good
+    }
+    return false;
+  }
+
+  /**
+   * Closes the socket and cleans up the state of the class.
+   * It is not considered good to use this function without
+   * first trying to use QUIT.
+   * @access public
+   * @return void
+   */
+  public function Close() {
+    $this->error = null; // so there is no confusion
+    $this->helo_rply = null;
+    if(!empty($this->smtp_conn)) {
+      // close the connection and cleanup
+      fclose($this->smtp_conn);
+      $this->smtp_conn = 0;
+    }
+  }
+
+  /////////////////////////////////////////////////
+  // SMTP COMMANDS
+  /////////////////////////////////////////////////
+
+  /**
+   * Issues a data command and sends the msg_data to the server
+   * finializing the mail transaction. $msg_data is the message
+   * that is to be send with the headers. Each header needs to be
+   * on a single line followed by a <CRLF> with the message headers
+   * and the message body being seperated by and additional <CRLF>.
+   *
+   * Implements rfc 821: DATA <CRLF>
+   *
+   * SMTP CODE INTERMEDIATE: 354
+   *     [data]
+   *     <CRLF>.<CRLF>
+   *     SMTP CODE SUCCESS: 250
+   *     SMTP CODE FAILURE: 552,554,451,452
+   * SMTP CODE FAILURE: 451,554
+   * SMTP CODE ERROR  : 500,501,503,421
+   * @access public
+   * @return bool
+   */
+  public function Data($msg_data) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              "error" => "Called Data() without being connected");
+      return false;
+    }
+
+    fputs($this->smtp_conn,"DATA" . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 354) {
+      $this->error =
+        array("error" => "DATA command not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    /* the server is ready to accept data!
+     * according to rfc 821 we should not send more than 1000
+     * including the CRLF
+     * characters on a single line so we will break the data up
+     * into lines by \r and/or \n then if needed we will break
+     * each of those into smaller lines to fit within the limit.
+     * in addition we will be looking for lines that start with
+     * a period '.' and append and additional period '.' to that
+     * line. NOTE: this does not count towards limit.
+     */
+
+    // normalize the line breaks so we know the explode works
+    $msg_data = str_replace("\r\n","\n",$msg_data);
+    $msg_data = str_replace("\r","\n",$msg_data);
+    $lines = explode("\n",$msg_data);
+
+    /* we need to find a good way to determine is headers are
+     * in the msg_data or if it is a straight msg body
+     * currently I am assuming rfc 822 definitions of msg headers
+     * and if the first field of the first line (':' sperated)
+     * does not contain a space then it _should_ be a header
+     * and we can process all lines before a blank "" line as
+     * headers.
+     */
+
+    $field = substr($lines[0],0,strpos($lines[0],":"));
+    $in_headers = false;
+    if(!empty($field) && !strstr($field," ")) {
+      $in_headers = true;
+    }
+
+    $max_line_length = 998; // used below; set here for ease in change
+
+    while(list(,$line) = @each($lines)) {
+      $lines_out = null;
+      if($line == "" && $in_headers) {
+        $in_headers = false;
+      }
+      // ok we need to break this line up into several smaller lines
+      while(strlen($line) > $max_line_length) {
+        $pos = strrpos(substr($line,0,$max_line_length)," ");
+
+        // Patch to fix DOS attack
+        if(!$pos) {
+          $pos = $max_line_length - 1;
+          $lines_out[] = substr($line,0,$pos);
+          $line = substr($line,$pos);
+        } else {
+          $lines_out[] = substr($line,0,$pos);
+          $line = substr($line,$pos + 1);
+        }
+
+        /* if processing headers add a LWSP-char to the front of new line
+         * rfc 822 on long msg headers
+         */
+        if($in_headers) {
+          $line = "\t" . $line;
+        }
+      }
+      $lines_out[] = $line;
+
+      // send the lines to the server
+      while(list(,$line_out) = @each($lines_out)) {
+        if(strlen($line_out) > 0)
+        {
+          if(substr($line_out, 0, 1) == ".") {
+            $line_out = "." . $line_out;
+          }
+        }
+        fputs($this->smtp_conn,$line_out . $this->CRLF);
+      }
+    }
+
+    // message data has been sent
+    fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 250) {
+      $this->error =
+        array("error" => "DATA not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Sends the HELO command to the smtp server.
+   * This makes sure that we and the server are in
+   * the same known state.
+   *
+   * Implements from rfc 821: HELO <SP> <domain> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE ERROR  : 500, 501, 504, 421
+   * @access public
+   * @return bool
+   */
+  public function Hello($host = '') {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+            "error" => "Called Hello() without being connected");
+      return false;
+    }
+
+    // if hostname for HELO was not specified send default
+    if(empty($host)) {
+      // determine appropriate default to send to server
+      $host = "localhost";
+    }
+
+    // Send extended hello first (RFC 2821)
+    if(!$this->SendHello("EHLO", $host)) {
+      if(!$this->SendHello("HELO", $host)) {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  /**
+   * Sends a HELO/EHLO command.
+   * @access private
+   * @return bool
+   */
+  private function SendHello($hello, $host) {
+    fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER: " . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 250) {
+      $this->error =
+        array("error" => $hello . " not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    $this->helo_rply = $rply;
+
+    return true;
+  }
+
+  /**
+   * Starts a mail transaction from the email address specified in
+   * $from. Returns true if successful or false otherwise. If True
+   * the mail transaction is started and then one or more Recipient
+   * commands may be called followed by a Data command.
+   *
+   * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE SUCCESS: 552,451,452
+   * SMTP CODE SUCCESS: 500,501,421
+   * @access public
+   * @return bool
+   */
+  public function Mail($from) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              "error" => "Called Mail() without being connected");
+      return false;
+    }
+
+    $useVerp = ($this->do_verp ? "XVERP" : "");
+    fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 250) {
+      $this->error =
+        array("error" => "MAIL not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Sends the quit command to the server and then closes the socket
+   * if there is no error or the $close_on_error argument is true.
+   *
+   * Implements from rfc 821: QUIT <CRLF>
+   *
+   * SMTP CODE SUCCESS: 221
+   * SMTP CODE ERROR  : 500
+   * @access public
+   * @return bool
+   */
+  public function Quit($close_on_error = true) {
+    $this->error = null; // so there is no confusion
+
+    if(!$this->connected()) {
+      $this->error = array(
+              "error" => "Called Quit() without being connected");
+      return false;
+    }
+
+    // send the quit command to the server
+    fputs($this->smtp_conn,"quit" . $this->CRLF);
+
+    // get any good-bye messages
+    $byemsg = $this->get_lines();
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $byemsg . $this->CRLF . '<br />';
+    }
+
+    $rval = true;
+    $e = null;
+
+    $code = substr($byemsg,0,3);
+    if($code != 221) {
+      // use e as a tmp var cause Close will overwrite $this->error
+      $e = array("error" => "SMTP server rejected quit command",
+                 "smtp_code" => $code,
+                 "smtp_rply" => substr($byemsg,4));
+      $rval = false;
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF . '<br />';
+      }
+    }
+
+    if(empty($e) || $close_on_error) {
+      $this->Close();
+    }
+
+    return $rval;
+  }
+
+  /**
+   * Sends the command RCPT to the SMTP server with the TO: argument of $to.
+   * Returns true if the recipient was accepted false if it was rejected.
+   *
+   * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250,251
+   * SMTP CODE FAILURE: 550,551,552,553,450,451,452
+   * SMTP CODE ERROR  : 500,501,503,421
+   * @access public
+   * @return bool
+   */
+  public function Recipient($to) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              "error" => "Called Recipient() without being connected");
+      return false;
+    }
+
+    fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 250 && $code != 251) {
+      $this->error =
+        array("error" => "RCPT not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Sends the RSET command to abort and transaction that is
+   * currently in progress. Returns true if successful false
+   * otherwise.
+   *
+   * Implements rfc 821: RSET <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE ERROR  : 500,501,504,421
+   * @access public
+   * @return bool
+   */
+  public function Reset() {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+              "error" => "Called Reset() without being connected");
+      return false;
+    }
+
+    fputs($this->smtp_conn,"RSET" . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 250) {
+      $this->error =
+        array("error" => "RSET failed",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Starts a mail transaction from the email address specified in
+   * $from. Returns true if successful or false otherwise. If True
+   * the mail transaction is started and then one or more Recipient
+   * commands may be called followed by a Data command. This command
+   * will send the message to the users terminal if they are logged
+   * in and send them an email.
+   *
+   * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE SUCCESS: 552,451,452
+   * SMTP CODE SUCCESS: 500,501,502,421
+   * @access public
+   * @return bool
+   */
+  public function SendAndMail($from) {
+    $this->error = null; // so no confusion is caused
+
+    if(!$this->connected()) {
+      $this->error = array(
+          "error" => "Called SendAndMail() without being connected");
+      return false;
+    }
+
+    fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
+
+    $rply = $this->get_lines();
+    $code = substr($rply,0,3);
+
+    if($this->do_debug >= 2) {
+      echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
+    }
+
+    if($code != 250) {
+      $this->error =
+        array("error" => "SAML not accepted from server",
+              "smtp_code" => $code,
+              "smtp_msg" => substr($rply,4));
+      if($this->do_debug >= 1) {
+        echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />';
+      }
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * This is an optional command for SMTP that this class does not
+   * support. This method is here to make the RFC821 Definition
+   * complete for this class and __may__ be implimented in the future
+   *
+   * Implements from rfc 821: TURN <CRLF>
+   *
+   * SMTP CODE SUCCESS: 250
+   * SMTP CODE FAILURE: 502
+   * SMTP CODE ERROR  : 500, 503
+   * @access public
+   * @return bool
+   */
+  public function Turn() {
+    $this->error = array("error" => "This method, TURN, of the SMTP ".
+                                    "is not implemented");
+    if($this->do_debug >= 1) {
+      echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF . '<br />';
+    }
+    return false;
+  }
+
+  /**
+  * Get the current error
+  * @access public
+  * @return array
+  */
+  public function getError() {
+    return $this->error;
+  }
+
+  /////////////////////////////////////////////////
+  // INTERNAL FUNCTIONS
+  /////////////////////////////////////////////////
+
+  /**
+   * Read in as many lines as possible
+   * either before eof or socket timeout occurs on the operation.
+   * With SMTP we can tell if we have more lines to read if the
+   * 4th character is '-' symbol. If it is a space then we don't
+   * need to read anything else.
+   * @access private
+   * @return string
+   */
+  private function get_lines() {
+    $data = "";
+    while($str = @fgets($this->smtp_conn,515)) {
+      if($this->do_debug >= 4) {
+        echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
+        echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
+      }
+      $data .= $str;
+      if($this->do_debug >= 4) {
+        echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />';
+      }
+      // if 4th character is a space, we are done reading, break the loop
+      if(substr($str,3,1) == " ") { break; }
+    }
+    return $data;
+  }
+
+}
+
+?>

+ 90 - 0
include/View.php

@@ -0,0 +1,90 @@
+<?php
+if(!isset($ajaxbool))$ajaxbool = $rock->jm->gettoken('ajaxbool', 'false');
+$ajaxbool	= $rock->get('ajaxbool', $ajaxbool);
+$p			= PROJECT;
+if(!isset($m))$m='index';
+if(!isset($a))$a='default';
+if(!isset($d))$d='';
+$m			= $rock->get('m', $m);
+$a			= $rock->get('a', $a);
+$d			= $rock->get('d', $d);
+
+define('M', $m);
+define('A', $a);
+define('D', $d);
+define('P', $p);
+
+$_m			= $m;
+if($rock->contain($m, '|')){
+	$_mas 	= explode('|', $m);
+	$m 		= $_mas[0];
+	$_m		= $_mas[1];
+}
+include_once($rock->strformat('?0/?1/?1Action.php',ROOT_PATH, $p));
+$rand		= date('YmdHis').rand(1000,9999);
+if(substr($d,-1)!='/' && $d!='')$d.='/';
+$errormsg	= '';
+$methodbool	= true;
+$actpath	= $rock->strformat('?0/?1/?2?3',ROOT_PATH, $p, $d, $_m);
+define('ACTPATH', $actpath);
+$actfile	= $rock->strformat('?0/?1Action.php',$actpath, $m);
+$actfile1	= $rock->strformat('?0/?1Action.php',$actpath, $_m);
+$actbstr 	= null;
+if(file_exists($actfile1))include_once($actfile1);
+if(file_exists($actfile)){
+	include_once($actfile);
+	$clsname	= ''.$m.'ClassAction';
+	$xhrock		= new $clsname();
+	$actname	= ''.$a.'Action';
+	if($ajaxbool == 'true')$actname	= ''.$a.'Ajax';
+	if(method_exists($xhrock, $actname)){
+		$xhrock->beforeAction();
+		$actbstr = $xhrock->$actname();
+		$xhrock->bodyMessage = $actbstr;
+		if(is_string($actbstr)){echo $actbstr;$xhrock->display=false;}
+		if(is_array($actbstr)){echo json_encode($actbstr);$xhrock->display=false;}
+	}else{
+		$methodbool = false;
+		if($ajaxbool == 'false')echo ''.$actname.' not found;';
+	}
+	$xhrock->afterAction();
+}else{
+	echo 'actionfile not exists;';
+	$xhrock		= new Action();
+}
+
+$_showbool = false;
+if($xhrock->display && ($ajaxbool == 'html' || $ajaxbool == 'false')){
+	$xhrock->smartydata['p']	= $p;
+	$xhrock->smartydata['a']	= $a;
+	$xhrock->smartydata['m']	= $m;
+	$xhrock->smartydata['d']	= $d;
+	$xhrock->smartydata['rand']	= $rand;
+	$xhrock->smartydata['qom']	= QOM;
+	$xhrock->smartydata['path']	= PATH;
+	$xhrock->smartydata['sysurl']= SYSURL;
+	$temppath					= ''.ROOT_PATH.'/'.$p.'/';
+	$tplpaths					= ''.$temppath.''.$d.''.$m.'/';
+	$tplname					= 'tpl_'.$m.'';
+	if($a!='default')$tplname  .= '_'.$a.'';
+	$tplname				   .= '.'.$xhrock->tpldom.'';
+	$mpathname					= $tplpaths.$tplname;
+	if($xhrock->displayfile!='' && file_exists($xhrock->displayfile))$mpathname = $xhrock->displayfile;
+	if(!file_exists($mpathname) || !$methodbool){
+		if(!$methodbool){
+			$errormsg	= 'in ('.$m.') not found Method('.$a.');';
+		}else{
+			$errormsg	= ''.$tplname.' not exists;';
+		}
+		echo $errormsg;
+	}else{
+		$_showbool = true;
+	}
+}
+if($xhrock->display && ($ajaxbool == 'html' || $xhrock->tpltype=='html' || $ajaxbool == 'false') && $_showbool){
+	$xhrock->setHtmlData();
+	$da = $xhrock->smartydata;
+	foreach($xhrock->assigndata as $_k=>$_v)$$_k=$_v;
+	include_once($mpathname);
+	$_showbool = false;
+}

+ 98 - 0
include/chajian/JPushChajian.php

@@ -0,0 +1,98 @@
+<?php 
+/**
+* 	最新系统推送1.9.7后
+*	软件:信呼OA
+*	最后更新:2021-10-09
+*/
+class JPushChajian extends Chajian{
+
+
+	//-------------最新原生app推送app是1.2.3版本 和 最新app+---------------
+	public function push($title, $desc, $cont, $palias)
+	{
+		
+		$alias		= $palias['alias'];
+		$xmalias	= $palias['xmalias']; //小米的
+		$newalias	= $palias['newalias']; //最新使用的
+		$oldalias	= $palias['oldalias']; //一般自己编译
+		$uids		= $palias['uids'];
+		$alias2019	= $palias['alias2019'];
+		$pushuids	= $palias['pushuids']; //可以推送的用户ID
+		$xmpush		= c('xmpush');
+		$hwpush		= c('hwpush');
+		
+		//可推送判断
+		$ketualia	= array();
+		foreach($alias2019 as $ali1){
+			$ali1aa = explode('|', $ali1);
+			$_uid	= $ali1aa[2];
+			if(in_array($_uid, $pushuids))$ketualia[] = $ali1;
+		}
+		$alias2019 = $ketualia;
+		
+		
+		//$this->rock->debugs($palias,'pushalias');//判断能不能推送,打印这个
+		
+		$xharr = array(
+			'uids'  => $uids,
+			'title' => $this->rock->jm->base64encode($title),
+			'cont'  => $this->rock->jm->base64encode($cont),
+			'desc'  => $desc,
+			'systype'=> getconfig('systype')
+		);
+		$isuguanw 	= false;
+		
+
+		//没有设置推送(走的信呼官网渠道)
+		if(!$xmpush->sendbool() && !$hwpush->sendbool()){
+			if($xmalias || $newalias || $oldalias || $alias2019){
+				if($xmalias)$xharr['xmalias'] 		= join(',', $xmalias);
+				if($newalias)$xharr['newalias'] 	= join(',', $newalias);
+				if($oldalias)$xharr['oldalias'] 	= join(',', $oldalias);
+				if($alias2019)$xharr['alias2019']	= join(',', $alias2019);
+				$isuguanw = true;
+			}
+		}else{
+			$desc = $this->rock->jm->base64decode($desc);
+			$xmarr = array();//小米的人员
+			$othar = array();//其他人用
+			$iosar = array(); //IOS
+			$hwarr = array(); //华为
+			$iospas= array();
+			if($alias2019)foreach($alias2019 as $ali1){
+				$ali1aa = explode('|', $ali1);
+				$regid  = $ali1aa[0];
+				$sjlxx  = $ali1aa[1];
+				if(contain($sjlxx,'xiaomi')){
+					$xmarr[] = $regid;
+				}else if(contain($sjlxx,'huawei')){
+					if(isset($ali1aa[3]) && $ali1aa[3])$hwarr[] = $ali1aa[3];
+				}else if(contain($sjlxx,'iphone')){	
+					$iosar[] = $regid;
+					$iospas[]= $ali1;
+				}else{
+					$othar[] = $regid;
+				}
+			}
+			$msg = $msg1 = $msg2 = '';
+			if($oldalias)$msg = $xmpush->androidsend($oldalias, $title, $desc, $cont);
+			if($xmarr)$msg = $xmpush->androidsend($xmarr, $title, $desc);
+			if($iosar){
+				if(!$xmpush->jpushiosbool()){
+					$xharr['alias2019']	= join(',', $iospas);
+					$isuguanw = true;	
+				}else{
+					$msg1= $xmpush->jpushiossend($iosar, $title, $desc);
+				}
+			}
+			if($hwarr)$msg2= $hwpush->androidsend($hwarr, $title, $desc);
+			$msg5 = $msg.$msg1.$msg2;
+			if($msg5)$this->rock->debugs($msg5,'mypush');
+		}
+		
+		if($isuguanw){
+			$runurl = c('xinhu')->geturlstr('jpushplat', $xharr);
+			c('curl')->getcurl($runurl);
+		}
+	}
+}

+ 383 - 0
include/chajian/PHPExcelChajian.php

@@ -0,0 +1,383 @@
+<?php 
+/**
+*	PHPExcel类
+*/
+class PHPExcelChajian extends Chajian{
+	
+	public  $excel				= null;
+	public  $sheetObj;
+	public	$headlen			= 0;
+
+	public  $headbgcolor		= 'CDF79E';
+	public  $bordercolor		= '000000';
+	public  $headfontcolor		= '';
+	public	$headfontbold		= false;
+	public 	$borderbool			= true;
+	
+	public 	$title				= '';
+	public 	$titlebool			= true;
+	public 	$titlebgbool		= false;
+	
+	public 	$sheettitle			= '';
+	public 	$headArr			= array();
+	public 	$rows				= array();
+	
+	
+	public 	$titleboolArray		= array();
+	public  $titleArray			= array();
+	public  $headArrArray		= array();
+	public  $rowsArray			= array();
+	
+	public  $pageCode			= 'utf-8';
+	public  $code				= 'utf-8';
+	public 	$createbool			= false;
+	
+	public function initChajian()
+	{
+		$this->A	= explode(',','A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ');
+		$this->headWidth= array();
+		$pastr = ROOT_PATH.'/include/PHPExcel.php';
+		if(file_exists($pastr)){
+			include_once($pastr);
+			$this->excel 	= new PHPExcel();
+		}
+	}
+	
+	public function isBool()
+	{
+		if($this->excel==null){
+			return false;
+		}else{
+			return true;
+		}
+	}
+	
+	/**
+		设置表头
+	*/
+	private function setHead($sheet=0)
+	{
+		$arrh	= $this->headArr;
+		$title	= $this->sheettitle;
+		if($title=='')$title = $this->title;
+		$this->headWidth	 = array();
+		if($sheet>0)$this->excel->createSheet();
+
+		$this->excel->setActiveSheetIndex($sheet);//设置当前的sheet工作簿
+		$this->sheetObj	= $this->excel->getActiveSheet();
+		$this->sheetObj->setTitle($title);//设置sheet的工作簿标题
+
+		$k	= 0;
+		if($sheet == 0){
+			$this->excel->getProperties()->setCreator('rock'); 		//创建者
+			$this->excel->getProperties()->setLastModifiedBy('rock');  //最后修改
+			$this->excel->getProperties()->setTitle('rock');  			//设置标题
+			$this->excel->getProperties()->setSubject('rock');  		//设置备注
+			$this->excel->getProperties()->setDescription('rock');  	//设置描述
+			$this->excel->getProperties()->setKeywords('rock');  		//设置关键字 | 标记
+			$this->excel->getProperties()->setCategory('rock');  		//设置类别
+		}
+		
+		$this->headlen	= -1;
+		foreach($arrh as $_arrh)$this->headlen++;
+		$this->rowslen	= 0;
+		if(is_array($this->rows))$this->rowslen=count($this->rows);//长度
+		if($this->headlen==-1)return false;
+
+		//整体添加边框颜色,居中
+		$zta		= ($this->titlebool)?2:1;
+		$getStyle	= $this->sheetObj->getStyle('A1:'.$this->A[$this->headlen].''.($this->rowslen+$zta).'');
+		$getStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);//垂直居中
+		$getStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::VERTICAL_CENTER);//水平居中
+		
+		if($this->borderbool){
+			$getStyle->getBorders()->getAllborders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);//边框
+			if($this->bordercolor!='000000')$getStyle->getBorders()->getAllborders()->getColor()->setARGB('FF'.$this->bordercolor.'');//边框颜色
+		}
+
+		//设置头部标题
+		if($this->titlebool){
+			$this->sheetObj->mergeCells('A1:'.$this->A[$this->headlen].'1');  //合并单元格
+			$this->sheetObj->setCellValue('A1', $title);
+			$this->sheetObj->getRowDimension(1)->setRowHeight(30); //设置行高
+			$getStyle	= $this->sheetObj->getStyle('A1');
+			$getStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
+			$getStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);//垂直剧中
+			$getStyle->getFont()->setBold(true);
+			$getStyle->getFont()->setSize(16);
+			//标题背景颜色
+			if($this->titlebgbool){
+				$getStyle->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
+				$getStyle->getFill()->getStartColor()->setARGB('FF'.$this->headbgcolor.'');
+			}
+		}
+		
+		//设置表头列标题
+		if($this->headfontbold)$this->sheetObj->getStyle('A'.$zta.':'.$this->A[$this->headlen].''.$zta.'')->getFont()->setBold(true);//标题是否加粗
+		foreach($arrh as $key=>$_arrh){
+			$name			= $_arrh;
+			$xlsfontcolor	= $this->headfontcolor;
+			$xlsbgcolor		= $this->headbgcolor;
+			$xlsbordercolor	= $this->bordercolor;
+			$xlsfontsize	= '';//字体大小
+			$xlswidth		= 0;		//宽度
+			$xlsalign		= 'center';	//对齐方式
+			$xlsbold		= false;	//是否加粗
+			if(is_array($_arrh)){
+				if(isset($_arrh['xlsfontcolor']))$xlsfontcolor=$_arrh['xlsfontcolor'];
+				if(isset($_arrh['xlsbgcolor']))$xlsbgcolor=$_arrh['xlsbgcolor'];
+				if(isset($_arrh['xlsbordercolor']))$xlsbordercolor=$_arrh['xlsbordercolor'];
+				if(isset($_arrh['xlswidth']))$xlswidth=$_arrh['xlswidth'];
+				if(isset($_arrh['xlsalign']))$xlswidth=$_arrh['xlsalign'];
+				if(isset($_arrh['xlsbold']))$xlsbold=$_arrh['xlsbold'];
+				if(isset($_arrh['xlsfontsize']))$xlsfontsize=$_arrh['xlsfontsize'];
+				$name= $_arrh['name'];
+			}
+			$this->headWidth[$key] = array(strlen($name), $xlswidth);	//设置宽度
+			//设置样式
+			$vk	= ''.$this->A[$k].'2';
+			
+			if(!$this->titlebool)$vk = ''.$this->A[$k].'1';
+			$getStyle	= $this->sheetObj->getStyle($vk);
+			
+			//边框
+			if($xlsbordercolor!='000000')$getStyle->getBorders()->getAllborders()->getColor()->setARGB('FF'.$xlsbordercolor.''); 
+				
+			
+			//设置背景色
+			$getStyle->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
+			$getStyle->getFill()->getStartColor()->setARGB('FF'.$xlsbgcolor.'');
+			
+			//设置字体颜色加粗,大小
+			if($xlsfontcolor!='')$getStyle->getFont()->getColor()->setARGB('FF'.$xlsfontcolor.'');
+			if($xlsbold)$getStyle->getFont()->setBold(true);
+			if($xlsfontsize!='')$getStyle->getFont()->setSize($xlsfontsize);
+			
+			//设置对齐方式
+			if($xlsalign!='center')$getStyle->getAlignment()->setHorizontal($xlsalign);
+			
+			$this->sheetObj->setCellValue($vk, $name);
+			$k++;
+		}
+	}
+	
+	
+	/**
+		添加数据
+	*/
+	private function setData()
+	{
+		$rows	= $this->rows;
+		if(!is_array($rows))return false;
+		$arrh	= $this->headArr;
+		$zta	= ($this->titlebool)?3:2;
+		//添加数据
+		foreach($rows as $r=>$rs){
+			if(!is_array($rs))continue;
+			$k			= 0;
+			$xlsmerge	= '';
+			$xlsbgcolor	= '';
+			$xua		= $r+$zta;
+			if(isset($rs['xlsmerge']))$xlsmerge=$rs['xlsmerge'];
+			if(isset($rs['xlsbgcolor']))$xlsbgcolor=$rs['xlsbgcolor'];
+			
+			//整行背景色
+			if($xlsbgcolor!=''){
+				$this->sheetObj->getStyle('A'.$xua.':'.$this->A[$this->headlen].''.$xua.'')
+				->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)
+				->getStartColor()->setARGB('FF'.$xlsbgcolor.'');
+			}
+			
+			//判断是否有合并单元格的(A:D)
+			if($xlsmerge!=''){
+				$ncta	= explode(':',$xlsmerge);
+				$this->sheetObj->mergeCells(''.$ncta[0].''.$xua.':'.$ncta[1].''.$xua.'');
+			}
+			
+			foreach($arrh as $key=>$_arrh){
+				if(!isset($rs[$key])){
+					$k++;
+					continue;
+				}
+				$vk	= ''.$this->A[$k].''.$xua.'';
+				$xlsfontcolor	= $xlsbgcolor = '';
+				$xlsbordercolor	= $this->bordercolor;
+				$xlsunderline	= '';
+				$xlsfontsize	= '';
+				$xlsalign		= 'center';	//对齐方式
+				$xlsbold		= false;	//是否加粗
+				$xlsitalic		= false;	//是否斜体
+				$val			= $rs[$key];
+				$vallen			= strlen(''.$val.'');
+				if($this->headWidth[$key][0]<$vallen)$this->headWidth[$key][0]=$vallen;
+				if(is_array($_arrh)){
+					if(isset($_arrh['xlsfontcolor']))$xlsfontcolor=$_arrh['xlsfontcolor'];
+					if(isset($_arrh['xlsbgcolor']))$xlsbgcolor=$_arrh['xlsbgcolor'];
+					if(isset($_arrh['xlsbordercolor']))$xlsbordercolor=$_arrh['xlsbordercolor'];
+					if(isset($_arrh['xlsalign']))$xlsalign=$_arrh['xlsalign'];
+				}
+				
+				if(isset($rs['xlsfontcolor']))$xlsfontcolor=$rs['xlsfontcolor'];
+				if(isset($rs['xlsbordercolor']))$xlsbordercolor=$rs['xlsbordercolor'];
+				if(isset($rs['xlsalign']))$xlsalign=$rs['xlsalign'];
+				if(isset($rs['xlsbold']))$xlsbold=$rs['xlsbold'];
+				if(isset($rs['xlsfontsize']))$xlsfontsize=$rs['xlsfontsize'];
+				if(isset($rs['xlsunderline']))$xlsunderline=$rs['xlsunderline'];
+				
+				if(isset($rs[''.$key.'xlsfontcolor']))$xlsfontcolor=$rs[''.$key.'xlsfontcolor'];
+				if(isset($rs[''.$key.'xlsbgcolor']))$xlsbgcolor=$rs[''.$key.'xlsbgcolor'];
+				if(isset($rs[''.$key.'xlsbordercolor']))$xlsbordercolor=$rs[''.$key.'xlsbordercolor'];
+				if(isset($rs[''.$key.'xlsalign']))$xlsalign=$rs[''.$key.'xlsalign'];
+				if(isset($rs[''.$key.'xlsbold']))$xlsbold=$rs[''.$key.'xlsbold'];
+				if(isset($rs[''.$key.'xlsfontsize']))$xlsfontsize=$rs[''.$key.'xlsfontsize'];
+				if(isset($rs[''.$key.'xlsitalic']))$xlsitalic=$rs[''.$key.'xlsitalic'];
+				if(isset($rs[''.$key.'xlsunderline']))$xlsunderline=$rs[''.$key.'xlsunderline'];
+				
+				$getStyle	= $this->sheetObj->getStyle($vk);
+				//设置背景色
+				if($xlsbgcolor!=''){
+					$getStyle->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
+					$getStyle->getFill()->getStartColor()->setARGB('FF'.$xlsbgcolor.'');
+				}
+				
+				//字体颜色
+				if($xlsfontcolor!='')$getStyle->getFont()->getColor()->setARGB('FF'.$xlsfontcolor.'');
+				if($xlsbold)$getStyle->getFont()->setBold(true);
+				if($xlsitalic)$getStyle->getFont()->setItalic(true);//斜体
+				if($xlsfontsize!='')$getStyle->getFont()->setSize($xlsfontsize);
+				if($xlsunderline!='')$getStyle->getFont()->setUnderline($xlsunderline);//下划线情况double,双下划线、doubleAccounting,整个单元格双下划线、single,单下划线、singleAccounting,整个单元格单下划线
+				
+				//设置边框颜色
+				if($xlsbordercolor!='000000')$getStyle->getBorders()->getAllborders()->getColor()->setARGB('FF'.$xlsbordercolor.''); 
+				
+				//对齐方式
+				if($xlsalign!='center')$getStyle->getAlignment()->setHorizontal($xlsalign);
+				
+				$this->sheetObj->setCellValue($vk, $val);
+				$k++;
+			}
+			
+			//设置行高
+			$xlsrowheight	= 0;
+			if(isset($rs['xlsrowheight']))$xlsrowheight=$rs['xlsrowheight'];
+			if($xlsrowheight != 0)$this->sheetObj->getRowDimension($r+$zta)->setRowHeight($xlsrowheight); 
+		}
+	}
+	
+	/**
+		设置列宽
+	*/
+	private function setColwidth()
+	{
+		$k=0;
+		foreach($this->headWidth as $key=>$v){
+			$w	= $v[1];
+			if($w<=0){
+				$w= $v[0] * 1.2;
+			}else{
+				$w= $w/70*12;
+			}
+			if($w>0)$this->sheetObj->getColumnDimension($this->A[$k])->setWidth($w);
+			$k++;
+		}		
+	}
+
+	/**
+		创建数据
+	*/
+	public function createData()
+	{
+		$len1	= count($this->titleArray);
+		$len2	= count($this->headArrArray);
+		$len3	= count($this->rowsArray);
+		
+		if($len1==$len2 && $len2==$len3 && $len1>0){
+			for($i=0; $i<$len1; $i++){
+				$this->sheettitle	= $this->titleArray[$i];
+				$this->headArr		= $this->headArrArray[$i];
+				$this->rows			= $this->rowsArray[$i];
+				$this->titlebool	= true;
+				if(isset($this->titleboolArray[$i]))$this->titlebool=$this->titleboolArray[$i];
+				
+				$this->setHead($i);
+				$this->setData();
+				$this->setColwidth();
+			}
+			$this->excel->setActiveSheetIndex(0);
+		}else{
+			$this->setHead(0);
+			$this->setData();
+			$this->setColwidth();
+		}
+		$this->createbool	= true;
+	}
+	
+	/**
+		输出显示
+		@param	string  $ext   	输出类型 xls,xlsx
+		@param	string  $type   是否直接下载
+		@return string 文件名
+	*/
+	public function display($ext='xls', $type='down')
+	{
+		if(!$this->createbool){
+			$this->createData();
+		}
+		
+		$title	= $this->title;
+
+		//有随机数
+		$rand		= '';
+		if(contain($type,'rand'))$rand	= date('YmdHis');
+		$filename	= ''.$title.''.$rand.'.'.$ext.'';
+
+		//输出
+		if($ext!='xlsx'){
+			$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
+		}else{
+			$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel2007'); //保存excel—2007格式或者
+		}
+		$backfile = 'down';
+		
+		//保存文件
+		if(contain($type,'savelogs')){
+			$dir	= 'logs';
+			$path	= ''.ROOT_PATH.'/'.UPDIR.'/'.$dir.'/';
+			if(!is_dir($path))mkdir($path);
+			$savefile	= $path.''.$this->iconvstr($filename).'';
+			$objWriter->save($savefile); //是否保存本地
+			$backfile	= ''.UPDIR.'/'.$dir.'/'.$filename.'';
+		}
+		
+		//下载
+		if(contain($type, 'down')){
+			header('Content-type: application/vnd.ms-excel');
+			header('Content-Disposition: attachment; filename="'.iconv('utf-8', 'gbk', $filename).'"');
+			header('Cache-Control: max-age=0');
+			$objWriter->save('php://output');
+		}
+		
+		return $backfile;
+	}
+	
+	
+	/**
+		编码转化
+	*/	
+	private function iconvstr($str)
+	{
+		if($this->pageCode=='utf-8')$str	= iconv('utf-8', 'gbk', $str);
+		return $str;
+	}
+	
+	
+	/**
+		合并单元格
+	*/
+	public function mergeCells($cel1, $cel2, $val=null, $sheet=-1)
+	{
+		if($sheet != -1)$this->excel->setActiveSheetIndex($sheet);
+		$this->excel->getActiveSheet()->mergeCells(''.$cel1.':'.$cel2.'');
+		if($val != null)$this->sheetObj->setCellValue($cel1, $val);
+	}
+}                         

Разлика између датотеке није приказан због своје велике величине
+ 65 - 0
include/chajian/PHPExcelReaderChajian.php


+ 69 - 0
include/chajian/PHPWordChajian.php

@@ -0,0 +1,69 @@
+<?php 
+/**
+*	PHPWord类
+*/
+
+class PHPWordChajian extends Chajian{
+	
+	private $vendorbool=false;
+	
+	protected function initChajian()
+	{
+		$path = ''.ROOT_PATH.'/include/vendor/autoload.php';
+		if(file_exists($path)){
+			require_once($path);
+			$this->vendorbool = true;
+		}
+	}
+	
+	public function isbool()
+	{
+		return $this->vendorbool;
+	}
+	
+	public function test()
+	{
+		if(!$this->vendorbool)return;
+		
+		\PhpOffice\PhpWord\Settings::loadConfig();
+		
+		\PhpOffice\PhpWord\Settings::setPdfRenderer(\PhpOffice\PhpWord\Settings::PDF_RENDERER_DOMPDF, ''.ROOT_PATH.'/include/vendor/dompdf/dompdf');
+		\PhpOffice\PhpWord\Settings::setOutputEscapingEnabled(true);
+		
+		$languageEnGb = new \PhpOffice\PhpWord\Style\Language(\PhpOffice\PhpWord\Style\Language::EN_GB);
+
+		$phpWord = new \PhpOffice\PhpWord\PhpWord();
+		$phpWord->getSettings()->setThemeFontLang($languageEnGb);
+		
+		
+		$section = $phpWord->addSection();
+		// Adding Text element to the Section having font styled by default...
+		$section->addText(
+			'"Learn from yesterday, live for today, hope for tomorrow. '
+				. 'The important thing is信呼 not to stop questioning." '
+				. '(Albert Einstein)'
+		);
+		//$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
+		//$objWriter->save('wfewew.docx');
+		$phpWord->save('helloWorld'.time().'.pdf','PDF');
+		
+		
+		
+	}
+	
+	/**
+	*	只能替换.docx
+	*/
+	public function replaceWord($path, $data=array(), $npath='')
+	{
+		if(!$this->vendorbool)return returnerror('未安装插件');
+		
+		$PhpWord = new \PhpOffice\PhpWord\TemplateProcessor($path);
+		foreach($data as $k=>$v)$PhpWord->setValue($k, $v);
+
+		if($npath=='')$npath = str_replace('.docx',''.rand(1000,9999).'.docx', $path);
+		$PhpWord->saveAs($npath);
+		
+		return returnsuccess($npath);
+	}
+}                         

+ 180 - 0
include/chajian/alismsChajian.php

@@ -0,0 +1,180 @@
+<?php
+/**
+*	阿里云短信服务api
+*/
+class alismsChajian extends Chajian{
+	
+	private $accesskeyid;
+	private $accesskeysecret;
+	
+	protected function initChajian()
+	{
+		$this->accesskeyid 		= getconfig('alisms_keyid');
+		$this->accesskeysecret 	= getconfig('alisms_keysecret');
+	}
+	
+	/**
+	*	批量发送短信
+	*/
+	public function send($mobiles, $qianm, $tplid, $cans=array())
+	{
+		if(isempt($this->accesskeyid) || isempt($this->accesskeysecret))return returnerror('没有设置短信keyid或keysecret');
+		
+		if(isempt($qianm))return returnerror('请设置短信签名');
+		if(isempt($tplid) || substr($tplid,0,4) != 'SMS_')return returnerror('短信模版CODE格式有误');
+		
+		$mbarr = $this->getTplcont($tplid);
+		if(!$mbarr['success'])return $mbarr;
+		$tplcont = $mbarr['data']['TemplateContent'];
+		
+		if(isset($cans['url']))$cans['url'] = c('xinhuapi')->urlsmall($cans['url']); //如果有短域名用这个生成,不要就删掉这行
+		
+		//把没用参数删掉
+		$csarr	= $this->rock->matcharr($tplcont);
+		foreach($csarr as $cs1)if(!isset($cans[$cs1]))return returnerror('模版里有{'.$cs1.'}参数,发送必须传');
+		foreach($cans as $k1=>$v1)if(!in_array($k1, $csarr))unset($cans[$k1]);
+		
+		
+		$params = array();
+		$shoujha= explode(',', $mobiles);
+		$params["PhoneNumberJson"] 	= $shoujha;
+		$params["TemplateCode"] 	=  $tplid;
+		
+		foreach($shoujha as $smid){
+			$params["SignNameJson"][] 		= $qianm;
+			if($cans)$params["TemplateParamJson"][] 	= $cans;
+		}
+	
+		if($cans)$params["TemplateParamJson"]  = json_encode($params["TemplateParamJson"], JSON_UNESCAPED_UNICODE);
+		$params["SignNameJson"] 		= json_encode($params["SignNameJson"], JSON_UNESCAPED_UNICODE);
+		$params["PhoneNumberJson"] 	= json_encode($params["PhoneNumberJson"], JSON_UNESCAPED_UNICODE);
+		
+		$helper 	= new SignatureHelper();
+		$result 	= $helper->request(
+			$this->accesskeyid,
+			$this->accesskeysecret,
+			'dysmsapi.aliyuncs.com',
+			array_merge($params, array(
+				"RegionId" => "cn-hangzhou",
+				"Action" => "SendBatchSms",
+				"Version" => "2017-05-25",
+			))
+		);
+		if(!$result)return returnerror('发送失败');
+		$barr	= json_decode($result, true);
+		if($barr['Code']=='OK')return returnsuccess($barr);
+		return returnerror('发送失败:'.$result.'');
+	}
+	
+	public function getTplcont($tplid)
+	{
+		$num = 'alisms_'.$tplid.'';
+		$val = m('option')->getval($num);
+		if(!isempt($val)){
+			return returnsuccess(array('TemplateContent'=>$val));
+		}
+		if(isempt($this->accesskeyid) || isempt($this->accesskeysecret))return returnerror('没有设置短信keyid或keysecret');
+		$helper 	= new SignatureHelper();
+		$params['TemplateCode'] = $tplid;
+		$result 	= $helper->request(
+			$this->accesskeyid,
+			$this->accesskeysecret,
+			'dysmsapi.aliyuncs.com',
+			array_merge($params, array(
+				"RegionId" => "cn-hangzhou",
+				"Action" => "QuerySmsTemplate",
+				"Version" => "2017-05-25",
+			))
+		);
+		if(!$result)return returnerror('获取模版失败'.$tplid.'');
+		$barr	= json_decode($result, true);
+		if($barr['Code']=='OK'){
+			m('option')->setval($num, $barr['TemplateContent']);
+			return returnsuccess($barr);
+		}
+		return returnerror('获取失败:'.$result.'');
+	}
+}
+
+/**
+ * 签名助手 2017/11/19
+ *
+ * Class SignatureHelper
+ */
+class SignatureHelper {
+
+    /**
+     * 生成签名并发起请求
+     *
+     * @param $accessKeyId string AccessKeyId (https://ak-console.aliyun.com/)
+     * @param $accessKeySecret string AccessKeySecret
+     * @param $domain string API接口所在域名
+     * @param $params array API具体参数
+     * @param $security boolean 使用https
+     * @return bool|\stdClass 返回API接口调用结果,当发生错误时返回false
+     */
+    public function request($accessKeyId, $accessKeySecret, $domain, $params, $security=false) {
+        $apiParams = array_merge(array (
+            "SignatureMethod" => "HMAC-SHA1",
+            "SignatureNonce" => uniqid(mt_rand(0,0xffff), true),
+            "SignatureVersion" => "1.0",
+            "AccessKeyId" => $accessKeyId,
+            "Timestamp" => gmdate("Y-m-d\TH:i:s\Z"),
+            "Format" => "JSON",
+        ), $params);
+        ksort($apiParams);
+
+        $sortedQueryStringTmp = "";
+        foreach ($apiParams as $key => $value) {
+            $sortedQueryStringTmp .= "&" . $this->encode($key) . "=" . $this->encode($value);
+        }
+
+        $stringToSign = "GET&%2F&" . $this->encode(substr($sortedQueryStringTmp, 1));
+
+        $sign = base64_encode(hash_hmac("sha1", $stringToSign, $accessKeySecret . "&",true));
+
+        $signature = $this->encode($sign);
+
+        $url = ($security ? 'https' : 'http')."://{$domain}/?Signature={$signature}{$sortedQueryStringTmp}";
+
+        try {
+            $content = $this->fetchContent($url);
+            return $content;
+        } catch( \Exception $e) {
+            return false;
+        }
+    }
+
+    private function encode($str)
+    {
+        $res = urlencode($str);
+        $res = preg_replace("/\+/", "%20", $res);
+        $res = preg_replace("/\*/", "%2A", $res);
+        $res = preg_replace("/%7E/", "~", $res);
+        return $res;
+    }
+
+    private function fetchContent($url) {
+        $ch = curl_init();
+        curl_setopt($ch, CURLOPT_URL, $url);
+        curl_setopt($ch, CURLOPT_TIMEOUT, 5);
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
+            "x-sdk-client" => "php/2.0.0"
+        ));
+
+        if(substr($url, 0,5) == 'https') {
+            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
+        }
+
+        $rtn = curl_exec($ch);
+
+        if($rtn === false) {
+            trigger_error("[CURL_" . curl_errno($ch) . "]: " . curl_error($ch), E_USER_ERROR);
+        }
+        curl_close($ch);
+
+        return $rtn;
+    }
+}

+ 95 - 0
include/chajian/arrayChajian.php

@@ -0,0 +1,95 @@
+<?php 
+/**
+	数组操作
+*/
+class arrayChajian extends Chajian{
+	/**
+		二维数组排序
+	*/
+	public function order($arr, $field, $tyee='desc')
+	{
+		$temp_a = array();
+		foreach ($arr as $arrs) {
+			$temp_a[] = $arrs[$field];
+		}
+		$tyee	= strtolower($tyee);
+		if($tyee == 'desc'){
+			array_multisort($temp_a, SORT_DESC, $arr);
+		}else{
+			array_multisort($temp_a, SORT_ASC, $arr);
+		}
+		return $arr;
+	}
+	
+	/**
+		转换为用数字做的键值
+	*/
+	public function tonumarray($arr, $otarr='')
+	{
+		$varr=array();
+		if(is_array($otarr))$varr[]=$otarr;
+		if(is_array($arr)){
+			foreach($arr as $da){
+				$key = array_keys($da);
+				$zarr=array();
+				for($i=0;$i<count($key);$i++)$zarr[$i]=$da[$key[$i]];
+				$varr[]=$zarr;
+			}			
+		}
+		return $varr;
+	}
+	
+	/**
+		$str  转化为 数组 0|昨天,2|d
+	*/
+	public function strtoarray($str)
+	{
+		$a	= explode(',', $str);
+		$arr= array();
+		foreach($a as $a1){
+			$a2	= explode('|', $a1);
+			$k 	= $a2[0];
+			$v 	= $a2[0];
+			$c	= '';
+			if(isset($a2[1]))$v = $a2[1];
+			if(isset($a2[2]))$c = $a2[2];
+			$arr[] = array($k, $v, $c);
+		}
+		return $arr;
+	}
+	
+	/**
+		$str  转化为 数组对象 0|昨天,2|d
+	*/
+	public function strtoobject($str)
+	{
+		$rowa = $this->strtoarray($str);
+		$arr  = array();
+		foreach($rowa as $k=>$rs){
+			$arr[$rs[0]] = $rs[1];
+		}
+		return $arr;
+	}
+	
+	/**
+		[{}]数组转化为{ke1:ke2}
+	*/
+	public function arrrytoobject($arr, $lx=0)
+	{
+		$rows = array();
+		foreach($arr as $k=>$da){
+			$karr 	= array_keys($da);
+			$key	= $da[$karr[0]];
+			$nav	= $key;
+			if(count($karr)>1){
+				$nav = $da[$karr[1]];
+			}
+			if($lx == 1){
+				$rows[$key] = $da;
+			}else{
+				$rows[$key] = $nav;
+			}
+		}
+		return $rows;
+	}
+}                                                                                                                                                            

+ 0 - 0
include/chajian/cacheChajian.php


Неке датотеке нису приказане због велике количине промена