Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- require 'config.php';
- require 'func_content.php';
- if (
- ($_SERVER["REQUEST_URI"] == '/') or
- ($_SERVER["REQUEST_URI"] == '/index') or
- ($_SERVER["REQUEST_URI"] == '/index/') or
- ($_SERVER["REQUEST_URI"] == '/index.php') or
- ($_SERVER["REQUEST_URI"] == '')
- )
- {
- $menu = '/index';
- Content($menu); // получаем $content_from_menu
- }
- elseif ($_SERVER["REQUEST_URI"] == '/reg' or
- $_SERVER["REQUEST_URI"] == '/reg/'
- )
- {
- $content_from_menu = '/reg';
- }
- elseif ($_SERVER["REQUEST_URI"] == '/reg2' or
- $_SERVER["REQUEST_URI"] == '/reg2/'
- )
- {
- $content_from_menu = '/reg2';
- }
- else
- {
- if ($_SERVER["REQUEST_URI"]
- {strlen($_SERVER["REQUEST_URI"])-1} == '/'
- )
- {
- $menu = substr($_SERVER["REQUEST_URI"], 0, -1);
- Content($menu);
- }
- else
- {
- $menu = $_SERVER["REQUEST_URI"];
- Content($menu);
- }
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Scetch</title>
- <link rel="stylesheet" href="http://<?=$_SERVER["SERVER_NAME"]?>/css/style.css">
- </head>
- <body>
- <div id="wrapper">
- <div id="under_header"></div>
- <div id="head"></div>
- <div id="menu">
- <div id="menu_container">
- <ul class="ul_hor_menu">
- <li class="li_first_hor_item"><a href="/">Главная</a></li>
- <li class="li_hor_item"><a href="/gostev">Гостевая</a></li>
- <li class="li_hor_item"><a href="/contacts">Контакты</a></li>
- <li class="li_hor_item"><a href="/reg">Регистрация</a></li>
- <li class="li_hor_item"><a href="/#">Проект1</a></li>
- <li class="li_hor_item"><a href="/#">Проект2</a></li>
- <li class="li_hor_item"><a href="/#">Проект3</a></li>
- <li class="li_hor_item"><a href="/#">Проект4</a></li>
- <li class="li_hor_item"><a href="/#">Проект5</a></li>
- <li class="li_last_hor_item"><a href="#">О нас</a></li>
- </ul>
- </div>
- </div>
- <div id="main">
- <div id="content">
- <?
- if ($content_from_menu == '/reg')
- include 'reg.php';
- elseif ($content_from_menu == '/reg2')
- include 'reg2.php';
- else
- echo $content_from_menu;
- ?>
- </div>
- <div id="left"></div>
- <div id="right"></div>
- </div>
- <div class="clear"></div>
- <div id="for_footer"></div>
- </div>
- <div id="footer"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement