index.php 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. <?php
  2. error_reporting(E_ALL ^ E_NOTICE);
  3. @set_time_limit(1000);
  4. define('InEmpireCMS',TRUE);
  5. $ecms_config=array();
  6. $ecms_config['db']['showerror']=1;
  7. $link='';
  8. $empire='';
  9. $dbtbpre='';
  10. //导入文件
  11. require('data/fun.php');
  12. require('../class/EmpireCMS_version.php');
  13. if(function_exists('mysql_connect'))
  14. {
  15. include('../class/db/db_mysql.php');
  16. }
  17. else
  18. {
  19. include('../class/db/db_mysqli.php');
  20. }
  21. //------ 参数开始 ------
  22. $char_r=array();
  23. $char_r=InstallReturnDbChar();
  24. $version="7.5,1502985610";
  25. $dbchar=$char_r['dbchar'];
  26. $setchar=$char_r['setchar'];
  27. $headerchar=$char_r['headerchar'];
  28. //------ 参数结束 ------
  29. @header('Content-Type: text/html; charset='.$headerchar);
  30. if(file_exists("install.off"))
  31. {
  32. echo"《帝国网站管理系统》安装程序已锁定。如果要重新安装,请删除<b>/e/install/install.off</b>文件!";
  33. exit();
  34. }
  35. $enews=$_GET['enews'];
  36. if(empty($enews))
  37. {
  38. $enews=$_POST['enews'];
  39. }
  40. //测试采集
  41. if($enews=="TestCj")
  42. {
  43. echo"<title>TEST</title>";
  44. TestCj();
  45. }
  46. $ok=$_GET['ok'];
  47. if(empty($ok))
  48. {
  49. $ok=$_POST['ok'];
  50. }
  51. $f=$_GET['f'];
  52. if(empty($f))
  53. {
  54. $f=$_POST['f'];
  55. }
  56. if(empty($f))
  57. {
  58. $f=1;
  59. }
  60. $font="f".$f;
  61. $$font="red";
  62. //处理
  63. if($enews=="setdb"&&$ok)
  64. {
  65. SetDb($_POST);
  66. }
  67. elseif($enews=="firstadmin"&&$ok)
  68. {
  69. FirstAdmin($_POST);
  70. }
  71. elseif($enews=="defaultdata"&&$ok)
  72. {
  73. InstallDefaultData($_GET);
  74. }
  75. elseif($enews=="templatedata"&&$ok)
  76. {
  77. InstallTemplateData($_GET);
  78. }
  79. elseif($enews=="moddata"&&$ok)
  80. {
  81. InstallModData($_GET);
  82. }
  83. $shorttag=ini_get('short_open_tag');
  84. ?>
  85. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  86. <html>
  87. <head>
  88. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  89. <title>帝国网站管理系统安装程序 - Powered by EmpireCMS</title>
  90. <link href="images/css.css" rel="stylesheet" type="text/css">
  91. </head>
  92. <body bgcolor="C9F1FF" leftmargin="0" topmargin="0">
  93. <?php
  94. if(!$shorttag)
  95. {
  96. ?>
  97. <br>
  98. <br><br>
  99. <table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  100. <tr>
  101. <td height="25" class="header"><div align="center"><strong><font color="#FFFFFF">错误提示</font></strong></div></td>
  102. </tr>
  103. <tr>
  104. <td height="25" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  105. <tr>
  106. <td height="25">您的PHP配置文件php.ini配置有问题,请按下面操作即可解决:</td>
  107. </tr>
  108. <tr>
  109. <td height="25">1、修改php.ini,将:short_open_tag 设为 On</td>
  110. </tr>
  111. <tr>
  112. <td height="25">2、修改后重启apache/iis方能生效。</td>
  113. </tr>
  114. </table>
  115. </td>
  116. </tr>
  117. </table>
  118. <?php
  119. echo"</body></html>";
  120. exit();
  121. }
  122. ?>
  123. <table width="776" height="100%" border="0" align="center" cellpadding="6" cellspacing="0" bgcolor="#FFFFFF">
  124. <tr>
  125. <td height="56" colspan="2" background="images/topbg.gif">
  126. <div align="center">
  127. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  128. <tr>
  129. <td width="80%"><div align="center"><img src="images/installsay.gif" width="500" height="50"></div></td>
  130. <td width="20%" valign="bottom"><font color="#FFFFFF">最后更新: <?php echo EmpireCMS_LASTTIME;?></font></td>
  131. </tr>
  132. </table>
  133. </div></td>
  134. </tr>
  135. <tr>
  136. <td width="21%" rowspan="3" valign="top">
  137. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  138. <tr>
  139. <td><div align="center"><a href="http://www.phome.net" target="_blank"><img src="images/logo.gif" width="170" height="72" border="0"></a></div></td>
  140. </tr>
  141. </table>
  142. <br>
  143. <table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableborder">
  144. <tr class="header">
  145. <td height="25" colspan="2"> <div align="left"><strong><font color="#FFFFFF">版权信息</font></strong></div></td>
  146. </tr>
  147. <tr bgcolor="#FFFFFF">
  148. <td width="34%" height="25">软件名称</td>
  149. <td width="66%" height="25">帝国网站管理系统</td>
  150. </tr>
  151. <tr bgcolor="#FFFFFF">
  152. <td height="25">英文名称</td>
  153. <td height="25">EmpireCMS</td>
  154. </tr>
  155. <tr bgcolor="#FFFFFF">
  156. <td height="25">程序版本</td>
  157. <td height="25">Version 7.5 </td>
  158. </tr>
  159. <tr bgcolor="#FFFFFF">
  160. <td height="25">开发团队</td>
  161. <td height="25">帝国软件开发团队</td>
  162. </tr>
  163. <tr bgcolor="#FFFFFF">
  164. <td height="25">公司名称</td>
  165. <td height="25">漳州市芗城帝兴软件开发有限公司</td>
  166. </tr>
  167. <tr bgcolor="#FFFFFF">
  168. <td height="25">官方网站</td>
  169. <td height="25"><a href="http://www.PHome.Net" target="_blank">www.PHome.Net</a></td>
  170. </tr>
  171. </table>
  172. <br>
  173. <table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableborder">
  174. <tr class="header">
  175. <td height="25"><strong><font color="#FFFFFF">安装进程</font></strong></td>
  176. </tr>
  177. <tr>
  178. <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
  179. <tr>
  180. <td><img src="images/noadd.gif" width="15" height="15">&nbsp;<font color="<?php echo $f1;?>">阅读用户使用条款</font></td>
  181. </tr>
  182. <tr>
  183. <td><img src="images/noadd.gif" width="15" height="15">&nbsp;<font color="<?php echo $f2;?>">检测运行环境</font></td>
  184. </tr>
  185. <tr>
  186. <td><img src="images/noadd.gif" width="15" height="15">&nbsp;<font color="<?php echo $f3;?>">设置目录权限</font></td>
  187. </tr>
  188. <tr>
  189. <td><img src="images/noadd.gif" width="15" height="15">&nbsp;<font color="<?php echo $f4;?>">配置数据库</font></td>
  190. </tr>
  191. <tr>
  192. <td><img src="images/noadd.gif" width="15" height="15">&nbsp;<font color="<?php echo $f5;?>">初始化管理员账号</font></td>
  193. </tr>
  194. <tr>
  195. <td><img src="images/noadd.gif" width="15" height="15">&nbsp;<font color="<?php echo $f6;?>">安装完毕</font></td>
  196. </tr>
  197. </table></td>
  198. </tr>
  199. </table></td>
  200. <td><div align="center"><strong><font color="#0000FF" size="3">想到即可做到 - 帝国网站管理系统</font></strong></div></td>
  201. </tr>
  202. <tr>
  203. <td valign="top">
  204. <?php
  205. //用户条款
  206. if($enews=="checkfj")
  207. {
  208. ?>
  209. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  210. <form name="form1" method="post" action="">
  211. <tr class="header">
  212. <td height="25"> <div align="center"><strong><font color="#FFFFFF">第二步:检测运行环境</font></strong></div></td>
  213. </tr>
  214. <tr>
  215. <td height="350" bgcolor="#FFFFFF"> <div align="center">
  216. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  217. <tr>
  218. <td height="23"><strong>提示信息</strong></td>
  219. </tr>
  220. <tr>
  221. <td height="25" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1">
  222. <tr>
  223. <td height="21"> <li>粗体字项目是必须支持的项目。</li></td>
  224. </tr>
  225. <tr>
  226. <td height="21"> <li>不支持GD库不影响系统正常运行,但图片缩略图与水印功能不能使用。</li></td>
  227. </tr>
  228. <tr>
  229. <td height="21"> <li>不支持采集不影响系统正常使用,但采集功能与远程保存附件不能正常使用。</li></td>
  230. </tr>
  231. <tr>
  232. <td height="21"> <li>点击“支持采集”链接可对采集进行测试。</li></td>
  233. </tr>
  234. </table></td>
  235. </tr>
  236. </table>
  237. <br>
  238. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  239. <tr>
  240. <td width="25%" height="23"> <div align="center"><strong>项目</strong></div></td>
  241. <td width="30%"> <div align="center"><strong>帝国CMS所需配置</strong></div></td>
  242. <td width="30%"> <div align="center"><strong>当前服务器</strong></div></td>
  243. <td width="15%"> <div align="center"><strong>测试结果</strong></div></td>
  244. </tr>
  245. <tr bgcolor="#FFFFFF">
  246. <td height="25"><div align="center">操作系统</div></td>
  247. <td><div align="center">不限</div></td>
  248. <td><div align="center">
  249. <?php echo GetUseSys();?>
  250. </div></td>
  251. <td><div align="center">√</div></td>
  252. </tr>
  253. <?php
  254. $phpr=GetPhpVer();
  255. ?>
  256. <tr bgcolor="#FFFFFF">
  257. <td height="25"><div align="center"><strong>PHP版本</strong></div></td>
  258. <td><div align="center"><strong>4.2.3+<br>
  259. </strong></div></td>
  260. <td><div align="center"> <b>
  261. <?php echo $phpr['ver'];?>
  262. </b> </div></td>
  263. <td><div align="center">
  264. <?php echo $phpr['result'];?>
  265. </div></td>
  266. </tr>
  267. <?php
  268. $mysqlr=CanMysql();
  269. ?>
  270. <tr bgcolor="#FFFFFF">
  271. <td height="25"><div align="center"><strong>MYSQL支持</strong></div></td>
  272. <td><div align="center"><strong>支持</strong></div></td>
  273. <td><div align="center"> <b>
  274. <?php echo $mysqlr['can'];?>
  275. </b> </div></td>
  276. <td><div align="center">
  277. <?php echo $mysqlr['result'];?>
  278. </div></td>
  279. </tr>
  280. <?php
  281. $phpsafer=GetPhpSafemod();
  282. ?>
  283. <tr bgcolor="#FFFFFF">
  284. <td height="25"><div align="center"><strong>PHP运行于安全模式</strong></div></td>
  285. <td><div align="center"><strong>否</strong></div></td>
  286. <td><div align="center"> <b>
  287. <?php echo $phpsafer['word'];?>
  288. </b> </div></td>
  289. <td><div align="center">
  290. <?php echo $phpsafer['result'];?>
  291. </div></td>
  292. </tr>
  293. <?php
  294. $gdr=GetGd();
  295. ?>
  296. <tr bgcolor="#FFFFFF">
  297. <td height="25"><div align="center">支持GD库</div></td>
  298. <td><div align="center">不限</div></td>
  299. <td><div align="center">
  300. <?php echo $gdr['can'];?>
  301. </div></td>
  302. <td><div align="center">
  303. <?php echo $gdr['result'];?>
  304. </div></td>
  305. </tr>
  306. <?php
  307. $cjr=GetCj();
  308. ?>
  309. <tr bgcolor="#FFFFFF">
  310. <td height="24"> <div align="center"><a title="测试采集" href="#empirecms" onClick="window.open('index.php?enews=TestCj','','width=200,height=80');"><u>支持采集</u></a></div></td>
  311. <td><div align="center">不限</div></td>
  312. <td><div align="center">
  313. <?php echo $cjr['word'];?>
  314. </div></td>
  315. <td><div align="center">
  316. <?php echo $cjr['result'];?>
  317. </div></td>
  318. </tr>
  319. </table>
  320. </div></td>
  321. </tr>
  322. <tr>
  323. <td><div align="center">
  324. <input type="button" name="Submit523" value="上一步" onClick="javascript:history.go(-1);">
  325. &nbsp;&nbsp;
  326. <input type="button" name="Submit623" value="下一步" onClick="self.location.href='index.php?enews=path&f=3';">
  327. </div></td>
  328. </tr>
  329. </form>
  330. </table>
  331. <?php
  332. }
  333. //设置目录权限
  334. elseif($enews=="path")
  335. {
  336. ?>
  337. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  338. <form name="form1" method="post" action="">
  339. <tr class="header">
  340. <td height="25"> <div align="center"><strong><font color="#FFFFFF">第三步:设置目录权限</font></strong></div></td>
  341. </tr>
  342. <tr>
  343. <td height="100" bgcolor="#FFFFFF"> <div align="center">
  344. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  345. <tr>
  346. <td height="23"><strong>提示信息</strong></td>
  347. </tr>
  348. <tr>
  349. <td height="25" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1">
  350. <tr>
  351. <td height="25"><li><font color="#FF0000">如果您的服务器使用
  352. Windows 操作系统,可跳过这一步。</font></li></td>
  353. </tr>
  354. <tr>
  355. <td height="25"> <li>将下面目录权限设为0777, 除了红色目录外,是目录全部要把权限应用于子目录与文件。
  356. </li></td>
  357. </tr>
  358. </table></td>
  359. </tr>
  360. </table>
  361. <br>
  362. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  363. <tr>
  364. <td width="34%" height="23"> <div align="center"><strong>目录文件名称</strong></div></td>
  365. <td width="42%"> <div align="center"><strong>说明</strong></div></td>
  366. <td width="24%"> <div align="center"><strong>权限检查</strong></div></td>
  367. </tr>
  368. <tr bgcolor="#FFFFFF">
  369. <td height="25"> <div align="left"><font color="#FF0000"><strong>/</strong></font></div></td>
  370. <td> <div align="center"><font color="#FF0000">系统根目录(不要应用于子目录)</font></div></td>
  371. <td> <div align="center"> <?php echo CheckFileMod("../../");?>
  372. </div></td>
  373. </tr>
  374. <tr bgcolor="#FFFFFF">
  375. <td height="25"> <div align="left">/d</div></td>
  376. <td> <div align="center"><font color="#666666">附件目录</font></div></td>
  377. <td> <div align="center"> <?php echo CheckFileMod("../../d","../../d/txt");?>
  378. </div></td>
  379. </tr>
  380. <tr bgcolor="#FFFFFF">
  381. <td height="25"> <div align="left">/s</div></td>
  382. <td> <div align="center"><font color="#666666">专题存放目录</font></div></td>
  383. <td> <div align="center"> <?php echo CheckFileMod("../../s");?>
  384. </div></td>
  385. </tr>
  386. <tr bgcolor="#FFFFFF">
  387. <td height="25"> <div align="left">/t</div></td>
  388. <td> <div align="center"><font color="#666666">标题分类存放目录</font></div></td>
  389. <td> <div align="center"> <?php echo CheckFileMod("../../t");?>
  390. </div></td>
  391. </tr>
  392. <tr bgcolor="#FFFFFF">
  393. <td height="25"> <div align="left">/ecachefiles</div></td>
  394. <td> <div align="center"><font color="#666666">动态页面缓存目录</font></div></td>
  395. <td> <div align="center"> <?php echo CheckFileMod("../../ecachefiles","../../ecachefiles/empirecms");?>
  396. </div></td>
  397. </tr>
  398. <tr bgcolor="#FFFFFF">
  399. <td height="25"> <div align="left">/search</div></td>
  400. <td> <div align="center"><font color="#666666">搜索表单</font></div></td>
  401. <td> <div align="center"> <?php echo CheckFileMod("../../search","../../search/test.txt");?>
  402. </div></td>
  403. </tr>
  404. <tr bgcolor="#FFFFFF">
  405. <td height="25"> <div align="left">/index.html</div></td>
  406. <td> <div align="center"><font color="#666666">网站首页</font></div></td>
  407. <td> <div align="center"> <?php echo CheckFileMod("../../index.html");?>
  408. </div></td>
  409. </tr>
  410. <tr bgcolor="#FFFFFF">
  411. <td height="25"> <div align="left">/html</div></td>
  412. <td> <div align="center"><font color="#666666">默认可选的HTML存放目录</font></div></td>
  413. <td> <div align="center"> <?php echo CheckFileMod("../../html");?>
  414. </div></td>
  415. </tr>
  416. <tr bgcolor="#FFFFFF">
  417. <td height="25">/e/admin/ebak/bdata</td>
  418. <td> <div align="center"><font color="#666666">备份数据存放目录</font></div></td>
  419. <td> <div align="center"> <?php echo CheckFileMod("../admin/ebak/bdata");?>
  420. </div></td>
  421. </tr>
  422. <tr bgcolor="#FFFFFF">
  423. <td height="25">/e/admin/ebak/zip</td>
  424. <td> <div align="center"><font color="#666666">备份数据压缩存放目录</font></div></td>
  425. <td> <div align="center"> <?php echo CheckFileMod("../admin/ebak/zip");?>
  426. </div></td>
  427. </tr>
  428. <tr bgcolor="#FFFFFF">
  429. <td height="25"> <div align="left">/e/config/config.php</div></td>
  430. <td> <div align="center"><font color="#666666">数据库等参数配置文件</font></div></td>
  431. <td> <div align="center"> <?php echo CheckFileMod("../config/config.php");?>
  432. </div></td>
  433. </tr>
  434. <tr bgcolor="#FFFFFF">
  435. <td height="25"> <div align="left">/e/data</div></td>
  436. <td> <div align="center"><font color="#666666">部分配置文件存放目录</font></div></td>
  437. <td> <div align="center"> <?php echo CheckFileMod("../data","../data/tmp");?>
  438. </div></td>
  439. </tr>
  440. <tr bgcolor="#FFFFFF">
  441. <td height="25">/e/install</td>
  442. <td> <div align="center"><font color="#666666">安装目录</font></div></td>
  443. <td> <div align="center"> <?php echo CheckFileMod("../install");?>
  444. </div></td>
  445. </tr>
  446. <tr bgcolor="#FFFFFF">
  447. <td height="25">/e/member/iframe/index.php</td>
  448. <td><div align="center"><font color="#666666">登陆状态显示</font></div></td>
  449. <td><div align="center"> <?php echo CheckFileMod("../member/iframe/index.php");?>
  450. </div></td>
  451. </tr>
  452. <tr bgcolor="#FFFFFF">
  453. <td height="25">/e/member/login/loginjs.php</td>
  454. <td><div align="center"><font color="#666666">JS登陆状态显示</font></div></td>
  455. <td><div align="center"> <?php echo CheckFileMod("../member/login/loginjs.php");?>
  456. </div></td>
  457. </tr>
  458. <tr bgcolor="#FFFFFF">
  459. <td height="25">/e/pl/more/index.php</td>
  460. <td> <div align="center"><font color="#666666">评论JS调用文件</font></div></td>
  461. <td> <div align="center"> <?php echo CheckFileMod("../pl/more/index.php");?>
  462. </div></td>
  463. </tr>
  464. <tr bgcolor="#FFFFFF">
  465. <td height="25">/e/sch/index.php</td>
  466. <td><div align="center"><font color="#666666">全站搜索文件</font></div></td>
  467. <td> <div align="center"> <?php echo CheckFileMod("../sch/index.php");?>
  468. </div></td>
  469. </tr>
  470. <tr bgcolor="#FFFFFF">
  471. <td height="25">/e/template</td>
  472. <td> <div align="center"><font color="#666666">动态页面的模板目录</font></div></td>
  473. <td> <div align="center"> <?php echo CheckFileMod("../template");?>
  474. </div></td>
  475. </tr>
  476. <tr bgcolor="#FFFFFF">
  477. <td height="25">/e/tool/feedback/temp</td>
  478. <td><div align="center"><font color="#666666">信息反馈</font></div></td>
  479. <td><div align="center"> <?php echo CheckFileMod("../tool/feedback/temp","../tool/feedback/temp/test.txt");?>
  480. </div></td>
  481. </tr>
  482. <tr bgcolor="#FFFFFF">
  483. <td height="25">/e/tool/gbook/index.php</td>
  484. <td><div align="center"><font color="#666666">留言板</font></div></td>
  485. <td><div align="center"> <?php echo CheckFileMod("../tool/gbook/index.php");?>
  486. </div></td>
  487. </tr>
  488. </table>
  489. </div></td>
  490. </tr>
  491. <tr>
  492. <td><div align="center">
  493. <script>
  494. function CheckNext()
  495. {
  496. var ok;
  497. //ok=confirm("确认有应用于子目录?");
  498. ok=true;
  499. if(ok)
  500. {
  501. self.location.href='index.php?enews=setdb&f=4';
  502. }
  503. }
  504. </script>
  505. <input type="button" name="Submit523" value="上一步" onClick="javascript:history.go(-1);">
  506. &nbsp;&nbsp;
  507. <input type="button" name="Submit72" value="刷新权限状态" onClick="javascript:self.location.href='index.php?enews=path&f=3';">
  508. &nbsp;&nbsp;
  509. <input type="button" name="Submit623" value="下一步" onClick="javascript:CheckNext();">
  510. </div></td>
  511. </tr>
  512. </form>
  513. </table>
  514. <?php
  515. }
  516. //设置配置数据库
  517. elseif($enews=="setdb")
  518. {
  519. $mycookievarpre=strtolower(InstallMakePassword(5));
  520. $myadmincookievarpre=strtolower(InstallMakePassword(5));
  521. ?>
  522. <script>
  523. function CheckSubmit()
  524. {
  525. var ok;
  526. ok=confirm("确认要进入下一步?");
  527. if(ok)
  528. {
  529. document.form1.Submit6223.disabled=true;
  530. return true;
  531. }
  532. return false;
  533. }
  534. </script> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  535. <form name="form1" method="post" action="index.php?enews=setdb&ok=1&f=5" onSubmit="document.form1.Submit6223.disabled=true;" autocomplete="off">
  536. <tr class="header">
  537. <td height="25"> <div align="center"><strong><font color="#FFFFFF">第四步:配置数据库</font></strong></div></td>
  538. </tr>
  539. <tr>
  540. <td height="100" bgcolor="#FFFFFF"> <div align="center">
  541. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  542. <tr>
  543. <td height="23"><strong>提示信息</strong></td>
  544. </tr>
  545. <tr>
  546. <td height="25" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1">
  547. <tr>
  548. <td height="23"> <li>请在下面填写您的数据库账号信息, 通常情况下不需要修改绿色选项内容。</li></td>
  549. </tr>
  550. <tr>
  551. <td height="23"> <li>带*项为不能为空。</li></td>
  552. </tr>
  553. </table></td>
  554. </tr>
  555. </table>
  556. <br>
  557. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  558. <tr>
  559. <td width="21%" height="23"> <div align="center"><strong>设置选项</strong></div></td>
  560. <td width="36%"><div align="center"><strong>当前值</strong></div></td>
  561. <td width="43%"><div align="center"><strong>注释</strong></div></td>
  562. </tr>
  563. <?php
  564. $getmysqlver=do_eGetDBVer(0);
  565. $selectmysqlver=$getmysqlver;
  566. if(empty($selectmysqlver))
  567. {
  568. $selectmysqlver='5.0';
  569. }
  570. ?>
  571. <tr bgcolor="#FFFFFF">
  572. <td height="25">MYSQL接口类型:</td>
  573. <td><select name="mydbtype" id="mydbtype">
  574. <?php
  575. if(function_exists('mysql_connect'))
  576. {
  577. ?>
  578. <option value="mysql">mysql</option>
  579. <?php
  580. }
  581. ?>
  582. <option value="mysqli">mysqli</option>
  583. </select>
  584. </td>
  585. <td><font color="#666666">一般默认即可</font></td>
  586. </tr>
  587. <tr bgcolor="#FFFFFF">
  588. <td height="25">MYSQL版本:</td>
  589. <td><table width="100%" border="0" cellpadding="3" cellspacing="1">
  590. <tr>
  591. <td height="22"><input type="radio" name="mydbver" value="auto">
  592. 自动识别</td>
  593. </tr>
  594. <tr>
  595. <td height="22"> <input type="radio" name="mydbver" value="4.0">
  596. MYSQL 4.0.*/3.*</td>
  597. </tr>
  598. <tr>
  599. <td height="22"> <input type="radio" name="mydbver" value="4.1">
  600. MYSQL 4.1.*</td>
  601. </tr>
  602. <tr>
  603. <td height="22"> <input type="radio" name="mydbver" value="5.0" checked>
  604. MYSQL 5.*或以上</td>
  605. </tr>
  606. </table></td>
  607. <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
  608. <tr>
  609. <td>系统检测到的版本号: <b> <u>
  610. <?php echo $getmysqlver?$getmysqlver:'';?>
  611. </u> </b></td>
  612. </tr>
  613. </table></td>
  614. </tr>
  615. <tr bgcolor="#FFFFFF">
  616. <td width="21%" height="25"><font color="#009900">数据库服务器(*):</font></td>
  617. <td width="36%"> <input name="mydbhost" type="text" id="mydbhost" value="localhost" size="30"></td>
  618. <td width="43%"><font color="#666666">数据库服务器地址, 一般为 localhost</font></td>
  619. </tr>
  620. <tr bgcolor="#FFFFFF">
  621. <td height="25"><font color="#009900">数据库服务器端口:</font></td>
  622. <td> <input name="mydbport" type="text" id="mydbport" size="30"> </td>
  623. <td><font color="#666666">MYSQL端口,空为默认端口, 一般为空</font></td>
  624. </tr>
  625. <tr bgcolor="#FFFFFF">
  626. <td height="25">数据库用户名:</td>
  627. <td> <input name="mydbusername" type="text" id="mydbusername" value="username" size="30"></td>
  628. <td><font color="#666666">MYSQL数据库链接账号</font></td>
  629. </tr>
  630. <tr bgcolor="#FFFFFF">
  631. <td height="25">数据库密码:</td>
  632. <td> <input name="mydbpassword" type="password" id="mydbpassword" size="30"></td>
  633. <td><font color="#666666">MYSQL数据库链接密码</font></td>
  634. </tr>
  635. <tr bgcolor="#FFFFFF">
  636. <td height="25">数据库名(*):</td>
  637. <td> <input name="mydbname" type="text" id="mydbname" value="empirecms" size="30"> </td>
  638. <td><font color="#666666">数据库名称</font></td>
  639. </tr>
  640. <tr bgcolor="#FFFFFF">
  641. <td height="25"><font color="#009900">表名前缀(*):</font></td>
  642. <td><input name="mydbtbpre" type="text" id="mydbtbpre" value="www_jianzhanzj_com_" size="30"></td>
  643. <td><font color="#666666">同一数据库安装多个CMS时可改变默认,不能数字开头</font></td>
  644. </tr>
  645. <tr bgcolor="#FFFFFF">
  646. <td height="25"><font color="#009900">COOKIE前缀(*):</font></td>
  647. <td><table width="100%" border="0" cellspacing="1" cellpadding="3">
  648. <tr>
  649. <td>前台:
  650. <input name="mycookievarpre" type="text" id="mycookievarpre" value="<?php echo $mycookievarpre;?>" size="22"></td>
  651. </tr>
  652. <tr>
  653. <td>后台:
  654. <input name="myadmincookievarpre" type="text" id="myadmincookievarpre" value="<?php echo $myadmincookievarpre;?>" size="22"></td>
  655. </tr>
  656. </table> </td>
  657. <td><font color="#666666">由<strong>英文字母</strong>组成,默认即可</font></td>
  658. </tr>
  659. <tr bgcolor="#FFFFFF">
  660. <td height="25">内置初始数据:</td>
  661. <td><input name="defaultdata" type="checkbox" id="defaultdata" value="1">
  662. 是</td>
  663. <td><font color="#666666">测试软件时选择</font></td>
  664. </tr>
  665. </table>
  666. </div></td>
  667. </tr>
  668. <tr>
  669. <td><div align="center">
  670. <input type="button" name="Submit5223" value="上一步" onClick="javascript:history.go(-1);">
  671. &nbsp;&nbsp;
  672. <input type="submit" name="Submit6223" value="下一步">
  673. <input name="mydbchar" type="hidden" id="mydbchar" value="<?php echo $dbchar;?>">
  674. <input name="mysetchar" type="hidden" id="mysetchar" value="<?php echo $setchar;?>">
  675. </div></td>
  676. </tr>
  677. </form>
  678. </table>
  679. <?php
  680. }
  681. //初使化管理员
  682. elseif($enews=="firstadmin")
  683. {
  684. ?>
  685. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  686. <form name="form1" method="post" action="index.php?enews=firstadmin&ok=1&f=6" onSubmit="document.form1.Submit62222.disabled=true" autocomplete="off">
  687. <input type="hidden" name="defaultdata" value="<?php echo $_GET['defaultdata'];?>">
  688. <tr class="header">
  689. <td height="25"> <div align="center"><strong><font color="#FFFFFF">第五步:初始化管理员账号</font></strong></div></td>
  690. </tr>
  691. <tr>
  692. <td height="100" bgcolor="#FFFFFF"> <div align="center">
  693. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  694. <tr>
  695. <td height="23"><strong>提示信息</strong></td>
  696. </tr>
  697. <tr>
  698. <td height="25" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1">
  699. <tr>
  700. <td height="25"> <li>请在下面填写您要设置的管理员账号信息。</li></td>
  701. </tr>
  702. <tr>
  703. <td height="25"> <li>密码不能包含:$、&amp;、*、#、&lt;、&gt;、'、&quot;、/、\、%、;、空格</li></td>
  704. </tr>
  705. </table></td>
  706. </tr>
  707. </table>
  708. <br>
  709. <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="D6E0EF">
  710. <tr>
  711. <td height="23" colspan="3"><strong>初始化管理员账号</strong></td>
  712. </tr>
  713. <tr>
  714. <td width="21%" height="25" bgcolor="#FFFFFF">用户名:</td>
  715. <td width="36%" bgcolor="#FFFFFF"> <input name="username" type="text" id="username" value="admin" size="30" readonly="readonly">
  716. </td>
  717. <td width="43%" bgcolor="#FFFFFF"><font color="#666666">管理员用户名</font></td>
  718. </tr>
  719. <tr>
  720. <td height="25" bgcolor="#FFFFFF">密码:</td>
  721. <td bgcolor="#FFFFFF"> <input name="password" type="text" id="password" value="admin" size="30" readonly="readonly"></td>
  722. <td bgcolor="#FFFFFF"><font color="#666666">管理员账号密码,区分大小写</font></td>
  723. </tr>
  724. <tr>
  725. <td height="25" bgcolor="#FFFFFF"> <p>重复密码:</p></td>
  726. <td bgcolor="#FFFFFF"> <input name="repassword" type="text" id="repassword" value="admin" size="30" readonly="readonly"></td>
  727. <td bgcolor="#FFFFFF"><font color="#666666">确认账号密码</font></td>
  728. </tr>
  729. <tr>
  730. <td height="25" bgcolor="#FFFFFF"><font color="#FF0000">登录认证码:</font></td>
  731. <td bgcolor="#FFFFFF"><input name="loginauth" type="text" id="loginauth" size="30"></td>
  732. <td bgcolor="#FFFFFF"><font color="#FF0000">如果设置后台登录要输入认证码,更安全</font></td>
  733. </tr>
  734. </table>
  735. </div></td>
  736. </tr>
  737. <tr>
  738. <td><div align="center">
  739. <input type="button" name="Submit52223" value="上一步" onClick="javascript:history.go(-3);">
  740. &nbsp;&nbsp;
  741. <input type="submit" name="Submit62222" value="下一步">
  742. </div></td>
  743. </tr>
  744. </form>
  745. </table>
  746. <?php
  747. }
  748. //安装完毕
  749. elseif($enews=="success")
  750. {
  751. //锁定安装程序
  752. $fp=@fopen("install.off","w");
  753. @fclose($fp);
  754. $word='恭喜您!您已成功安装帝国网站管理系统.';
  755. if($_GET['defaultdata'])
  756. {
  757. $word='恭喜您!您已成功安装帝国网站管理系统.<br>请继续操作初始化内置数据(看安装说明第三大步)。';
  758. }
  759. ?>
  760. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  761. <form name="form1" method="post" action="index.php?enews=setdb&ok=1&f=7">
  762. <tr class="header">
  763. <td height="25"> <div align="center"><strong><font color="#FFFFFF">第六步:安装完毕</font></strong></div></td>
  764. </tr>
  765. <tr>
  766. <td height="100"> <div align="center">
  767. <table width="92%" border="0" align="center" cellpadding="3" cellspacing="1">
  768. <tr>
  769. <td bgcolor="#FFFFFF"> <div align="center">
  770. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  771. <tr>
  772. <td height="42"> <div align="center"><font color="#FF0000">
  773. <?php echo $word;?>
  774. </font></div></td>
  775. </tr>
  776. <tr>
  777. <td height="30"> <div align="center">(友情提示:请马上删除/e/install目录,以避免被再次安装.)</div></td>
  778. </tr>
  779. <tr>
  780. <td height="42"> <div align="center">
  781. <input type="button" name="Submit82" value="进入后台控制面板" onClick="javascript:self.location.href='../admin/index.php'">
  782. </div></td>
  783. </tr>
  784. <tr>
  785. <td height="25"> <div align="center" style="DISPLAY:none"><?=InstallSuccessShowInfo()?></div></td>
  786. </tr>
  787. </table>
  788. </div></td>
  789. </tr>
  790. </table>
  791. </div></td>
  792. </tr>
  793. <tr>
  794. <td><div align="center"> </div></td>
  795. </tr>
  796. </form>
  797. </table>
  798. <?php
  799. }
  800. //条款
  801. else
  802. {
  803. ?>
  804. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  805. <form name="form1" method="post" action="">
  806. <tr class="header">
  807. <td height="25"> <div align="center"><strong><font color="#FFFFFF">第一步:帝国CMS用户许可协议</font></strong></div></td>
  808. </tr>
  809. <tr>
  810. <td bgcolor="#FFFFFF"> <div align="center">
  811. <table width="100%" height="350" border="0" align="center" cellpadding="3" cellspacing="1">
  812. <tr>
  813. <td><div align="center">
  814. <IFRAME frameBorder=0 name=xy scrolling=auto src="data/xieyi.html" style="HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:2"></IFRAME>
  815. </div></td>
  816. </tr>
  817. </table>
  818. </div></td>
  819. </tr>
  820. <tr>
  821. <td><div align="center">
  822. <input type="button" name="Submit5" value="我不同意" onClick="window.close();">
  823. &nbsp;&nbsp;
  824. <input type="button" name="Submit6" value="我同意" onClick="javascript:self.location.href='index.php?enews=checkfj&f=2';">
  825. </div></td>
  826. </tr>
  827. </form>
  828. </table>
  829. <?php
  830. }
  831. ?>
  832. </td>
  833. </tr>
  834. <tr>
  835. <td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
  836. <tr>
  837. <td><hr align="center"></td>
  838. </tr>
  839. <tr>
  840. <td height="25"><div align="center"><a href="http://www.PHome.Net" target="_blank">官方网站</a>&nbsp;
  841. | &nbsp;<a href="http://bbs.PHome.Net" target="_blank">支持论坛</a>&nbsp;
  842. | &nbsp;<a href="http://www.phome.net/EmpireCMS/UserSite/" target="_blank">部分案例</a>&nbsp;
  843. | &nbsp;<a href="http://www.phome.net/ecms72/?ecms=EmpireCMS" target="_blank">系统特性</a>&nbsp;
  844. | &nbsp;<a href="http://www.phome.net/zy/template/" target="_blank">模板下载</a>&nbsp;
  845. | &nbsp;<a href="http://bbs.phome.net/showthread-13-18902-0.html" target="_blank">教程下载</a>&nbsp;
  846. | &nbsp;<a href="http://www.phome.net/service/about.html" target="_blank">关于帝国</a></div></td>
  847. </tr>
  848. <tr>
  849. <td height="36"> <div align="center">帝兴软件开发有限公司 版权所有<BR>
  850. <font face="Arial, Helvetica, sans-serif">Copyright &copy; 2002
  851. - 2018<b> <a href="http://www.PHome.net"><font color="#000000">PHome</font><font color="#FF6600">.Net</font></a></b></font></div></td>
  852. </tr>
  853. </table></td>
  854. </tr>
  855. </table>
  856. </body>
  857. </html>