plugins/Decir.php
changeset 6 3f66ec435f08
parent 5 6eea55374f5b
child 7 37387f84fe25
equal deleted inserted replaced
5:6eea55374f5b 6:3f66ec435f08
    31       \'namespace\'=>\'Special\',
    31       \'namespace\'=>\'Special\',
    32       \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    32       \'special\'=>0,\'visible\'=>0,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\',
    33       ));
    33       ));
    34   ');
    34   ');
    35 
    35 
       
    36 require( DECIR_ROOT . '/admincp/admin_base.php' );
       
    37 
    36 function decir_early_init(&$paths, &$session)
    38 function decir_early_init(&$paths, &$session)
    37 {
    39 {
    38   $paths->addAdminNode('Decir forum configuration', 'General settings', 'DecirGeneral');
    40   $paths->addAdminNode('Decir forum configuration', 'General settings', 'DecirGeneral');
    39   $paths->nslist['DecirForum']  = $paths->nslist['Special'] . 'Forum/ViewForum/';
    41   $paths->nslist['DecirForum']  = $paths->nslist['Special'] . 'Forum/ViewForum/';
    40   $paths->nslist['DecirPost']   = $paths->nslist['Special'] . 'Forum/Post/';
    42   $paths->nslist['DecirPost']   = $paths->nslist['Special'] . 'Forum/Post/';
    50 {
    52 {
    51   global $db, $session, $paths, $template, $plugins; // Common objects
    53   global $db, $session, $paths, $template, $plugins; // Common objects
    52   
    54   
    53   if ( getConfig('decir_version') != ENANO_DECIR_VERSION || isset($_POST['do_install_finish']) )
    55   if ( getConfig('decir_version') != ENANO_DECIR_VERSION || isset($_POST['do_install_finish']) )
    54   {
    56   {
       
    57     chdir(DECIR_ROOT);
    55     require(DECIR_ROOT . '/install.php');
    58     require(DECIR_ROOT . '/install.php');
    56     return false;
    59     return false;
    57   }
    60   }
    58   
    61   
    59   $act = strtolower( ( $n = $paths->getParam(0) ) ? $n : 'Index' );
    62   $act = strtolower( ( $n = $paths->getParam(0) ) ? $n : 'Index' );
    82   
    85   
    83   chdir($curdir);
    86   chdir($curdir);
    84   
    87   
    85 }
    88 }
    86 
    89 
    87 function page_Admin_DecirGeneral()
       
    88 {
       
    89   global $db, $session, $paths, $template, $plugins; if($session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN) { header('Location: '.makeUrl($paths->nslist['Special'].'Administration'.urlSeparator.'noheaders')); die('Hacking attempt'); }
       
    90   echo 'Hello world!';
       
    91 }
       
    92 
       
    93 ?>
    90 ?>