Subversion Repositories ALCASAR

Rev

Rev 783 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 783 Rev 830
Line 17... Line 17...
17
 *   along with this program; if not, write to the                         *
17
 *   along with this program; if not, write to the                         *
18
 *   Free Software Foundation, Inc.,                                       *
18
 *   Free Software Foundation, Inc.,                                       *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20
 ***************************************************************************/
20
 ***************************************************************************/
21
 
21
 
22
// $Id: portail.php 783 2011-12-17 14:24:08Z richard $
22
// $Id: portail.php 830 2012-03-03 17:26:04Z richard $
23
 
23
 
24
// xml_utilisateur()
24
// xml_utilisateur()
25
 
25
 
26
function request ($texte) {
26
function request ($texte) {
27
		$strResult = 0;
27
		$strResult = 0;
Line 56... Line 56...
56
	return $_text;
56
	return $_text;
57
} 
57
} 
58
// Fonction de test de connectivité internet
58
// Fonction de test de connectivité internet
59
function internetTest(){
59
function internetTest(){
60
        $host = "www.google.com";  # Google Test
60
        $host = "www.google.com";  # Google Test
61
        $host2 = "www.alcasar.info";
61
        $host2 = "www.alcasar.net";
62
        $port = "80";
62
        $port = "80";
63
        //var $num;     //non utilisé
63
        //var $num;     //non utilisé
64
        //var $error;   //non utilisé
64
        //var $error;   //non utilisé
65
	$sock = fsockopen($host, $port, $num, $error, 2);
65
	$sock = fsockopen($host, $port, $num, $error, 2);
66
	if (!$sock){
66
	if (!$sock){
Line 120... Line 120...
120
	if (filtrageTest("/etc/dansguardian/dansguardian.conf","/^proxyport = 8090/")){
120
	if (filtrageTest("/etc/dansguardian/dansguardian.conf","/^proxyport = 8090/")){
121
		$web_antivir_status = $text['enable'];}
121
		$web_antivir_status = $text['enable'];}
122
	else {	$web_antivir_status = $text['disable'];}
122
	else {	$web_antivir_status = $text['disable'];}
123
	if ((filtrageTest("/var/www/html/index.php","/network_pb = False/")) && (internetTest())){
123
	if ((filtrageTest("/var/www/html/index.php","/network_pb = False/")) && (internetTest())){
124
		$internet_status =  "<img src='/images/state_ok.gif'>".$text['enable'];
124
		$internet_status =  "<img src='/images/state_ok.gif'>".$text['enable'];
125
		$version = dns_get_record("version.alcasar.info",DNS_TXT);
125
		$version = dns_get_record("version.alcasar.net",DNS_TXT);
126
		$AVAILABLEDVERSION = $version[0]['txt'];
126
		$AVAILABLEDVERSION = $version[0]['txt'];
127
	} else {
127
	} else {
128
		$internet_status =  "<img src='/images/state_error.gif'>".$text['disable'];
128
		$internet_status =  "<img src='/images/state_error.gif'>".$text['disable'];
129
		$AVAILABLEDVERSION = "-";
129
		$AVAILABLEDVERSION = "-";
130
	}
130
	}