Example #1
0
function left_infos_1()
{
    $newfrontend = false;
    $users = new usersMenus();
    $sock = new sockets();
    $tpl = new templates();
    $ldap = new clladp();
    if (!$users->AsArticaAdministrator) {
        die("<H2 style='color:red'>permission denied</H2>");
    }
    $page = CurrentPageName();
    $DisablePurchaseInfo = $sock->GET_INFO("DisablePurchaseInfo");
    if (!is_numeric($DisablePurchaseInfo)) {
        $DisablePurchaseInfo = 0;
    }
    if ($DisablePurchaseInfo == 0) {
        echo $tpl->_ENGINE_parse_body(ParagrapheTEXT("technical-support-32.png", '{ARTICA_P_SUPPORT}', '{ARTICA_P_SUPPORT_TEXT}', "javascript:Loadjs('artica.subscription.php');"));
    }
    if (is_file("ressources/logs/status.inform.html")) {
        echo $tpl->_ENGINE_parse_body(@file_get_contents("ressources/logs/status.inform.html"));
    }
    if ($ldap->ldap_password == "secret") {
        echo ParagrapheTEXT("danger32-user-lock.png", '{MANAGER_DEFAULT_PASSWORD}', '{MANAGER_DEFAULT_PASSWORD_TEXT}', "javascript:Loadjs('artica.settings.php?js=yes&bigaccount-interface=yes');", null, 330);
    }
    if (!function_exists("browser_detection")) {
        include dirname(__FILE__) . '/ressources/class.browser.detection.inc';
    }
    $browser = browser_detection();
    if ($browser == "ie") {
        echo ParagrapheTEXT("no-ie-32.png", '{NOIEPLEASE} !!', '{NOIEPLEASE_TEXT}', "javascript:s_PopUp('http://www.mozilla-europe.org/en/firefox/','800',800);", null, 330);
    }
    if ($sock->GET_INFO("EnableNightlyInFrontEnd") == 1) {
        NightlyNotifs();
    }
    if ($users->VMWARE_HOST) {
        if (!$users->VMWARE_TOOLS_INSTALLED) {
            echo ParagrapheTEXT("vmware-logo-48.png", '{INSTALL_VMWARE_TOOLS}', '{INSTALL_VMWARE_TOOLS_TEXT}', "javascript:Loadjs('setup.index.progress.php?product=APP_VMTOOLS&start-install=yes');", null, 330);
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo "{$page} LINE:" . __LINE__ . "\n";
    }
    if ($users->VIRTUALBOX_HOST) {
        if (!$users->APP_VBOXADDINTION_INSTALLED) {
            echo ParagrapheTEXT("virtualbox-48.png", '{INSTALL_VBOX_TOOLS}', '{INSTALL_VBOX_TOOLS_TEXT}', "javascript:Loadjs('setup.index.progress.php?product=APP_VBOXADDITIONS&start-install=yes');", null, 330);
        }
    }
    if ($users->ZARAFA_INSTALLED) {
        $q = new mysql();
        $ctc = $q->COUNT_ROWS("zarafa_orphaned", "artica_backup");
        if ($ctc > 0) {
            echo ParagrapheTEXT("inbox-error-48.png", "{$ctc} {ORPHANED_STORES}", '{ORPHANED_STORES_TEXT}', "javascript:Loadjs('zarafa.orphans.php?js=yes');", null, 330);
        }
    }
}
function OfficialRelease()
{
    $sock = new sockets();
    if (!is_file("ressources/index.ini")) {
        if ($GLOBALS["VERBOSE"]) {
            echo "<span style=color:blue>ressources/index.ini no such file</span><br>\n";
        }
        return;
    }
    $ini = new Bs_IniHandler("ressources/index.ini");
    if (!isset($ini->_params["NEXT"])) {
        $sock->getFrameWork("system.php?refresh-index-ini=yes");
        return;
    }
    $Lastest = trim(strtolower($ini->_params["NEXT"]["artica"]));
    $version = @file_get_contents("VERSION");
    $nightlybin = str_replace('.', '', $Lastest);
    $versionbin = str_replace('.', '', $version);
    if ($GLOBALS["VERBOSE"]) {
        echo "<span style=color:blue>{$nightlybin} = {$versionbin}</span><br>\n";
    }
    if ($versionbin == 0) {
        return;
    }
    if ($nightlybin == 0) {
        NightlyNotifs();
        return;
    }
    if ($nightlybin > $versionbin) {
        $tpl = new templates();
        $html = "<div style='margin-bottom:15px'>" . Paragraphe("download-info-64.png", "{NEW_RELEASE}: {$Lastest}", "{NEW_RELEASE_TEXT}", "javascript:Loadjs('artica.update.php?js=yes')", "go_to_section", 665, 132, 1);
        $html = $tpl->_ENGINE_parse_body($html) . "</div>";
        echo $html;
        return;
    }
    NightlyNotifs();
}
Example #3
0
function status_right(){
	include_once(dirname(__FILE__)."/ressources/class.browser.detection.inc");
	$users=new usersMenus();
	$sock=new sockets();
	$tpl=new templates();
	if(!$users->AsArticaAdministrator){die("<H2 style='color:red'>permission denied</H2>");}
	$page=CurrentPageName();
	$script="\n<script>LoadAjax('left_status','$page?status=left');</script>\n";
	$ldap=new clladp();
	if($GLOBALS["VERBOSE"]){echo "$page LINE:".__LINE__."\n";}
	
	if($ldap->ldap_password=="secret"){
		echo RoundedLightGrey(Paragraphe("danger64-user-lock.png",'{MANAGER_DEFAULT_PASSWORD}','{MANAGER_DEFAULT_PASSWORD_TEXT}',"javascript:Loadjs('artica.settings.php?js=yes&bigaccount-interface=yes');",null,330))."<br>";
	}
	if(!function_exists("browser_detection")){include(dirname(__FILE__).'/ressources/class.browser.detection.inc');}
	$browser=browser_detection();
	
	if($browser=="ie"){
		echo Paragraphe("no-ie-64.png",'{NOIEPLEASE} !!','{NOIEPLEASE_TEXT}',"javascript:s_PopUp('http://www.mozilla-europe.org/en/firefox/','800',800);",null,330)."<br>";
	}
	
	if($sock->GET_INFO("EnableNightlyInFrontEnd")==1){NightlyNotifs();}
	
	if($users->VMWARE_HOST){
		if(!$users->VMWARE_TOOLS_INSTALLED){
			echo RoundedLightGrey(Paragraphe("vmware-logo.png",'{INSTALL_VMWARE_TOOLS}','{INSTALL_VMWARE_TOOLS_TEXT}',
			"javascript:Loadjs('setup.index.progress.php?product=APP_VMTOOLS&start-install=yes');",null,330))."<br>";
		}
	}
	if($GLOBALS["VERBOSE"]){echo "$page LINE:".__LINE__."\n";}
	if($users->VIRTUALBOX_HOST){
		if(!$users->APP_VBOXADDINTION_INSTALLED){
			echo RoundedLightGrey(Paragraphe("virtualbox-64.png",'{INSTALL_VBOX_TOOLS}','{INSTALL_VBOX_TOOLS_TEXT}',
			"javascript:Loadjs('setup.index.progress.php?product=APP_VBOXADDITIONS&start-install=yes');",null,330))."<br>";	
		}
	}
	
	
	$hostname=base64_decode($sock->getFrameWork("network.php?fqdn=yes"));
	$mustchangeHostname=false;
	if(preg_match("#Name or service not known#", $hostname)){$mustchangeHostname=true;}
	if(preg_match("#locahost\.localdomain#", $hostname)){$mustchangeHostname=true;}
	
	writelogs("hostname=$hostname mustchangeHostname=$mustchangeHostname",__FUNCTION__,__FILE__,__LINE__);
	
	
	if($mustchangeHostname){echo "<script>Loadjs('admin.chHostname.php');</script>";}	
	
	
	
	if($users->POSTFIX_INSTALLED){
			if($GLOBALS["VERBOSE"]){echo "$page -> status_postfix() LINE:".__LINE__."\n";}
			echo status_postfix().$script;
			return null;
		}
	
	if($GLOBALS["VERBOSE"]){echo "$page LINE:".__LINE__."\n";}
	$memory="<div id='mem_status_computer'>".$tpl->_ENGINE_parse_body(@file_get_contents("ressources/logs/status.memory.html"))."</div>";	
	
	if($users->SQUID_INSTALLED){
		if($GLOBALS["VERBOSE"]){echo "$page LINE:".__LINE__."\n";}
		echo $memory.status_squid().$script;
		return null;
	}
	
	if($users->SAMBA_INSTALLED){
		echo $memory.StatusSamba().$script;
		return null;	
	}
	echo "$memory$script";
	$sock=new sockets();
	$sock->getFrameWork('cmd.php?ForceRefreshRight=yes');
	}