» Rubriques

[Texte] [SQL] [Function] [Maths] [Divers] [Variables] [FTP] [Email] [Date] [Regex]

Maintenance de site
<!-- FICHIER index.php -->
<?
echo'<html><head>';
//début de maintenance
include("under/maint.inc.php");
$maintenance=$oui_non
if(@
$maintenance==1){
include(
"out.php");
exit;
}
//fin de maintenance
echo'<title>Votre site</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/css.css" type=text/css rel=stylesheet>
</head>'
;
echo
'<body >
<p align="center"><strong><font color="#000000" size="4">MAINTENANCE DE SITE</font></strong></p>
<p><strong>Petite application avec variable...pour mettre un site en maintenance 
  à l\'aide d\'un formulaire!</strong></p>
<p><strong>Afin d\'apprécier son fonctionnement cliquez sur le lien ci dessous.</strong></p>
<p align="center"><em><font color="#006699">Maintenance <a href="under/index.php">oui</a></font></em></p>
<p><em><font color="#006699">* Il est conseillé de mettre dans le répertoire 
  de traitement un .htaccess par sécurité.</font></em></p>
<p><em><font color="#006699">* Vérifiez également les droits d\'écriture 
  sur vos fichiers .</font></em></p>
<p align="center"><a href="mailto:mlionet@mlionet.com">mlionet.com</a> © 
  2003</p>
</body>
</html>'
;
?>
<!-- FICHIER out.php -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> Maintenance </title>
<link href="css/css.css" type=text/css rel=stylesheet>
</head>
<body>
<div align="center">
  <p><img src="under/maintenance.gif" width="282" height="168"></p>
  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Le site </strong> est en maintenance</font>,</p>
  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nous sommes désolés pour la gène occasionée ...</font></p>
  <p><a href="mailto:mlionet@mlionet.com">mlionet.com</a> © 2003</p>
</div>
</body>
</html>

<!-- Dossier under qui contient un index.php -->
<?
echo'<html><head>
<title>Site en maintenance</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css/css.css" type=text/css rel=stylesheet>
</head>
<body>
<table width="90%"  border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>
    <blockquote><br />
        <strong>Mettre le site en maintenance:</strong><br>
 <br />
        Le site est actuellement :'
;
include(
"maint.inc.php");
$maintenance=$oui_non
if(@
$maintenance==1){
echo
'  <font color="red"><b>en maintenance.</b></font>';
}else{
echo
'  <font color="red"><b>en ligne.</b></font>';
}
echo
' <form name="maint" method="post" action="">
          <label> 
          <input type="radio" name="radiobutton" value="1">
          maintenance oui <br />
          <input name="radiobutton" type="radio" value="0" checked>
          maintenance non<br />
          </label>
          <label>
          <input type="submit" name="Submit" value="   maintenance  ">
          </label>
        </form>
        <br>'

if (@
$Submit){
$fp=fopen("maint.inc.php","w+");
fwrite($fp,"<?php\n");
fwrite($fp,"\$oui_non=\"$radiobutton\";\n");
fwrite($fp,"?>\n");
fclose($fp);
echo
'<meta http-equiv="refresh" content="3;URL=index.php">';
echo
'<p><strong>Patientez 3 secondes - vos données sont transférées</strong></p>';
        }else{
        echo
'';
        }          
echo
'<br /><a href="../">Retour sur le site</a></blockquote></td></tr></table>
</body>
</html>'
;
?>
<!-- FICHIER maint.inc.php -->
<?php
$oui_non
="0";
?>
/////
//une image
maintenance.gif (non fournis);)
////////
//un dossier css avec un fichier css.css
//////////
/* Barre de Défillement (Internet Exploreur >= 5.5 uniquement) --- */ 
BODY
     {
     scrollbar-face-color: #FFFFFF;
     scrollbar-shadow-color: #FFFFFF;
     scrollbar-highlight-color: #FFFFFF;
     scrollbar-3dlight-color: #CC3333;
     scrollbar-darkshadow-color: #FFFFFF;
     scrollbar-track-color: #FFFFFF;
     scrollbar-arrow-color: #CC3333;
     }

body { color: #000000; background-color: #FFFFFF ;leftmargin :0; topmargin:0; marginwidth:0; marginheight:0;}

/* Style des Liens ------------------------------------#5B5B5B */
A:link    {font-family:verdana; font-size:9px; text-decoration: none; color: #C2A945;}
A:visited {font-family:verdana; font-size:9px; text-decoration: none; color: #800000;}
A:active  {font-family:verdana; font-size:9px; text-decoration: none; color: #400000;}
A:hover   {font-family:verdana; font-size:9px; text-decoration: underline; color: #FFFFFF;background-color: #800000; }
.small  {font-family:verdana; font-size:9px; text-decoration: none; color: #800000;text-decoration: underline }
.titre {font-family:verdana; font-size:16px; color: #CC3333;font: bold ;font-family: Courier New, Courier, mono; }
.copy {font-family:arial; font-size:9px; text-decoration: none;color: #FFFFFF; text-align:center ; font: bold;background-color: #C2A945; }
.menu {font-family:arial; font-size:12px; text-decoration: none;color: #B3B300;background-color: #800000;}

Posté par Lionel le 20/01/2004 à 23:45
» Commentaires

Pas de commentaires.

Vous devez être connecté en tant que Membre pour pouvoir poster un commentaire, Inscrivez vous ici !