3 error_reporting(E_ALL);
5 // File : $Source: /cvsroot/ijbswa/current/project.h,v $
7 // Purpose : redirects requests to a specific paragraph in the online docs
8 // This file belongs into
9 // ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
11 // $Id: Makefile.in,v 1.12 2001/06/12 17:15:56 swa Exp $
13 // Written by and Copyright (C) 2001 the SourceForge
14 // IJBSWA team. http://ijbswa.sourceforge.net
16 // Based on the Internet Junkbuster originally written
17 // by and Copyright (C) 1997 Anonymous Coders and
18 // Junkbusters Corporation. http://www.junkbusters.com
21 // Parse the v= and to= paramaters
22 function parse_parameters()
25 global $version_major, $version_minor, $version_point;
37 // Check if it's valid.
38 // Valid versions have the form "n.n.n", where n=digit(s).
39 if ( (strspn($v,"0123456789.") == strlen($v)) )
41 // Probably valid. Copy into globals.
42 $version_pieces = explode (".", $v, 4);
43 if (isset($version_pieces[0]))
45 $version_major = 0 + $version_pieces[0];
47 if (isset($version_pieces[1]))
49 $version_minor = 0 + $version_pieces[1];
51 if (isset($version_pieces[2]))
53 $version_point = 0 + $version_pieces[2];
60 // Trim whitespace and convert to lowercase.
61 $to = strtolower(trim($to));
63 // Restrict the characters in the string by removing everything
64 // from the first disallowed character onwards.
66 // Allowed characters are 0-9, a-z, ".", "_", "-".
68 $to = substr($to, 0, strspn($to, "0123456789abcdefghijklmnopqrstuvwxyz._-"));
79 // print "Version {$version_major}.{$version_minor}.{$version_point}<br>";
80 // print "Target \"{$to}\"<br>";
83 // Please do NOT delete any of these redirects. Even if you take them
84 // out of JunkBuster, they may be in use by older releases.
86 // Note 2: Should *not* include #target part in these URLs.
87 // (It works with MS IE, but is not valid HTTP.)
93 header ("Location: http://www.junkbusters.com/ht/en/ijb2faq.html");
97 // Config file options
98 // called as redirect.php?v=X.X.X&to=option#optionname
99 header ("Location: http://www.junkbusters.com/ht/en/ijb2man.html");
102 // Used by 2.9.0+ on WIN32
103 header ("Location: http://www.junkbusters.com/ht/en/ijbwin.html");
106 // // Currently hard-wired into the code.
107 // header ("Location: http://ijbswa.sourceforge.net/");
110 // // Currently hard-wired into the code.
111 // header ("Location: http://www.fsf.org/copyleft/gpl.html");
114 header ("Location: http://ijbswa.sourceforge.net/");
121 // This program is free software; you can redistribute it
122 // and/or modify it under the terms of the GNU General
123 // Public License as published by the Free Software
124 // Foundation; either version 2 of the License, or (at
125 // your option) any later version.
127 // This program is distributed in the hope that it will
128 // be useful, but WITHOUT ANY WARRANTY; without even the
129 // implied warranty of MERCHANTABILITY or FITNESS FOR A
130 // PARTICULAR PURPOSE. See the GNU General Public
131 // License for more details.
133 // The GNU General Public License should be included with
134 // this file. If not, you can view it at
135 // http://www.gnu.org/copyleft/gpl.html
136 // or write to the Free Software Foundation, Inc., 59
137 // Temple Place - Suite 330, Boston, MA 02111-1307, USA.
140 // $Log: Makefile.in,v $