Source for file index.php

Documentation is available at index.php

  1. <?php
  2.  
  3. /**
  4.  * AVE.cms
  5.  *
  6.  * @package AVE.cms
  7.  * @subpackage admin
  8.  * @filesource
  9.  */
  10.  
  11.  
  12. define('START_MICROTIME'microtime());
  13.  
  14.  
  15. define('ACP'1);
  16.  
  17. define('BASE_DIR'str_replace("\\""/"substr(dirname(__FILE__)0-6)));
  18.  
  19. if (@filesize(BASE_DIR '/inc/db.config.php')) header('Location:../install.php')exit}
  20.  
  21. require(BASE_DIR '/admin/init.php');
  22.  
  23. if (!defined('UID'|| !check_permission('adminpanel'))
  24. {
  25.     header('Location:admin.php');
  26.     exit;
  27. }
  28.  
  29. if (empty($_SESSION['admin_language']))
  30. {
  31.     if (!empty($_REQUEST['feld']&&
  32.         !empty($_REQUEST['Id']&&
  33.         !empty($_REQUEST['RubrikId']))
  34.     {
  35.         $_SESSION['redirectlink''index.php?do=docs&action=edit&pop=1'
  36.                                     . '&RubrikId=' . (int)$_REQUEST['RubrikId']
  37.                                     . '&Id='       . (int)$_REQUEST['Id']
  38.                                     . '&feld='     . (int)$_REQUEST['feld']
  39.                                     . '#'          . (int)$_REQUEST['feld'];
  40.     }
  41.     else
  42.     {
  43.         unset($_SESSION['redirectlink']);
  44.     }
  45.  
  46.     header('Location:admin.php');
  47.     exit;
  48. }
  49.  
  50. $_REQUEST['do']     (!isset($_REQUEST['do']))     '' $_REQUEST['do'];
  51. $_REQUEST['action'(!isset($_REQUEST['action'])) '' $_REQUEST['action'];
  52. $_REQUEST['sub']    (!isset($_REQUEST['sub']))    '' $_REQUEST['sub'];
  53. $_REQUEST['submit'(!isset($_REQUEST['submit'])) '' $_REQUEST['submit'];
  54.  
  55. $AVE_Template->assign('navi'$AVE_Template->fetch('navi/navi.tpl'));
  56.  
  57. $allowed array('index''start''templates''rubs''user''groups''docs''navigation''logs''request''modules''settings''dbsettings');
  58. $do (!empty($_REQUEST['do'])) $_REQUEST['do''start';
  59. if (in_array($do$allowed))
  60. {
  61.     define('DO_FILE'BASE_DIR '/admin/' $do '.php');
  62. }
  63. else
  64. {
  65.     define('DO_FILE'BASE_DIR '/admin/start.php');
  66. }
  67. include(DO_FILE);
  68.  
  69. if (defined('NOPERM')) $AVE_Template->assign('content'$config_vars['MAIN_NO_PERMISSION']);
  70.  
  71. //$tpl = (isset($_REQUEST['css']) && $_REQUEST['css'] == 'inline') ? 'iframe.tpl' : 'pop.tpl';
  72. //$tpl = (isset($_REQUEST['pop']) && $_REQUEST['pop'] == 1) ? $tpl : 'main.tpl';
  73. $tpl (isset($_REQUEST['pop']&& $_REQUEST['pop'== 1'pop.tpl' 'main.tpl';
  74. $AVE_Template->display($tpl);
  75.  
  76. // Статистика
  77. if (defined('PROFILING'&& PROFILINGecho get_statistic(1111);
  78.  
  79. ?>

Documentation generated on Fri, 04 Jun 2010 18:02:37 +0400 by phpDocumentor 1.4.3