0){ // esiste record appuntamento $html = $html.'
'; if ($_SESSION['livello'] == "admin") { $html = $html.''; } else { $html = $html.''; } $html = $html.''; if ($_SESSION['livello'] == "admin") { $html = $html.''; } $html = $html.'
CALENDARIO APPUNTAMENTI
 
Dettaglio appuntamento
Nome:'.mysql_result($query,$abc,"Nome").'
Luogo'.mysql_result($query,$abc,"Luogo").'
Periodo'.mysql_result($query,$abc,"Periodo").'
     Modifica appuntamento       Invia mail a tutti i prenotati
 
'.mysql_result($query,$abc,"Descrizione").'
Nuova attivitą

'; $queryatt = mysql_db_query($db_database,"SELECT * FROM Attivita WHERE idapp='".$idapp."' order by Attivita.Data, Attivita.Ora",$connessione);// seleziono tutte le Attivita per questo appuntamento $num=mysql_num_rows($queryatt); if ($num > 0){ // esiste record attivita $abc=0; $color = 0; while ( $abc<$num ){ $idatt = mysql_result($queryatt,$abc,"id"); $dataf = substr (mysql_result($queryatt,$abc,"Data"),0,10); $anno = substr($dataf,0,4); $mese = substr($dataf,5,2); $gg = substr($dataf,8,2); $dataf = $gg.'/'.$mese.'/'.$anno; $html1 = $html1 .' #divScorrevole'.$idatt.'{ display: none; padding: 10px 10px 10px 10px; margin-top: 10px; width: 900px; text-align: justify; }'; $java = $java.'function mostraDivScorrevole'.$idatt.'(){ $("#divScorrevole'.$idatt.'").animate({"height": "toggle"}, { duration: 1000 }); } function setVisible'.$idatt.'() { document.getElementById("'.$idatt.'").style.display="block"; }'; $oraf = substr (mysql_result($queryatt,$abc,"Ora"),11,5); if ($color == 0){ $html = $html.'
'; $color = 1; } else { $html = $html. '
'; $color = 0; } $html = $html. ''; if (mysql_result($queryatt,$abc,"Max") != 0){ $html = $html. ''; } else { $html = $html. ''; } $html = $html. ''; $querypre = mysql_db_query($db_database,"SELECT Partecipanti.*, userlist.* FROM Partecipanti LEFT JOIN userlist ON (Partecipanti.amicodiusername = userlist.username) or (Partecipanti.username = userlist.username) WHERE Partecipanti.idattivita='".$idatt."' order by Partecipanti.id",$connessione);// seleziono tutti i partecipannti a questa Attivita $numpre=mysql_num_rows($querypre); $queryme = mysql_db_query($db_database,"SELECT Partecipanti.* FROM Partecipanti WHERE Partecipanti.username='".$_SESSION['username']."' AND Partecipanti.idattivita='".$idatt."'",$connessione); if ($_SESSION['livello'] != "") {// apro if loggato if ($_SESSION['abilitato'] == "1") { // apro if abilitato $html = $html. ''; } //chiudo if abilitato else// apro else abilitato { $html = $html. ''; }// chiudo else abilitato }// chiudo if loggato else { //apro else loggato $html = $html. ''; }// chiudo else loggato $Max = mysql_result($queryatt,$abc,"Max"); if ( (mysql_result($queryatt,$abc,"Max") < $numpre) AND (mysql_result($queryatt,$abc,"Max") != 0)){ //ampro if lista di attesa $diff=$numpre-$Max; $html = $html.''; } else { $url = 'gapp01/dettapp.php?idapp='.$idapp; $html = $html .'Dettagli'; } if ($numpre > 0){ // esiste record prenotati $html = $html. '
Attivita:'.mysql_result($queryatt,$abc,"Nome").'Tipo:'.mysql_result($queryatt,$abc,"Tipo").'Data:'.$dataf.'
Costo:'.mysql_result($queryatt,$abc,"Costo").'Max partecipanti:'.mysql_result($queryatt,$abc,"Max").'Max partecipanti:No Limits!Appuntamento alle:'.$oraf.'
Note:'.mysql_result($queryatt,$abc,"Note").'
Prenotazioni '; if ($_SESSION['livello'] == "admin"){// inserisco riquadro amministrazione $html = $html. '
Amministra '; } // chiudo if amministratore $html = $html. '
Prenotazioni
Prenotati a questa Attivita: '.$numpre.' di cui '.$diff.' in lista di attesa'; }// chiudo if lista attesa else { $html = $html.'Prenotati a questa Attivita: '.$numpre.''; }// chiudo else lista attesa if ($_SESSION['livello'] != "") { $html = $html .'Dettagli
'; if ($_SESSION['abilitato'] == "1") {// apro if per visualizzare lista prenotati $html = $html. ' '; $abcpre=0; while ( $abcpre<$numpre ){ //apro ciclo prenotati if (($abcpre < $Max)||($Max == 0)){ $class = 'class5'; $style = 'style2'; } else // sei in lista di attesa { $class = 'class3'; $style = 'style6'; } if (mysql_result($querypre,$abcpre,"Nomeamico") != ""){ $html = $html. ''; $html = $html. ''; } else { $html = $html. ''; } $abcpre++; }// chiudo ciclo prenotati $html = $html. '
NomeNoteConfermatoAnticipo
'.mysql_result($querypre,$abcpre,"Nomeamico").' amico di '.mysql_result($querypre,$abcpre,"Partecipanti.amicodiusername"); } else { if ($_SESSION['livello'] == "admin") { $html = $html. '
'.mysql_result($querypre,$abcpre,"Partecipanti.Username").''; }// chiudo sei admin else {// apro non sei admin $html = $html. '
'.mysql_result($querypre,$abcpre,"Partecipanti.Username").''; }//chiudo non sei admin }// chiudo non sei un amico $html = $html. ''.mysql_result($querypre,$abcpre,"Partecipanti.Note").''; if ($_SESSION['livello'] == "admin"){ $html = $html. ''; } else { if ($_SESSION['id'] == mysql_result($querypre,$abcpre,"userlist.id")) { $html = $html. mysql_result($querypre,$abcpre,"Partecipanti.Anticipo"); } } if (($_SESSION['livello'] == "admin") or ($_SESSION['id'] == mysql_result($querypre,$abcpre,"userlist.id"))){ $html = $html. 'Cancella
Contrai
'; }// chiudo if per visualizzare lista prenotati else { //apro else non visualizzare lista prenotati $html = $html.'
Prenotati non visualizzabili perchč non sei stato abilitato
'; }// ciudo else non visualizzare lista prenotati }// chiudo if esiste record prenotati $abc++; $html = $html. '

'; }// choudo ciclo Attivita }// esiste record Attivita else { // non esiste record Attivita $html = $html. '
non ci sono Attivita a cui prenotarsi
'; }// chiudo else non esiste record Attivita }// esiste record appuntamento print ' '; if ($to == 'mailinv') { print ''; } else { print ''; } print ''; include("../testa.php"); print $html; include("forum.php"); print ''; ?>