Я сделал вот так:
PHP код:
<?php
include("menu.htm");
echo "<br>";
if ((isset($_GET["ID"])) and ($_GET["ID"] != "")) {
$res = $_GET["ID"];
$links = array("main","read","became_healthy","lose_weight","became_beauty","check_yourself","take_rest","stories","write_me");
if (in_array($res, $links)) {
if ((isset($_GET["user"])) and ($_GET["user"] != "")) {
if (($res=="main") or ($res=="write_me")) {
$getuser = $_GET["user"];
include ("$getuser/$res.htm");
}
}
else include("$res.htm");
}
else include("main.htm");
}
else include("main.htm");
?>
Правда остался один недочёт, если придти на
index.php?user=vasya без ID, то он приходит в main не юзера Вася, а в main который
index.php?ID=main.