$value) { if ($t_diades[$any_diada][1] == 1) { // intern de la taula de diades $tx["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $tx["any"] = $any_diada; $tx["opcio"] = 2; $tx["status"] = "1,4"; $total_registres[$any_diada] = $DIA->llistar_diades ( $tx ) ; } } $total_diades_any = $total_registres[$_SESSION['DIADA_EN_CURS']]; $sub[] = Array(1,"TOTS","TOTS"); $sub[] = Array(2,"per PAÍS","xPAIS"); $sub[] = Array(3,"per CIUTAT","xCIUTAT"); //$sub[] = Array(5,"per CIUTAT d'EMPADRONAMENT"); $sub[] = Array(5,"per DATA D'ESDEVENIMENT","xDATA"); $sub[] = Array(4,"per DATA DE REGISTRE","xRegistre"); if ($t==1) { if ($o==3) { $orderby = " cit_Name "; } else if ($o==2) { $orderby = " pai_cat "; } else { $orderby = " dia_data_registre DESC "; } } else if ($t==2) { if ($o==2) { $orderby = " total DESC "; } else { $orderby = " pai_cat "; } } else if ($t==3 OR $t==5) { if ($o==2) { $orderby = " total DESC "; } else if ($o==3) { $orderby = " cit_provincia, cit_Name "; } else { $orderby = " cit_Name "; } } else if ($t==4) { if ($o==2) { $orderby = " total DESC "; } else { $orderby = " dia_data_registre DESC "; } } else if ($t==5) { if ($o==2) { $orderby = " total DESC "; } else { $orderby = " dia_data DESC "; } } function ciutat_i_estat ($row) { if ( $row["cit_District"]!="" AND $row["cit_District"]!=$row["cit_Name"]) { $ciutat = $row["cit_Name"]." (".$row["cit_District"].")"; } else { $ciutat = $row["cit_Name"]; } return $ciutat; } ?> '; echo ' '; } $t2["opcio"] = 1; $t2["any"] = $_SESSION['DIADA_EN_CURS']; $t2["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t2["status"] = "1"; $t2["orderby"] = $orderby; $result = $DIA->llistar_diades ( $t2 ) ; while ( $row = mysql_fetch_array($result) ) { //$ciutat = stripslashes($row["cit_Name"]); $ciutat = ciutat_i_estat ($row); if ($row["dia_status"]==4) $ciutat.=" (*)"; //$link = ($row["dia_link"]!="") ? '
MÉS INFO' : ""; $link = ($row["dia_link"]!="") ? "
> Més info" : ""; if ($esmobil) { $mesinfo = wordwrap(stripslashes($row["dia_mesinfo"]), 40, "\n", true); // TALLA ELS LINKS > 40 ! deputamare per mobils! echo ''; echo ' '; echo ''; } else { echo ''; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; } $total_registres[$row["dia_status"]]++; $supertotal++; } echo ''; } else if ($t==2) { // per pais $t3["opcio"] = 2; $t3["any"] = $_SESSION['DIADA_EN_CURS']; $t3["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t3["status"] = "1"; $total_testimonis = $DIA->llistar_diades ( $t3 ) ; $t4["opcio"] = 1; $t4["any"] = $_SESSION['DIADA_EN_CURS']; $t4["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t4["status"] = "1"; $t4["orderby"] = $orderby; $t4["groupby"] = "pai_id"; $result = $DIA->llistar_diades ( $t4 ) ; // --- grafics google echo ''; echo ' '; echo ' '; echo ''; echo ' '; echo ' '; echo ' '; echo ''; while ( $row = mysql_fetch_array($result) ) { $perc = ($row[total] * 100) / $total_testimonis; $perc = number_format ($perc,2); echo ''; echo ' '; echo ' '; echo ' '; echo ''; $total+=$row[total]; if ($row[pai_id]==$PAIS_CATALUNYA) { $total_cat+=$row[total]; } else if ($row[pai_id]==$PAIS_ESPANYA) { $total_esp+=$row[total]; } else { $total_mon+=$row[total]; } } echo ''; echo ' '; echo ' '; echo ' '; echo ''; /* // --- CATALUNYA - ESPANYA - MON $perc_cat = ($total_cat * 100) / $total; $perc_esp = ($total_esp * 100) / $total; $perc_mon = ($total_mon * 100) / $total; echo ''; echo ' '; echo ' '; echo ' '; echo ''; echo ''; echo ' '; echo ' '; echo ' '; echo ''; echo ''; echo ' '; echo ' '; echo ' '; echo ''; */ } else if ($t==3) { $t5["opcio"] = 1; $t5["any"] = $_SESSION['DIADA_EN_CURS']; $t5["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t5["status"] = "1"; $t5["orderby"] = $orderby; $t5["groupby"] = "cit_id"; $result = $DIA->llistar_diades ( $t5 ) ; echo ''; echo ' '; echo ' '; echo ' '; echo ''; while ( $row = mysql_fetch_array($result) ) { $ciutat = ciutat_i_estat ($row); echo ''; echo ' '; echo ' '; echo ' '; echo ''; $total+=$row[total]; } echo ''; echo ' '; echo ' '; echo ''; } else if ($t==4) { // per data de registre // AQUI VULL TAMBE LES QUE ESTAN PENDENTS DE CONFIRMAR per tant status=1,4 $t6["opcio"] = 1; $t6["any"] = $_SESSION['DIADA_EN_CURS']; $t6["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t6["status"] = "1"; $t6["orderby"] = $orderby; $t6["groupby"] = "LEFT (dia_data_registre,8)"; $result = $DIA->llistar_diades ( $t6 ) ; // --- grafics google echo ''; echo ' '; echo ' '; // --- echo ''; echo ' '; echo ' '; echo ''; while ( $row = mysql_fetch_array($result) ) { //$total_x = intval($row[total] * 2); $total_x = intval($row[total]); echo ''; echo ' '; echo ' '; echo ''; $total+=$row["total"]; } echo ''; echo ' '; echo ' '; echo ''; } else if ($t==5) { // per data de DIADA $t6["opcio"] = 1; $t6["any"] = $_SESSION['DIADA_EN_CURS']; $t6["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t6["status"] = "1"; $t6["orderby"] = "dia_data"; $t6["groupby"] = "LEFT (dia_data,8)"; $result = $DIA->llistar_diades ( $t6 ) ; echo ''; echo ' '; if (!$esmobil) echo ' '; echo ''; while ( $row = mysql_fetch_array($result) ) { $t7["opcio"] = 1; $t7["data"] = $row["dia_data"]; $t7["esdeveniment"] = $_SESSION['ESDEVENIMENT']; $t7["status"] = "1"; $t7["orderby"] = "cit_Name"; $result7 = $DIA->llistar_diades ( $t7 ) ; $diades_avui = "
'; foreach ($sub as $key=>$value) { $classe = ($sub[$key][0]==$t) ? ' class="menu_on" ' : ' class="menu_off" ' ; $index = ($esmobil) ? 2 : 1; echo ''.$sub[$key][$index].' '; } echo ' '; echo '


Warning: Undefined variable $total_diades_any in /home/catalansalmon/public_html/diada/stats_dia.php on line 246

Diades arreu del món del
Warning: Undefined global variable $_SESSION in /home/catalansalmon/public_html/diada/stats_dia.php on line 246

Warning: Trying to access array offset on null in /home/catalansalmon/public_html/diada/stats_dia.php on line 246
'; echo '
'; ?>
'; if ($t==1) { if (!$esmobil) { echo '
Data'; if ($ES_DEVELOPER) echo "ID
(DEV ONLY)"; echo '
País'; echo ' Ciutat'; echo ' Més info'; echo '
'; echo ' '; echo '

'.formatejar_data($row["dia_data"],2).'

'; echo ' '.stripslashes($row["pai_cat"]).''; echo ' '.$ciutat.''; echo '
'.$row["dia_lloc"].''; echo '

'.$mesinfo.''.$link; echo '
'.formatejar_data($row["dia_data"],2).''.stripslashes($row["pai_cat"]).''.$ciutat.''.$row["dia_lloc"].'
'.stripslashes($row["dia_mesinfo"]).''.$link.'
CONFIRMATS: '.$total_registres[1].' - PENDENTS: '.$total_registres[4].' / TOTAL: '.$supertotal.'
'; echo '
...Carregant gràfics...
'; echo '
País ('.mysql_num_rows($result).')TotalPercentatge
'.stripslashes($row["pai_cat"]).''.$row["total"].''.$perc.' %
Total:'.$total.'
Total CATALUNYA:'.$total_cat.''.number_format ($perc_cat,2).' %
Total ESPANYA:'.$total_esp.''.number_format ($perc_esp,2).' %
Total RESTA MÓN:'.$total_mon.''.number_format ($perc_mon,2).' %
Ciutat ('.mysql_num_rows($result).')PaisTotal
'.$ciutat.''.stripslashes($row["pai_cat"]).''.$row["total"].'
Total:'.$total.'
'; echo '
...Carregant gràfics...
'; echo '
DataTotal
'.formatejar_data($row["dia_data_registre"],2).''.$row["total"].'
Total:'.$total.'
DataTotal
"; while ( $row7 = mysql_fetch_array($result7) ) { $diades_avui.= ''; $diades_avui.= ' '; $diades_avui.= ' '; $diades_avui.= ' '; $diades_avui.= ""; } $diades_avui.= "
'.$row7["cit_Name"].''.$row7["dia_hora"].''.$row7["dia_lloc"].'
"; $bg = ($row["dia_data"]==$avui) ? " class='destacat3' " : ""; $total_x = intval($row["total"]); if ($esmobil) { echo ''; echo ' '; echo '

'.formatejar_data($row["dia_data"],2).'

('.$row["total"].')'; echo '
'.$diades_avui; echo ' '; echo ''; } else { echo ''; echo ' '.formatejar_data($row["dia_data"],2).''; echo ' '.$row["total"].''; echo ' '.$diades_avui.''; echo ''; } $total+=$row["total"]; } echo ''; echo ' Total: '.$total.''; echo ''; } echo ''; ?>