index.php
changeset 907 44851d7e9bda
parent 906 c949e82b8f49
child 953 323c4cd1aa37
equal deleted inserted replaced
906:c949e82b8f49 907:44851d7e9bda
   327       $template->header();
   327       $template->header();
   328       echo '<div class="menu_nojs" style="width: 150px; padding: 0;"><ul style="display: block;"><li><div class="label">' . $lang->get('ajax_lbl_moreoptions_nojs') . '</div><div style="clear: both;"></div></li>'.$template->toolbar_menu.'</ul></div>';
   328       echo '<div class="menu_nojs" style="width: 150px; padding: 0;"><ul style="display: block;"><li><div class="label">' . $lang->get('ajax_lbl_moreoptions_nojs') . '</div><div style="clear: both;"></div></li>'.$template->toolbar_menu.'</ul></div>';
   329       $template->footer();
   329       $template->footer();
   330       break;
   330       break;
   331     case 'protect':
   331     case 'protect':
       
   332       if ( !$session->sid_super )
       
   333       {
       
   334         redirect(makeUrlNS('Special', "Login/{$paths->page}", 'target_do=protect&level=' . $session->user_level, false), $lang->get('etc_access_denied_short'), $lang->get('etc_access_denied_need_reauth'), 0);
       
   335       }
       
   336       
   332       if ( isset($_POST['level']) && isset($_POST['reason']) )
   337       if ( isset($_POST['level']) && isset($_POST['reason']) )
   333       {
   338       {
   334         $level = intval($_POST['level']);
   339         $level = intval($_POST['level']);
   335         if ( !in_array($level, array(PROTECT_FULL, PROTECT_SEMI, PROTECT_NONE)) )
   340         if ( !in_array($level, array(PROTECT_FULL, PROTECT_SEMI, PROTECT_NONE)) )
   336         {
   341         {
   440     case 'flushlogs':
   445     case 'flushlogs':
   441       if(!$session->get_permissions('clear_logs'))
   446       if(!$session->get_permissions('clear_logs'))
   442       {
   447       {
   443         die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('etc_access_denied') . '</p>');
   448         die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('etc_access_denied') . '</p>');
   444       }
   449       }
       
   450       if ( !$session->sid_super )
       
   451       {
       
   452         redirect(makeUrlNS('Special', "Login/{$paths->page}", 'target_do=flushlogs&level=' . $session->user_level, false), $lang->get('etc_access_denied_short'), $lang->get('etc_access_denied_need_reauth'), 0);
       
   453       }
   445       require_once(ENANO_ROOT.'/includes/pageutils.php');
   454       require_once(ENANO_ROOT.'/includes/pageutils.php');
   446       if(isset($_POST['_downthejohn']))
   455       if(isset($_POST['_downthejohn']))
   447       {
   456       {
   448         $template->header();
   457         $template->header();
   449           $result = PageUtils::flushlogs($paths->page_id, $paths->namespace);
   458           $result = PageUtils::flushlogs($paths->page_id, $paths->namespace);
   515     case 'deletepage':
   524     case 'deletepage':
   516       if(!$session->get_permissions('delete_page'))
   525       if(!$session->get_permissions('delete_page'))
   517       {
   526       {
   518         die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('etc_access_denied') . '</p>');
   527         die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('etc_access_denied') . '</p>');
   519       }
   528       }
       
   529       if ( !$session->sid_super )
       
   530       {
       
   531         redirect(makeUrlNS('Special', "Login/{$paths->page}", 'target_do=deletepage&level=' . $session->user_level, false), $lang->get('etc_access_denied_short'), $lang->get('etc_access_denied_need_reauth'), 0);
       
   532       }
       
   533       
   520       require_once(ENANO_ROOT.'/includes/pageutils.php');
   534       require_once(ENANO_ROOT.'/includes/pageutils.php');
   521       if(isset($_POST['_adiossucker']))
   535       if(isset($_POST['_adiossucker']))
   522       {
   536       {
   523         $reason = ( isset($_POST['reason']) ) ? $_POST['reason'] : false;
   537         $reason = ( isset($_POST['reason']) ) ? $_POST['reason'] : false;
   524         if ( empty($reason) )
   538         if ( empty($reason) )
   618       if ( !$q )
   632       if ( !$q )
   619         $db->_die('Detag query, index.php:'.__LINE__);
   633         $db->_die('Detag query, index.php:'.__LINE__);
   620       die_friendly($lang->get('page_detag_success_title'), '<p>' . $lang->get('page_detag_success_body') . '</p>');
   634       die_friendly($lang->get('page_detag_success_title'), '<p>' . $lang->get('page_detag_success_body') . '</p>');
   621       break;
   635       break;
   622     case 'aclmanager':
   636     case 'aclmanager':
       
   637       if ( !$session->sid_super )
       
   638       {
       
   639         redirect(makeUrlNS('Special', "Login/{$paths->page}", 'target_do=aclmanager&level=' . $session->user_level, false), $lang->get('etc_access_denied_short'), $lang->get('etc_access_denied_need_reauth'), 0);
       
   640       }
       
   641       
   623       require_once(ENANO_ROOT.'/includes/pageutils.php');
   642       require_once(ENANO_ROOT.'/includes/pageutils.php');
   624       $data = ( isset($_POST['data']) ) ? $_POST['data'] : Array('mode' => 'listgroups');
   643       $data = ( isset($_POST['data']) ) ? $_POST['data'] : Array('mode' => 'listgroups');
   625       PageUtils::aclmanager($data);
   644       PageUtils::aclmanager($data);
   626       break;
   645       break;
   627     case 'sql_report':
   646     case 'sql_report':