What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » /?id=home

/?id=home
Author: Message:
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: /?id=home
I use to have something similar to the if/else..
code:
//Page system

if(!isset($_GET['page']))
    {include('index.htm');}

elseif($_GET['page'] == "home"){include('index.htm');}
elseif($_GET['page'] == "news"){include('news.htm');}

//msn pages
elseif($_GET['page'] == "msn"){
    if(!isset($_GET['ver']))
    {include('msn.htm');}
      elseif($_GET['ver'] == "8")
    {include('msn/wlm.htm'); }
    elseif($_GET['ver'] == "7.5")
    {include('msn/7.5.htm'); }
    else{include "error.php";}
    }
       
elseif($_GET['page'] == "desktop"){include('desktop.htm');}
elseif($_GET['page'] == "downloads"){include('downloads.htm');}
elseif($_GET['page'] == "info"){include('info.php');}

elseif($_GET['page'] == "contact"){include('contact.htm');}
elseif($_GET['page'] == "contacted"){include('contact.php');}
elseif($_GET['page'] == "projects"){include('projects.htm');}

//w2m sec
elseif($_GET['page'] == "w2m"){
    if(!isset($_GET['sec']))
    {include('w2m/index.php');}
    elseif($_GET['sec'] == "start")
    {include('w2m/start.php'); }
    elseif($_GET['sec'] == "tut")
    {include('w2m/tut.php');}
   
    else{include "error.php";}
    }
   
//wdp sec
elseif($_GET['page'] == "wdp"){
    if(!isset($_GET['sec']))
    {include('wdp/dynamic.php');}
    elseif($_GET['sec'] == "dynamic")
    else{include "error.php";}
    }

else{include "error.php";}

But then I got too many pages so i changed it to switch/case:

code:
if(!isset($_GET['page'])) {include "index.htm";}
elseif($_GET['page'] == "msn" && !isset($_GET['ver'])) {include "msn.htm";}
elseif($_GET['page'] == "w2m" && !isset($_GET['sec'])) {include "w2m/index.php";}
elseif($_GET['page'] == "wdp" && !isset($_GET['sec'])) {include "wdp/dynamic.php";}
elseif($_GET['page'] == "projects" && !isset($_GET['id'])) {include "projects.htm";}
else {
switch ($_GET['page']) {
               
    case "home":
        include "index.htm"; break;
    case "news":
        include "news.htm"; break;
    case "desktop":
        include "desktop.htm"; break;
    case "comics":
        include "comics.htm"; break;
    case "downloads":
        include "downloads.htm"; break;
    case "contact":
        include "contact.htm"; break;
    case "info":
        include "info.php"; break;
    case "wdp":
        switch($_GET['page'] == "wdp" && @$_GET['sec']) {
        case "dyimg":
            include "wdp/dyimg.php"; break;
        case "dynamic":
            include "wdp/dynamic.php"; break; }
}
}

These are not all the pages, itll take too much space

This post was edited on 12-21-2005 at 02:39 PM by hmaster.
[Image: sig.png]
12-21-2005 02:39 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
/?id=home - by stoshrocket on 12-20-2005 at 10:54 PM
RE: /?id=home - by ShawnZ on 12-20-2005 at 10:58 PM
RE: /?id=home - by CookieRevised on 12-20-2005 at 11:12 PM
RE: /?id=home - by ShawnZ on 12-20-2005 at 11:59 PM
RE: /?id=home - by CookieRevised on 12-21-2005 at 12:10 AM
RE: /?id=home - by ShawnZ on 12-21-2005 at 12:22 AM
RE: /?id=home - by surfichris on 12-21-2005 at 12:23 AM
RE: RE: /?id=home - by CookieRevised on 12-21-2005 at 12:35 AM
RE: /?id=home - by ShawnZ on 12-21-2005 at 12:36 AM
RE: /?id=home - by surfichris on 12-21-2005 at 12:40 AM
RE: /?id=home - by CookieRevised on 12-21-2005 at 12:55 AM
RE: /?id=home - by rav0 on 12-21-2005 at 08:35 AM
RE: /?id=home - by Stigmata on 12-21-2005 at 09:50 AM
RE: /?id=home - by absorbation on 12-21-2005 at 02:12 PM
RE: /?id=home - by hmaster on 12-21-2005 at 02:39 PM
RE: /?id=home - by stoshrocket on 12-21-2005 at 03:32 PM
RE: /?id=home - by absorbation on 12-21-2005 at 03:36 PM
RE: /?id=home - by stoshrocket on 12-21-2005 at 03:40 PM
RE: /?id=home - by -dt- on 12-21-2005 at 03:54 PM
RE: /?id=home - by stoshrocket on 12-21-2005 at 09:15 PM
RE: /?id=home - by absorbation on 12-21-2005 at 09:19 PM
RE: /?id=home - by stoshrocket on 12-21-2005 at 09:22 PM
RE: /?id=home - by absorbation on 12-21-2005 at 09:24 PM
RE: /?id=home - by stoshrocket on 12-21-2005 at 09:29 PM
RE: /?id=home - by absorbation on 12-21-2005 at 09:31 PM
RE: /?id=home - by stoshrocket on 12-21-2005 at 09:34 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On