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

add.php3

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

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

      $board = LoadClass('Board');
      $session = LoadClass('Session');

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

      //   Always use $HTTP_POST_VARS because slashes and extra spaces
      //   are stripped
      $message = isset($HTTP_POST_VARS['message'])?$HTTP_POST_VARS['message']:'';
      $board_section = isset($HTTP_POST_VARS['board_section'])?
            $HTTP_POST_VARS['board_section']:'';
      if ($message != '') {
            if (!empty($board_section)) {
                  echo $board->add($message,$board_section);
            } else {
                  echo $board->add($message);
            }
      } else {
            if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER']!='') {
                  header("Location: ".$HTTP_SERVER_VARS['HTTP_REFERER']);
            } else {
                  header("Location: ".$config->basehref.$config->boardindexfile);
            }
      }

?>

Generated by  Doxygen 1.6.0   Back to index