From 7b3e26cff5527c3db42cf9977b30fb14f739c880 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 23 Aug 2012 07:36:11 +0000 Subject: [PATCH] Correction indentation --- bureau/class/m_log.php | 78 +++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/bureau/class/m_log.php b/bureau/class/m_log.php index 56ec19a4..be2d77ff 100644 --- a/bureau/class/m_log.php +++ b/bureau/class/m_log.php @@ -32,68 +32,68 @@ class m_log { - function m_log(){ - } + function m_log(){ + } - function list_logs_directory($dir){ - global $cuid,$err; - $err->log("log","list_logs_directory"); + function list_logs_directory($dir){ + global $cuid,$err; + $err->log("log","list_logs_directory"); $dir2=$dir; if ($dir = @opendir($dir)) { while (($file = readdir($dir)) !== false) { - if ($file!="." && $file!=".." && realpath($dir2 . "/" . $file) == $dir2 . "/" . $file){ - $absfile=$dir2."/".$file; - $c[]=array("name"=>$file, - "creation_date"=>date("F d Y H:i:s.", filectime($absfile)), - "filesize"=>filesize($absfile), - "downlink"=>"logs_download.php?file=".urlencode($file), - ); - } + if ($file!="." && $file!=".." && realpath($dir2 . "/" . $file) == $dir2 . "/" . $file){ + $absfile=$dir2."/".$file; + $c[]=array("name"=>$file, + "creation_date"=>date("F d Y H:i:s.", filectime($absfile)), + "filesize"=>filesize($absfile), + "downlink"=>"logs_download.php?file=".urlencode($file), + ); + } } closedir($dir); } usort($c,"compare_logname"); - return $c; + return $c; - }//list_logs + }//list_logs - function list_logs_directory_all($dirs){ - global $err; - $err->log("log","get_logs_directory_all"); - $c=array(); - foreach($dirs as $dir=>$val){ - $c[$dir]=$this->list_logs_directory($val); - } - return $c; + function list_logs_directory_all($dirs){ + global $err; + $err->log("log","get_logs_directory_all"); + $c=array(); + foreach($dirs as $dir=>$val){ + $c[$dir]=$this->list_logs_directory($val); + } + return $c; - } - - function get_logs_directory(){ - global $cuid,$db,$err; - $err->log("log","get_logs_directory"); - - $db->query("select login from membres where uid=$cuid ;"); + } + + function get_logs_directory(){ + global $cuid,$db,$err; + $err->log("log","get_logs_directory"); + + $db->query("select login from membres where uid=$cuid ;"); if ($db->num_rows()==0) { $err->raise("log",1); return false; } $db->next_record(); - $c=array("dir"=>"/var/alternc/logs/".$cuid."-".$db->f("login")); - return $c; - } - - function download_link($file){ - global $err,$mem; - $err->log("log","download_link"); + $c=array("dir"=>"/var/alternc/logs/".$cuid."-".$db->f("login")); + return $c; + } + + function download_link($file){ + global $err,$mem; + $err->log("log","download_link"); header("Content-Disposition: attachment; filename=".$mem->user["login"].".zip"); header("Content-Type: application/force-download"); header("Content-Transfer-Encoding: binary"); $f=$this->get_logs_directory(); $ff=$f['dir']."/".basename($file); set_time_limit(0); - readfile($ff); - } + readfile($ff); + } } // end class