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

index.php3

<?php
/* daCode _ http://www.dacode.org/
 * $Id: index.php3,v 1.31.2.9 2002/10/12 17:32:29 ruffy Exp $
 */

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

      $session = LoadClass('Session');
      $html = LoadClass('Html');
      $user = LoadClass('User');
      $sidebox = LoadClass('Sidebox');

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

      $a = (isset($HTTP_GET_VARS['a'])?$HTTP_GET_VARS['a']:"");
      $user_id = (isset($HTTP_GET_VARS['user_id'])?$HTTP_GET_VARS['user_id']:"");
      $login = (isset($HTTP_GET_VARS['login'])?$HTTP_GET_VARS['login']:"");
      $table = (isset($HTTP_POST_VARS['table'])?$HTTP_POST_VARS['table']:"");
      $start_nb = (isset($HTTP_GET_VARS['start_nb'])?$HTTP_GET_VARS['start_nb']:0);

      switch($a) {
            case "cs":
                  if (!empty($HTTP_SERVER_VARS['HTTP_REFERER'])) {
                        $tmp = parse_url($HTTP_SERVER_VARS['HTTP_REFERER']);
                  }
                  $reload = empty($tmp['query']) ? '?' : '&';
                  $reload .= 'reload=reload';
                  $text = $session->close($reload);
                  break;
            case "rp":
                  $title = lecho("Receive Password");
                  $text = $user->show_forget();
                  break;
            case "mu":
                  $title = lecho("Preferences");
                  $text = $user->print_setting();
                  break;
            case "na":
                  if ($config->restricted_registration && !$session->is_admin) {
                        $utils = LoadClass('Utils');
                        $text = $utils->no_access_msg();
                  } else {
                        $title = lecho("New Account");
                        $text = $user->create_account($table);
                  }
                  break;
            case "vu":
                  $title = lecho("User Informations");
                  if ($login) {
                        $text = $user->get_infologin($login);
                  } else {
                        $text = $user->get_info($user_id);
                  }
                  break;
            default:
                  $title = "";
                  break;
      }

      $html->parsetemplate('users.tmpl');

?>

Generated by  Doxygen 1.6.0   Back to index