Česky
Kamil Dudka

Web components

File detail

Name:Downloadindex.php [Download]
Location: src > script
Size:484 B
Last modification:2007-12-11 16:09

Source code

<?php
// Load configuration
require_once('../config.php');
$config = Config::instance();
$webRoot = $config->webRoot();
 
// Import ScriptServer class
ClassFactory::importClass('ScriptServer');
 
// Send script to client
if (!ScriptServer::sendScript($_GET['name'])) {
  // Script not found
  header('Content-type: text/html', true, 404);
  ClassFactory::importClass('Redirect');
  Redirect::redirect($webRoot.'/NavigationError-ScriptNotFound', LangSelect::singleton()->getLang());
}
?>