Accès au manager - réservé aux membres

NAVIGATION

Informations sur le code source PHP


Code source PHP écrit par :  Olravet

Titre du code : Déterminer le saint du jour.

Site de l'auteur » Voir

Autres codes en PHP de l'auteur : [3] sources » Voir

Date d'enregistrement du code le 05-05-2008 - Vu 284 fois

Code source zippé: » Télécharger le fichier ZIP

Impression: » Imprimer le code

Ajouter la page à vos favoris »



Description du code source


Il suffit d'appeler cette fonction avec le jour et le mois... echo saint(12,7);
vous écrira "St Olivier".
C'est très simple (plus qu'en passant par mysql) et très rapide d'exécution.




Code Source


.01
.02
.03
.04
.05
.06
.07
.08
.09
.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
  <?
FUNCTION saint($jour,$mois){
SWITCH(
$mois)
{
CASE 
1:
    SWITCH(
$jour)
    {
    CASE 
1$saint "Jour de l'an";
    BREAK;
    CASE 
2$saint "St Basile";
        BREAK;
    CASE 
3$saint "Ste Geneviève";
        BREAK;
    CASE 
4$saint "St Odilon";
        BREAK;
    CASE 
5$saint "St Edouard";
        BREAK;
    CASE 
6$saint "Ste Mélanie";
        BREAK;
    CASE 
7$saint "St Raymond";
        BREAK;
    CASE 
8$saint "St Lucien";
        BREAK;
    CASE 
9$saint "Ste Alix";
        BREAK;
    CASE 
10$saint "St Guillaume";
        BREAK;
    CASE 
11$saint "St Paulin";
        BREAK;
    CASE 
12$saint "Ste Tatiana";
        BREAK;
    CASE 
13$saint  "Ste Yvette";
        BREAK;
    CASE 
14$saint  "Ste Nina";
        BREAK;
    CASE 
15$saint  "St Remi";
        BREAK;
    CASE 
16$saint  "St Marcel";
        BREAK;
    CASE 
17$saint  "Ste Roseline";
        BREAK;
    CASE 
18$saint  "Ste Prisca";
        BREAK;
    CASE 
19$saint  "St Marius";
        BREAK;
    CASE 
20$saint  "St Sébastien";
        BREAK;
    CASE 
21$saint  "Ste Agnès";
        BREAK;
    CASE 
22$saint "St Vincent";
        BREAK;
    CASE 
23$saint "St Barnard";
        BREAK;
    CASE 
24$saint "St François";
        BREAK;
    CASE 
25$saint "Conv de St Paul";
        BREAK;
    CASE 
26$saint "St Timothée";
        BREAK;
    CASE 
27$saint "Ste Angèle";
        BREAK;
    CASE 
28$saint "St Thomas d'Aquin";
        BREAK;
    CASE 
29$saint "St Gildas";
        BREAK;
    CASE 
30$saint "Ste Martine";
        BREAK;
    CASE 
31$saint "Ste Marcelle";
    BREAK;
      
      
    }
BREAK  ;
CASE 
2:
    SWITCH(
$jour)
    {
CASE 
1$saint "Ste Ella";
BREAK;
CASE 
2$saint "Présentation";
BREAK;
CASE 
3$saint "St Blaise";
BREAK;
CASE 
4$saint "Ste Véronique";
BREAK;
CASE 
5$saint "Ste Agathe";
BREAK;
CASE 
6$saint "St Gaston";
BREAK;
CASE 
7$saint "Ste Eugénie";
BREAK;
CASE 
8$saint "Ste Jacqueline";
BREAK;
CASE 
9$saint "Ste Apolline";
BREAK;
CASE 
10$saint "St Arnaud";
BREAK;
CASE 
11$saint "N-D de Lourdes";
BREAK;
CASE 
12$saint "St Félix";
BREAK;
CASE 
13$saint "Ste Béatrice";
BREAK;
CASE 
14$saint "St Valentin";
BREAK;
CASE 
15$saint "St Claude";
BREAK;
CASE 
16$saint "Ste Julienne";
BREAK;
CASE 
17$saint "St Alexis";
BREAK;
CASE 
18$saint "Ste Bernadette";
BREAK;
CASE 
19$saint "St Gabin";
BREAK;
CASE 
20$saint "Ste Aimée";
BREAK;
CASE 
21$saint "St Damien";
BREAK;
CASE 
22$saint "Ste Isabelle";
BREAK;
CASE 
23$saint "St Lazare";
BREAK;
CASE 
24$saint "St Modeste";
BREAK;
CASE 
25$saint "St Roméo";
BREAK;
CASE 
26$saint "St Nestor";
BREAK;
CASE 
27$saint "Ste Honorine";
BREAK;
CASE 
28$saint "St Romain";
BREAK;
CASE 
29$saint "St Auguste";
BREAK;
    }
BREAK;
CASE 
3:
    SWITCH(
$jour)
    {
CASE 
1$saint  "St Aubin";
BREAK;
CASE 
2$saint  "St Charles";
BREAK;
CASE 
3$saint  "St Guénolé";
BREAK;
CASE 
4$saint  "St Casimir";
BREAK;
CASE 
5$saint  "Ste Olive";
BREAK;
CASE 
6$saint  "Ste Colette";
BREAK;
CASE 
7$saint  "Ste Félicité";
BREAK;
CASE 
8$saint  "St Jean de Dieu";
BREAK;
CASE 
9$saint  "Ste Françoise";
BREAK;
CASE 
10$saint  "St Vivien";
BREAK;
CASE 
11$saint  "Ste Rosine";
BREAK;
CASE 
12$saint  "Ste Justine";
BREAK;
CASE 
13$saint  "St Rodrigue";
BREAK;
CASE 
14$saint  "Ste Mathilde";
BREAK;
CASE 
15$saint  "Ste Louise";
BREAK;
CASE 
16$saint  "Ste Bénédicte";
BREAK;
CASE 
17$saint  "St Patrice";
BREAK;
CASE 
18$saint  "St Cyrille";
BREAK;
CASE 
19$saint  "St Joseph";
BREAK;
CASE 
20$saint  "St Herbert";
BREAK;
CASE 
21$saint  "Ste Clémence";
BREAK;
CASE 
22$saint  "Ste Léa";
BREAK;
CASE 
23$saint  "St Victorien";
BREAK;
CASE 
24$saint  "Ste Catherine de Suède";
BREAK;
CASE 
25$saint  "Annonciation";
BREAK;
CASE 
26$saint  "Ste Larissa";
BREAK;
CASE 
27$saint  "St Habib";
BREAK;
CASE 
28$saint  "St Gontran";
BREAK;
CASE 
29$saint  "Ste Gwladys";
BREAK;
CASE 
30$saint  "St Amédée";
BREAK;
CASE 
31$saint  "St Benjamin";
BREAK;
}
BREAK;
CASE 
4:
    SWITCH(
$jour)
    {
    
CASE 
1$saint  "St Hughes";
BREAK;
CASE 
2$saint  "Ste Sandrine";
BREAK;
CASE 
3$saint  "St Richard";
BREAK;
CASE 
4$saint  "St Isidore";
BREAK;
CASE 
5$saint  "Ste Irène";
BREAK;
CASE 
6$saint  "St Marcellin";
BREAK;
CASE 
7$saint  "St J-B de la Salle";
BREAK;
CASE 
8$saint  "Ste Julie";
BREAK;
CASE 
9$saint  "St Gautier";
BREAK;
CASE 
10$saint  "St Fulbert";
BREAK;
CASE 
11$saint  "St Stanislas";
BREAK;
CASE 
12$saint  "Ste Jules";
BREAK;
CASE 
13$saint  "Ste Ida";
BREAK;
CASE 
14$saint  "St Maxime";
BREAK;
CASE 
15$saint  "St Paterne";
BREAK;
CASE 
16$saint  "St Benoit-Joseph";
BREAK;
CASE 
17$saint  "St Anicet";
BREAK;
CASE 
18$saint  "St Parfait";
BREAK;
CASE 
19$saint  "Ste Emma";
BREAK;
CASE 
20$saint  "Ste Odette";
BREAK;
CASE 
21$saint  "St Anselme";
BREAK;
CASE 
22$saint  "St Alexandre";
BREAK;
CASE 
23$saint  "St Georges";
BREAK;
CASE 
24$saint  "St Fidèle";
BREAK;
CASE 
25$saint  "St Marc";
BREAK;
CASE 
26$saint  "Ste Alida";
BREAK;
CASE 
27$saint  "Ste Zita";
BREAK;
CASE 
28$saint  "Ste Valérie";
BREAK;
CASE 
29$saint  "Ste Cath. de Sienne";
BREAK;
CASE 
30$saint  "St Robert";
BREAK;
}
BREAK;
CASE 
5:
    SWITCH(
$jour)
    {
    
CASE 
1$saint  "Fête du Travail";
BREAK;
CASE 
2$saint  "St Boris";
BREAK;
CASE 
3$saint  "SS Philippe Jacques";
BREAK;
CASE 
4$saint  "St Sylvain";
BREAK;
CASE 
5$saint  "Ste Judith";
BREAK;
CASE 
6$saint  "Ste Prudence";
BREAK;
CASE 
7$saint  "Ste Gisèle";
BREAK;
CASE 
8$saint  "Victoire 1945";
BREAK;
CASE 
9$saint  "Ste Pacôme";
BREAK;
CASE 
10$saint  "Ste Solange";
BREAK;
CASE 
11$saint  "Ste Estelle";
BREAK;
CASE 
12$saint  "St Achille";
BREAK;
CASE 
13$saint  "Ste Rolande";
BREAK;
CASE 
14$saint  "St Mathias";
BREAK;
CASE 
15$saint  "Ste Denise";
BREAK;
CASE 
16$saint  "St Honoré";
BREAK;
CASE 
17$saint  "St Pascal";
BREAK;
CASE 
18$saint  "St Eric";
BREAK;
CASE 
19$saint  "St Yves";
BREAK;
CASE 
20$saint  "St Bernardin";
BREAK;
CASE 
21$saint  "St Constantin";
BREAK;
CASE 
22$saint  "St Emile";
BREAK;
CASE 
23$saint  "St Didier";
BREAK;
CASE 
24$saint  "St Donatien";
BREAK;
CASE 
25$saint  "Ste Sophie";
BREAK;
CASE 
26$saint  "St Béranger";
BREAK;
CASE 
27$saint  "St Augustin";
BREAK;
CASE 
28$saint  "St Germain";
BREAK;
CASE 
29$saint  "St Aymard";
BREAK;
CASE 
30$saint  "St Ferdinand";
BREAK;
CASE 
31$saint  "Visitation";
BREAK;
}
BREAK;
CASE 
6:
    SWITCH(
$jour)
    {
CASE 
1$saint  "St Justin";
BREAK;
CASE 
2$saint  "Ste Blandine";
BREAK;
CASE 
3$saint  "St Kévin";
BREAK;
CASE 
4$saint  "Ste Clotilde";
BREAK;
CASE 
5$saint  "St Igor";
BREAK;
CASE 
6$saint  "St Norbert";
BREAK;
CASE 
7$saint  "St Gilbert";
BREAK;
CASE 
8$saint  "St Médard";
BREAK;
CASE 
9$saint  "Ste Diane";
BREAK;
CASE 
10$saint  "St Landry";
BREAK;
CASE 
11$saint  "St Barnabé";
BREAK;
CASE 
12$saint  "St Guy";
BREAK;
CASE 
13$saint  "St Antoine de P.";
BREAK;
CASE 
14$saint  "St Elisée";
BREAK;
CASE 
15$saint  "Ste Germaine";
BREAK;
CASE 
16$saint  "St J-F Régis";
BREAK;
CASE 
17$saint  "St Hervé";
BREAK;
CASE 
18$saint  "St Léonce";
BREAK;
CASE 
19$saint  "St Romuald";
BREAK;
CASE 
20$saint  "St Silvère";
BREAK;
CASE 
21$saint  "Eté";
BREAK;
CASE 
22$saint  "St Alban";
BREAK;
CASE 
23$saint  "Ste Audrey";
BREAK;
CASE 
24$saint  "St Jean-Baptiste";
BREAK;
CASE 
25$saint  "St Prosper";
BREAK;
CASE 
26$saint  "St Anthelme";
BREAK;
CASE 
27$saint  "St Fernand";
BREAK;
CASE 
28$saint  "St Irénée";
BREAK;
CASE 
29$saint  "SS Pierre: St Paul";
BREAK;
CASE 
30$saint  "St Martial";
BREAK;
}
BREAK;
CASE 
7:
    SWITCH(
$jour)
    {
CASE 
1$saint  "St Thierry";
BREAK;
CASE 
2$saint  "St Martinien";
BREAK;
CASE 
3$saint  "St Thomas";
BREAK;
CASE 
4$saint  "St Florent";
BREAK;
CASE 
5$saint  "St Antoine-Marie";
BREAK;
CASE 
6$saint  "Ste Mariette";
BREAK;
CASE 
7$saint  "St Raoul";
BREAK;
CASE 
8$saint  "St Thibaut";
BREAK;
CASE 
9$saint  "Ste Amandine";
BREAK;
CASE 
10$saint  "St Ulrich";
BREAK;
CASE 
11$saint  "St Benoît";
BREAK;
CASE 
12$saint  "St Olivier";
BREAK;
CASE 
13$saint  "SS Henri et Joël";
BREAK;
CASE 
14$saint  "Fête Nationale";
BREAK;
CASE 
15$saint  "St Donald";
BREAK;
CASE 
16$saint  "N-D du Mt-Carmel";
BREAK;
CASE 
17$saint  "Ste Charlotte";
BREAK;
CASE 
18$saint  "St Frédéric";
BREAK;
CASE 
19$saint  "St Arsène";
BREAK;
CASE 
20$saint  "Ste Marina";
BREAK;
CASE 
21$saint  "St Victor";
BREAK;
CASE 
22$saint  "Ste Marie-Madeleine";
BREAK;
CASE 
23$saint  "Ste Brigitte";
BREAK;
CASE 
24$saint  "Ste Christine";
BREAK;
CASE 
25$saint  "St Jacques";
BREAK;
CASE 
26$saint  "SS Anne et Joachim";
BREAK;
CASE 
27$saint  "Ste Nathalie";
BREAK;
CASE 
28$saint  "St Samson";
BREAK;
CASE 
29$saint  "Ste Marthe";
BREAK;
CASE 
30$saint  "Ste Juliette";
BREAK;
CASE 
31$saint  "St Ignace de Loyola";
BREAK;
}
BREAK;
CASE 
8:
    SWITCH(
$jour)
    {
CASE 
1$saint "St Alphonse";
BREAK;
CASE 
2$saint "St Julien Eymard";
BREAK;
CASE 
3$saint "Ste Lydie";
BREAK;
CASE 
4$saint "St J-M Vianney";
BREAK;
CASE 
5$saint "St Abel";
BREAK;
CASE 
6$saint "Transfiguration";
BREAK;
CASE 
7$saint "St Gaëtan";
BREAK;
CASE 
8$saint "St Dominique";
BREAK;
CASE 
9$saint "St Amour";
BREAK;
CASE 
10$saint "St Laurent";
BREAK;
CASE 
11$saint "Ste Claire";
BREAK;
CASE 
12$saint "Ste Clarisse";
BREAK;
CASE 
13$saint "St Hippolyte";
BREAK;
CASE 
14$saint "St Evrard";
BREAK;
CASE 
15$saint "Assomption";
BREAK;
CASE 
16$saint "St Armel";
BREAK;
CASE 
17$saint "St Hyacinthe";
BREAK;
CASE 
18$saint "Ste Hélène";
BREAK;
CASE 
19$saint "St Jean Eudes";
BREAK;
CASE 
20$saint "St Bernard";
BREAK;
CASE 
21$saint