NomeLuogo; } else { header("location: login.php"); } } if (isset($_GET["a"])) { $azione = $_GET["a"]; } $extra = ""; if (isset($_GET["x"])) { $extra = $_GET["x"]; } if (isset($_GET["r"])) { if (in_array($_GET["r"], $utente->UtenteRealta)) { $realta = new Realta($handle, $_GET["r"]); } else { header("location: login.php"); } } if (isset($_GET["c"])) { $concerto = new Concerto($handle, $_GET["c"]); if (isset($_GET["r"])) { if (!in_array($_GET["r"], $concerto->IDRealta)) { header("location: login.php"); } } } if($azione == "NEW" || ($azione == "NEWA" && $utente->TipoCreaConcerto == 1)) { $titolo = "Nuovo Concerto"; $concerto = new Concerto($handle, 0); $luogoDisabled = ""; if ($azione == "NEW" && $realta->TipoIsLuogo == 1) { $Luogo = $realta->Nome; $IDLuogo = $realta->ID; $luogoDisabled = " disabled"; } if ($azione == "NEW" && $realta->TipoIsArtista == 1) { $Artista = $realta->Nome . "; "; $IDArtista = $realta->ID; } } if ($azione == "INS" || $azione == "INS2" || $azione == "APP" || (($azione == "INSA" || $azione == "INS2A" || $azione == "APPA") && $utente->TipoCreaConcerto == 1)) { switch($azione) { case "INS": case "INSA": $forceInsert = false; break; case "INS2": case "INS2A": $forceInsert = true; break; case "APP": case "APPA": if (isset($_GET["n"])) { $ConcertoEsistente = $_GET["n"]; } else { header("location: login.php"); } break; } $luogoDisabled = ""; if ($azione == "INS" || $azione == "INS2" || $azione == "APP") { if ($realta->TipoIsLuogo == 1) { $luogoDisabled = " disabled"; } } $Artista = $_POST["Artista"]; $IDArtista = $_POST["IDArtista"]; $Luogo = $_POST["Luogo"]; $IDLuogo = $_POST["IDLuogo"]; $Data_giorno = $_POST["Data_giorno"]; $Data_mese = $_POST["Data_mese"]; $Data_anno = $_POST["Data_anno"]; $Data_ora = $_POST["Data_ora"]; if($IDArtista != "" && $IDLuogo != "" && $Data_ora != "") { $DataOra = $Data_anno . "-" . $Data_mese . "-" . $Data_giorno . " " . $Data_ora . ":00"; if ($azione == "APP" || ($azione == "APPA" && $utente->TipoCreaConcerto == 1)) { $concerto = new Concerto($handle, $ConcertoEsistente); if ($azione == "APPA" && $utente->TipoCreaConcerto == 1) { $alertJS = $concerto->appendConcerto($handle, null, $IDArtista, $Artista, $IDLuogo, $utente); $azione = "U1A"; } else { $alertJS = $concerto->appendConcerto($handle, $realta, $IDArtista, $Artista, $IDLuogo, $utente); $azione = "U1"; } $titolo = $concerto->getArtisti() . " @ " . $concerto->NomeLuogo; $ConcertoEsistente = ""; } else { $concerto = new Concerto($handle, 0); if (($azione == "INSA" || $azione == "INS2A") && $utente->TipoCreaConcerto == 1) { $alertJS = $concerto->addConcerto($handle, null, $IDArtista, $IDLuogo, $Luogo, $DataOra, $ConcertoEsistente, $forceInsert, $utente); $azione = "U1A"; } else { $alertJS = $concerto->addConcerto($handle, $realta, $IDArtista, $IDLuogo, $Luogo, $DataOra, $ConcertoEsistente, $forceInsert, $utente); $azione = "U1"; } if ($ConcertoEsistente == "") { $titolo = $concerto->getArtisti() . " @ " . $concerto->NomeLuogo; } else { $titolo = "CONCERTO"; if (($azione == "INSA" || $azione == "INS2A" || $azione == "NEWA" || $azione == "U1A") && $utente->TipoCreaConcerto == 1) { $azione = "NEW2A"; } else { $azione = "NEW2"; } } } } else { $alertJS = "Tutti i campi sono obbligatori!"; if (($azione = "NEWA" || $azione == "INSA" || $azione == "INS2A" || $azione == "APPA") && $utente->TipoCreaConcerto == 1) { $azione = "NEWA"; } else { $azione = "NEW"; } } } if ($azione == "ACT" || ($azione == "ACTA" && $utente->TipoCreaConcerto == 1)) { if (isset($_GET["s"])) { $concerto->attiva($handle, $_GET["s"]); if ($azione == "ACT") { $azione = "DIR"; } else { $azione = "DIRA"; } } else { header("location: login.php"); } } if ($azione == "U1" || ($azione == "U1A" && $utente->TipoCreaConcerto == 1)) { $luogoDisabled = ""; if ($azione == "U1") { if ($realta->TipoIsLuogo == 1) { $luogoDisabled = " disabled"; } } $Artista = $concerto->GetArtisti(); $IDArtista = $concerto->GetIDArtisti(); $Luogo = $concerto->NomeLuogo; $IDLuogo = $concerto->IDLuogo; $Data_giorno = formatDateFromSQL($concerto->DataOra, "giorno"); $Data_mese = formatDateFromSQL($concerto->DataOra, "mese"); $Data_anno = formatDateFromSQL($concerto->DataOra, "anno"); $Data_ora = formatDateFromSQL($concerto->DataOra, "ora"); $Organizzatore = $concerto->GetOrganizzatori(); $IDOrganizzatore = $concerto->GetIDOrganizzatori(); $titolo = $concerto->getArtisti() . " @ " . $concerto->NomeLuogo; } if ($azione == "U2" || ($azione == "U2A" && $utente->TipoCreaConcerto == 1)) { if (isset($_GET["c"])) { $ConcertoEsistente = $_GET["c"]; } else { header("location: login.php"); } $luogoDisabled = ""; if ($azione == "U2") { if ($realta->TipoIsLuogo == 1) { $luogoDisabled = " disabled"; } } $Artista = $_POST["Artista"]; $IDArtista = $_POST["IDArtista"]; $Luogo = $_POST["Luogo"]; $IDLuogo = $_POST["IDLuogo"]; $Data_giorno = $_POST["Data_giorno"]; $Data_mese = $_POST["Data_mese"]; $Data_anno = $_POST["Data_anno"]; $Data_ora = $_POST["Data_ora"]; $Descrizione = $_POST["Descrizione"]; $Prezzo = $_POST["Prezzo"]; $Organizzatore = $_POST["Organizzatore"]; $IDOrganizzatore = $_POST["IDOrganizzatore"]; if($IDArtista != "" && $IDLuogo != "" && $Data_ora != "") { $DataOra = $Data_anno . "-" . $Data_mese . "-" . $Data_giorno . " " . $Data_ora . ":00"; $concerto = new Concerto($handle, $ConcertoEsistente); if ($azione == "U2") { $alertJS = $concerto->updateConcerto($handle, $realta, $IDArtista, $Artista, $IDLuogo, $Luogo, $DataOra, $Descrizione, $Prezzo, $IDOrganizzatore, $Organizzatore, $utente); $azione = "DIR"; } else { $alertJS = $concerto->updateConcerto($handle, null, $IDArtista, $Artista, $IDLuogo, $Luogo, $DataOra, $Descrizione, $Prezzo, $IDOrganizzatore, $Organizzatore, $utente); //$azione = "DIRA"; $azione = "U1A"; } $titolo = $concerto->getArtisti() . " @ " . $concerto->NomeLuogo; $ConcertoEsistente = ""; } } ?> ID; break; case "NEW2": $postAction = "a=INS2&r=" . $realta->ID; break; case "U1": $postAction = "a=U2&r=" . $realta->ID . "&c=" . $concerto->ID; break; case "NEWA": if ($utente->TipoCreaConcerto == 1) { $postAction = "a=INSA"; } break; case "NEW2A": if ($utente->TipoCreaConcerto == 1) { $postAction = "a=INS2A"; } break; case "U1A": if ($utente->TipoCreaConcerto == 1) { $postAction = "a=U2A&c=" . $concerto->ID; } break; } ?>
GIORNO | ARTISTI | LUOGO | ||||
![]() | ";
}
else
{
echo "![]() | ";
}
echo "" . formatDateFromSQL($arrConcerti[$i]["DataOra"], "data") . " | "; echo "" . getNomeArtistiConcerto($handle, $arrConcerti[$i]["ID"], 0) . " | "; echo "" . getLuogoConcerto($handle, $arrConcerti[$i]["IDLuogo"]) . " | "; echo "||
Vedi tutti... |