begin process at 2012 05 27 20:02:36
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Date / Heure

 > EMPLOI DU TEMPS

EMPLOI DU TEMPS


 Information sur la source

Note :
2 / 10 - par 1 personne
2,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Date / Heure Niveau :Débutant Date de création :30/06/2003 Date de mise à jour :30/06/2003 05:46:29 Vu :7 262

Auteur : Houzefa

Ecrire un message privé
Site perso
Commentaire sur cette source (3)
Ajouter un commentaire et/ou une note

 Description

Le genre de truc qu'on fait quand on sait vraiment pas quoi faire, et encore, ce jour-là, je devais être bien défoncé...
Mais finalement c'est assez simple, il suffit de changer les codes du tableau $filtre. Voilà les codes qui vous permettent de faire l'emploi du temps (dans $jours) :
* X<>000 signifie qu'il ya cours de X en salle 000 ;
* t à la fin signifie qu'il ya TP ;
* aX<>000;bY<>001 permet de diviser l'heure en 2, si ya une semaine a ou b.

Source

  • <html>
  • <head>
  • <title>Emploi du temps</title>
  • <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  • <style type="text/css">
  • td { text-align: center; font: bold small Georgia, "Times New Roman", Times, serif }
  • </style>
  • </head>
  • <body bgcolor="#FFAF5F" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  • <table width="100%" border="0" cellspacing="0" cellpadding="0">
  • <tr>
  • <?
  • function afficher($a_afficher) {
  • $filtre=array(
  • "!"=>"<font color=\"#A0A0F0\">Manger</font>",
  • "<>"=>"<br>",
  • "t"=>"<br>TP",
  • "M"=>"Math&eacute;matiques",
  • "P"=>"Physiques",
  • "S"=>"SVT",
  • "F"=>"Fran&ccedil;ais",
  • "A"=>"Anglais",
  • "D"=>"Allemand",
  • "H"=>"Histoire-G&eacute;ographie",
  • "C"=>"ECJS",
  • "E"=>"EPS"
  • );
  • echo ($a_afficher=="") ? "&nbsp;" : strtr($a_afficher, $filtre) ;
  • }
  • $jours=array(
  • "Lundi"=>array("", "", "H<>225", "F<>321", "!", "a;bH<>225", "M<>300", "", ""),
  • "Mardi"=>array("a;bP<>210", "F<>320", "F<>320", "P<>311", "!", "Pt", "Pt", "St", "St"),
  • "Mercredi"=>array("S<>311", "S<>311", "D<>122", "A<>321", "!", "", "", "", ""),
  • "Jeudi"=>array("", "", "H<>221", "F<>223", "!", "M<>306", "M<>306", "E", "E"),
  • "Vendredi"=>array("aD<>225;b", "a;bD<>225", "P<>211", "!", "M<>306", "aM<>306;bC<>326", "A<>320", "M<>306", "")
  • );
  • $largeur=(100/count($jours));
  • while ($largeur*count($jours)>95) { $largeur--; }
  • echo "<td width=\"".(100-$largeur*count($jours))."%\">\n<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td height=\"26\"></td></tr>\n";
  • for ($id_for=9;$id_for<=17;$id_for++) {
  • echo "<tr><td height=\"66\">$id_for H</td></tr>\n";
  • }
  • echo "</table>\n</td>\n";
  • foreach ($jours as $jour=>$horaires) {
  • $case=0;
  • echo "<td width=\"$largeur%\" height=\"100%\">\n<table width=\"100%\" height=\"100%\" border=\"1\" bordercolor=\"#C0F0C0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td height=\"26\" bgcolor=\"#CFFFCF\">$jour</td></tr>\n";
  • foreach ($horaires as $horaire) {
  • if (($horaire!=$horaires[$case-1])||(!isset($horaires[$case-1]))) {
  • $hauteur=66;
  • $id_while=0;
  • while (($horaire==$horaires[$case+(++$id_while)])&&(isset($horaires[$case+$id_while]))) {
  • $hauteur+=66;
  • }
  • echo "<tr><td height=\"$hauteur\">";
  • if (substr($horaire, 0, 1)=="a") {
  • echo "\n<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"50%\" bgcolor=\"#FFB45F\">";
  • afficher(substr($horaire, 1, strpos($horaire, ";")-1));
  • echo "</td>\n<td width=\"50%\" bgcolor=\"#FFAA5F\">";
  • afficher(substr($horaire, strpos($horaire, "b")+1));
  • echo "</td>\n</tr></table>\n";
  • } else { afficher($horaire); }
  • echo "</td></tr>\n";
  • }
  • $case++;
  • }
  • echo "</table>\n</td>\n";
  • }
  • ?>
  • </tr></table>
  • </body>
  • </html>
<html>
<head>
<title>Emploi du temps</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
td { text-align: center; font: bold small Georgia, "Times New Roman", Times, serif }
</style>
</head>

<body bgcolor="#FFAF5F" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
function afficher($a_afficher) {
$filtre=array(
"!"=>"<font color=\"#A0A0F0\">Manger</font>",
"<>"=>"<br>",
"t"=>"<br>TP",
"M"=>"Math&eacute;matiques",
"P"=>"Physiques",
"S"=>"SVT",
"F"=>"Fran&ccedil;ais",
"A"=>"Anglais",
"D"=>"Allemand",
"H"=>"Histoire-G&eacute;ographie",
"C"=>"ECJS",
"E"=>"EPS"
);
echo ($a_afficher=="") ? "&nbsp;" : strtr($a_afficher, $filtre) ;
}
$jours=array(
"Lundi"=>array("", "", "H<>225", "F<>321", "!", "a;bH<>225", "M<>300", "", ""),
"Mardi"=>array("a;bP<>210", "F<>320", "F<>320", "P<>311", "!", "Pt", "Pt", "St", "St"),
"Mercredi"=>array("S<>311", "S<>311", "D<>122", "A<>321", "!", "", "", "", ""),
"Jeudi"=>array("", "", "H<>221", "F<>223", "!", "M<>306", "M<>306", "E", "E"),
"Vendredi"=>array("aD<>225;b", "a;bD<>225", "P<>211", "!", "M<>306", "aM<>306;bC<>326", "A<>320", "M<>306", "")
);
$largeur=(100/count($jours));
while ($largeur*count($jours)>95) { $largeur--; }
echo "<td width=\"".(100-$largeur*count($jours))."%\">\n<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td height=\"26\"></td></tr>\n";
for ($id_for=9;$id_for<=17;$id_for++) {
echo "<tr><td height=\"66\">$id_for H</td></tr>\n";
}
echo "</table>\n</td>\n";
foreach ($jours as $jour=>$horaires) {
$case=0;
echo "<td width=\"$largeur%\" height=\"100%\">\n<table width=\"100%\" height=\"100%\" border=\"1\" bordercolor=\"#C0F0C0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr><td height=\"26\" bgcolor=\"#CFFFCF\">$jour</td></tr>\n";
foreach ($horaires as $horaire) {
if (($horaire!=$horaires[$case-1])||(!isset($horaires[$case-1]))) {
$hauteur=66;
$id_while=0;
while (($horaire==$horaires[$case+(++$id_while)])&&(isset($horaires[$case+$id_while]))) {
$hauteur+=66;
}
echo "<tr><td height=\"$hauteur\">";
if (substr($horaire, 0, 1)=="a") {
echo "\n<table width=\"100%\" height=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"50%\" bgcolor=\"#FFB45F\">";
afficher(substr($horaire, 1, strpos($horaire, ";")-1));
echo "</td>\n<td width=\"50%\" bgcolor=\"#FFAA5F\">";
afficher(substr($horaire, strpos($horaire, "b")+1));
echo "</td>\n</tr></table>\n";
} else { afficher($horaire); }
echo "</td></tr>\n";
}
$case++;
}
echo "</table>\n</td>\n";
}
?>
</tr></table>
</body>
</html>

 Conclusion

Désolé pour tous ceux qui s'en foutent de l'école !


 Sources du même auteur

GÉNÉRER DES VIGNETTES D'IMAGES
Source avec Zip Source avec une capture METTRE LES CODES SOURCES DE TOUS LES FICHIERS DE VOTRE SITE ...
LISTE DES FAVORIS WINDOWS SOUS FORME D'ARRAYS PHP FACILEMENT...

 Sources de la même categorie

Source avec une capture AGENDA GRAPHIQUE SIMPLE (DÉBUTANT) À INTÉGRER par NicomakM
CALCUL DU NOMBRE DE JOURS CONTENUS DANS L'INTERSECTION DE DE... par curphey
CALENDRIER EN 70 LIGNES par tchconst
Source avec Zip CALENDRIER par gabay
CALENDRIER SIMPLE par manuche

Commentaires et avis

Commentaire de Houzefa le 30/06/2003 05:47:44

J'avais oublié de préciser un truc important : "!" c'est pour le manger !

Commentaire de matrey le 30/06/2003 13:36:19

mouais... bof...
Je confirme que tu devais vraiment être bcp défoncé !!!!

Commentaire de pyrrah le 01/10/2009 08:48:03 2/10

Ton idée combinée à une base de donnée mySQL aurait été la bienvenue...
C'est fait "à l'arrache" :/

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,515 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales