Пример #1
0
 public static function get_design()
 {
     if (!empty(self::$design)) {
         return self::$design;
     }
     $design = '';
     if (file_exists('include/designs/' . $_SESSION['authgfx'] . '/index.htm')) {
         $design = $_SESSION['authgfx'];
     } elseif (file_exists('include/designs/ilchClan/index.htm')) {
         $design = 'ilchClan';
     } else {
         $od = opendir('include/designs');
         while ($f = readdir($od)) {
             if (file_exists('include/designs/' . $f . '/index.htm')) {
                 $design = $f;
                 break;
             }
         }
         closedir($od);
     }
     if (empty($design)) {
         echo 'ERROR: No Design was found';
     }
     self::$design = $design;
     return $design;
 }