Simple Multi User Managed Directory 0.00063
SMUMD
source/install/secure/getpath.php
gehe zur Dokumentation dieser Datei
00001 <?php
00002 /*! \brief getPath
00003  *      Simple Multi User Managed Directory
00004  *      by Sascha Heinatz * sascha.heinatz@alice.de
00005  *      Copyright 2011. 
00006  * 
00007  *      This file is part of Simple Multi User Managed Directory - SMUMD.
00008  *      
00009  *      Simple Multi User Managed Directory - SMUMD 
00010  *      is free software: you can redistribute it and/or modify
00011  *      it under the terms of the GNU Lesser General Public License as published by
00012  *      the Free Software Foundation, either version 3 of the License, or
00013  *      (at your option) any later version.
00014  *      
00015  *      Simple Multi User Managed Directory - SMUMD 
00016  *      is distributed in the hope that it will be useful,
00017  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *      GNU Lesser General Public License for more details.
00020  *      
00021  *      You should have received a copy of the GNU Lesser General Public License
00022  *      along with Simple Multi User Managed Directory - SMUMD.  
00023  *      If not, see <http://www.gnu.org/licenses/>.
00024  *      <hr>
00025  */
00026  /*! wenn URL mit pathnow parameter */
00027 if (isset($_GET['pathnow'])) {
00028         /*! set secure  pfad from GET data  */
00029         $used['pathurl'] = securepath($_GET['pathnow']);
00030         if ($debugging) $out["errors"] .= "url stuff : ".$_GET['pathnow']." <br />";
00031 }
00032 /*! aktuelles und letztes directory aus POST */
00033 if (isset($_POST['pathnow'])) {
00034         /*! set secure pathnow from POST data */
00035         $used['pathnow'] = securepath($_POST['pathnow']);
00036 } else {
00037         /*! set pathnow from $used data */
00038         $used['pathnow'] = $used['path'].$FS.$used['pathurl'];
00039         
00040 }
00041 /*! wenn kein / am ende von $used['pathnow'] dann eins anhängen */
00042 if (!preg_match("/\/$/",$used['pathnow'])) {$used['pathnow'].=$FS;}
00043 if ($debugging) {
00044         $out["errors"] .= "main pfad ".$used["path"]."<br>";
00045         $out["errors"] .= "jetzt pfad ".$used["pathnow"]."<br>";
00046         $out["errors"] .= "used file ".$used["file"]."<br>";
00047 }
00048 ?>