Migration SVN
This commit is contained in:
22
system/api/api.php
Executable file
22
system/api/api.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @function __autoload
|
||||
* @brief Autoload an API when it is called
|
||||
*/
|
||||
function __autoload ($api_name)
|
||||
{
|
||||
require_once(PATH_API.strtolower($api_name).'.api.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* @function redirect()
|
||||
* @brief Redirect and stop execution
|
||||
* @param url -> name of module to redirect (not an url)
|
||||
*/
|
||||
function redirect($url)
|
||||
{
|
||||
header('Location: '.TPL_HOST.$url);
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user