Bouts de Codes PHP

Déterminer le saint du jour.

Information sur le code source PHP

Ecrit par :  Olravet
Site de l'auteur Voir
Codes en PHP de l'auteur : [3] sources Voir
Enregistrement le 05 Mai 2008 - Vu 2980 fois
Impression: Imprimer le code
Pas encore
de vote

Description du code source

Information sur le 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
.806
.807
.808
.809
.810
.811
.812
.813
.814
.815
.816
.817
.818
.819
.820
.821
.822
.823
.824
.825
.826
 

<?php
/******************************************************************************/
/*                                                                            */
/*                       __        ____                                       */
/*                 ___  / /  ___  / __/__  __ _____________ ___               */
/*                / _ \/ _ \/ _ \_\ \/ _ \/ // / __/ __/ -_|_-<               */
/*               / .__/_//_/ .__/___/\___/\_,_/_/  \__/\__/___/               */
/*              /_/       /_/                                                 */
/*                                                                            */
/*                                                                            */
/******************************************************************************/
/*                                                                            */
/* Titre          : Déterminer le saint du jour.                              */
/*                                                                            */
/* URL            : http://www.phpsources.org/scripts383-PHP.htm              */
/* Auteur         : Olravet                                                   */
/* Date édition   : 05 Mai 2008                                               */
/* Website auteur : http://olravet.fr/                                        */
/*                                                                            */
/******************************************************************************/
?>
<?
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 "St Christophe";
BREAK;
CASE 22$saint "St Fabrice";
BREAK;
CASE 23$saint "Ste Rose de Lima";
BREAK;
CASE 24$saint "St Barthélémy";
BREAK;
CASE 25$saint "St Louis";
BREAK;
CASE 26$saint "Ste Natacha";
BREAK;
CASE 27$saint "Ste Monique";
BREAK;
CASE 28$saint "St Augustin";
BREAK;
CASE 29$saint "Ste Sabine";
BREAK;
CASE 30$saint "St Fiacre";
BREAK;
CASE 31$saint "St Aristide";
BREAK;
}
BREAK;
CASE 9:
    SWITCH($jour)
    {
CASE 1$saint  "St Gilles";
BREAK;
CASE 2$saint  "Ste Ingrid";
BREAK;
CASE 3$saint  "St Grégoire";
BREAK;
CASE 4$saint  "Ste Rosalie";
BREAK;
CASE 5$saint  "Ste Raïssa";
BREAK;
CASE 6$saint  "St Bertrand";
BREAK;
CASE 7$saint  "Ste Reine";
BREAK;
CASE 8$saint  "Nativité de N-D";
BREAK;
CASE 9$saint  "St Alain";
BREAK;
CASE 10$saint  "Ste Inès";
BREAK;
CASE 11$saint  "St Adolphe";
BREAK;
CASE 12$saint  "St Apollinaire";
BREAK;
CASE 13$saint  "St Aimé";
BREAK;
CASE 14$saint  "La Ste-Croix";
BREAK;
CASE 15$saint  "St Roland";
BREAK;
CASE 16$saint  "Ste Edith";
BREAK;
CASE 17$saint  "St Renaud";
BREAK;
CASE 18$saint  "Ste Nadège";
BREAK;
CASE 19$saint  "Ste Emilie";
BREAK;
CASE 20$saint  "St Davy";
BREAK;
CASE 21$saint  "St Matthieu";
BREAK;
CASE 22$saint  "St Maurice";
BREAK;
CASE 23$saint  "St Constant";
BREAK;
CASE 24$saint  "St Thècle";
BREAK;
CASE 25$saint  "St Hermann";
BREAK;
CASE 26$saint  "St Côme";
BREAK;
CASE 27$saint  "St Vincent de Paul";
BREAK;
CASE 28$saint  "St Venceslas";
BREAK;
CASE 29$saint  "St Michel";
BREAK;
CASE 30$saint  "St Jérôme";
BREAK;
}
BREAK;
CASE 10:
    SWITCH($jour)
    {
CASE 1$saint  "Ste Thérèse de l'E-J";
BREAK;
CASE 2$saint  "St Léger";
BREAK;
CASE 3$saint  "St Gérard";
BREAK;
CASE 4$saint  "St François d'Assise";
BREAK;
CASE 5$saint  "Ste Fleur";
BREAK;
CASE 6$saint  "St Bruno";
BREAK;
CASE 7$saint  "St Serge";
BREAK;
CASE 8$saint  "Ste Pélagie";
BREAK;
CASE 9$saint  "St Denis";
BREAK;
CASE 10$saint  "St Ghislain";
BREAK;
CASE 11$saint  "St Firmin";
BREAK;
CASE 12$saint  "St Wilfrid";
BREAK;
CASE 13$saint  "St Géraud";
BREAK;
CASE 14$saint  "St Juste";
BREAK;
CASE 15$saint  "Ste Thérèse d'Avila";
BREAK;
CASE 16$saint  "Ste Edwige";
BREAK;
CASE 17$saint  "St Baudouin";
BREAK;
CASE 18$saint  "St Luc";
BREAK;
CASE 19$saint  "St René";
BREAK;
CASE 20$saint  "Ste Adeline";
BREAK;
CASE 21$saint  "Ste Céline";
BREAK;
CASE 22$saint  "Ste Elodie";
BREAK;
CASE 23$saint  "St Jean de Capistran";
BREAK;
CASE 24$saint  "St Florentin";
BREAK;
CASE 25$saint  "St Crépin";
BREAK;
CASE 26$saint  "St Dimitri";
BREAK;
CASE 27$saint  "Ste Emeline";
BREAK;
CASE 28$saint  "SS Simon et Juda";
BREAK;
CASE 29$saint  "St Narcisse";
BREAK;
CASE 30$saint  "St Bienvenu";
BREAK;
CASE 31$saint  "St Quentin";
BREAK;
}
BREAK;
CASE 11:
    SWITCH($jour)
    {
CASE 1$saint    "Toussaint";
BREAK;
CASE 2$saint    "Défunts";
BREAK;
CASE 3$saint    "St Hubert";
BREAK;
CASE 4$saint    "St Charles";
BREAK;
CASE 5$saint    "Ste Sylvie";
BREAK;
CASE 6$saint    "Ste Bertille";
BREAK;
CASE 7$saint    "Ste Carine";
BREAK;
CASE 8$saint    "St Geoffroy";
BREAK;
CASE 9$saint    "St Théodore";
BREAK;
CASE 10$saint    "St Léon";
BREAK;
CASE 11$saint    "St Martin";
BREAK;
CASE 12$saint    "St Christian";
BREAK;
CASE 13$saint    "St Brice";
BREAK;
CASE 14$saint    "St Sidoine";
BREAK;
CASE 15$saint    "St Albert";
BREAK;
CASE 16$saint    "Ste Marguerite";
BREAK;
CASE 17$saint    "Ste Elisabeth";
BREAK;
CASE 18$saint    "Ste Aude";
BREAK;
CASE 19$saint    "St Tanguy";
BREAK;
CASE 20$saint    "St Edmond";
BREAK;
CASE 21$saint    "Prés. de Marie";
BREAK;
CASE 22$saint    "Ste Cécile";
BREAK;
CASE 23$saint    "St Clément";
BREAK;
CASE 24$saint    "Ste Flora";
BREAK;
CASE 25$saint    "Ste Catherine";
BREAK;
CASE 26$saint    "Ste Delphine";
BREAK;
CASE 27$saint    "St Séverin";
BREAK;
CASE 28$saint    "St Jacques de la M.";
BREAK;
CASE 29$saint    "St Saturnin";
BREAK;
CASE 30$saint    "St André";
BREAK;
}
BREAK;
CASE 12:
    SWITCH($jour)
    {
CASE 1$saint  "Ste Florence";
BREAK;
CASE 2$saint  "Ste Viviane";
BREAK;
CASE 3$saint  "St Xavier";
BREAK;
CASE 4$saint  "Ste Barbara";
BREAK;
CASE 5$saint  "St Gérald";
BREAK;
CASE 6$saint  "St Nicolas";
BREAK;
CASE 7$saint  "St Ambroise";
BREAK;
CASE 8$saint  "Imm. Conception";
BREAK;
CASE 9$saint  "St P. Fourier";
BREAK;
CASE 10$saint  "St Romaric";
BREAK;
CASE 11$saint  "St Daniel";
BREAK;
CASE 12$saint  "Ste Jeanne F.-C.";
BREAK;
CASE 13$saint  "Ste Lucie";
BREAK;
CASE 14$saint  "Ste Odile";
BREAK;
CASE 15$saint  "Ste Ninon";
BREAK;
CASE 16$saint  "Ste Alice";
BREAK;
CASE 17$saint  "St Gaël";
BREAK;
CASE 18$saint  "St Gatien";
BREAK;
CASE 19$saint  "St Urbain";
BREAK;
CASE 20$saint  "St Abraham";
BREAK;
CASE 21$saint  "St P. Cenisius";
BREAK;
CASE 22$saint  "Ste Fr.-Xavière";
BREAK;
CASE 23$saint  "St Armand";
BREAK;
CASE 24$saint  "St Adèle";
BREAK;
CASE 25$saint  "Noël";
BREAK;
CASE 26$saint  "St Etienne";
BREAK;
CASE 27$saint  "St Jean";
BREAK;
CASE 28$saint  "St Innocents";
BREAK;
CASE 29$saint  "St David";
BREAK;
CASE 30$saint  "St Roger";
BREAK;
CASE 31$saint  "St Sylvestre";
BREAK;
}
BREAK;
}
RETURN $saint;
}
?>

Fonctions du code source

Fonctions php / mysql PHP


Commentaires (2)
Nouveau message debian
le 06 Mai 2008 à 09:50:00
Gros Merci smile

ca fait longtemps que je cherchais ce code smile smile smile
Nouveau message superpigeon
le 08 Mai 2008 à 11:41:00
J'applaudis l'effort fourni, mais je m'interroge sur l'efficacité et la maintenabilité d'un tel code.

N'aurait-il pas été plus simple de déclarer un array contenant la liste des saints au début du script et ensuite avoir un parcours simple de ce tableau.

Sinon, je m'incline quand même, parce que ça a du être pénible à coder ^^.

Poster un commentaire

:P :)
:wink: :lol:
:surprised: :confused:
:idea: :no:
Taille du texte:
Couleur:
 
Code de sécurité
Offres d'emploi
Librairie

Langages de programmation

La librairie est ouverte à tous et elle est accès principalement sur les langages PHP et MySQL. Vous trouverez aussi d'autres langages de programmation tel que le CSS, HTML, AJAX, ASP.. Plus de 300 références facilement accessibles. Visiter

  • Les Mysteres de Php et Mysql
  • XHTML : Liste des principales balises ; Regroupement thématique ; Caractères spéciaux ; 140 couleurs
  • Le grand livre de PHP 5 : Développemnt objet Applications pratiques
  • PHP 5.2 - Développer un site Web dynamique et interactif
  • PHP & MySQL et CSS
  • SQL (1Cédérom)
  • PHP - Introduction et premiers pas
  • HTML, XHTML, CSS
  • PHP et MySQL pour les Nuls
  • Total HTML