Don't like ads? PRO users don't see any ads ;-)
Guest

functions.php

By: a guest on May 9th, 2012  |  syntax: PHP  |  size: 0.57 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. namespace Src;
  4.  
  5. use Calendar\Controller\BaseController;
  6.  
  7. global $config;
  8. $config = BaseController::getConfig();
  9.  
  10. function asset($type, $item)
  11. {
  12.         switch($type)
  13.         {
  14.                 case 'img':
  15.                         $r_item = $config['other']['assetPath'] . '/' . $config['other']['tplUsed'] . '/images/' . $item;
  16.                 case 'css':
  17.                         $r_item = $config['other']['assetPath'] . '/' . $config['other']['tplUsed'] . '/style/' . $item;
  18.                 case 'js':
  19.                         $r_item = $config['other']['assetPath'] . '/' . $config['other']['tplUsed'] . '/script/' . $item;
  20.                 default:
  21.                         $r_item = null;
  22.         }
  23.         return $r_item;
  24. }