- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
<? $page = $_REQUEST['page'];
switch ($page) {
case news:
include "./pages/news.php";
break;
case about:
include "./pages/about.php";
break;
case about_1:
include "./pages/about_1.php";
break;
case about_2:
include "./pages/about_2.php";
break;
case about_3:
include "./pages/about_3.php";
break;
case how:
include "./pages/how.php";
break;
case admission:
include "./pages/admission.php";
break;
case admission2009:
include "./pages/admission2009.php";
break;
case admission2009_1:
include "./pages/admission2009_1.php";
break;
case admission2009_2:
include "./pages/admission2009_2.php";
break;
case admission2009_3:
include "./pages/admission2009_3.php";
break;
case admission2009_4:
include "./pages/admission2009_4.php";
break;
case admission2009_5:
include "./pages/admission2009_5.php";
break;
case admission2009_6:
include "./pages/admission2009_6.php";
break;
case admission2009_7:
include "./pages/admission2009_7.php";
break;
case admission2009_8:
include "./pages/admission2009_8.php";
break;
case admission2009_10:
include "./pages/admission2009_10.php";
break;
case admission2009_11:
include "./pages/admission2009_11.php";
break;
case programme:
include "./pages/programme.php";
break;
case programme_1:
include "./pages/programme_1.php";
break;
case programme_2:
include "./pages/programme_2.php";
break;
case programme_3:
include "./pages/programme_3.php";
break;
case vacancy:
include "./pages/vacancy.php";
break;
case donation:
include "./pages/donation.php";
break;
case profile:
include "./profile/index.php";
break;
case guestbook:
echo "<div class='GBlock'>";
echo "<h1>Гостевая книга</h1>";
include "./guestbook/index.php";
echo "</div>";
$pagename="Гостевая книга";
break;
case links:
include "./pages/links.php";
break;
case contacts:
include "./pages/contacts.php";
break;
case upload:
include "./profile/upload.php";
break;
default:
include "./pages/404.php";
break;
} ?>
guest 02.10.2009 23:02 # +1
guest 03.10.2009 11:38 # +0.8
guest 04.10.2009 16:06 # +0.8
if (is_file('./pages/'.$page.'.php'))
include "./pages/'.$page.'.php';
(это примерно)
guest 04.10.2009 20:30 # −0.8
$pages = array('about', 'about_2', ...);
if(in_array($pages, $page)){
...
}
guest 16.04.2010 15:34 # 0
iGorash 02.10.2009 23:11 # +4
RewriteRule ^/$ index.php?page=news
RewriteRule ^newsarchive$ index.php?page=newsarchive
RewriteRule ^newsarchive/$ index.php?page=newsarchive
RewriteRule ^crew$ index.php?page=crew
RewriteRule ^crew/$ index.php?page=crew
RewriteRule ^about/1$ index.php?page=about_1
RewriteRule ^about/1/$ index.php?page=about_1
RewriteRule ^about/1$ index.php?page=about_2
RewriteRule ^about/2/$ index.php?page=about_2
RewriteRule ^about/3$ index.php?page=about_3
RewriteRule ^about/3/$ index.php?page=about_3
...
RewriteRule ^profile/upload/$ index.php?page=upload
Легко видеть сколько всего нужно сделать чтобы добавить на сайт 1 (одну) страничку
gorky 03.10.2009 09:15 # +3
Wry 05.10.2009 13:06 # 0
Holden 06.10.2009 09:55 # 0