19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazar.fonct.cal.php,v 1.3 2005-10-21 16:15:04 florian Exp $ |
// CVS : $Id: bazar.fonct.cal.php,v 1.4 2005-10-31 17:10:56 ddelon Exp $ |
/** |
* |
* Fonctions calendrier du module bazar |
29,7 → 29,7 |
*@author David Delon <david.delon@clapas.net> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005-10-21 16:15:04 $ |
*@version $Revision: 1.4 $ $Date: 2005-10-31 17:10:56 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
64,7 → 64,10 |
} |
|
|
function GestionAffichageCalendrier($prefixe_cal) { |
// $type : calendrier |
// $type : calendrier_appplette |
|
function GestionAffichageCalendrier($type='calendrier') { |
|
|
$retour=''; |
122,8 → 125,9 |
|
$retour.="<br></br>"; |
|
// Vue Mois |
if (!isset($_GET['id_fiche'])) { |
// Vue Mois calendrier ou vue applette |
|
if ((!isset($_GET['id_fiche']) && ($type=='calendrier')) || ($type=='calendrier_applette')){ |
|
// Recherche evenement de la periode selectionnée |
|
166,19 → 170,36 |
|
$month->build($selection); |
|
$retour.= "<table class=\"calendar\"> |
<tr> |
if ($type=='calendrier') { |
$retour.= "<table class=\"calendar\"> |
<tr> |
|
<th> ". BAZ_LUNDI ."</th> |
<th> ". BAZ_MARDI ."</th> |
<th> ". BAZ_MERCREDI ."</th> |
<th> ". BAZ_JEUDI ."</th> |
<th> ". BAZ_VENDREDI ."</th> |
<th> ". BAZ_SAMEDI ."</th> |
<th> ". BAZ_DIMANCHE ."</th> |
</tr> |
"; |
} |
else { |
$retour.= "<table class=\"calendar\"> |
<tr> |
|
<th> ". BAZ_LUNDI_COURT ."</th> |
<th> ". BAZ_MARDI_COURT ."</th> |
<th> ". BAZ_MERCREDI_COURT ."</th> |
<th> ". BAZ_JEUDI_COURT ."</th> |
<th> ". BAZ_VENDREDI_COURT ."</th> |
<th> ". BAZ_SAMEDI_COURT ."</th> |
<th> ". BAZ_DIMANCHE_COURT ."</th> |
</tr> |
"; |
} |
|
<th> ". BAZ_LUNDI ."</th> |
<th> ". BAZ_MARDI ."</th> |
<th> ". BAZ_MERCREDI ."</th> |
<th> ". BAZ_JEUDI ."</th> |
<th> ". BAZ_VENDREDI ."</th> |
<th> ". BAZ_SAMEDI ."</th> |
<th> ". BAZ_DIMANCHE ."</th> |
</tr> |
"; |
|
|
$todayStamp=time(); |
|
$today_ymd=date('Ymd',$todayStamp); |
218,16 → 239,36 |
if ($day->isFirst()) |
$retour.= ( "<tr>\n" ); |
|
$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" ); |
//$retour.= ( "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n" ); |
|
if ($day->isSelected() ) { |
$evenements=$day->getEntry(); |
while ($ligne_evenement=array_pop($evenements)) { |
$url->addQueryString ('id_fiche',$ligne_evenement->bf_id_fiche); |
if ($type=='calendrier') { |
$retour.= "<td class=\"".$class."\">".$day->thisDay()."\n"; |
if ($day->isSelected() ) { |
$evenements=$day->getEntry(); |
while ($ligne_evenement=array_pop($evenements)) { |
$id_fiches=array(); |
$id_fiches[]=$ligne_evenement->bf_id_fiche; |
$url->addQueryString ('id_fiches',$id_fiches); |
$link = $url->getUrl(); |
$retour.= "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n"; |
$url->removeQueryString ('id_fiches'); |
} |
} |
} |
else { |
$lien_date= "<td class=\"".$class."\">".$day->thisDay()."\n"; |
if ($day->isSelected() ) { |
$evenements=$day->getEntry(); |
$id_fiches=array(); |
while ($ligne_evenement=array_pop($evenements)) { |
$id_fiches[]=$ligne_evenement->bf_id_fiche; |
} |
$url->addQueryString ('id_fiches',$id_fiches); |
$link = $url->getUrl(); |
$retour.= ( "<a href=\"".$link."\">".$ligne_evenement->bf_titre."</a>\n" ); |
$lien_date= "<td class=\"".$class."\"><a href=\"".$link."\">".$day->thisDay()."</a>\n"; |
$url->removeQueryString ('id_fiches'); |
} |
|
$retour.=$lien_date; |
} |
|
$retour.= ( "</td>\n" ); |
239,17 → 280,17 |
|
$retour.= "</table>"; |
|
return $retour; |
|
} |
|
// Vue detail |
|
if ((isset($_GET['id_fiches']))) { |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = baz_voir_fiches(0,$_GET['id_fiches'] ); |
} |
else { |
// Vue jour |
if (isset($_GET['id_fiche'])) { |
return $retour.baz_voir_fiche(0, $_GET['id_fiche']); |
} |
} |
|
return $retour; |
|
; |
} |
|
?> |