1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
| <?
/*-----------------------------------
* Includes
-------------------------------------*/
/**/ require_once("./includes/inc_newsFunctions.php");
/*************************************
PARAMS' DEFAULT VALUES
*************************************/
$choixagenda = "";
$nbrSoireeAffiche = 0;
$nbrAgendaDate = $nbrTodayNewsDate;
/*************************************
VARIABLE
*************************************/
// Variable Get
if ( strlen($_GET['showdate']) > 15 ) {
// si l'id n'est pas passée en variable
setErrorMessage(L_ERROR_AGENDA);
?>
<script>
window.location = '../n63show.php';
</script>
<? exit();
} else {
if ( isset($_GET['showdate']) && is_numeric($_GET['showdate']) ){
$nbrAgendaDate = $_GET['showdate'];
}
}
/*************************************
Constante de date
*************************************/
$jour = date( "d", $nbrAgendaDate );
$mois = date( "m", $nbrAgendaDate );
$moisagenda = translateDate( date( "M", $nbrAgendaDate) );
$annee = date( "Y", $nbrAgendaDate );
$selection = 0;
$titredate2 = $jour.' '.$moisagenda.' '.$annee;
?>
<table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="280" align="left" valign="top"><p>
<? //on insert les news
include ("./includes/inc_news.php");
?>
<div align="left"> </p>
<p><br />
</p>
</td>
<td width="300" align="right" valign="top">
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#66CCFF">
<tr>
<td>
<?
//on insert la Pub IMU
include ("./includes/inc_imu.php");
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" colspan="2" valign="top"><hr /></td>
</tr>
<tr>
<td height="20" colspan="2" valign="top"> <?
include("./includes/inc_menu_agenda.php");
?> </td>
</tr>
<tr valign="middle">
<td colspan="2"><hr /></td>
</tr>
<tr valign="middle">
<td colspan="2"> </td>
</tr>
<tr valign="top">
<td colspan="2" valign="middle">
<? $sqlQuery =
" SELECT EVENEMENT_TYPE_LABEL " .
" FROM EVENEMENT_TYPE".
" ORDER BY EVENEMENT_TYPE_LABEL ASC";
$req = mysql_query($sqlQuery);
checkSqlError($sqlQuery);
$nbreTypeSoiree = mysql_num_rows($req);
$evenementListe = mysql_fetch_array($req); ?>
</td>
</tr>
</table>
<fieldset>
<legend class="legend"><? echo($stg_day) ?>
<? echo($titredate2) ?> - <? echo(getVilleFromId($idSecteur)) ?> </legend>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><p>
<?
//début de la boucle d'affichage des cadres d'événements
for ($boucleSoireeType = 1; $boucleSoireeType <= $nbreTypeSoiree ; $boucleSoireeType++)
{
//recherche le type de la selection en cours
$sqlQuery =
" SELECT EVENEMENT_TYPE_LABEL ".
" FROM EVENEMENT_TYPE ".
" WHERE EVENEMENT_TYPE_ID = '$boucleSoireeType'".
" ORDER BY EVENEMENT_TYPE_ID DESC LIMIT 0,1";
$req = mysql_query($sqlQuery);
checkSqlError($sqlQuery);
$soireeType = mysql_fetch_array($req);
//recherche les valeurs des soirées de la selection en cours
$sqlQuery =
" SELECT SOIREE_ID , EVENEMENT_TYPE_LABEL , SOIREE_TITLE , SOIREE_DESCRIPTION , SOIREE_DATE , SOIREE_DATE_FIN , SOIREE_LIEU , SOIREE_PRIX , SOIREE_HEURE" .
" FROM SOIREE ".
" INNER JOIN EVENEMENT_TYPE ON EVENEMENT_TYPE.EVENEMENT_TYPE_ID = SOIREE_TYPE".
" WHERE ( SOIREE_SECTEUR = '$idSecteur' AND EVENEMENT_TYPE_ID = '$boucleSoireeType' AND UNIX_TIMESTAMP(SOIREE_DATE) = $nbrAgendaDate )".
" OR ( EVENEMENT_TYPE_ID LIKE '$boucleSoireeType' AND UNIX_TIMESTAMP(SOIREE_DATE) < '$nbrAgendaDate' AND UNIX_TIMESTAMP(SOIREE_DATE_FIN) >='$nbrAgendaDate' AND SOIREE_SECTEUR = '$idSecteur') ".
" ORDER BY SOIREE_ID DESC ";
$req = mysql_query($sqlQuery);
checkSqlError($sqlQuery);
$nbreligne = mysql_num_rows($req);
//si pas de réponse on affiche pas le code
if ( $nbreligne )
{ ?>
</p>
<table width="95%%" border="0" align="center" cellspacing="0">
<tr>
<td valign="bottom"> <p><strong> <? echo($soireeType['EVENEMENT_TYPE_LABEL']) ?></strong></p></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="agenda_center">
<tr>
<td>
<?
// boucle d'affichage des soirées
while($data = mysql_fetch_array($req))
{
$nbrSoireeAffiche ++ ;
$agendadatefin=$data['SOIREE_DATE_FIN'];?>
<table width="95%" border="0" align="center" cellspacing="0">
<tr valign="bottom">
<td colspan="2"></td>
</tr>
<tr>
<td width="69%" valign="top"><blockquote>
<p><a class="agenda" href="n63show.php?link=agendadetail&idAgendaDetail=<? echo($data['SOIREE_ID']) ?>"><? echo($data['SOIREE_TITLE']) ?></a>
<br />
Lieu: <? if ( isPlace($data['SOIREE_LIEU']) )
{ ?>
<a href="n63show.php?link=detail&idDetail=<? echo(isPlace($data['SOIREE_LIEU'])) ?>" class="messagedate"><? echo($data['SOIREE_LIEU'] )?></a>
<? } else {
echo($data['SOIREE_LIEU']);
}?><br />
</p>
</blockquote></td>
<td width="31%" valign="top"><ul>
<li>Tarifs:
<? if ( $data['SOIREE_PRIX'] == 0) { ?>
Gratuit
<? } if ( $data['SOIREE_PRIX'] > 0 && $data['SOIREE_PRIX'] < 999) { ?>
<? echo($data['SOIREE_PRIX']) ?> €
<? } if ( $data['SOIREE_PRIX'] == 999) { ?>
Nc
<? } ?>
<br />
[<a class="messagelink" href="n63show.php?link=agendadetail&idAgendaDetail=<? echo($data['SOIREE_ID']) ?>">+
de détails</a>]</li>
</ul></td>
</tr>
</table>
<? } ?>
</td>
</tr>
</table>
<br> <p> </p>
<p>
<? //fin du test
}
}
if ( $nbrSoireeAffiche == 0 ) {
?>
</p>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="agenda_center">
<tr>
<td><br /> <hr width="90%" /> <p align="center">!!! Aucune activité
ce soir !!!<br />
</p>
<hr width="90%" /> <br /></td>
</tr>
</table>
<p align="left">
<?
}?>
</p>
<p> </p></td>
</tr>
</table>
</fieldset>
<p> </p>
</td>
</tr>
</table> |
Partager