Notice: Undefined index: reserche in /home/starmed-locations-espagne.com/www/includes/inc_general.php on line 76 Notice: Undefined offset: 1 in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 352 Notice: Undefined offset: 50 in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 352 Notice: Undefined offset: 60 in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 352 Notice: Undefined offset: 4 in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 352 Notice: Undefined property: Intersecter::$range in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 354 Notice: Undefined variable: tree in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 474 Notice: Undefined variable: tree in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 474 Notice: Undefined variable: tree in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 474 Notice: Undefined variable: tree in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 474 Notice: Undefined variable: tree in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 474 Notice: Undefined variable: tree in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 474 Notice: Undefined offset: 1 in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 1267 Notice: Use of undefined constant parent - assumed 'parent' in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 1268 Notice: Use of undefined constant parent - assumed 'parent' in /home/starmed-locations-espagne.com/www/includes/categorizer.class.php on line 1249 var tab_jours = new Array("Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"); var tab_mois = new Array("Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"); var tab_long_mois = new Array(31,29,31,30,31,30,31,31,30,31,30,31); function annee_avant(id_a_changer){ if (annee_courant <= 0){ annee_courant = 0; } else{ annee_courant -= 1; } afficher_mois(mois_courant,annee_courant, id_a_changer); } function annee_apres(id_a_changer){ if (annee_courant >= 2100){ annee_courant = 2100; } else{ annee_courant += 1; } afficher_mois(mois_courant,annee_courant, id_a_changer); } function mois_avant(id_a_changer){ if (mois_courant==0){ mois_courant = 11; annee_courant -= 1; } else{ mois_courant -= 1; } afficher_mois(mois_courant,annee_courant, id_a_changer); } function mois_apres(id_a_changer){ if (mois_courant==11){ mois_courant = 0; annee_courant += 1; } else{ mois_courant += 1; } afficher_mois(mois_courant,annee_courant, id_a_changer); } function afficher_mois(mois,annee, id_a_changer){ str_calend = '' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += ' ' + "\n"; str_calend += '
«'+ tab_mois[mois] +'»«'+ annee +'»
' + "\n"; str_calend += '' + "\n"; // Noms des jours str_calend += ' ' + "\n"; for (cpt=0; cpt<=6; cpt++) { str_calend += ' ' + "\n"; } str_calend += ' ' + "\n"; cpt_td_jour = 0; le_1er = new Date(annee,mois,1); //-- la var le_1er correspond au 1/mois/annee -- str_calend += ' ' + "\n"; // On affiche ici des cellules vides de sorte que le premier jour que l'on affiche // (le 1er) soit dans la case correspondant au bon jour de la semaine // la fonction getDay() retourne un entier de 0 à 6, 0 étant le dimanche, ce qui ne correspond pas au tableau que nous avons // choisi pour stocker le nom des jours que l'on fait commencer au lundi (0) pour coller à l'affichage. On utilise donc la correspondance // (getDay()+6) % 7 pour passer sur notre représentation. while (cpt_td_jour < (le_1er.getDay()+6) % 7 ){ str_calend += ' ' + "\n"; cpt_td_jour ++; } // On affiche alors tous les jours du mois. La case de départ est fixée par la boucle while précédente. for (cpt=1; cpt <= nb_jours_dans_mois(mois,annee); cpt++){ cpt_td_jour ++; // si debut de ligne on affiche un tr sauf cas ou le 1er est un lundi car le début de le premiere ligne est déjà écrit if (cpt_td_jour % 7 == 1){ str_calend += ' ' + "\n"; } str_calend += ' ' + "\n"; if (cpt_td_jour % 7 == 0){ str_calend += ' ' + "\n"; } } // fin boucle affichage des jours // on complète la table avec des cellules vide if (cpt_td_jour % 7 != 0) { while (cpt_td_jour % 7 != 0) { cpt_td_jour ++; str_calend += ' ' + "\n"; } if (cpt_td_jour % 7 == 0) { str_calend += ' ' + "\n"; } } str_calend += ' ' + "\n"; str_calend += '
'+ tab_jours[cpt] +'
'+ cpt +'
' + "\n"; document.getElementById('calend_'+id_a_changer).innerHTML = str_calend; } function voir(){ mois = document.getElementById('mois').value; annee = document.getElementById('annee').value; afficher_mois(mois,annee); } function nb_jours_dans_mois(mois,annee){ // cette fonction retourne le nombre de jours du mois pour un mois et une annee donnée if (mois != 1){ return tab_long_mois[mois]; } else{ if (is_bissextile(annee)){ return 29; } else{ return 28; } } } function is_bissextile(annee){ if ((annee % 100 != 0 && annee % 4 == 0) || (annee % 400 == 0)){ return 1; } else { return 0; } } /** fin fonction is_bissextile **/ function ouvrir_calend2(id){ // id = l'id du champ à modifier id_champ = id; oChampDate = document.getElementById(id_champ); var regex = /[0-9]{2}\/([0-9]{2})\/([0-9]{4})$/; var res = oChampDate.value.match(regex); if (res && 1 <= res[1] && res[1] <= 12 && 0 <= res[2] && res[2] <= 2100) { mois_courant = Number(res[1]) - 1; annee_courant = Number(res[2]); } afficher_mois(mois_courant, annee_courant, id_champ); document.getElementById('div_calend_'+id_champ).style.display = "block"; /** div_calend = nom du div contenant tout le calendrier **/ /*@cc_on @if (@_jscript_version <= 5.6) calend_hideSelectBoxes(); /*@end @*/ } function fermer_calend(id){ id_champ = id; document.getElementById('div_calend_'+id_champ).style.display = "none"; /** div_calend = nom du div contenant tout le calendrier **/ /*@cc_on @if (@_jscript_version <= 5.6) calend_showSelectBoxes(); /*@end @*/ } function maj_champ(jour,mois,annee, id_a_changer){ mois = mois+1; if(jour<10){ jour = "0"+jour; } if(mois<10){ mois = "0"+mois; } oChampDate.value = jour + "/" + mois + "/" + annee; fermer_calend(id_a_changer); } function calend_showSelectBoxes(){ selects = document.getElementsByTagName("select"); for (i = 0; i != selects.length; i++) { selects[i].style.visibility = "visible"; } selects = document.getElementsByTagName("input"); for (i = 0; i != selects.length; i++) { selects[i].style.visibility = "visible"; } selects = document.getElementsByTagName("textarea"); for (i = 0; i != selects.length; i++) { selects[i].style.visibility = "visible"; } } // --------------------------------------------------- function calend_hideSelectBoxes(){ selects = document.getElementsByTagName("select"); for (i = 0; i != selects.length; i++) { selects[i].style.visibility = "hidden"; } selects = document.getElementsByTagName("input"); for (i = 0; i != selects.length; i++) { selects[i].style.visibility = "hidden"; } selects = document.getElementsByTagName("textarea"); for (i = 0; i != selects.length; i++) { selects[i].style.visibility = "hidden"; } } var date_now = new Date(); var jour_courant = date_now.getDate(); var mois_courant = date_now.getMonth(); var annee_courant = date_now.getFullYear(); var id_champ = ''; // Cette variable global sert a stocker l'id du champ a mettre a jour. var oChampDate = ''; // Cette variable global sert a stocker l'id du champ a mettre a jour. //afficher_mois(mois_courant,annee_courant);