Gestione JS locali
This commit is contained in:
@@ -701,4 +701,20 @@ function addslashes_array ($value) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
function caricajs () {
|
||||
$script = $_SERVER["PHP_SELF"];
|
||||
$base = $_SERVER["DOCUMENT_ROOT"];
|
||||
$path_parts = pathinfo($script);
|
||||
|
||||
$path = $path_parts['dirname'];
|
||||
$noext = $path_parts['filename'];
|
||||
|
||||
$js = "$path/jsl/$noext.js";
|
||||
$js_test = "$base$path/jsl/$noext.js";
|
||||
|
||||
if (file_exists ($js_test)) {
|
||||
print "\t<script src=\"$js\"></script>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php caricajs() ; ?>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<link rel="stylesheet" type="text/css" href="<?php print $CONF['base_url'] ?>/css/stile.css" />
|
||||
|
||||
Reference in New Issue
Block a user