Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "./content/nav.php";
- include "./content/header.php";
- include "./content/content.php";
- include "./content/helper.php";
- // debug
- ini_set("display_errors", 1);
- error_reporting(E_ALL);
- // output
- function output(&$output)
- {
- echo "$output";
- }
- // main
- function main()
- {
- // öffne html
- $output = "%HTML_START";
- // hole header
- $output = "$output%HEAD_START";
- $output = "$output%HEAD_CONTENT";
- $output = "$output%HEAD_END";
- // öffne body
- $output = "$output%BODY_START";
- // hole overlay
- $output = "$output%OVERLAY";
- // hole nav
- $output = "$output%DESIGNE_NAV";
- $output = "$output%NAV";
- // hole header
- $output = "$output%DESIGNE_HEADER";
- $output = "$output%HEADER";
- // hole content
- $output = "$output%DESIGNE_CONTENT";
- $output = "$output%CONTENT";
- // schliesse body
- $output = "$output%BODY_END";
- // schliesse html
- $output = "$output%HTML_END";
- // work GET
- $nav=-1;
- if(isset($_GET["nav"]))
- {
- $nav = $_GET["nav"];
- }
- // fill variable
- $NAV = get_nav();
- $HEADER = get_header();
- $CONTENT = get_content($nav);
- $DESIGNE_NAV = get_dnav();
- $DESIGNE_HEADER = get_dheader();
- $DESIGNE_CONTENT = get_dcontent();
- //replace main
- $mysearch = array();
- $mysearch[] = "/%HTML_START/";
- $mysearch[] = "/%HEAD_START/";
- $mysearch[] = "/%HEAD_CONTENT/";
- $mysearch[] = "/%HEAD_END/";
- $mysearch[] = "/%BODY_START/";
- $mysearch[] = "/%OVERLAY/";
- $mysearch[] = "/%NAV/";
- $mysearch[] = "/%DESIGNE_NAV/";
- $mysearch[] = "/%HEADER/";
- $mysearch[] = "/%DESIGNE_HEADER/";
- $mysearch[] = "/%CONTENT/";
- $mysearch[] = "/%DESIGNE_CONTENT/";
- $mysearch[] = "/%BODY_END/";
- $mysearch[] = "/%HTML_END/";
- $myreplace = array();
- $myreplace[] = "<html>";
- $myreplace[] = "\n\t<head>";
- $myreplace[] = "\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"designe/designe.css\">";
- $myreplace[] = "\n\t</head>";
- $myreplace[] = "\n\t<body>";
- $myreplace[] = "\n\t\t<div class=\"overlay\">\n\t\t</div>";
- $myreplace[] = "$NAV";
- $myreplace[] = "$DESIGNE_NAV";
- $myreplace[] = "$HEADER";
- $myreplace[] = "$DESIGNE_HEADER";
- $myreplace[] = "$CONTENT";
- $myreplace[] = "$DESIGNE_CONTENT";
- $myreplace[] = "\n\t</body>";
- $myreplace[] = "\n</html>\r\n";
- ksort($mysearch);
- ksort($myreplace);
- $output = preg_replace($mysearch, $myreplace, $output);
- output($output);
- }
- // start script
- main();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement