27 lines
509 B
PHP
27 lines
509 B
PHP
|
<?php
|
||
|
|
||
|
namespace Vn\Hedera;
|
||
|
|
||
|
class Js
|
||
|
{
|
||
|
static function includeFile ($fileName)
|
||
|
{
|
||
|
echo '<script type="text/javascript" src="'.$fileName.'?'. $_SESSION['version'] .'"></script>'."\n\t";
|
||
|
}
|
||
|
|
||
|
static function includeLib ($libName)
|
||
|
{
|
||
|
$args = func_get_args ();
|
||
|
|
||
|
$localeJs = 'locale/'. $_SESSION['lang'] .'/js/'. $libName .'.js';
|
||
|
|
||
|
if (file_exists ($localeJs))
|
||
|
self::includeFile ($localeJs);
|
||
|
|
||
|
for ($i = 1; $i < count ($args); $i++)
|
||
|
self::includeFile ('js/'.$libName.'/'.$args[$i].'.js');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|