function render_page($content=null){ $hour=date('h'); $key_cache="CACHEINFOS_STATUSSEVERREDNDER$hour"; if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];} unset($_SESSION["DISTRI"]); include_once('ressources/class.os.system.inc'); include_once("ressources/class.os.system.tools.inc"); if(!isset($_SESSION["DISTRI"])){ $sys=new systeminfos(); writelogs('Loading datas system for session',__FUNCTION__,__FILE__); $distri=$sys->ditribution_name; $kernel=$sys->kernel_version; $LIBC=$sys->libc_version; $temp=$sys->GetCpuTemp(); $users=new usersMenus(); $os=new os_system(); $arraycpu=$os->cpu_info(); $cpuspeed=round(($arraycpu["cpuspeed"]/1000*100)/100,2); $host=$users->hostname; $publicip=@file_get_contents("ressources/logs/web/myIP.conf"); $distri="<table style='width:100%;color:white;font-size:11px'> <tr> <td valign='top' style='font-size:12px'> <strong>{server}</strong>: $host<br><br>{public_ip}: <strong>$publicip</strong><br><strong> {$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz</strong> </td> <td valign='top' style='font-size:12px'> <strong>Artica $users->ARTICA_VERSION $distri kernel $kernel<br>libc $LIBC &Temp $temp C</strong> </td> </tr> </table>"; $_SESSION["DISTRI"]=$distri; }else{ $distri=$_SESSION["DISTRI"]; } $distri_logo="img/serv-mail-linux.png"; if(is_file("img/$users->LinuxDistriCode.png")){$distri_logo="img/$users->LinuxDistriCode.png";} if(is_file("img/$users->LinuxDistriCode.gif")){$distri_logo="img/$users->LinuxDistriCode.gif";} $artica=new artica_general(); $html=" <table style='width:100%;background-color:#005446'> <tr> <td style='background-color:#005447;margin:0px;padding:0px;border:0px'> <table style='width:100%;margin:0px;padding:0px;border:0px'> <tr> <td width=1%> <img src='$distri_logo'> </td> <td valign='top'> <table style='width:100%'> <tr> <td valign='top'><span style='color:white;font-size:18px;font-weight:bold'>{manage_your_server}</td> </tr> <tr> <td valign='top' style='padding-top:3px;border-top:1px dotted white;font-size:11px'> $distri </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr style='margin:0px;padding:0px;border:0px'> <td valign='top' style='background-color:#005446;margin:0px;padding:0px;border:0px'> $content </td> </tr> </table> <table style='width:100%;background-color:white'> <tr> <td width=1%>" . Field_checkbox('ConfigureYourserverStart',1,$artica->ArticaFirstWizard,"OnClick=\"javascript:ConfigureYourserver_Cancel();\"")."</td> <td align='left'>{disable_startup}</td> </tr> </table> "; $_SESSION[$key_cache]=$html; return $html; }
function section_computer_header() { $hour = date('h'); $key_cache = "CACHEINFOS_STATUSSEVERREDNDER{$hour}"; //if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];} unset($_SESSION["DISTRI"]); include_once 'ressources/class.os.system.inc'; include_once "ressources/class.os.system.tools.inc"; $sock = new sockets(); $datas = unserialize($sock->getFrameWork("services.php?dmicode=yes")); $img = "img/server-256.png"; $foundChassis = false; if (is_array($datas)) { $proc_type = $datas["PROC_TYPE"]; $MANUFACTURER = $datas["MANUFACTURER"]; $PRODUCT = $datas["PRODUCT"]; $CHASSIS = $datas["CHASSIS"]; $md5Chassis = md5("{$datas["MANUFACTURER"]}{$datas["CHASSIS"]}{$datas["PRODUCT"]}"); if (is_file("img/vendors/{$md5Chassis}.jpg")) { $img = "img/vendors/{$md5Chassis}.jpg"; $foundChassis = true; } if (is_file("img/vendors/{$md5Chassis}.jpeg")) { $img = "img/vendors/{$md5Chassis}.jpeg"; $foundChassis = true; } if (is_file("img/vendors/{$md5Chassis}.png")) { $img = "img/vendors/{$md5Chassis}.png"; $foundChassis = true; } } if (!$foundChassis) { $chassis_serial = "<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{serial}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$md5Chassis}</td>\n\t\t\t\t</tr>"; } if (!isset($_SESSION["DISTRI"])) { $sys = new systeminfos(); writelogs('Loading datas system for session', __FUNCTION__, __FILE__); $distri = $sys->ditribution_name; $kernel = $sys->kernel_version; $LIBC = $sys->libc_version; $temp = $sys->GetCpuTemp(); $users = new usersMenus(); $os = new os_system(); $arraycpu = $os->cpu_info(); $cpuspeed = round($arraycpu["cpuspeed"] / 1000 * 100 / 100, 2); $host = $users->hostname; $publicip = @file_get_contents("ressources/logs/web/myIP.conf"); $distri_logo = "img/serv-mail-linux.png"; if (is_file("img/{$users->LinuxDistriCode}.png")) { $distri_logo = "img/{$users->LinuxDistriCode}.png"; } if (is_file("img/{$users->LinuxDistriCode}.gif")) { $distri_logo = "img/{$users->LinuxDistriCode}.gif"; } $distri = "\n\t<center>\n\t\n\t\n\t<table style='width:100%;color:black;' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2 align=center><img src='{$img}'></td>\n\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{server}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$host}</strong><br><strong>{$MANUFACTURER} {$PRODUCT} {$CHASSIS}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{public_ip}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$publicip}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{processors}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz<br>{$proc_type}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>Artica:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$users->ARTICA_VERSION}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t<td valign='top' style='font-size:12px'><img src='{$distri_logo}'></td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$distri}<br>kernel {$kernel}\n\t\t\t\t\t<br>libc {$LIBC}<br>Temp {$temp} C</strong>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t{$chassis_serial}\n\t\t\t</table>\n</center>"; $_SESSION["DISTRI"] = $distri; } else { $distri = $_SESSION["DISTRI"]; } $html = "{$distri}"; $_SESSION[$key_cache] = $html; return $html; }
function section_computer_header() { if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) { return null; } $hour = date('h'); $key_cache = "CACHEINFOS_STATUSSEVERREDNDER{$hour}"; $page = CurrentPageName(); //if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];} unset($_SESSION["DISTRI"]); include_once 'ressources/class.os.system.inc'; include_once "ressources/class.os.system.tools.inc"; $sock = new sockets(); $datas = unserialize($sock->getFrameWork("services.php?dmicode=yes")); $img = "img/server-256.png"; $foundChassis = false; if (is_array($datas)) { $proc_type = $datas["PROC_TYPE"]; $MANUFACTURER = $datas["MANUFACTURER"]; $PRODUCT = $datas["PRODUCT"]; $CHASSIS = $datas["CHASSIS"]; $md5Chassis = md5("{$datas["MANUFACTURER"]}{$datas["CHASSIS"]}{$datas["PRODUCT"]}"); if (is_file("img/vendors/{$md5Chassis}.jpg")) { $img = "img/vendors/{$md5Chassis}.jpg"; $foundChassis = true; } if (is_file("img/vendors/{$md5Chassis}.jpeg")) { $img = "img/vendors/{$md5Chassis}.jpeg"; $foundChassis = true; } if (is_file("img/vendors/{$md5Chassis}.png")) { $img = "img/vendors/{$md5Chassis}.png"; $foundChassis = true; } } if (!$foundChassis) { $chassis_serial = "<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{serial}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$md5Chassis}</td>\n\t\t\t\t</tr>"; } if (!isset($_SESSION["DISTRI"])) { $sys = new systeminfos(); writelogs('Loading datas system for session', __FUNCTION__, __FILE__); $distri = $sys->ditribution_name; $kernel = $sys->kernel_version; $LIBC = $sys->libc_version; $temp = $sys->GetCpuTemp(); $users = new usersMenus(); $os = new os_system(); $arraycpu = $os->cpu_info(); $cpuspeed = round($arraycpu["cpuspeed"] / 1000 * 100 / 100, 2); $host = $users->hostname; $publicip = @file_get_contents("ressources/logs/web/myIP.conf"); $distri_logo = "img/serv-mail-linux.png"; if (is_file("img/{$users->LinuxDistriCode}.png")) { $distri_logo = "img/{$users->LinuxDistriCode}.png"; } if (is_file("img/{$users->LinuxDistriCode}.gif")) { $distri_logo = "img/{$users->LinuxDistriCode}.gif"; } if (preg_match("#Broken pipevmware#i", $MANUFACTURER)) { $MANUFACTURER = "VMWare"; } if (preg_match("#Broken pipevmware#i", $PRODUCT)) { $PRODUCT = "VMWare"; } if (preg_match("#Broken pipevmware#i", $CHASSIS)) { $CHASSIS = "VMWare"; } if ($MANUFACTURER != null) { $tr[] = $MANUFACTURER; } if ($PRODUCT != null) { $tr[] = $PRODUCT; } if ($CHASSIS != null) { $tr[] = $CHASSIS; } if (count($tr) > 0) { $LINEMANU = @implode(", ", $tr); } if ($publicip == null) { $publicip = "x.x.x.x"; } $distri = "\n\t<center>\n\t\n\t\n\t<table style='width:99%;color:black;' class=form>\n\t\t<tr>\n\t\t\t<td colspan=2 align=center><img src='{$img}'></td>\n\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend nowrap>{server}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong id='squidcklinks-host-infos'></strong>\n\t\t\t\t\t\t<div><i style='font-weight:bold;font-size:11px'>{$LINEMANU}</i></div></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend nowrap>{public_ip}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><a href=\"javascript:RefreshMyIP()\" style='font-size:12px;text-decoration:underline;font-weight:bold' id='RefreshMyIP-span'>{$publicip}</a></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>{processors}:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz<br>{$proc_type}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' style='font-size:12px' class=legend>Artica:</td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$users->ARTICA_VERSION}</strong></td>\n\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t<td valign='top' style='font-size:12px'><img src='{$distri_logo}'></td>\n\t\t\t\t\t<td valign='top' style='font-size:12px'><strong>{$distri}<br>kernel {$kernel}\n\t\t\t\t\t<br>libc {$LIBC}<br>Temp {$temp} C</strong>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t{$chassis_serial}\n\t\t\t</table>\n</center>\n<script>\n\tUnlockPage();\n\tLoadAjaxTiny('squidcklinks-host-infos','{$page}?squidcklinks-host-infos=yes');\n\tfunction RefreshMyIP(){\n\t\tLoadAjaxTiny('RefreshMyIP-span','{$page}?RefreshMyIp=yes');\n\t}\n\t\n</script>\n\t\n\n\n"; $tpl = new templates(); $distri = $tpl->_ENGINE_parse_body($distri); $_SESSION["DISTRI"] = $distri; } else { $distri = $_SESSION["DISTRI"]; } $html = "{$distri}"; $_SESSION[$key_cache] = $html; SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html); echo $html; }
function section_computer_header(){ if(GET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__)){return null;} $hour=date('h'); $key_cache="CACHEINFOS_STATUSSEVERREDNDER$hour"; $page=CurrentPageName(); //if(isset($_SESSION[$key_cache])){return $_SESSION[$key_cache];} unset($_SESSION["DISTRI"]); include_once('ressources/class.os.system.inc'); include_once("ressources/class.os.system.tools.inc"); $sock=new sockets(); $datas=unserialize($sock->getFrameWork("services.php?dmicode=yes")); $img="img/server-256.png"; $foundChassis=false; if(is_array($datas)){ $proc_type=$datas["PROC_TYPE"]; $MANUFACTURER =$datas["MANUFACTURER"]; $PRODUCT=$datas["PRODUCT"]; $CHASSIS=$datas["CHASSIS"]; $md5Chassis=md5("{$datas["MANUFACTURER"]}{$datas["CHASSIS"]}{$datas["PRODUCT"]}"); if(is_file("img/vendors/$md5Chassis.jpg")){$img="img/vendors/$md5Chassis.jpg";$foundChassis=true;} if(is_file("img/vendors/$md5Chassis.jpeg")){$img="img/vendors/$md5Chassis.jpeg";$foundChassis=true;} if(is_file("img/vendors/$md5Chassis.png")){$img="img/vendors/$md5Chassis.png";$foundChassis=true;} } if(!$foundChassis){ $chassis_serial="<tr> <td valign='top' style='font-size:12px' class=legend>{serial}:</td> <td valign='top' style='font-size:12px'><strong>$md5Chassis</td> </tr>"; } if(!isset($_SESSION["DISTRI"])){ $sys=new systeminfos(); writelogs('Loading datas system for session',__FUNCTION__,__FILE__); $distri=$sys->ditribution_name; $kernel=$sys->kernel_version; $LIBC=$sys->libc_version; $temp=$sys->GetCpuTemp(); $users=new usersMenus(); $os=new os_system(); $arraycpu=$os->cpu_info(); $cpuspeed=round(($arraycpu["cpuspeed"]/1000*100)/100,2); $host=$users->hostname; $publicip=@file_get_contents("ressources/logs/web/myIP.conf"); $distri_logo="img/serv-mail-linux.png"; if(is_file("img/$users->LinuxDistriCode.png")){$distri_logo="img/$users->LinuxDistriCode.png";} if(is_file("img/$users->LinuxDistriCode.gif")){$distri_logo="img/$users->LinuxDistriCode.gif";} if(preg_match("#Broken pipevmware#i", $MANUFACTURER)){$MANUFACTURER="VMWare";} if(preg_match("#Broken pipevmware#i", $PRODUCT)){$PRODUCT="VMWare";} if(preg_match("#Broken pipevmware#i", $CHASSIS)){$CHASSIS="VMWare";} $distri=" <center> <table style='width:99%;color:black;' class=form> <tr> <td colspan=2 align=center><img src='$img'></td> </tr> <tr> <td valign='top' style='font-size:12px' class=legend>{server}:</td> <td valign='top' style='font-size:12px'><strong id='squidcklinks-host-infos'></strong><strong>$MANUFACTURER, $PRODUCT, $CHASSIS</td> </tr> <tr> <td valign='top' style='font-size:12px' class=legend>{public_ip}:</td> <td valign='top' style='font-size:12px'><strong>$publicip</strong></td> </tr> <tr> <td valign='top' style='font-size:12px' class=legend>{processors}:</td> <td valign='top' style='font-size:12px'><strong>{$arraycpu["cpus"]} cpu(s):{$cpuspeed}GHz<br>$proc_type</strong></td> </tr> <tr> <td valign='top' style='font-size:12px' class=legend>Artica:</td> <td valign='top' style='font-size:12px'><strong>$users->ARTICA_VERSION</strong></td> </tr> <td valign='top' style='font-size:12px'><img src='$distri_logo'></td> <td valign='top' style='font-size:12px'><strong>$distri<br>kernel $kernel <br>libc $LIBC<br>Temp $temp C</strong> </td> </tr> $chassis_serial </table> </center> <script> LoadAjaxTiny('squidcklinks-host-infos','$page?squidcklinks-host-infos=yes'); </script> "; $tpl=new templates(); $distri=$tpl->_ENGINE_parse_body($distri); $_SESSION["DISTRI"]=$distri;}else{$distri=$_SESSION["DISTRI"];} $html="$distri"; $_SESSION[$key_cache]=$html; SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html); echo $html; }