flatnuke/sections/none_Statistiche/download_stats section.php,1.10,1.11

0 views
Skip to first unread message

Marco Segato

unread,
Mar 4, 2012, 9:51:08 AM3/4/12
to Flatnuk...@googlegroups.com
Update of /cvsroot/flatnuke/flatnuke/sections/none_Statistiche/download_stats
In directory vz-cvs-3.sog:/tmp/cvs-serv26342/sections/none_Statistiche/download_stats

Modified Files:
section.php
Log Message:
Fixed different PHP Notice errors on statistics engine

Index: section.php
===================================================================
RCS file: /cvsroot/flatnuke/flatnuke/sections/none_Statistiche/download_stats/section.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** section.php 31 Oct 2011 15:22:55 -0000 1.10
--- section.php 4 Mar 2012 14:51:06 -0000 1.11
***************
*** 1,3 ****
! <?php
/**
* Copyright (C) 2004 Aldo Boccacci
--- 1,3 ----
! <?php
/**
* Copyright (C) 2004 Aldo Boccacci
***************
*** 31,64 ****
$topdownloadsfile = get_fn_dir("var")."/fdplus/fd_top_download.php";

-
-
//-------------------
//FINE CONFIGURAZIONE
//-------------------
- include_once("download/fd+.php");

! global $lang,$newfiletime,$archivedir,$icon_style;
! if (!isset($lang)) $lang="it";
! //impostazione lingua
! if ($lang=="en" or $lang=="es"){
! include_once ("languages/fd+lang/fd+en.php");
! include_once ("languages/$lang.php");
! }
! else if ($lang=="it"){
! include_once ("languages/fd+lang/fd+it.php");
! include_once ("languages/it.php");
! }
! else if ($lang=="de"){
! include_once ("languages/fd+lang/fd+de.php");
! include_once ("languages/de.php");
! }
! else if ($lang=="pt"){
! include_once ("languages/fd+lang/fd+pt.php");
! include_once ("languages/pt.php");
! }
! else {
! include_once ("languages/fd+lang/fd+en.php");
! include_once ("languages/$lang.php");
! }

if(file_exists($topdownloadsfile)) {
--- 31,39 ----
$topdownloadsfile = get_fn_dir("var")."/fdplus/fd_top_download.php";

//-------------------
//FINE CONFIGURAZIONE
//-------------------

! include_once("download/fd+.php");

if(file_exists($topdownloadsfile)) {
***************
*** 74,78 ****

$statstring = get_xml_element("fd:topdownloads",$statstring);
-
$files = get_xml_array("fd:file",$statstring);

--- 49,52 ----
***************
*** 81,88 ****
foreach ($files as $file){
$filepath = get_xml_element("fd:path",$file);
-
//verifico che il file esista
if (!file_exists($filepath)) continue;
-
$lastdir = strrchr(dirname($filepath),"/");
if (eregi($archivedir,$lastdir)){
--- 55,60 ----
***************
*** 91,97 ****
}
if (!file_exists($filepath)) continue;
- // echo "$filepath<br><br>",
show_file($filepath,$archivedir,$newfiletime,$icon_style);
-
}

--- 63,67 ----
***************
*** 100,128 ****
if (count($archivedfiles)!=0){
foreach ($archivedfiles as $archivedfile){
! show_file($archivedfile,$archivedir,$newfiletime,$icon_style);
! // echo $archivedfile."<br>";
}
-
}
-
-
- }
-
-
- /**
- * Restituisce true se l'utente � di livello 10
- * (e dunque possiede i privilegi di amministrazione)
- */
- /*function fdview_is_admin(){
- include_once("shared.php");
- if (!isset($_COOKIE['myforum'])) return false;
-
- if ((getlevel($_COOKIE['myforum'],"home"))=="10" and versecid($_COOKIE['myforum'])) {
- return true;
}

- else return false;
-
- }*/

/**
--- 70,78 ----
if (count($archivedfiles)!=0){
foreach ($archivedfiles as $archivedfile){
! show_file($archivedfile,$archivedir,$newfiletime,$icon_style);
}
}
}


/**
***************
*** 153,161 ****
//controllo se il livello dell'utente � adeguato a quello del file
if ($description['level']!="-1"){
! if (isset($_COOKIE['myforum']) and versecid($_COOKIE['myforum'])){
! if ($description['level']>getLevel($_COOKIE['myforum'],"home")){
!
! return;
! }
}
else {
--- 103,107 ----
//controllo se il livello dell'utente � adeguato a quello del file
if ($description['level']!="-1"){
! if($description['level'] > _FN_USERLEVEL) return;
}
else {
***************
*** 163,175 ****
}

- }
-
//controllo se il livello dell'utente � adeguato a quello della sezione che ospita il file
$mod="";
$mod = eregi_replace("^.*sections/","",dirname($filepath));
! if (getlevel($_COOKIE['myforum'],"home")<getsectlevel($mod)) return;
!
//MOSTRO IL FILE
- // openTableTitle();
echo "<table width=\"100%\" style=\"border:1px solid #000000;\">";

--- 109,118 ----
}

//controllo se il livello dell'utente � adeguato a quello della sezione che ospita il file
$mod="";
$mod = eregi_replace("^.*sections/","",dirname($filepath));
! if(getsectlevel($mod) > _FN_USERLEVEL) return;
!
//MOSTRO IL FILE
echo "<table width=\"100%\" style=\"border:1px solid #000000;\">";

***************
*** 181,185 ****
$mod = eregi_replace("sections/","",dirname($filepath));

-
echo "<a href=\"index.php?mod=".rawurlencodepath($mod)."#".rawurlencode(basename($filepath))."\"";
if ($description['hide']=="true") echo " style=\"color : #ff0000; text-decoration : line-through;\"";
--- 124,127 ----
***************
*** 206,212 ****
echo "<td><b>"._FDSIZE.":</b></td><td>".round((filesize($filepath)/1024))."&nbsp;kb</td></tr>";
echo "</table><br>";
- // closeTableTitle();
-
-
}

--- 148,151 ----

Reply all
Reply to author
Forward
0 new messages