Rev Author Line No. Line
185 miho 1 <?php
2 # vim:et:ts=3:sts=3:sw=3:fdm=marker:
3  
4 // WebSVN - Subversion repository viewing via the web using PHP
5 // Copyright © 2004-2006 Tim Armes, Matt Sicker
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //
21 // --
22 //
23 // form.php
24 //
25 // Handling of WebSVN forms
26  
27 require_once("include/setup.inc");
28 require_once("include/utils.inc");
29  
30 // Generic redirect handling
31  
32 function redirect($loc)
33 {
34 $url= getFullURL($loc);
35  
36 # technically, a die(header('Location: '.$url)); would suffice for all web browsers... ~J
37 header("Location: $url");
38 echo "<html>\n <head>\n <title>Redirecting...</title>\n <meta http-equiv='refresh' content='0; url=$url' />
39 <script type='application/x-javascript'><![CDATA[ window.location.href = '$url'; ]]></script>
40 </head>
41 <body>
42 <p>If you are not automatically redirected, please click <a href='$url'>here</a> to continue.</p>
43 </body>\n</html>";
44 }
45  
46 // Handle project selection
47  
48 if (@$_REQUEST["selectproj"])
49 {
50 $basedir = dirname($_SERVER["PHP_SELF"]);
51 if ($basedir != "" && $basedir != DIRECTORY_SEPARATOR && $basedir != "\\" && $basedir != "/" )
52 $basedir .= "/";
53 else
54 $basedir = "/";
55  
56 $url = $config->getURL($rep, "/", "dir");
57 $url = html_entity_decode($url);
58  
59 if ($config->multiViews)
60 redirect($url."sc=$showchanged");
61 else
62 redirect($basedir.$url."sc=$showchanged");
63 }
64  
65  
66 ?>