PHP Classes

File: includes/serve-assets.php

Recommend this page to a friend!
  Classes of Subin Siby   Lobby   includes/serve-assets.php   Download  
File: includes/serve-assets.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Lobby
Web OS to install and run Web applications
Author: By
Last change: Lobby 1.0 Cobra
Date: 7 years ago
Size: 477 bytes
 

Contents

Class file image Download
<?php
Assets
::$preProcess = function($data, $type){
 
$to_replace = array(
   
"<?L_URL?>" => L_URL,
   
"<?THEME_URL?>" => Request::get("THEME_URL")
  );
  if(isset(
$_GET['APP_URL'])){
   
$to_replace["<?APP_URL?>"] = htmlspecialchars(urldecode($_GET['APP_URL']));
   
$to_replace["<?APP_SRC?>"] = htmlspecialchars(urldecode($_GET['APP_SRC']));
  }
  foreach(
$to_replace as $from => $to){
   
$data = str_replace($from, $to, $data);
  }
  return
$data;
};
Assets::serve();
?>