43 $host=parse_url(NOALYSS_PACKAGE_REPOSITORY,PHP_URL_HOST);
44 $file=$_ENV[
'TMP'].
"/web.xml";
46 if ( file_exists(
$file) ) {
47 $date_time=new \DateTime();
48 $file_tmstamp=filemtime(
$file);
50 $delta=$date_time->getTimestamp() - $file_tmstamp;
53 if (
$delta > self::$time_cache_second ) {
54 $web_repo = file_get_contents(NOALYSS_PACKAGE_REPOSITORY.
"/web.xml");
55 $f_file= fopen(
$file,
"w+");
56 fwrite($f_file,$web_repo);
62 }
elseif( gethostbyname($host) != $host) {
63 $content=file_get_contents(NOALYSS_PACKAGE_REPOSITORY.
"/web.xml");
65 $file=$_ENV[
'TMP'].
"/web.xml";
66 $f_file= fopen(
$file,
"w+");
67 fwrite($f_file,$this->
content->saveXML());
107 if ( $this->
content==
false )
throw new Exception (
"XML INVALIDE [$content]",
EXC_INVALID);
115 $download_dir=NOALYSS_HOME.
"/tmp";
116 if (is_dir($download_dir)&&is_writable($download_dir))
130 if ( $this->
content == NULL ) {
131 throw new Exception(_(
"Problème réseau"),10);
137 echo $this->
content->core->description;
155 if ( $this->
content == NULL ) {
156 throw new Exception(_(
"Problème réseau"),10);
178 if ( $this->
content == NULL ) {
179 throw new Exception(_(
"Problème réseau"),10);
195 if ( $this->
content == NULL ) {
196 throw new Exception(_(
"Problème réseau"),10);
209 throw new Exception(_(
"Modèle non trouvé"),1002);
218 throw new Exception(_(
"Extension non trouvée"), 1001);
236 $dom=
new DomDocument(
'1.0');
global $g_user
if no group available , then stop
else $card content[$j]['j_montant']
for($e=0;$e< $nb_dirscan;$e++) $nb_plugin
Class Package Core to install the core , if possible.
Manage the installation of plug.
connect to NOALYSS_PACKAGE and fetch the file web.xml , it displays content of this file ,...
static setTimeCacheSecond(int $time_cache_second)
find_template($p_code)
return a SimpleXMLElement of the db template thanks its code, it returns NULL if no template is found
can_download()
check that NOALYSS_HOME exists and is writable
setContent($content)
set content
display_noalyss_info()
Get info for Noalyss code : version #, announce, path to the last version.
make_object($p_type, $p_id)
read_package_xml($p_file)
Read xml file from the package.
find_plugin($p_code)
return a SimpleXMLElement of the plugin thanks its code, it returns NULL if no plugin is found
static $time_cache_second
static getTimeCacheSecond()
Show , download and install template database for accountancy from the Package repository.
if( $delta< 0) elseif( $delta==0)
if( $xml==NULL) $a_template