install.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * The install router file of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2013 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package ZenTaoPMS
  9. * @version $Id: install.php 4677 2013-04-26 06:23:58Z chencongzhi520@gmail.com $
  10. * @link http://www.zentao.net
  11. */
  12. error_reporting(0);
  13. /* Load the framework. */
  14. include '../framework/router.class.php';
  15. include '../framework/control.class.php';
  16. include '../framework/model.class.php';
  17. include '../framework/helper.class.php';
  18. /* Instance the app. */
  19. $app = router::createApp('pms', dirname(dirname(__FILE__)), 'router', 'installing');
  20. /* Check installed or not. */
  21. if(!isset($_SESSION['installing']) && $app->checkInstalled()) die(header('location: index.php'));
  22. /* Reset the config params to make sure the install program will be lauched. */
  23. $oldRequestType = zget($config, 'requestType', '');
  24. $config->set('requestType', 'GET');
  25. $config->set('default.module', 'install');
  26. $app->setDebug();
  27. try
  28. {
  29. $app->parseRequest();
  30. $app->loadModule();
  31. }
  32. catch (EndResponseException $endResponseException)
  33. {
  34. echo $endResponseException->getContent();
  35. }