Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1.  
  2. class ASTemplate {
  3.  
  4.  
  5.  
  6.     public function getStyleSheet($styleName = '', $stylesheet = '') {
  7.  
  8.         $templatePath = "template/" . $styleName . "/stylesheet/" . $stylesheet . ".css";
  9.  
  10.        
  11.  
  12.         switch (file_exists($templatePath)) {
  13.  
  14.        
  15.  
  16.             case (true):
  17.  
  18.                 echo $templatePath;
  19.  
  20.                 break;
  21.  
  22.                
  23.  
  24.             case (false):
  25.  
  26.                 die ("Cannot locate the Template.");
  27.  
  28.                 break;
  29.  
  30.             }
  31.  
  32.         }
  33.  
  34.        
  35.  
  36.     public function getImagePath($styleName = '') {
  37.  
  38.         $stylePath = "template/" . $styleName . "/images/";
  39.  
  40.        
  41.  
  42.         switch (file_exists($stylePath)) {
  43.  
  44.        
  45.  
  46.             case (true):
  47.  
  48.                 echo $stylePath;
  49.  
  50.                 break;
  51.  
  52.                
  53.  
  54.             case (false):
  55.  
  56.                 die ("Cannot locate the Style Path.");
  57.  
  58.                 break;
  59.  
  60.             }
  61.  
  62.         }
  63.  
  64.  
  65.  
  66.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement