From 9cfd4f4056bba6a956dd190b57cecc5ada4cf922 Mon Sep 17 00:00:00 2001 From: dvoraj42 Date: Sun, 20 Mar 2011 17:21:47 +0100 Subject: [PATCH 01/12] undefined variables warnings FIX --- index.php | 41 ++++++++++++++++++++++------------------ themes/classic/theme.php | 6 ++++-- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/index.php b/index.php index eedf984..55ed4cf 100755 --- a/index.php +++ b/index.php @@ -1,5 +1,4 @@ \n" ."function itemsel(item,ff,check,action,overcolor,outcolor,clickcolor) {\n" ." if (action == 1) {\n" @@ -209,6 +213,7 @@ function home() { $count = "0"; $a=1; $b=1; $content1 = ""; $content2 = ""; + $p=0; $tcoloring=''; $totalsize=0; $handle=opendir($userdir.$d); while ($fileinfo = readdir($handle)) $filelist[] = $fileinfo; @@ -355,7 +360,7 @@ function listdir($dir, $level_count = 0) { function logout() { setcookie("user","",time()-60*60*24*1); setcookie("pass","",time()-60*60*24*1); - $login=yes; + $login=null; page_header("Logout",false); echo "Your are now logged out." ."

" @@ -564,7 +569,7 @@ function save($ncontent, $fename, $d, $next_action) { function cr() { - global $d, $userdir; + global $d, $userdir,$content,$adminfile; page_header("Create"); opentitle("Create"); opentable("100%"); @@ -1528,7 +1533,7 @@ function pass() { ." document.prefmod.encpas2.value = hashb;\n" ." return true;\n" ." } else {\n" - ." form.onsubmit=null;\n" + ." form.onsubmit=function(){return false;};\n" ." return false;\n" ." }\n" ." } \n" @@ -1850,8 +1855,8 @@ function valid_js() { - -switch($_REQUEST['p']) { +if ( isset($_REQUEST['p']) ) $p=$_REQUEST['p']; else $p=null; +switch($p) { case "logout": logout(); break; diff --git a/themes/classic/theme.php b/themes/classic/theme.php index 84109a2..3654e69 100755 --- a/themes/classic/theme.php +++ b/themes/classic/theme.php @@ -1,5 +1,5 @@ \n\n" - ."$sitetitle :: $title » Powerd by Arz FileManager 2.0 (Libra)\n" + ."$sitetitle :: $title � Powerd by Arz FileManager 2.0 (Libra)\n" ."\n" ."\n" ."\n" From 011827cd19d8aeb2dffbc440b4a4890fb3cb8c09 Mon Sep 17 00:00:00 2001 From: dvoraj42 Date: Sun, 20 Mar 2011 17:42:59 +0100 Subject: [PATCH 02/12] Devision by zero bug FIX --- index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 55ed4cf..b97a5a2 100755 --- a/index.php +++ b/index.php @@ -49,7 +49,7 @@ mysql_select_db ($config['db']['db']); $yay = 0; $user = ''; $pass = ''; $sess = ''; -$theme=''; +$theme=''; $logged=false; if ( isset($_REQUEST['login']) ) $user = $_REQUEST['login']; elseif ( isset($_COOKIE['user']) ) $user = $_COOKIE['user']; @@ -97,11 +97,14 @@ setcookie('pass',$pass,time()+60*60*24*1); setcookie('sess',$sess,time()+60*60*24*1); + $logged=true; + } else { $er=false; if ( isset($_REQUEST['login']) || isset($_REQUEST['encpas']) ) $er = true; $theme=$defaulttheme; require_once("themes/$theme/theme.php"); + $logged=false; login($er); } @@ -123,7 +126,6 @@ function login($fail = false) { setcookie('sess','',time()-60*60*24*1); $user = ''; $pass = ''; - global $configindex, $extraheaders, $REQUEST_URI, $sqlpref, $lastpage, $bgcolor1, $bgcolor2,$bgcolor3, $tbcolor1, $tbcolor2, $fail, $login, $password, $user, $pass; $randsess = md5(md5(rand(1,25419876)).md5(date("DMjygia"))); $extraheaders = "