~rem( dont_cache(); cookiename="templeet_download"; include('config.tmpl'); distlist=array(); dist2server=array(); array_list(servers,0,, 'LM', { servername_id=array_fld('key'); server_info=array_fld('current'); tmp=getpackages(server_info,servername_id); if(is_array(tmp), { distlist=array_merge(distlist,tmp); dist2server=array_merge(dist2server,array_fill_keys(array_keys(distlist),servername_id)); }) }); dists=_REQUEST["dists"]; if(is_array(dists), { cookievalue=""; foreach(dists,value,key, if(value!="",cookievalue.=",".key."=".value); ); if(cookievalue!="",cookievalue=substr(cookievalue,1)); setcookie(cookiename,cookievalue,0x7FFFFF00,getconf("dir_installed")); }, { if(isset(_COOKIE[cookiename]), { tmp=explode(",",_COOKIE[cookiename]); foreach(tmp,value, if(value!="", { tmp=explode("=",value); selectsnap[tmp[0]]=tmp[1]; }); ) }) } ) ) ~switch( getget("action")=="makeinstaller", { oneinst=FALSE; foreach(dists,snapshot,distname, { if(preg_match("/^INST_\w\w$/",distname), oneinst=TRUE; ) } ); if(!oneinst, foreach(dist2server,host,distname, { if(preg_match("/^INST_\w\w$/",distname), dists[distname]="st" ) } ) ); outdists=array(); foreach(dists,snapshot,distname, switch( snapshot=="st", { foreach(distlist[distname],value, if(value[2]&1, { outdists[distname]=value[0]; break(); }) ) }, snapshot=="sn", { foreach(distlist[distname],value, if(value[2]&2, { outdists[distname]=value[0]; break(); }) ) }, snapshot=="", { "" }, outdists[distname]=snapshot ); ); res=makeinstaller( array( "nocompress" => !empty(_REQUEST["nocompress"]), "distname" => "makesnapshot", "installername" => "makesnapshot" ), servers,dist2server,outdists ); }, ~if(0, , function makeurl() { packages=[~array_list(distlist,0,,'LS',',','LM', { distname=array_fld('key'); snapshots=array_fld('current'); if(!preg_match("/^INST/",distname), '"~array_fld('key')"' ) })]; url="~getconf("site_url")~absolute_templeet_script()~string(path)?action=makeinstaller"; for(package in packages) { if (document.getElementById("package_"+packages[package]).value!="") { url+="&dists["+packages[package]+"]="+document.getElementById("package_"+packages[package]).value; } } if (document.getElementById("nocompress").checked) url+="&nocompress=1"; document.getElementById("url").value=url; }
~array_list(distlist,0,,'LM', { distname=array_fld('key'); snapshots=array_fld('current'); if(!preg_match("/^INST/",distname), ~rem( laststable=""; lastsnapshot=""; options=array_list(snapshots,0,,'LM', { snapshot=array_fld('current'); if(snapshot[2]&1,laststable=snapshot[0]); if(snapshot[2]&2,lastsnapshot=snapshot[0]); ~if(preg_match("/^\d{12}$/",snapshot[0]), snapshot[0], snapshot[0]." (".snapshot[1].")" ) ]OPTION]> })) ]SERVER]>) })
Package Version
~string(distname)
Pas de compression:
]COREOK]>) ]DEFAULT]>)