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

tips.php3

<?php
/* daCode _ http://www.dacode.org/
 * $Id: tips.php3,v 1.1.2.10 2002/08/04 20:40:47 ruffy Exp $
 */

      $matches = array();

      if (!isset($HTTP_SERVER_VARS)) {
            // looks likes a PHP3 server
            if (isset($PATH_INFO)) {
                  $HTTP_SERVER_VARS['PATH_INFO'] = $PATH_INFO;
            } else {
                  $HTTP_SERVER_VARS = array();
            }
      }

      if (isset ($HTTP_GET_VARS['tip_id']) &&
            ereg("^[0-9]+$",$HTTP_GET_VARS['tip_id'])) {
            $news_id = $HTTP_GET_VARS['tip_id'];
      } elseif (isset ($HTTP_SERVER_VARS['PATH_INFO']) && 
            preg_match('/(\d+)\/(-1|\d+)/', $HTTP_SERVER_VARS['PATH_INFO'], 
                        $matches)) {
            //Odd, because we use HTTP redirects, some browsers
            //don't like get vars in it!
            //Get the vars we need from $HTTP_SERVER_VARS['PATH_INFO']
            $news_id = $tip_id = $matches[1];
            $score = $matches[2];
            //FIXME: TO BE EXPANDED
      } else {
            die ('<b>Error 404:</b> Page not found');
      }
      $topdir = ".";
      require $topdir.'/dacode.php3';
      //echo "<font color=red><h1>$news_id</fint></h1>";
      $sidebox = LoadClass("Sidebox");
      $tips = LoadClass("Tips");
      $html = LoadClass("Html");
      //Used to control which comments are loaded
      $res_type = 2;
      $news_id = $tip_id;
      if (!isset($a)) $a = '';
      $config->score = isset($score)?$score:'';
      $comments = LoadClass("Comments");

      $html->parseTemplate("tips.tmpl");

?>

Generated by  Doxygen 1.6.0   Back to index