האתר שלי בנוי על דרך דומה .. SWICH יש את הSWICH בדף pages.php וגם בדף pages/my/index.php .
בדף הראשון ה pages.php יש את זה ככה :
PHP קוד:
<?php
include ("header.php");
switch($ID) {
case "News":
include ("pages/news/index.php");
break;
case "My":
include ("pages/my/index.php");
break;
}
?>
ובדף pages/my/index.php ששם יש את הבעיות הוא :
PHP קוד:
<?
switch($Page)
{
case "Signupf";
include "signup1.php";
break;
case "Logout";
include "logout.php";
break;
case "Signup";
include "signup.php";
break;
case "edit";
include "details.php";
break;
case "Login";
include "login.php";
}
session_start();
include "config.php";
include "lang/$language";
if(!us_check_security())
{
echo ERORC;
exit;
}
echo 'נכנסתה בהצלחה';
?>
עכשיו..בכל הדפים שהוא עושה ינקלוד יש שם את הפונקציה us_check_security אבל אני חייב שהיא תהיה בכל הדפים האלה .