From a50e2ac2021251b4b9e73a3596f5417c80fade30 Mon Sep 17 00:00:00 2001 From: Mustafa Jibaly Date: Mon, 12 Mar 2012 23:30:39 -0400 Subject: [PATCH] changes to ROOT, added version number to footer --- pafm-files/js.js | 6 +++--- pafm.php | 38 +++++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/pafm-files/js.js b/pafm-files/js.js index 94a10aa..acfd166 100644 --- a/pafm-files/js.js +++ b/pafm-files/js.js @@ -1,11 +1,11 @@ -/** +/* @filename: js.js @date: February 16th, 2012 Copyright (C) 2007-2012 mustafa This program is free software; you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation. See gpl-3.0.txt -**/ + GNU General Public License as published by the Free Software Foundation. +*/ function $(element) { return document.getElementById(element); } diff --git a/pafm.php b/pafm.php index 96b1403..f13f9ba 100644 --- a/pafm.php +++ b/pafm.php @@ -1,13 +1,13 @@ array(), 'files' => array()); $cpExts = array('asp', 'css', 'htm', 'html', 'js', 'java', 'pl', 'php', 'rb', 'sql', 'xsl'); //For CP Editing -$footer = 'pafm by mustafa'; +$footer = 'pafm v'.VERSION.' by mustafa'; $do = $_GET['do']; @@ -60,9 +70,9 @@ /** directory checks and chdir **/ -if (!is_dir(ROOT)) - exit('ROOT (' . htmlspecialchars(ROOT) . ') is not a valid directory'); -chdir(ROOT); +if (is_dir(ROOT)) + chdir(ROOT); + //exit('ROOT (' . htmlspecialchars(ROOT) . ') is not a valid directory'); if (!is_dir($path)) exit('path (' . $pathHTML . ') is not a valid directory'); @@ -207,6 +217,7 @@ function pathCrumbs(){ } return $crumb; } + //authorize functions function doAuth(){ global $do, $pathURL, $footer; @@ -277,6 +288,7 @@ function doLogout(){ session_destroy(); redirect(); } + //fOp functions function doCreate($file, $folder, $path){ if (isNull($file) && isNull($folder))