// ====================================================================================================
//
// DIADES ARREU DEL MON - Catalansalmon.com/diada
//
// ====================================================================================================
include "includes_dia.php";
$columnes = ($esmobil) ? 1 : 4;
// per saber si venim del formulari
$sent = isset ($_REQUEST["sent"]) ? protegeix($_REQUEST["sent"],"int") : "";
$rnd = intval($_REQUEST["rnd"]);
// recopilem info de la gent que sha registrat
$t["esdeveniment"] = $_SESSION['ESDEVENIMENT'];
$t["any"] = $_SESSION['DIADA_EN_CURS'];
$t["opcio"] = 1;
$t["orderby"] = "cit_Name";
$t["status"] = 1;
$result = $DIA->llistar_diades ( $t ) ;
$i_opinio = 0;
while ( $row = mysql_fetch_array($result) ) {
$i++;
$t_ciutats[$i][1] = $row["dia_ciutat"];
$t_ciutats[$i][2] = $row["total"];
$t_ciutats[$i][3] = stripslashes($row["cit_Name"]);
if ( $row["dia_lat"]!=0 ) {
$t_ciutats[$i][4] = $row["dia_lat"];
$t_ciutats[$i][5] = $row["dia_long"];
} else {
$t_ciutats[$i][4] = $row["cit_lat"];
$t_ciutats[$i][5] = $row["cit_long"];
}
$t_ciutats[$i][6] = stripslashes($row["pai_cat"]);
$t_ciutats[$i][7] = $row["pai_id"];
$t_ciutats[$i][8] = $row["dia_id"];
$t_ciutats[$i][10] = $row["dia_status"];
$t_ciutats[$i][11] = $row["dia_data"];
$t_ciutats[$i][12] = $row["dia_hora"];
$lloc = $row["dia_lloc"];
$lloc = preg_replace('/\s+/', ' ', trim($lloc)); // ENLLOC DEL nl2br
//$lloc = stripslashes(htmlentities($lloc, ENT_QUOTES));
$t_ciutats[$i][13] = $lloc;
$t_ciutats[$i][14] = $row["dia_link"];
}
// --- Totals ---
$tx["esdeveniment"] = $_SESSION['ESDEVENIMENT'];
$tx["any"] = $_SESSION['DIADA_EN_CURS'];
$tx["opcio"] = 2;
$tx["status"] = "1,4";
$total_registres = $DIA->llistar_diades ( $tx ) ;
$ty["esdeveniment"] = $_SESSION['ESDEVENIMENT'];
$ty["any"] = $_SESSION['DIADA_EN_CURS'];
$ty["opcio"] = 2;
$ty["status"] = "4";
$total_registres_pendents = $DIA->llistar_diades ( $ty ) ;
$total_registres_confirmats = $total_registres - $total_registres_pendents ;
$perc_pendents = number_format ((( $total_registres_pendents * 100 ) / $total_registres), 1);
$perc_confirmats = number_format ((( $total_registres_confirmats * 100 ) / $total_registres) , 1);
// diades agrupades per ciutat (o Random)---
$tz["esdeveniment"] = $_SESSION['ESDEVENIMENT'];
$tz["any"] = $_SESSION['DIADA_EN_CURS'];
$tz["opcio"] = 1;
$tz["status"] = "1";
$tz["orderby"] = "cit_Name";
$tz["groupby"] = "dia_ciutat";
$result = $DIA->llistar_diades ( $tz ) ;
$llista_diades = "";
while ( $row = mysql_fetch_array($result) ) {
$llista_diades.= ''.$row["cit_Name"].' ';
if ($row["total"] > 1) {
$llista_diades.='('.$row["total"].') ';
} else {
$llista_diades.=' ';
}
}
// ---
$t_carpetes = get_llista_carpetes ($_SESSION['DIADA_EN_CURS']);
//print_r($t_carpetes);
$total_fotos = 0;
$llista_diades_amb_foto = "";
foreach ($t_carpetes as $key=>$carpeta) {
$t_fotos[$carpeta] = get_llista_fotos ($_SESSION['DIADA_EN_CURS'], $carpeta, 0);
$row = $DIA->get_diada ( $carpeta, "", "");
if ($rnd) {
$llista_diades_amb_foto.= ''.$row["cit_Name"].' ';
} else {
$llista_diades_amb_foto.= ''.$row["cit_Name"].' ';
}
foreach ($t_fotos[$carpeta] as $key2=>$value2) {
$llista_random[] = "fotos/".$_SESSION['DIADA_EN_CURS']."/$carpeta/$value2";
$total_fotos++; // no se perque la funcio recursiva no va be (aasteriscada)
}
}
//print_r($t_fotos);
//$total_fotos = count($t_fotos, COUNT_RECURSIVE); // recursive!
// -- si random
if ($rnd) {
shuffle ($llista_random);
}
?>
$titol_pagina = $hash1;
include "head_dia.php";
?>
echo $compartir_fb_pre; ?>
include "capcelera_dia.php" ?>
include "menu_compartir.php";?>
TENIM
Warning : Undefined variable $total_fotos in /home/catalansalmon/public_html/diada/fotos.php on line 199
FOTOS DE
Warning : Undefined variable $t_carpetes in /home/catalansalmon/public_html/diada/fotos.php on line 200
Fatal error : Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/catalansalmon/public_html/diada/fotos.php:200
Stack trace:
#0 {main}
thrown in /home/catalansalmon/public_html/diada/fotos.php on line 200