Accueil > > > XO.CALENDAR://V1.0
XO.CALENDAR://V1.0
Information sur la source
Description
-- XO.CALENDAR -- Le html provient de www.geekboys.org Script running @ http://rflood.free.fr/calendar.php Testé avec php4.3
Source
- <?
-
- # --------------------------- <CONFIGURATION> ---------------------------
- # le nom de cette page
- $page_name = "calendar.php";
- # --------------------------- </CONFIGURATION> ---------------------------
-
-
-
- function rtrn_month_daynb($dmonth, $dyear)
- {
- if($dmonth == 2)
- {
-
- if(checkdate($dmonth,"29","$dyear") == true) { return 29; }
- else { return 28; }
- }
- else
- {
- if(checkdate($dmonth,"31","$dyear") == true) { return 31; }
- else { return 30; }
- }
- }
-
- function rtrn_nbday($w_date)
- {
- if($w_date == "0") { return 7; }
- else { return ($w_date); }
- }
-
- # -- DETERMINE SI UN MOIS A ETE PRECISE DANS L'URL --
- if(isset($HTTP_GET_VARS['dm']) && $HTTP_GET_VARS['dm'] != "")
- { $cmonth = $HTTP_GET_VARS['dm']; }
- else
- { $cmonth = date("m",mktime()); }
-
- # -- DETERMINE SI UNE ANNEE A ETE PRECISE DANS L'URL --
- if(isset($HTTP_GET_VARS['dy']) && $HTTP_GET_VARS['dy'] != "")
- { $cyear = $HTTP_GET_VARS['dy']; }
- else
- { $cyear = date("Y",mktime()); }
-
- # -- DETERMINE MOIS/ANNEES SUIVANTES/PRECEDENTES --
- # MOIS PRECEDENT
- if($cmonth == 1)
- { $p_month = 12; $p_year = $cyear - 1;}
- else
- { $p_month = $cmonth-1; $p_year = $cyear;}
-
- # MOIS SUIVANT
- if($cmonth == 12)
- { $n_month = 1; $n_year = $cyear + 1;}
- else
- { $n_month = $cmonth+1; $n_year = $cyear;}
-
-
- $ctimestamp = mktime(0,0,0,$cmonth,01,$cyear);
-
- $cd_day_name = date("D",$ctimestamp);
- $cd_day_nb = rtrn_nbday(date("w",$ctimestamp));
-
- $cl_started = 0;
- $cl_cday = 0;
- $cl_month_nb_day = rtrn_month_daynb("$cmonth","$cyear");
-
-
- echo "
- <HTML>
- <HEAD>
- <TITLE>LaLla</TITLE>
-
- <style>
- .atext {font-family:fixedsys;font-size:11px;color:#FFFFFF;text-decoration:none}
- .htext {font-family:fixedsys;font-size:11px;color:#999999;text-decoration:none}
- .thtext {font-family:fixedsys;font-size:11px;color:#00FF00;text-decoration:none}
- a.alink {font-family:fixedsys;font-size:11px;color:#FFFFFF;text-decoration:none}
- a.alink:hover {font-family:fixedsys;font-size:11px;color:#FFFFFF;text-decoration:underline}
- a.cllink {font-family:fixedsys;font-size:11px;color:#FF0000;text-decoration:none}
- a.cllink:hover {font-family:fixedsys;font-size:11px;color:#FF0000;text-decoration:underline}
-
-
- </style>
- </HEAD>
-
- <BODY bgcolor=#000000>
- <TABLE width=100% height=100% cellspacing=0 cellpadding=0 border=0>
- <TR><TD valign=middle align=center width=100%>
- <TABLE width=400 cellspacing=0 cellpadding=0 border=0>
- <TR class=atext>
- <TD>.</TD>
- <TD colspan=7>------------------------------------------------</TD>
- <TD>.</TD>
- </TR>
- <TR>
- <TD class=atext>|</TD>
- <TD colspan=7 align=center class=thtext><A class=alink href=$page_name?dm=$p_month&dy=$p_year><<</A> " . date("F, Y",$ctimestamp) . " <A class=alink href=$page_name?dm=$n_month&dy=$n_year>>></A></TD>
- <TD class=atext>|</TD>
- </TR>
- <TR align=center class=atext>
- <TD>|</TD>
- <TD class=htext>L</TD>
- <TD class=htext>M</TD>
- <TD class=htext>M</TD>
- <TD class=htext>J</TD>
- <TD class=htext>V</TD>
- <TD class=htext>S</TD>
- <TD class=htext>D</TD>
- <TD>|</TD>
- </TR>
- ";
-
-
-
-
-
- for($i=1;$i<=42;$i++)
- {
-
- if($i == 1 )
- {
- echo "<TR>\n<TD class=atext>|</TD>\n";
- }
- elseif(($i-1)%7 == 0)
- {
- echo "<TD class=atext>|</TD>\n</TR>\n<TR>\n<TD class=atext>|</TD>\n";
- }
- elseif ($i == 42)
- {
- echo "<TD class=atext> </TD>\n<TD class=atext>|</TD>\n</TR>\n";
- }
-
- if($i == $cd_day_nb)
- {
- $cl_cday = 1;
- $cl_started = 1;
- }
-
- if($cl_started == 1)
- {
- echo "<TD class=atext align=center>$cl_cday</TD>\n";
- $cl_cday+=1;
- }
- elseif($i != 42)
- {
- echo "<TD class=atext> </TD>\n";
- }
-
- # -- ARRETE LAFFICHAGE DES JOURS --
- if($cl_started == 1 && $cl_month_nb_day+1 == $cl_cday)
- {
- $cl_started = 0;
- }
- }
-
-
- echo "
- <TR class=atext>
- <TD>`</TD>
- <TD colspan=7>------------------------------------------------</TD>
- <TD>Z</TD>
- </TR>
- <TR>
- <TD colspan=9 align=right><A class=atext>> </A><A class=alink href=$page_name>This month</A></TD>
- </TR>
- </TABLE>
- </TD></TR></TABLE>
- ";
-
- ?>
<?
# --------------------------- <CONFIGURATION> ---------------------------
# le nom de cette page
$page_name = "calendar.php";
# --------------------------- </CONFIGURATION> ---------------------------
function rtrn_month_daynb($dmonth, $dyear)
{
if($dmonth == 2)
{
if(checkdate($dmonth,"29","$dyear") == true) { return 29; }
else { return 28; }
}
else
{
if(checkdate($dmonth,"31","$dyear") == true) { return 31; }
else { return 30; }
}
}
function rtrn_nbday($w_date)
{
if($w_date == "0") { return 7; }
else { return ($w_date); }
}
# -- DETERMINE SI UN MOIS A ETE PRECISE DANS L'URL --
if(isset($HTTP_GET_VARS['dm']) && $HTTP_GET_VARS['dm'] != "")
{ $cmonth = $HTTP_GET_VARS['dm']; }
else
{ $cmonth = date("m",mktime()); }
# -- DETERMINE SI UNE ANNEE A ETE PRECISE DANS L'URL --
if(isset($HTTP_GET_VARS['dy']) && $HTTP_GET_VARS['dy'] != "")
{ $cyear = $HTTP_GET_VARS['dy']; }
else
{ $cyear = date("Y",mktime()); }
# -- DETERMINE MOIS/ANNEES SUIVANTES/PRECEDENTES --
# MOIS PRECEDENT
if($cmonth == 1)
{ $p_month = 12; $p_year = $cyear - 1;}
else
{ $p_month = $cmonth-1; $p_year = $cyear;}
# MOIS SUIVANT
if($cmonth == 12)
{ $n_month = 1; $n_year = $cyear + 1;}
else
{ $n_month = $cmonth+1; $n_year = $cyear;}
$ctimestamp = mktime(0,0,0,$cmonth,01,$cyear);
$cd_day_name = date("D",$ctimestamp);
$cd_day_nb = rtrn_nbday(date("w",$ctimestamp));
$cl_started = 0;
$cl_cday = 0;
$cl_month_nb_day = rtrn_month_daynb("$cmonth","$cyear");
echo "
<HTML>
<HEAD>
<TITLE>LaLla</TITLE>
<style>
.atext {font-family:fixedsys;font-size:11px;color:#FFFFFF;text-decoration:none}
.htext {font-family:fixedsys;font-size:11px;color:#999999;text-decoration:none}
.thtext {font-family:fixedsys;font-size:11px;color:#00FF00;text-decoration:none}
a.alink {font-family:fixedsys;font-size:11px;color:#FFFFFF;text-decoration:none}
a.alink:hover {font-family:fixedsys;font-size:11px;color:#FFFFFF;text-decoration:underline}
a.cllink {font-family:fixedsys;font-size:11px;color:#FF0000;text-decoration:none}
a.cllink:hover {font-family:fixedsys;font-size:11px;color:#FF0000;text-decoration:underline}
</style>
</HEAD>
<BODY bgcolor=#000000>
<TABLE width=100% height=100% cellspacing=0 cellpadding=0 border=0>
<TR><TD valign=middle align=center width=100%>
<TABLE width=400 cellspacing=0 cellpadding=0 border=0>
<TR class=atext>
<TD>.</TD>
<TD colspan=7>------------------------------------------------</TD>
<TD>.</TD>
</TR>
<TR>
<TD class=atext>|</TD>
<TD colspan=7 align=center class=thtext><A class=alink href=$page_name?dm=$p_month&dy=$p_year><<</A> " . date("F, Y",$ctimestamp) . " <A class=alink href=$page_name?dm=$n_month&dy=$n_year>>></A></TD>
<TD class=atext>|</TD>
</TR>
<TR align=center class=atext>
<TD>|</TD>
<TD class=htext>L</TD>
<TD class=htext>M</TD>
<TD class=htext>M</TD>
<TD class=htext>J</TD>
<TD class=htext>V</TD>
<TD class=htext>S</TD>
<TD class=htext>D</TD>
<TD>|</TD>
</TR>
";
for($i=1;$i<=42;$i++)
{
if($i == 1 )
{
echo "<TR>\n<TD class=atext>|</TD>\n";
}
elseif(($i-1)%7 == 0)
{
echo "<TD class=atext>|</TD>\n</TR>\n<TR>\n<TD class=atext>|</TD>\n";
}
elseif ($i == 42)
{
echo "<TD class=atext> </TD>\n<TD class=atext>|</TD>\n</TR>\n";
}
if($i == $cd_day_nb)
{
$cl_cday = 1;
$cl_started = 1;
}
if($cl_started == 1)
{
echo "<TD class=atext align=center>$cl_cday</TD>\n";
$cl_cday+=1;
}
elseif($i != 42)
{
echo "<TD class=atext> </TD>\n";
}
# -- ARRETE LAFFICHAGE DES JOURS --
if($cl_started == 1 && $cl_month_nb_day+1 == $cl_cday)
{
$cl_started = 0;
}
}
echo "
<TR class=atext>
<TD>`</TD>
<TD colspan=7>------------------------------------------------</TD>
<TD>Z</TD>
</TR>
<TR>
<TD colspan=9 align=right><A class=atext>> </A><A class=alink href=$page_name>This month</A></TD>
</TR>
</TABLE>
</TD></TR></TABLE>
";
?>
Conclusion
Pas de commentaires "c'est nul", "ca sert a rien". Merci!
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
MYSQL_FETCH_ASSOCMYSQL_FETCH_ASSOC par moumenitaliano
Cliquez pour lire la suite par moumenitaliano
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|