s3_sae.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title><?php echo $Title; ?> - <?php echo $Powered; ?></title>
  6. <link rel="stylesheet" href="./css/install.css?v=9.0" />
  7. </head>
  8. <body>
  9. <div class="wrap">
  10. <?php require './templates/header.php';?>
  11. <section class="section">
  12. <div class="step">
  13. <ul>
  14. <li class="on"><em>1</em>检测环境</li>
  15. <li class="current"><em>2</em>创建数据</li>
  16. <li><em>3</em>完成安装</li>
  17. </ul>
  18. </div>
  19. <form id="J_install_form" action="<?php echo $_SERVER['PHP_SELF']; ?>?step=4" method="post">
  20. <input type="hidden" name="force" value="0" />
  21. <div class="server">
  22. <table width="100%">
  23. <tr>
  24. <td class="td1" width="100">数据库信息</td>
  25. <td class="td1" width="200">&nbsp;</td>
  26. <td class="td1">&nbsp;</td>
  27. </tr>
  28. <tr>
  29. <td class="tar">数据库服务器:</td>
  30. <td><input type="text" name="dbhost" id="dbhost" disabled="disabled" value="SAE_MYSQL_HOST_M" class="input"></td>
  31. <td><div id="J_install_tip_dbhost"><span class="gray">数据库服务器地址,一般为localhost</span></div></td>
  32. </tr>
  33. <tr>
  34. <td class="tar">数据库端口:</td>
  35. <td><input type="text" name="dbport" id="dbport" disabled="disabled" value="SAE_MYSQL_PORT" class="input"></td>
  36. <td><div id="J_install_tip_dbport"><span class="gray">数据库服务器端口,一般为3306</span></div></td>
  37. </tr>
  38. <tr>
  39. <td class="tar">数据库用户名:</td>
  40. <td><input type="text" name="dbuser" id="dbuser" disabled="disabled" value="SAE_MYSQL_USER" class="input"></td>
  41. <td><div id="J_install_tip_dbuser"></div></td>
  42. </tr>
  43. <tr>
  44. <td class="tar">数据库密码:</td>
  45. <td><input type="text" name="dbpw" id="dbpw" disabled="disabled" value="SAE_MYSQL_PASS" class="input" autoComplete="off" onBlur="TestDbPwd()"></td>
  46. <td><div id="J_install_tip_dbpw"></div></td>
  47. </tr>
  48. <tr>
  49. <td class="tar">数据库名:</td>
  50. <td><input type="text" name="dbname" id="dbname" disabled="disabled" value="SAE_MYSQL_DB" class="input"></td>
  51. <td><div id="J_install_tip_dbname"></div></td>
  52. </tr>
  53. <tr>
  54. <td class="tar">数据库表前缀:</td>
  55. <td><input type="text" name="dbprefix" id="dbprefix" disabled="disabled" value="eb_" class="input" disabled></td>
  56. <td><div id="J_install_tip_dbprefix"><span class="gray">建议使用默认,同一数据库安装多个CrmEb时需修改</span></div></td>
  57. </tr>
  58. </table>
  59. <table width="100%">
  60. <tr>
  61. <td class="td1" width="100">网站配置</td>
  62. <td class="td1" width="200">&nbsp;</td>
  63. <td class="td1">&nbsp;</td>
  64. </tr>
  65. <tr>
  66. <td class="tar">网站名称:</td>
  67. <td><input type="text" name="sitename" value="CrmEb内容管理框架" class="input"></td>
  68. <td><div id="J_install_tip_sitename"></div></td>
  69. </tr>
  70. <tr>
  71. <td class="tar">网站域名:</td>
  72. <td><input type="text" name="siteurl" value="http://<?php echo $domain ?>/" id="siteurl" class="input" autoComplete="off"></td>
  73. <td><div id="J_install_tip_siteurl"><span class="gray">请以“/”结尾</span></div></td>
  74. </tr>
  75. <tr>
  76. <td class="tar">关键词:</td>
  77. <td><input type="text" name="sitekeywords" value="CrmEb" class="input" autoComplete="off"></td>
  78. <td><div id="J_install_tip_sitekeywords"></div></td>
  79. </tr>
  80. <tr>
  81. <td class="tar">描述:</td>
  82. <td><input type="text" name="siteinfo" class="input" value="CrmEb是一款基于PHP+MySql开发的Crm客户管理+Eb电商系统,其中免费版是完全开源的版本,采用MVC设计模式实现业务逻辑与表现层的适当分离,使网页设计师能够轻松设计出理想的模板,可面向中小型站点提供重量级微信公众号商城建设和微信小程序建设。对于那些想要进行开发,但技术不足的站长们是一个难得的系统。微信商城微信小程序建站,就选CRMEB!CRMEB的开发旨在帮助创业者搭建企业电商平台,实现创业梦想。"></td>
  83. <td><div id="J_install_tip_siteinfo"></div></td>
  84. </tr>
  85. </table>
  86. <table width="100%">
  87. <tr>
  88. <td class="td1" width="100">创始人信息</td>
  89. <td class="td1" width="200">&nbsp;</td>
  90. <td class="td1">&nbsp;</td>
  91. </tr>
  92. <tr>
  93. <td class="tar">管理员帐号:</td>
  94. <td><input type="text" name="manager" value="admin" class="input"></td>
  95. <td><div id="J_install_tip_manager"></div></td>
  96. </tr>
  97. <tr>
  98. <td class="tar">密码:</td>
  99. <td><input type="text" name="manager_pwd" id="J_manager_pwd" class="input" autoComplete="off"></td>
  100. <td><div id="J_install_tip_manager_pwd"></div></td>
  101. </tr>
  102. <tr>
  103. <td class="tar">重复密码:</td>
  104. <td><input type="text" name="manager_ckpwd" class="input" autoComplete="off"></td>
  105. <td><div id="J_install_tip_manager_ckpwd"></div></td>
  106. </tr>
  107. <tr>
  108. <td class="tar">Email:</td>
  109. <td><input type="text" name="manager_email" class="input" value=""></td>
  110. <td><div id="J_install_tip_manager_email"></div></td>
  111. </tr>
  112. </table>
  113. <div id="J_response_tips" style="display:none;"></div>
  114. </div>
  115. <div class="bottom tac"> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?step=2" class="btn">上一步</a>
  116. <button type="submit" class="btn btn_submit J_install_btn">创建数据</button>
  117. </div>
  118. </form>
  119. </section>
  120. <div style="width:0;height:0;overflow:hidden;"> <img src="./images/install/pop_loading.gif"> </div>
  121. <script src="./js/jquery.js?v=9.0"></script>
  122. <script src="./js/validate.js?v=9.0"></script>
  123. <script src="./js/ajaxForm.js?v=9.0"></script>
  124. <script>
  125. function TestDbPwd()
  126. {
  127. var dbHost = $('#dbhost').val();
  128. var dbUser = $('#dbuser').val();
  129. var dbPwd = $('#dbpw').val();
  130. var dbName = $('#dbname').val();
  131. var dbport = $('#dbport').val();
  132. data={'dbHost':dbHost,'dbUser':dbUser,'dbPwd':dbPwd,'dbName':dbName,'dbport':dbport};
  133. var url = "<?php echo $_SERVER['PHP_SELF']; ?>?step=3&testdbpwd=1";
  134. $.ajax({
  135. type: "POST",
  136. url: url,
  137. data: data,
  138. beforeSend:function(){
  139. },
  140. success: function(msg){
  141. if(msg){
  142. }else{
  143. $('#dbpw').val("");
  144. $('#J_install_tip_dbpw').html('<span for="dbname" generated="true" class="tips_error" style="">数据库链接配置失败</span>');
  145. }
  146. },
  147. complete:function(){
  148. },
  149. error:function(){
  150. $('#J_install_tip_dbpw').html('<span for="dbname" generated="true" class="tips_error" style="">数据库链接配置失败</span>');
  151. $('#dbpw').val("");
  152. }
  153. });
  154. }
  155. $(function(){
  156. //聚焦时默认提示
  157. var focus_tips = {
  158. dbhost : '数据库服务器地址,一般为localhost',
  159. dbport : '数据库服务器端口,一般为3306',
  160. dbuser : '',
  161. dbpw : '',
  162. dbname : '',
  163. dbprefix : '建议使用默认,同一数据库安装多个时需修改',
  164. manager : '创始人帐号,拥有站点后台所有管理权限',
  165. manager_pwd : '',
  166. manager_ckpwd : '',
  167. sitename : '',
  168. siteurl : '请以“/”结尾',
  169. sitekeywords : '',
  170. siteinfo : '',
  171. manager_email : ''
  172. };
  173. var install_form = $("#J_install_form"),
  174. reg_username = $('#J_reg_username'), //用户名表单
  175. reg_password = $('#J_reg_password'), //密码表单
  176. reg_tip_password = $('#J_reg_tip_password'), //密码提示区
  177. response_tips = $('#J_response_tips'); //后端返回提示
  178. //validate插件修改了remote ajax验证返回的response处理方式;增加密码强度提示 passwordRank
  179. install_form.validate({
  180. //debug : true,
  181. //onsubmit : false,
  182. errorPlacement: function(error, element) {
  183. //错误提示容器
  184. $('#J_install_tip_'+ element[0].name).html(error);
  185. },
  186. errorElement: 'span',
  187. //invalidHandler : , 未验证通过 回调
  188. //ignore : '.ignore' 忽略验证
  189. //onkeyup : true,
  190. errorClass : 'tips_error',
  191. validClass : 'tips_error',
  192. onkeyup : false,
  193. focusInvalid : false,
  194. rules: {
  195. dbhost: {
  196. required : true
  197. },
  198. dbport:{
  199. required : true
  200. },
  201. dbuser: {
  202. required : true
  203. },
  204. /* dbpw: {
  205. required : true
  206. }, */
  207. dbname: {
  208. required : true
  209. },
  210. dbprefix : {
  211. required : true
  212. },
  213. manager: {
  214. required : true
  215. },
  216. manager_pwd: {
  217. required : true
  218. },
  219. manager_ckpwd: {
  220. required : true,
  221. equalTo : '#J_manager_pwd'
  222. },
  223. manager_email: {
  224. required : true,
  225. email : true
  226. }
  227. },
  228. highlight : false,
  229. unhighlight : function(element, errorClass, validClass) {
  230. var tip_elem = $('#J_install_tip_'+ element.name);
  231. tip_elem.html('<span class="'+ validClass +'" data-text="text"><span>');
  232. },
  233. onfocusin : function(element){
  234. var name = element.name;
  235. $('#J_install_tip_'+ name).html('<span data-text="text">'+ focus_tips[name] +'</span>');
  236. $(element).parents('tr').addClass('current');
  237. },
  238. onfocusout : function(element){
  239. var _this = this;
  240. $(element).parents('tr').removeClass('current');
  241. if(element.name === 'email') {
  242. //邮箱匹配点击后,延时处理
  243. setTimeout(function(){
  244. _this.element(element);
  245. }, 150);
  246. }else{
  247. _this.element(element);
  248. }
  249. },
  250. messages: {
  251. dbhost: {
  252. required : '数据库服务器地址不能为空'
  253. },
  254. dbport:{
  255. required : '数据库服务器端口不能为空'
  256. },
  257. dbuser: {
  258. required : '数据库用户名不能为空'
  259. },
  260. dbpw: {
  261. required : '数据库密码不能为空'
  262. },
  263. dbname: {
  264. required : '数据库名不能为空'
  265. },
  266. dbprefix : {
  267. required : '数据库表前缀不能为空'
  268. },
  269. manager: {
  270. required : '管理员帐号不能为空'
  271. },
  272. manager_pwd: {
  273. required : '密码不能为空'
  274. },
  275. manager_ckpwd: {
  276. required : '重复密码不能为空',
  277. equalTo : '两次输入的密码不一致。请重新输入'
  278. },
  279. manager_email: {
  280. required : 'Email不能为空',
  281. email : '请输入正确的电子邮箱地址'
  282. }
  283. },
  284. submitHandler:function(form) {
  285. form.submit();
  286. return true;
  287. }
  288. });
  289. var _data = {};
  290. });
  291. </script>
  292. </div>
  293. <?php require './templates/footer.php';?>
  294. </body>
  295. </html>