Logo Search packages:      
Sourcecode: dacode version File versions  Download package

index.php3

<?php
/* daCode _ http://www.dacode.org/
 * $Id: index.php3,v 1.25.2.10 2003/02/08 00:25:37 ruffy Exp $
 */

      $topdir = '..';
      require $topdir."/dacode.php3";

      $session = LoadClass('Session');
      $html = LoadClass('Html');
      $user = LoadClass('User');
      $sidebox = LoadClass('Sidebox');
      $admin = LoadClass('Admin');
      $utils = LoadClass('Utils');
      $board = LoadClass('Board');

      if (!($session->is_admin) && !($session->is_moderator)) {
            echo $utils->no_access_msg();
            exit;
      }

      if (!ereg('^'.$config->baseurl,$HTTP_SERVER_VARS['HTTP_REFERER'])
            && !($session->param & pow(2,3))) {
            $title = lecho("HTTP referer");
            $nobanner = false;
            $text = $utils->warn_referer();
            $html->parsetemplate('basic.tmpl');
            exit;
      }

      $tmp = parse_url($HTTP_SERVER_VARS['REQUEST_URI']);

      if (isset($tmp['query']) && $tmp['query'] != '') {
            $title = '';
        $HTTP_POST_VARS['table'] = (isset($HTTP_POST_VARS['table']))?$HTTP_POST_VARS['table']:"";
            $html->parsetemplate('admin.tmpl');
      } else {
            $text = '<br /><br /><span class="newstext">'.
                  lecho("This directory ('admin/') is not intended to access to the admin scripts.<br />To moderate news, create or edit sections &amp; topics, just go back to ").
                  '<a href="'.$config->basehref.'">'.$config->titledefault.'</a>'.
                  lecho(", enter your login and password in the login box, validate, and then just use the admin box, which will provide you all the useful admin links.").
                  '<br /><br /></span>';
            $nobanner = false;
            $title = $config->basehref.': '.lecho("Admin index?");
            $html->parsetemplate('basic.tmpl');
      }
?>

Generated by  Doxygen 1.6.0   Back to index