25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
31 $langs->loadLangs(array(
"admin",
"other"));
33 $action =
GETPOST(
'action',
'aZ09');
42 $urldolibarr =
'https://www.dolibarr.org/downloads/';
43 $dolibarrroot = preg_replace(
'/([\\/]+)$/i',
'', DOL_DOCUMENT_ROOT);
44 $dolibarrroot = preg_replace(
'/([^\\/]+)$/i',
'', $dolibarrroot);
45 $dolibarrdataroot = preg_replace(
'/([\\/]+)$/i',
'', DOL_DATA_ROOT);
55 if ($action ==
'getlastversion')
57 $result =
getURLContent(
'https://sourceforge.net/projects/dolibarr/rss');
59 $sfurl = simplexml_load_string($result[
'content']);
67 $wikihelp =
'EN:Installation_-_Upgrade|FR:Installation_-_Mise_à_jour|ES:Instalación_-_Actualización';
74 print $langs->trans(
"CurrentVersion").
' : <strong>'.DOL_VERSION.
'</strong><br>';
76 if (function_exists(
'curl_init'))
78 $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
80 if ($action ==
'getlastversion')
85 while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
87 $title = $sfurl->channel[0]->item[$i]->title;
88 if (preg_match(
'/([0-9]+\.([0-9\.]+))/', $title, $reg))
90 $newversion = $reg[1];
91 $newversionarray = explode(
'.', $newversion);
92 $versionarray = explode(
'.', $version);
94 if (
versioncompare($newversionarray, $versionarray) > 0) $version = $newversion;
100 print $langs->trans(
"LastStableVersion").
' : <b>'.(($version !=
'0.0') ? $version : $langs->trans(
"Unknown")).
'</b><br>';
102 print $langs->trans(
"LastStableVersion").
' : <b>'.$langs->trans(
"UpdateServerOffline").
'</b><br>';
105 print $langs->trans(
"LastStableVersion").
' : <a href="'.
$_SERVER[
"PHP_SELF"].
'?action=getlastversion" class="button">'.$langs->trans(
"Check").
'</a><br>';
113 print $langs->trans(
"Upgrade").
'<br>';
115 print $langs->trans(
"ThisIsProcessToFollow").
'<br>';
116 print
'<b>'.$langs->trans(
"StepNb", 1).
'</b>: ';
117 $fullurl =
'<a href="'.$urldolibarr.
'" target="_blank">'.$urldolibarr.
'</a>';
118 print $langs->trans(
"DownloadPackageFromWebSite", $fullurl).
'<br>';
119 print
'<b>'.$langs->trans(
"StepNb", 2).
'</b>: ';
120 print $langs->trans(
"UnpackPackageInDolibarrRoot", $dolibarrroot).
'<br>';
121 print
'<b>'.$langs->trans(
"StepNb", 3).
'</b>: ';
122 print $langs->trans(
"RemoveLock", $dolibarrdataroot.
'/install.lock').
'<br>';
123 print
'<b>'.$langs->trans(
"StepNb", 4).
'</b>: ';
124 $fullurl =
'<a href="'.DOL_URL_ROOT.
'/install/" target="_blank">'.DOL_URL_ROOT.
'/install/</a>';
125 print $langs->trans(
"CallUpdatePage", $fullurl).
'<br>';
126 print
'<b>'.$langs->trans(
"StepNb", 5).
'</b>: ';
127 print $langs->trans(
"RestoreLock", $dolibarrdataroot.
'/install.lock').
'<br>';
136 print $langs->trans(
"AddExtensionThemeModuleOrOther").
'<br>';
139 print $langs->trans(
"GoModuleSetupArea", DOL_URL_ROOT.
'/admin/modules.php?mode=deploy', $langs->transnoentities(
"Home").
' - '.$langs->transnoentities(
"Setup").
' - '.$langs->transnoentities(
"Modules"));
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getURLContent($url, $postorget= 'GET', $param= '', $followlocation=1, $addheaders=array(), $allowedschemes=array('http', 'https'), $localurl=0)
Function to get a content from an URL (use proxy if proxy defined).
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save"&&empty($cancel)) $wikihelp
View.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays).
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.