par
luc@s » 01 déc. 2007, 14:49
<html>
<head>
<title><?php
//si la page est indiquee, on affiche
//sinon on affiche les breves
if(!empty($_GET['page']))
echo htmlspecialchars($_GET['page']) ;
else
echo "Breves";
?></title>
</head>
<table border="0" cellspacing="0" cellpadding="0" width="2">
<tr>
<td colspan="2" align="left">
<script language="JavaScript1.2">fwLoadMenus();</script>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
</td>
</tr>
</table>
</td>
</tr>
<td width="6" class="g"></td>
<td width="911" class="cont_h" valign="top" align="center">
<div align="left">
<?php
// On teste que le paramètre d'url existe et qu'il est bien autorisé
// -----------------------------------------------------------------
$pageOK = array('Juventus non officiel' => 'breves.php',
'Actua' => 'actualite.php');
if ( (isset($_GET['page'])) && (isset($pageOK[$_GET['page']])) ) {
include($pageOK[$_GET['page']]); // Nous appelons le contenu central de la page
} else {
include('breves.php'); // Page par défaut quant elle n'existe pas dans le tableau
}
?>
<? // --------------------------------------------------------------------------------------------------------------------------------------------------- ?>
</div> </td>
<td width="6" class="d"></td>
</tr>
<tr>
<td width="6" class="g"></td>
<td width="911" class="cont_h" valign="top"><?php require_once('includes/part.php'); ?></td>
<td width="6" class="d"></td>
</tr>
<tr>
<td colspan="100%" background="cont_b.jpg" align="left" height="45" class="cont_h"> </td>
</tr>
</table>
</center>
</body>
</html>
[php]<html>
<head>
<title><?php
//si la page est indiquee, on affiche
//sinon on affiche les breves
if(!empty($_GET['page']))
echo htmlspecialchars($_GET['page']) ;
else
echo "Breves";
?></title>
</head>
<table border="0" cellspacing="0" cellpadding="0" width="2">
<tr>
<td colspan="2" align="left">
<script language="JavaScript1.2">fwLoadMenus();</script>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
</td>
</tr>
</table>
</td>
</tr>
<td width="6" class="g"></td>
<td width="911" class="cont_h" valign="top" align="center">
<div align="left">
<?php
// On teste que le paramètre d'url existe et qu'il est bien autorisé
// -----------------------------------------------------------------
$pageOK = array('Juventus non officiel' => 'breves.php',
'Actua' => 'actualite.php');
if ( (isset($_GET['page'])) && (isset($pageOK[$_GET['page']])) ) {
include($pageOK[$_GET['page']]); // Nous appelons le contenu central de la page
} else {
include('breves.php'); // Page par défaut quant elle n'existe pas dans le tableau
}
?>
<? // --------------------------------------------------------------------------------------------------------------------------------------------------- ?>
</div> </td>
<td width="6" class="d"></td>
</tr>
<tr>
<td width="6" class="g"></td>
<td width="911" class="cont_h" valign="top"><?php require_once('includes/part.php'); ?></td>
<td width="6" class="d"></td>
</tr>
<tr>
<td colspan="100%" background="cont_b.jpg" align="left" height="45" class="cont_h"> </td>
</tr>
</table>
</center>
</body>
</html> [/php]