2015-10-24 39 views
0

我正在一個PHP基地在線論壇真誠地說我從codecanyon我買了腳本仍然是一個新手在PHP索引頁包含$ _GET nd切換案例,這將有助於在導航到其他頁面,但其工作繼續顯示頁面沒有找到。我已經嘗試了所有我可以請我需要你的幫助,感謝名單.....

`<?php 
include("includes/db_config.php");  
include("includes/google_config.php");  
include("includes/functions.php"); 
include("includes/loaders.php");  

//get web settings  
$web = mysql_fetch_array(mysql_query("SELECT * FROM settings ORDER BY id   
DESC LIMIT 1"));  

//update user online time  
if($_SESSION['usern']) {  
$user_id = userinfo($_SESSION['usern'],"id");  
$online_time = time();  
$update = mysql_query("UPDATE users SET online_time='$online_time' WHERE      
id='$user_id'");  
}  

//update forum visits  
update_visits();  

load_header();  
$page = protect($_GET['page']);  

}  

switch($page) {  
case "set_password": include("pages/set_password.php"); break;  
case "chat_content": include("pages/chat_content.php"); break;  
case "chat": include("pages/chat.php"); break; 
case "tag": include("pages/tag.php"); break;  
case "forum_sign_in": include("pages/sign_in.php"); break;  
case "forum_sign_up": include("pages/sign_up.php"); break;  
case "forum_lostpassword": include("pages/lostpassword.php"); break;  
case "forum_profile": include("pages/profile.php"); break;  
case "forum_messages": include("pages/messages.php"); break; 
case "forum_online_users": include("pages/online_users.php"); break;  
case "forum_adpanel": include("pages/adpanel.php"); break;  
case "view_forum": include("pages/view_forum.php"); break;  
case "view_thread": include("pages/view_thread.php"); break;  
case "post_thread": include("pages/post_thread.php"); break; 
case "post_replie": include("pages/post_replie.php"); break; 
case "post_edit": include("pages/post_edit.php"); break; 
case "post_delete": include("pages/post_delete.php"); break; 
case "post_quote": include("pages/post_quote.php"); break; 
case "post_report": include("pages/post_report.php"); break;  
case "userinfo": include("pages/userinfo.php"); break;  
case "search": include("pages/search.php"); break;  
case "read_message": include("pages/read_message.php"); break;  
case "send_message": include("pages/send_message.php"); break;  
case "reply_message": include("pages/reply_message.php"); break;  
case "delete_message": include("pages/delete_message.php"); break;  
case "panel": include("pages/panel.php"); break;  
case "adpanel_func": include("pages/adpanel_func.php"); break;  
case "forum_logout":  
    unset($_SESSION['usern']);  
    session_destroy();  
    session_unset();  
    $redir = $web['forum_url']."sign_in/";  
    header("Location: $redir");  
    break;  
    default: include("pages/home.php");  
    }  
    load_footer();  
    ?>  

回答

0

首先,你必須調試什麼的$ page變量裏面有:

var_dump($page); 

,看看什麼是價值當你點擊那個鏈接。

注意: 我在php標記打開程序前看到一個大括號「`」,刪除它

相關問題