IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Mélanger du php avec du javascript: besoin de votre aide !


Sujet :

JavaScript

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    11
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 11
    Points : 7
    Points
    7
    Par défaut Mélanger du php avec du javascript: besoin de votre aide !
    Bonsoir tout le monde, j'ai trouvé un calendrier sur votre site: http://www.developpez.net/forums/d64...s-mieux-mieux/ (je sais qu'il y a une v3 mais je préfère celle là niveau graphisme)

    Alors j'ai utiliser ce calendrier pour un formulaire, mais j'aimerais aussi l'utiliser pour lister les évènements (donc pas dans un formulaire), donc bon pas de problème jusque là, mais je n'ai pas très bien comprit quel est la variable qui contient les jours, donc voici mes 2 questions:

    -J'aimerais introduire ce code php pour que lorsque le jour est égal a un évènement, il soit colorer:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    $query = mysql_query("SELECT date_debut from evenement");
    while($donnees =mysql_fetch_array($query))
    {
    if(date dans le calendrier == $donnees["date_debut"])
    {
    on colorie le jour 
    }
    }
    -J'aimerais que lorsqu'on clique sur un jour, ça me redirige vers un lien de type ./action.php?&=show_details !

    Voici le code du calendrier:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
     
    <style type="text/css">
    	/*###### Bouton gauche des mois ######*/ 
    	.MonthLeft{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -112px -250px;
    		position:absolute;
    		left:-2px;
    		top:0px;
    	}
    	.MonthLeftOver{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -126px -250px;
    		position:absolute;
    		left:-2px;
    		top:0px;
    	}
    	.MonthLeftClick{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -140px -250px;
    		position:absolute;
    		left:-2px;
    		top:0px;
    	}
    	/*###### Bouton droit des mois ######*/ 
    	.MonthRight{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -154px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
    	.MonthRightOver{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -168px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
    	.MonthRightClick{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -182px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
     
    	/*###### Bouton haut des années ######*/ 
     
    	.YearTop{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -196px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
    	.YearTopOver{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -210px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;		
    	}
    	.YearTopClick{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -224px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;		
    	}
    	/*###### Bouton bas des années ######*/ 
     
    	.YearBottom{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -196px -275px;
    		position:absolute;
    		right:-2px;
    		bottom:0px;		
    	}
    	.YearBottomOver{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -210px -275px;
    		position:absolute;
    		right:-2px;
    		bottom:0px;			
    	}
    	.YearBottomClick{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -224px -275px;
    		position:absolute;
    		right:-2px;
    		bottom:0px;			
    	}
    	/*###### conteneur principal ######*/ 
    	.calendar{
    		width:300px;
    		height:250px;
    		background:url('images/static.png') no-repeat;
    		position:absolute;
    		left:400px;
    		font-weight:bold;
    		font-family:Tahoma,"Lucida Grande",Verdana,Arial,Helvetica,sans-serif;
    		font-size:11px;
    		text-align:center;
    	}
     
    	.contentMonth{
    		width:130px;
    		height:50px;
    		background:url('images/static.png') -100px -300px repeat-x;
    		position:absolute;
    		left:85px;
    		top:5px;
    	}
    	.pMonth{
    		width:130px;
    		height:50px;
    		line-height:50px;
    		display:block;
    	}
    	.contentDay{
    		width:56px;
    		height:50px;
    		line-height:25px;
    		text-align:center;
    		background:url('images/static.png') 0px -250px;
    		position:absolute;
    		left:15px;
    		top:5px;
    	}
    	.contentYear{
    		width:56px;
    		height:50px;
    		background:url('images/static.png') -56px -250px;
    		position:absolute;
    		left:230px;
    		top:5px;
    	}
    	.pYear{
    		width:42px;
    		height:50px;
    		line-height:50px;
    		display:block;
    	}
    	.contentListDay{
    		width:290px;
    		height:155px;
    		overflow:hidden;
    		position:absolute;
    		left:5px;
    		top:90px;
     
    	}
    	.contentListDay ul{
    		width:100%;
    		height:100%;
    		position:absolute;
    		margin:0px;
    		padding:2px 0px 0px 1px;
    	}
    	.dayCurrent{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') -41px -352px;
    	}
    	.liOut{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') 0px -352px;
    		cursor:pointer;
    	}
    	.liHover{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') -41px -352px;
    		cursor:pointer;
    	}
    	.liInactive{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') -82px -352px;
    	}
    	.contentNameDay{
    		width:290px;
    		height:27px;
    		line-height:27px;
    		overflow:hidden;
    		position:absolute;
    		left:5px;
    		top:63px;
    		padding:0px;
    		margin:0px;
    		list-style:none;
    	}
     
    	.contentNameDay li{
    		width:41px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    	}
     
    	.bugFrame{
    		position:absolute;
    		top:0px;
    		left:0px;
    		background:url('images/static.png') no-repeat;
    		z-index:0;
    		width:100%;
    		height:100%;
    		border:0px;
    	}
    </style>
    <script type="text/javascript">
    	function calendar(element){
    		if(!element.calendarActive){
    		//Propriété de la date ( année , mois etc ... )
    		this.monthCurrent = null;
    		this.yearCurrent = null;
    		this.dayCurrent = null;
    		this.dateCurrent = null;
    		//Le timer pour les effet ( fade in ^^ )
    		this.timer = null;
    		/*###### Objet composant le calendrier ######*/
    		// la div principale
    		this.calendar = null;
     
    		this.bugFrame = null;
    		//div contenant les mois ainsi que les deux boutons suivant et précédent
    		this.contentMonth = null;
    		this.pMonth = null;
    		this.MonthLeft = null;
    		this.MonthRight = null;
     
    		//Div contenant l'année ainsi que les deux boutons
    		this.contentYear = null;
    		this.pYear = null;
    		this.YearTop = null;
    		this.YearBottom = null;
     
    		//Div contenant le nom des jours
    		this.contentNameDay = null;
     
    		//Div contenant la liste des jours
    		this.contentListDay = null;
     
    		/*###### FIN des Objet du calendrier ######*/
     
    		//Liste des dates courantes
    		this.from = null;
    		//Liste des dates suivantes
    		this.to = null;
     
    		this.opacite = 0 ;
    		this.direction = null;
    		//Variable permettant de mettre a  jour le header + slide
    		this.inMove = false;
    		//Tableau d'élément a déplacé
    		this.elementToSlide = new Array();
    		//Index de l'élément en cours
    		this.currentIndex = 0;
    		//Paramètre pour lancement automatique
    		this.timePause = 0 ; //permet de définir le temps de pause entre deux slide
    		this.auto = false ; //Permet d'activer ou non le slide automatique
     
    		//Input sur lequel on a cliqué
    		this.element = (element) ? element: null;
    		this.element.calendarActive = true ;
    		//Tableaux contenant le nom des mois et jours
    		this.monthListName = new Array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
    		this.dayListName = new Array('Lu','Ma','Me','Je','Ve','Sa','Di');
    		this.dayFullName = new Array('Lun','Mar','Mer','Jeu','Ven','Sam','Dim');
     
    		this.IsIE=!!document.all;
     
    		this.init();
    		}
    	}
     
    	calendar.prototype.init = function (){
    		var me = this;
    		//On créer une div principale
    		this.calendar = this.newElement({"typeElement":"div","classeCss":"calendar","parent":null});
    		//Pour combler un bug ie , on doit ajouter les filtres d'opacité
    		//Ajout du filtre
    	      if(this.IsIE)
    	      {
    	        this.calendar.style.filter='alpha(opacity=0)';
    	        this.calendar.filters[0].opacity=0;
    	      }
    	      else
    	      {
    	        this.calendar.style.opacity='0';
    	      }
    		//Création d'une frame pour combler un bug lié aux liste sous ie
    		this.bugFrame = this.newElement({"typeElement":"iframe","classeCss":"bugFrame","parent":this.calendar});
    		//Création d'une divContenant le fond  pour combler un bug sous ie
    		var temp = this.newElement({"typeElement":"div","classeCss":"bugFrame","parent":this.calendar});
    		//Création des contenants ( mois , année , jours , listes jours etc ... )
     
    		this.contentDay = this.newElement({"typeElement":"div","classeCss":"contentDay","parent":this.calendar});
    		this.contentMonth = this.newElement({"typeElement":"div","classeCss":"contentMonth","parent":this.calendar});
    		this.pMonth = this.newElement({"typeElement":"span","classeCss":"pMonth","parent":this.contentMonth});
    		this.contentYear = this.newElement({"typeElement":"div","classeCss":"contentYear","parent":this.calendar});
    		this.pYear = this.newElement({"typeElement":"span","classeCss":"pYear","parent":this.contentYear});
    		this.contentNameDay = this.newElement({"typeElement":"ul","classeCss":"contentNameDay","parent":this.calendar});
    		this.contentListDay = this.newElement({"typeElement":"div","classeCss":"contentListDay","parent":this.calendar});
     
    		//Ajout des éléments dans les conteneurs ( bouton + initialisation des dates )
    		this.MonthLeft = this.newElement({"typeElement":"div","classeCss":"MonthLeft","parent":this.contentMonth});
    		this.MonthRight = this.newElement({"typeElement":"div","classeCss":"MonthRight","parent":this.contentMonth});
    		//Ajout des évènements sur les div
    		this.MonthLeft.onclick = function(){me.updateMonthBefNexCur("before");me.SlideToRight()};
    		this.MonthRight.onclick = function(){me.updateMonthBefNexCur("next");me.SlideToLeft()};
     
    		this.YearTop = this.newElement({"typeElement":"div","classeCss":"YearTop","parent":this.contentYear});
    		this.YearBottom = this.newElement({"typeElement":"div","classeCss":"YearBottom","parent":this.contentYear});
     
    		this.YearTop.onclick = function(){me.updateYearBefNexCur("next");me.SlideToTop()};
    		this.YearBottom.onclick = function(){me.updateYearBefNexCur("before");me.SlideToBottom()};
     
     
    		//Ajout des évènements liés au survol et appuis de la souris sur les éléments;
    		this.MonthLeft.onmouseover = function(){this.className = "MonthLeftOver"};
    		this.MonthLeft.onmouseout = function(){this.className = "MonthLeft"};
    		this.MonthLeft.onmousedown = function(){this.className = "MonthLeftClick"};
    		this.MonthLeft.onmouseup = function(){this.className = "MonthLeftOver"};
     
    		this.MonthRight.onmouseover = function(){this.className = "MonthRightOver"};
    		this.MonthRight.onmouseout = function(){this.className = "MonthRight"};
    		this.MonthRight.onmousedown = function(){this.className = "MonthRightClick"};
    		this.MonthRight.onmouseup = function(){this.className = "MonthRightOver"};
     
    		this.YearTop.onmouseover = function(){this.className = "YearTopOver"};
    		this.YearTop.onmouseout = function(){this.className = "YearTop"};
    		this.YearTop.onmousedown = function(){this.className = "YearTopClick"};
    		this.YearTop.onmouseup = function(){this.className = "YearTopOver"};
     
    		this.YearBottom.onmouseover = function(){this.className = "YearBottomOver"};
    		this.YearBottom.onmouseout = function(){this.className = "YearBottom"};
    		this.YearBottom.onmousedown = function(){this.className = "YearBottomClick"};
    		this.YearBottom.onmouseup = function(){this.className = "YearBottomOver"};
     
    		//Récupération de la date du champs sinon date par défaut
     
    		//Si l'élément sur lequel on a cliquez n'est pas vide on extrait la date
    		if(this.element != null && this.element.value != ""){
    			var reg=new RegExp("/", "g");
    			var dateOfField = this.element.value;
    			var dateExplode = dateOfField.split(reg);
    			this.dateCurrent = this.getDateCurrent(dateExplode[0], dateExplode[1] - 1,dateExplode[2]);
    		}
    		else{
    			this.dateCurrent = this.getDateCurrent();
    		}
     
    		//Récupération de la date du champs , sinon création d'une nouvelle;
    		this.monthCurrent = this.dateCurrent.getMonth();
    		this.yearCurrent = this.dateCurrent.getFullYear();
    		this.dayCurrent = this.dateCurrent.getDate();
     
    		//Création du mois courant
    		this.from = this.createContentDay(0,"left");
    		this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.from});
    		//Création de la div qui défilera  On le remplira au moment ou on en aura besoins
    		this.to = this.createContentDay(parseInt(this.calendar.offsetWidth),"left");
    		this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
     
    		//On ajoute les éléments souhaités ( ici un tableau )  on peut utiliser la méthode AddElement pour ajouter un seul élément. on peut ajouter un id ou directement l'élément ;-)
    		this.AddElements(Array(this.from,this.to));
     
    		//Création de l'entete
    		this.createHeader();
    		this.updateDateHeader();
     
    		//Positionnement du calendrier
    		this.getPosition();
     
    		//Apparition
    		this.fadePic(0,true);
    	}
     
    	calendar.prototype.getDateCurrent = function (day,month,year){
     
    			//Aujourd'hui si month et year ne sont pas renseignés
    			if(year == null || month == null){
    				return (new Date());
    			}
     
    			else{
    				//Création d'une date en fonction de celle passée en paramètre
    				return (new Date(year, month , day));
    			}
    	}
     
    	calendar.prototype.newElement = function (parameter){
    		var typeElement = parameter['typeElement'];
    		var classToAffect = parameter['classeCss'];
    		var parent = parameter['parent'];
     
    		var newElement = document.createElement(typeElement);
    		newElement.className = classToAffect;
    		if(parent == null){
    			document.body.appendChild(newElement);
    		}
    		else{
    			parent.appendChild(newElement);
    		}
    		return newElement;
    	}
     
    	calendar.prototype.createMonth = function(parameter){
    		//Récupération des paramètres
    		var CurrentDay = parameter["CurrentDay"];
    		var CurrentMonth = parameter["CurrentMonth"];
    		var CurrentYear = parameter["CurrentYear"];
    		var conteneur = parameter["conteneur"];
     
    		//On commence par détruire toute les date du conteneur :)
    		/*for(var i = 0 , l = conteneur.childNodes.length; i < l;i++ ){
    			conteneur.removeChild(conteneur.childNodes[i]);
    		}*/
    		while (conteneur.childNodes.length>0) {
    			conteneur.removeChild(conteneur.firstChild);
    		}
    		//conteneur.innerHTML = '';
     
    		//Appel de la méthode getDateCurrent retournant la date courante ou la date passé en paramètre
    		var dateCurrent = this.getDateCurrent(CurrentDay,CurrentMonth,CurrentYear);
     
    		//Mois actuel
    		var monthCurrent = dateCurrent.getMonth()
     
    		//Année actuelle
    		var yearCurrent = dateCurrent.getFullYear();
     
    		//Jours actuel
    		var dayCurrent = dateCurrent.getDate();
     
    		// On récupère le premier jour de la semaine du mois
    		var dateTemp = new Date(yearCurrent, monthCurrent,1);
     
    		//test pour vérifier quel jour était le premier du mois par rapport a la semaine
    		this.current_day_since_start_week = (( dateTemp.getDay()== 0 ) ? 6 : dateTemp.getDay() - 1);
     
    		//On initialise le nombre de jour par mois et on vérifis si l'on est au mois de février
    		var nbJoursfevrier = (yearCurrent % 4) == 0 ? 29 : 28;
    		//Initialisation du tableau indiquant le nombre de jours par mois
    		var day_number = new Array(31,nbJoursfevrier,31,30,31,30,31,31,30,31,30,31);
     
    		//On commence par ajouter les nombre de jours du mois précédent
     
    		//Calcul des date en fonction du moi précédent
     
    		var dayBeforeMonth = ((day_number[((monthCurrent == 0) ? 11:monthCurrent-1)]) - this.current_day_since_start_week)+1;
     
    		for(i  = dayBeforeMonth ; i <= (day_number[((monthCurrent == 0) ? 11:monthCurrent-1)]) ; i ++){
     
    			this.createDayInContent(i,false,false,conteneur);
    		}
     
    		//On remplit le calendrier avec le nombre de jour, en remplissant les premiers jours par des champs vides
    		for(var nbjours = 0 ; nbjours < (day_number[monthCurrent] + this.current_day_since_start_week) ; nbjours++){
    		//et enfin on ajoute les dates au calendrier
    		//Pour gèrer les jours "vide" et éviter de faire une boucle on vérifit que le nombre de jours corespond bien au
    		//nombre de jour du mois
    			if(nbjours < day_number[monthCurrent]){
    				if(dayCurrent == (nbjours+1)){
    					this.createDayInContent(nbjours+1,true,true,conteneur);
    				}
    				else{
    					this.createDayInContent(nbjours+1,false,true,conteneur);
    				}
    			}
    		}
     
    		//Calcul des date en fonction du moi suivant
    		var nbCelRest = 42 - (day_number[monthCurrent]+this.current_day_since_start_week);
     
    		for(i  = 0 ; i <  nbCelRest ; i ++){
     
    			this.createDayInContent(i+1,false,false,conteneur);
    		}
     
    	}
     
    	calendar.prototype.createDayInContent = function (dateDay,CurrentDay,active,conteneur){
    		var me = this;
    		//Création d'un li comprenant un noeud texte avec la date du jour
    		var liDay = document.createElement("li");
    		var TextContent = document.createTextNode(dateDay);
    		//Pour éviter les if else ....
    		liDay.className = (CurrentDay) ? "dayCurrent":"liOut";
    		liDay.className = (!active) ? "liInactive":liDay.className;
    		liDay.appendChild(TextContent);
    		//Ajout du survol :)
    		if(active){
    			liDay.onmouseover = function(){this.className = (this.className == "dayCurrent") ? this.className : "liHover";};
    			liDay.onmouseout = function(){this.className = (this.className == "dayCurrent") ? this.className : "liOut";};
    			liDay.onclick = function(){me.dayCurrent = this.innerHTML ; me.fillField()};
    		}
    		//Ajout de l'élément dans la liste
    		conteneur.appendChild(liDay);
    	}
     
    	calendar.prototype.createContentDay = function (positionTo,position){
    		//Création d'un li comprenant un noeud texte avec la date du jour
    		var ulDays = document.createElement("ul");
    		ulDays.className = "dayCal";
     
    		if(position != "top"){
    			if(positionTo != null){ulDays.style.left = positionTo + "px";}
    			ulDays.style.top = 0 + "px";
    		}
    		else{
    			if(positionTo != null){ulDays.style.top = positionTo + "px";}
    			ulDays.style.left = 0 + "px";
    		}
    		this.contentListDay.appendChild(ulDays);
    		return ulDays;
    	}
     
    	calendar.prototype.createCalendar = function (){
    		//Création d'un li comprenant un noeud texte avec la date du jour
    		var divContent = document.createElement("div");
    		divContent.className = "calendrier";
    		document.body.appendChild(divContent);
    		return divContent;
    	}
     
    	calendar.prototype.createHeader = function(){
     
    		//Ajout des jours
    		for(var i = 0 , l = this.dayListName.length ; i < l ; i++){
    			var liDayTemp = document.createElement("li");
    			TextContent = document.createTextNode(this.dayListName[i]);
    			liDayTemp.appendChild(TextContent);
    			//Ajout du jour dans la liste
    			this.contentNameDay.appendChild(liDayTemp);
    		}
    	}
     
    	calendar.prototype.updateDateHeader = function(){
    		var me = this ;
    		//On commence par détruire tous les enfants des mois et années
    		while (this.pMonth.childNodes.length>0) {
    			this.pMonth.removeChild(this.pMonth.firstChild);
    		}
     
    		while (this.pYear.childNodes.length>0) {
    			this.pYear.removeChild(this.pYear.firstChild);
    		}
     
    		while (this.contentDay.childNodes.length>0) {
    			this.contentDay.removeChild(this.contentDay.firstChild);
    		}
     
    		//Ajout de la date du jour
    		var nomDuJour =  this.dayFullName[((this.dateCurrent.getDay()-1) == -1) ? 6 :(this.dateCurrent.getDay()-1)];
    		var TextContent = document.createTextNode(nomDuJour);
    		this.contentDay.appendChild(TextContent);
    		var retourLigne = document.createElement("br");
    		this.contentDay.appendChild(retourLigne);
    		TextContent = document.createTextNode(this.dayCurrent);
    		this.contentDay.appendChild(TextContent);
     
     
    		//Ajout du mois 
    		TextContent = document.createTextNode(this.monthListName[(this.monthCurrent == 12) ? 0:this.monthCurrent]);
    		this.pMonth.appendChild(TextContent);
     
    		//Ajout de l'année 
    		TextContent = document.createTextNode(this.yearCurrent);
    		this.pYear.appendChild(TextContent);
    	}
     
    	calendar.prototype.updateMonthBefNexCur = function(direction){
     
    			if(!this.inMove){
    				if(this.timer == null){
    					if(direction == "next"){
    						this.updateDate("next");
    						this.direction = "left";
    						//on le remplit
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
    					}
    					else if(direction == "before"){
    						this.updateDate("before");
    						this.direction = "right";
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
     
    					}
    				}
    				//On positionne la div
    				this.Positionne();
    			}
    	}
     
    	calendar.prototype.updateYearBefNexCur = function(direction){
    			if(!this.inMove){
    				if(this.timer == null){
    					if(direction == "next"){
    						this.yearCurrent++;
    						this.direction = "top";
    						//on le remplit
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
    					}
    					else if(direction == "before"){
    						this.yearCurrent--;
    						this.direction = "bottom";
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
     
    					}
    				}
    				//Mise a jour de la date courante : 
    				this.dateCurrent = new Date(this.yearCurrent, this.monthCurrent,this.dayCurrent);
    				this.dateCurrent.setDate(this.dayCurrent);
    				this.updateDateHeader();
    				this.Positionne();
    			}
    	}
     
    	calendar.prototype.updateDate = function(direction){
    		if(this.timer == null){
    			if(direction == "before"){
    			//on calcul les dates suivante et précédente
    				if(this.monthCurrent == 0){
    					this.monthCurrent = 11;
    				}
    				else{
    					this.monthCurrent = this.monthCurrent - 1 ;
    				}
    				this.yearCurrent = (this.monthCurrent == 11 ) ? this.yearCurrent - 1:this.yearCurrent;
    			}
    			else{
    			//On récupère le mois actuel puis on vérifit que l'on est pas en janvier sinon on ajoute une année
    				if(this.monthCurrent == 11){
    					this.monthCurrent = 0;
     
    				}
    				else{
    					this.monthCurrent =this.monthCurrent + 1;
    				}
    				this.yearCurrent = (this.monthCurrent == 0) ?  this.yearCurrent+1:this.yearCurrent;
    			}
     
    			//Mise a jour de la date courante : 
    			this.dateCurrent = new Date(this.yearCurrent, this.monthCurrent,this.dayCurrent);
    			this.dateCurrent.setDate(this.dayCurrent);
    			this.updateDateHeader();
    		}
    	}
     
    	//Fonction permettant de trouver la position de l'élément ( input ) pour pouvoir positioner le calendrier
    	calendar.prototype.getPosition = function() {
    	var tmpLeft = this.element.offsetLeft;
    	var tmpTop = this.element.offsetTop;
    	var MyParent = this.element.offsetParent;
    	while(MyParent) {
    		tmpLeft += MyParent.offsetLeft;
    		tmpTop += MyParent.offsetTop;
    		MyParent = MyParent.offsetParent;
    	}
    		this.calendar.style.left = tmpLeft;
    		this.calendar.style.top = tmpTop +  this.element.offsetHeight + 2 +"px";
    	}
     
    	calendar.prototype.fillField = function(){
    		this.element.value = this.dayCurrent+"/"+ ((this.monthCurrent+1 == 13) ? 1:this.monthCurrent+1)+"/"+this.yearCurrent;
    		//On détruit le calendrier;
    		this.purge(this.calendar);
    		document.body.removeChild(this.calendar);
    		this.element.calendarActive = false;
    	}
     
    	calendar.prototype.purge = function (CurrentNode){
     
    		//Récupération de tous les noeuds enfants 
    		while (CurrentNode.childNodes.length>0) {
    			//Si le premier enfant a des enfants appel récursif de la méthode
    			if(CurrentNode.firstChild.childNodes.length>0){
    				this.purge(CurrentNode.firstChild);
    			}
    			//Sinon on parcours ses propriétés pour supprimer les évènements lié aux objet, puis destruction de l'objet
    			else{
     
    				var tempo = CurrentNode.firstChild ;
    				var a = tempo.attributes, i, l, n;
    			    if (a) {
    			        l = a.length;
    			        for (i = 0; i < l; i += 1) {
    			            n = a[i].name;
    			            if (typeof tempo[n] === 'function') {
    			                tempo[n] = null;
    			            }
    			        }
    			    }
    				tempo = null;
    				CurrentNode.removeChild(CurrentNode.firstChild);
     
    			}
    		}
    	}
     
     
    	/*##########################################################
    	############  METHODES PERMETTANT DE SCROLLER LES DATES  ##############
    	##########################################################*/
    	//Permet de récupérer un élément par id
    	calendar.prototype.$ = function(element){
    		return document.getElementById(element);
    	};
     
    	//Méthode permettant de lancer les animations si en auto :)
    	calendar.prototype.go = function(){
    		if(this.auto){
    			switch (this.direction ){
    				case 'left':
    					this.SlideToLeft();
    				break;
    				case 'right':
    					this.SlideToRight();
    				break;
    				case 'top':
    					this.SlideToTop();
    				break;
    				case 'bottom':
    					this.SlideToBottom();
    				break;
    			}
    		}
    	}
     
    	//Méthode permettant d'ajouter un élément
    	calendar.prototype.AddElement = function(element){
    		if(typeof(element) == "string"){
    			this.elementToSlide.push(this.$(element));
    		}
    		else if(typeof(element) == "object"){
    			this.elementToSlide.push(element);
    		}
    	}
     
    	//Méthode permettant d'ajouter plusieurs élément d'un coup
    	calendar.prototype.AddElements = function (elements){
    		for(var i = 0 , l = elements.length; i < l ;i++){
    			this.AddElement(elements[i]);
    		}
    	}
     
    	//Méthode permettant de déplacer les éléments vers la gauche
    	calendar.prototype.SlideToLeft = function(){
    		if(this.direction == null || this.direction == 'left'){
    			var me = this ;
    			//On vérifit la direction pour initialiser le positionnement
    			if(this.direction != 'left'){
    					this.direction = 'left';
    					if(this.timer == null){
    						this.Positionne();
    					}
    			}
    			else if(this.direction == 'left' && this.auto && this.timer == null){
    				this.Positionne();
    			}
     
    			if(this.timer != null){
    				clearTimeout(this.timer);
    				this.timer = null;
    			}
    			//Si le timer n'est pas finit on détruit l'ancienne div
    			if(parseInt(this.from.style.left) == Number.NaN || (parseInt(this.from.parentNode.offsetWidth) + parseInt(this.from.style.left))> 0){
    				this.from.style.left = parseInt(this.from.style.left) - 15 + "px";
    				this.to.style.left  =parseInt(this.to.style.left) - 15 + "px";
    				this.inMove = true;
    				this.timer = setTimeout(function(){me.SlideToLeft()},25);
     
    			}
    			else{
    				clearTimeout(this.timer);
    				this.timer = null;
    				this.currentIndex = (this.currentIndex == (this.elementToSlide.length-1)) ? 0:this.currentIndex + 1;
    				this.Positionne();
    				this.direction = null;
    				this.inMove = false;
    			}
    		}
    	};
     
    	//Méthode permettant de déplacer les éléments vers la droite
    	calendar.prototype.SlideToRight = function(){
    		var me = this ;
    		if(this.direction == null || this.direction == 'right'){
    				if(this.direction != 'right'){
    					this.direction = 'right';
    					if(this.timer == null){
    						this.Positionne();
    					}
    				}
    				else if(this.direction == 'right' && this.auto && this.timer == null){
    					this.Positionne();
    				}
     
    				if(this.timer != null){
    					clearTimeout(this.timer);
    					this.timer = null;
    				}
    				//Si le timer n'est pas finit on détruit l'ancienne div
    				if(parseInt(this.from.style.left) == Number.NaN ||  parseInt(this.from.style.left) < parseInt(this.from.parentNode.offsetWidth)){
    					this.from.style.left = parseInt(this.from.style.left) + 15 + "px";
    					this.to.style.left  =parseInt(this.to.style.left) + 15 + "px";
    					this.inMove = true;
    					this.timer = setTimeout(function(){me.SlideToRight()},25);
    				}
    				else{
    					clearTimeout(this.timer);
    					this.timer = null;
    					this.currentIndex = (this.currentIndex == 0) ? this.elementToSlide.length-1:this.currentIndex - 1;
    					this.Positionne();
    					this.direction = null;
    					this.inMove = false;
    				}
    		}
     
     
    	};
     
    	//Méthode permettant de déplacer les éléments vers la gauche
    	calendar.prototype.SlideToTop = function(){
    		var me = this ;
    		if(this.direction == null || this.direction == 'top'){
    			//On vérifit la direction pour initialiser le positionnement
    			if(this.direction != 'top'){
    					this.direction = 'top';
    					if(this.timer == null){
    						this.Positionne();
    					}
    			}
    			if(this.timer != null){
    				clearTimeout(this.timer);
    				this.timer = null;
    			}
    			//Si le timer n'est pas finit on détruit l'ancienne div
    			if(parseInt(this.from.style.top) == Number.NaN || (parseInt(this.from.style.top) > - parseInt(this.from.parentNode.offsetHeight))){
    				this.from.style.top = parseInt(this.from.style.top) - 15 + "px";
    				this.to.style.top  =parseInt(this.to.style.top) - 15 + "px";
    				this.inMove = true;
    				this.timer = setTimeout(function(){me.SlideToTop()},25);
    			}
    			else{
    				clearTimeout(this.timer);
    				this.timer = null;
    				this.currentIndex = (this.currentIndex == 0) ? this.elementToSlide.length-1:this.currentIndex - 1;
    				this.Positionne();					
    				this.direction = null;
    				this.inMove = false;
    			}
    		}
    	};
     
    	//Méthode permettant de déplacer les éléments vers le bas
    	calendar.prototype.SlideToBottom = function(){
    		var me = this 
    		if(this.direction == null || this.direction == 'bottom'){
    			//On vérifit la direction pour initialiser le positionnement
    			if(this.direction != 'bottom'){
    					this.direction = 'bottom';
    					if(this.timer == null){
    						this.Positionne();
    					}
    			}
    			if(this.timer != null){
    				clearTimeout(this.timer);
    				this.timer = null;
    			}
    			//Si le timer n'est pas finit on détruit l'ancienne div
    			if(parseInt(this.from.style.top) == Number.NaN || parseInt(this.from.style.top) < parseInt(this.from.parentNode.offsetHeight)){
    				this.from.style.top = parseInt(this.from.style.top) + 15 + "px";
    				this.to.style.top  =parseInt(this.to.style.top) + 15 + "px";
    				this.inMove = true;
    				this.timer = setTimeout(function(){me.SlideToBottom()},25);
    			}
    			else{
    				clearTimeout(this.timer);
    				this.timer = null;
    				this.currentIndex = (this.currentIndex == this.elementToSlide.length-1) ? 0:this.currentIndex + 1;
    				this.Positionne();
    				this.direction = null;
    				this.inMove = false;
    			}
    		}
    	};
     
    	//Fonction initialisant le tableau en positionnant tous les éléments :)
    	calendar.prototype.Positionne = function(){
    		if(this.direction == 'left'){
    			//On vérifit que l'on est pas a la fin sinon le premier devient le dernier
    			if(this.currentIndex == this.elementToSlide.length-1){
    				//récupération des éléments : 
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[0]; //Premier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex + 1];
    			}
    				this.from.style.display = "block" ;
    				this.from.style.left = 0 + "px";
    				this.to.style.left = this.from.parentNode.offsetWidth + "px";
    				this.to.style.display = "block";
    				//Posionement vertical
    				this.to.style.top = 0 + "px";
    				this.from.style.top = 0 + "px" ;
    		}
    		else if(this.direction == 'right'){
    			if(this.currentIndex == 0){
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.elementToSlide.length-1]; // dernier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex-1];
    			}
    			this.from.style.display = "block" ;
    			this.from.style.left = 0 + "px";
    			this.to.style.left = - (this.from.parentNode.offsetWidth )+ "px";
    			this.to.style.display = "block";
    			//Posionement vertical
    			this.to.style.top = 0 + "px";
    			this.from.style.top = 0 + "px" ;
    		}
    		else if(this.direction == 'bottom'){
    			if(this.currentIndex == this.elementToSlide.length-1){
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[0]; // dernier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex+1];
    			}
    			this.from.style.display = "block" ;
    			this.from.style.top = 0 + "px";
    			this.to.style.top = - (this.from.parentNode.offsetHeight )+ "px";
    			this.to.style.display = "block";
    			//Posionement horizontal
    			this.to.style.left = 0 + "px";
    			this.from.style.left = 0 + "px" ;
    		}
    		else if(this.direction == 'top'){
    			if(this.currentIndex == 0){
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.elementToSlide.length-1]; // dernier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex-1];
    			}
    			this.from.style.display = "block" ;
    			this.from.style.top = 0 + "px";
    			this.to.style.top = (this.from.parentNode.offsetHeight )+ "px";
    			this.to.style.display = "block";
    			//Posionement horizontal
    			this.to.style.left = 0 + "px";
    			this.from.style.left = 0 + "px" ;
    		}
    	};
     
    	calendar.prototype.fadePic = function (current,up){
    		this.calendar.style.display = "block";
    		this.opacite = current ;
    		this.up = up ;
     
    		if (this.opacite< 100 && this.up){
    			this.opacite+=3;
    			this.IsIE?this.calendar.filters[0].opacity=this.opacite:this.calendar.style.opacity=this.opacite/100;
    			var me = this;
    			this.timer = setTimeout(function(){me.fadePic(me.opacite,true)},25);
    		}
    		else{
    			clearTimeout(this.timer);
    			this.timer = null;
    			this.up = false;
    		}
    	}
    	</script>
     
    new calendar(this);
    Merci de votre aide !

  2. #2
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    11
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 11
    Points : 7
    Points
    7
    Par défaut
    suite à une recherche, j'ai découvert que l'on peut mélanger du javascript et du php, ainsi je vous serez très reconnaissant si vous pourriez me donner juste le nom de la variable javascript qui contient les jours et répondre a mon autre question !

    Merci.

  3. #3
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    je n'ai pas très bien comprit quel est la variable qui contient les jours
    pourtant, le nommage des variables est assez explicite :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    this.dayCurrent = null;


    J'aimerais introduire ce code php
    autant il est possible de créer du code JavaScript avec du PHP, autant il n'est pas possible d'interpréter du PHP avec JavaScript (et encore moins d'accéder à une base de données).

    A la rigueur, tu peux faire un appel AJAX à chaque changement de mois pour récupérer les dates à colorer...

  4. #4
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2010
    Messages
    11
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2010
    Messages : 11
    Points : 7
    Points
    7
    Par défaut
    merci pour la variable ^^

    Tu aurait pas un exemple rapide sous la main, au niveau du code AJAX qu'il me faudrait ?

Discussions similaires

  1. commenter un include() php avec du javascript
    Par kl3ist dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 09/12/2010, 00h30
  2. Comment lancer des traitements php avec du Javascript?
    Par Evenmor dans le forum Général JavaScript
    Réponses: 24
    Dernier message: 23/06/2008, 17h38
  3. [PHP-JS] Comment faire intéragir du php avec du javascript
    Par Alexlesilex dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 24/04/2007, 20h42
  4. Petit problème avec un code : besoin de votre aide :)
    Par loicdu4000 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 01/09/2006, 18h02
  5. [PHP-JS] une fonction php avec parametres javascript
    Par kagura dans le forum Langage
    Réponses: 1
    Dernier message: 02/03/2006, 18h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo