index.php
changeset 1149 be4feea8872a
parent 1082 d1c41601ef39
child 1226 de56132c008d
equal deleted inserted replaced
1148:dcf6e9394e02 1149:be4feea8872a
   540       </form>
   540       </form>
   541       <?php
   541       <?php
   542     $template->footer();
   542     $template->footer();
   543     break;
   543     break;
   544   case 'deletepage':
   544   case 'deletepage':
   545     if(!$session->get_permissions('delete_page'))
   545     if ( !$session->get_permissions('delete_page') )
   546     {
   546     {
   547       die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('etc_access_denied') . '</p>');
   547       die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('etc_access_denied') . '</p>');
   548     }
   548     }
   549     if ( !$session->sid_super )
   549     if ( !$session->sid_super )
   550     {
   550     {
   551       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);
   551       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);
   552     }
   552     }
   553     
   553     
   554     require_once(ENANO_ROOT.'/includes/pageutils.php');
   554     require_once(ENANO_ROOT . '/includes/pageutils.php');
   555     if(isset($_POST['_adiossucker']))
   555     if ( isset($_POST['_adiossucker']) )
   556     {
   556     {
   557       $reason = ( isset($_POST['reason']) ) ? $_POST['reason'] : false;
   557       $reason = ( isset($_POST['reason']) ) ? $_POST['reason'] : false;
   558       if ( empty($reason) )
   558       if ( empty($reason) )
   559         $error = $lang->get('ajax_delete_prompt_reason');
   559         $error = $lang->get('ajax_delete_prompt_reason');
   560       else
   560       else
   570       ?>
   570       ?>
   571       <form action="<?php echo makeUrl($paths->page, 'do=deletepage'); ?>" method="post">
   571       <form action="<?php echo makeUrl($paths->page, 'do=deletepage'); ?>" method="post">
   572          <?php echo $lang->get('page_delete_warning_stern'); ?>
   572          <?php echo $lang->get('page_delete_warning_stern'); ?>
   573          <?php if ( isset($error) ) echo "<p>$error</p>"; ?>
   573          <?php if ( isset($error) ) echo "<p>$error</p>"; ?>
   574          <p><?php echo $lang->get('page_delete_lbl_reason'); ?> <input type="text" name="reason" size="50" /></p>
   574          <p><?php echo $lang->get('page_delete_lbl_reason'); ?> <input type="text" name="reason" size="50" /></p>
   575          <p><input type="submit" name="_adiossucker" value="<?php echo htmlspecialchars($lang->get('page_delete_btn_submit')); ?>" style="color: red; font-weight: bold;" /></p>
   575          <p><input type="submit" name="_adiossucker" value="<?php echo htmlspecialchars($lang->get('page_delete_btn_submit')); ?>" style="font-weight: bold;" /></p>
   576       </form>
   576       </form>
   577       <?php
   577       <?php
   578     $template->footer();
   578     $template->footer();
   579     break;
   579     break;
   580   case 'setwikimode':
   580   case 'setwikimode':