Показать сообщение отдельно
Старый 11.08.2004, 16:44     # 21
IncreMan
Junior Member
 
Аватар для IncreMan
 
Регистрация: 05.04.2002
Адрес: Израиль
Сообщения: 93

IncreMan Путь к славе только начался
Я сделал вот так:
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.
__________________
..:: Deeds Talk Loud Than Words ::..

Последний раз редактировалось IncreMan; 11.08.2004 в 16:50.
IncreMan вне форума