Source du fichier sources.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
<meta name="KEYWORDS" content="heroes,chronicles,HC,scripts,sources">
<title>Sources</title>
<?php require_once('common_function.php'); include('designhc.html'); ?>
</head>
<body>
<form id="form" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="get">
<?php
$script_allow=Array('convertlog','recreatelog','potions','plantes','stats_clan','zn_distance','stats_kill','cartfidel','common_function','sources', 'outils');
foreach($script_allow as $script) {
echo "<a href=?script=$script>$script</a> ";
}
?>
</form>
<?php
if (isset($_GET['script'])) {
$script = $_GET['script'];
if (preg_match('`^[0-9a-z_]+$`',$script)) {
$file = $script.'.php';
if (file_exists($file)) {
if (in_array($script,$script_allow)) {
echo "<br />Source du fichier $file :<br /><br />";
echo '<hr>';
highlight_file($file);
echo '<hr>';
}
else {
echo 'Non';
}
}
else {
echo 'Non';
}
}
else {
echo 'Non';
}
}
?>
</body>
</html>