Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once $root . '/require/pagelist.php';
- function validatepage() {
- @$page = $_GET['page'];
- if ( $page == NULL ) {
- $page = 'home';
- } else {
- $page = $_GET['page'];
- };
- $do = false;
- for ( $i=0;$i<count($pagelist);$i++ ) {
- if ( $page == $pagelist[$i][0] ) {
- require_once $root . 'page/' . $pagelist[$i][1];
- return $root . 'page/' . $pagelist[$i][1];
- };
- };
- if ( !$do ) {
- echo "La pagina richiesta e' stata considerata non valida";
- return NULL;
- };
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement