Gestione JS locali
This commit is contained in:
@@ -701,4 +701,20 @@ function addslashes_array ($value) {
|
|||||||
return $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>
|
</script>
|
||||||
|
|
||||||
|
<?php caricajs() ; ?>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<link rel="stylesheet" type="text/css" href="<?php print $CONF['base_url'] ?>/css/stile.css" />
|
<link rel="stylesheet" type="text/css" href="<?php print $CONF['base_url'] ?>/css/stile.css" />
|
||||||
|
|||||||
Reference in New Issue
Block a user