Subversion Repositories ALCASAR

Rev

Rev 2296 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2296 Rev 2297
Line 60... Line 60...
60
	
60
	
61
	$textdir = direction();
61
	$textdir = direction();
62
	$scale_factor = 2;
62
	$scale_factor = 2;
63
	$strLoadbar = "";
63
	$strLoadbar = "";
64
	$uptime = "";
64
	$uptime = "";
65
	$date = exec ("/bin/date");
65
	$date = date('d-m-Y H:i:s');
66
	$cert_ca_expiration_date = exec ("/usr/bin/openssl x509 -noout -in /etc/pki/tls/certs/alcasar.crt -dates|grep After|cut -d\"=\" -f2");
66
	$certificateInfos = openssl_x509_parse(file_get_contents('/etc/pki/tls/certs/alcasar.crt'));
-
 
67
	$certExpirationDate = date('d-m-Y H:i:s', $certificateInfos['validTo_time_t']);
67
	if( $XPath->match( "/phpsysinfo/Vitals/CPULoad" ) )
68
	if( $XPath->match( "/phpsysinfo/Vitals/CPULoad" ) )
68
		$strLoadbar = "<br>" . create_bargraph( $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ), 100, $scale_factor ) . "&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ) . "%";
69
		$strLoadbar = "<br>" . create_bargraph( $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ), 100, $scale_factor ) . "&nbsp;" . $XPath->getData( "/phpsysinfo/Vitals/CPULoad" ) . "%";
69
	
70
	
70
	$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
71
	$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n"
71
		. "  <tr>\n"
72
		. "  <tr>\n"
72
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['hostname'] . "</font></td>\n"
73
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['hostname'] . "</font></td>\n"
73
		. "    <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</font></td>\n"
74
		. "    <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/Hostname" ) . "</font></td>\n"
74
		. "  </tr>\n"
75
		. "  </tr>\n"
75
		. "  <tr>\n"
76
		. "  <tr>\n"
76
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['cert_expiration_date'] . "</font></td>\n"
77
		. "    <td valign=\"top\"><font size=\"-1\">" . $text['cert_expiration_date'] . "</font></td>\n"
77
		. "    <td><font size=\"-1\">" . $cert_ca_expiration_date . "</font></td>\n"
78
		. "    <td><font size=\"-1\">" . $certExpirationDate . "</font></td>\n"
78
		. "  </tr>\n"
79
		. "  </tr>\n"
79
//		. "  <tr>\n"
80
//		. "  <tr>\n"
80
//		. "    <td valign=\"top\"><font size=\"-1\">" . $text['ip'] . "</font></td>\n"
81
//		. "    <td valign=\"top\"><font size=\"-1\">" . $text['ip'] . "</font></td>\n"
81
//		. "    <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/IPAddr" ) . "</font></td>\n"
82
//		. "    <td><font size=\"-1\">" . $XPath->getData( "/phpsysinfo/Vitals/IPAddr" ) . "</font></td>\n"
82
//		. "  </tr>\n"
83
//		. "  </tr>\n"