Пример #1
0
 protected function Validate_Icon($String)
 {
     die(__FUNCTION__);
     /* Validate String has been Provided */
     if (!is_string($String)) {
         return $this->WMS_Error('validate_,NoString');
     }
     /* Validate String is not empty*/
     if ($String == '') {
         return $this->WMS_Error('validate_,EmptyString');
     }
     /* Validate Link using regex */
     if (preg_match($this->Regex['Validate_Icon'], $String) != 1) {
         return implode('', $this->WMS_Error('Validate_Icon(),PregString'));
     }
     $String = '.' . substr($String, 3) . ':before';
     $CSS = $this->Root . $this->WMS['Folder_CSS'] . 'fonts/';
     foreach (DynamicLoader($CSS, '.css', true) as $File) {
         if (strpos($File, 'fontawesome-webfont') !== false) {
             if ($this->HTML_CSS_Write($File) !== false) {
                 $F = file_get_contents($File);
                 if (strpos($F, $String) !== false) {
                     return 'OK';
                 }
             }
         }
     }
     return $this->WMS_Error('Validate_Icon(),IconNotFound');
 }
Пример #2
0
// Load WMS Load functions
require_once WMS_LIB . 'functions/endswith.php';
require_once WMS_LIB . 'functions/startswith.php';
require_once WMS_LIB . 'functions/dynamicloader.php';
// Start the Object + Callbacks
require_once WMS_LIB . 'functions/callback_wms.php';
ob_start("callback_wms");
// Loads Functions
foreach (DynamicLoader(WMS_LIB . 'functions/', '.php', true) as $File) {
    require_once $File;
}
// Loads Extensions
foreach (DynamicLoader(WMS_LIB . 'extensions/', '.php', false) as $File) {
    require_once $File;
}
// Loads Class Componenets
foreach (DynamicLoader(WMS_LIB . 'classes/components/', '.php', false) as $File) {
    require_once $File;
}
// Loads Plugins
foreach (DynamicLoader(WMS_LIB . 'components/', '.php', false) as $File) {
    require_once $File;
}
function autoloader_wms_classes($class)
{
    include WMS_LIB . 'classes/' . $class . '.php';
}
spl_autoload_register('autoloader_wms_classes');
// Loads classes
require_once WMS_LIB . 'classes/wms.php';
$WMS = new WMS();
Пример #3
0
 /**
  * The HTML Default Javascript Template Loader
  *
  * @version 1
  * @author Rick de Man <*****@*****.**>
  *
  * @param string $S
  *        	The offset of the line, spaces and or tabs
  * @param string $WmsElement
  *        	The complete wms:include element
  * @param array $Attributes
  *        	The element tag attributes
  * @return string The HTML Output
  */
 private function HTML_JsTemplate($S, $WmsElement, $Attributes)
 {
     // Create the Result variable
     $Result = '';
     // Load template files
     $Files = DynamicLoader(WMS_ROOT . 'assets/templates/' . $this->Template . '/js/', 'js', true);
     // Make sue there are files
     if (count($Files) > 0) {
         $Result .= '<!-- JS Template -->' . EOL;
         // Creating all HTML5 CSS tags
         foreach ($Files as $File) {
             // Loads the CSS Tag
             $Tag = $this->HTML_CreateElement('JS', $File);
             // Only Generate valid Tags
             if ($Tag !== False) {
                 $Result .= $Tag . EOL;
             }
         }
     }
     // Return processed HTML string
     return $Result;
 }