I use something similar.
I recommend cleaning the $_GET value...
below the
PHP Code:
require_once('./global.php');
add
PHP Code:
$vbulletin->input->clean_gpc('r', 'reqpage', TYPE_NOHTML);
You should also...
- clean the $_GET value before adding it to $globaltemplates array (just in case)
- check if template does exist ... if it doesn't exist redirect to front page or error page (eg. someone could have copied the url wrong)