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