140 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			140 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
	// Desactiver le rapport d'erreurs
 | 
						|
	error_reporting(0);
 | 
						|
 | 
						|
// 	$tableau_connectivite = (file("http://marvin.fritalk.com/status.php?jid=blankoworld@jabber.dk&iconset=stellar"));
 | 
						|
// 	
 | 
						|
// 	$decoupage_src = explode("src=", $tableau_connectivite[1]);
 | 
						|
// 	$decoupage_guillemet = explode('"', $decoupage_src[1]);
 | 
						|
// 	
 | 
						|
// 	$adresse_icone = $decoupage_guillemet[1];
 | 
						|
// 	
 | 
						|
// 	$information_adresse = pathinfo($adresse_icone);
 | 
						|
// 	
 | 
						|
// 	$fichier = $information_adresse['basename'];
 | 
						|
// 	
 | 
						|
// 	$extension = explode(".", $fichier);
 | 
						|
// 	
 | 
						|
// 	// available = dispo = disponible
 | 
						|
// 	// dnd = occ = occupe
 | 
						|
// 	// away = abs = absent
 | 
						|
// 	// xa = nondispo = non disponible
 | 
						|
// 	// unvailable = deco = deconnecte (ou apparaitre hors ligne)
 | 
						|
// 	// chat = chat = libre pour discuter
 | 
						|
// 	if($fichier == 'available.png')
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'dispo.png';
 | 
						|
// 		$etat = 'disponible';
 | 
						|
// 	}
 | 
						|
// 	
 | 
						|
// 	elseif($fichier == 'dnd.png')
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'occ.png';
 | 
						|
// 		$etat = 'occupee';
 | 
						|
// 	}
 | 
						|
// 	
 | 
						|
// 	elseif($fichier == 'away.png')
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'abs.png';
 | 
						|
// 		$etat = 'absente';
 | 
						|
// 	}
 | 
						|
// 	
 | 
						|
// 	elseif($fichier == 'xa.png')
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'nondispo.png';
 | 
						|
// 		$etat = 'connectee, mais indisponible pour l\'instant';
 | 
						|
// 	}
 | 
						|
// 	
 | 
						|
// 	elseif($fichier == 'unvailable.png')
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'deco.png';
 | 
						|
// 		$etat = 'deconnectee ou hors ligne';
 | 
						|
// 	}
 | 
						|
// 	
 | 
						|
// 	elseif($fichier == 'chat.png')
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'chat.png';
 | 
						|
// 		$etat = 'disponible pour discuter';
 | 
						|
// 	}
 | 
						|
// 	
 | 
						|
// 	else
 | 
						|
// 	{
 | 
						|
// 		$image_locale = 'deco.png';
 | 
						|
// 		$etat = ' dont l\'etat est inconnu pour le moment';
 | 
						|
// 	}
 | 
						|
	
 | 
						|
//	Ancienne ligne pour marvin.fritalk.com
 | 
						|
//	$image_lue = './img/jabber/' . $image_locale;
 | 
						|
 | 
						|
$commentaire_image = "Image de l'état de connexion de Blankoworld";
 | 
						|
 | 
						|
/*** Creation de l'image a.png : Petite icone pour montrer l'etat jabber ***/
 | 
						|
		$image_lue = 'http://presence.jabberfr.org/703e38e51020119cd96de0d9252bc5ab/image-dcraven.png';
 | 
						|
		$image_destination = 'a.png';
 | 
						|
 | 
						|
		$image = imagecreatefrompng($image_lue);
 | 
						|
    imagealphablending($image, true); // permet de garder transparence
 | 
						|
    imagesavealpha($image, true); // idem garde transparence
 | 
						|
 | 
						|
		if(is_file($image_destination))
 | 
						|
		{
 | 
						|
			unlink($image_destination);
 | 
						|
			imagepng($image, $image_destination);
 | 
						|
		}
 | 
						|
		else {
 | 
						|
			imagepng($image, $image_destination);
 | 
						|
		}
 | 
						|
 | 
						|
/*** Creation de l'image b.png : Gros encart avec photo, statut Jabber, adresse Jabber, et petit icone d'etat jabber ***/
 | 
						|
		$grande_image_lue = 'http://webstatus.kd2.org/signature.php/jid/xq.eroonw..qyebjbxanyo/image.png';
 | 
						|
		$grande_image_destination = 'b.png';
 | 
						|
 | 
						|
		$grande_image = imagecreatefrompng($grande_image_lue);
 | 
						|
 | 
						|
		if(is_file($grande_image_destination))
 | 
						|
		{
 | 
						|
			unlink($grande_image_destination);
 | 
						|
			imagepng($grande_image, $grande_image_destination);
 | 
						|
		}
 | 
						|
		else {
 | 
						|
			imagepng($grande_image, $grande_image_destination);
 | 
						|
		}
 | 
						|
?>
 | 
						|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 | 
						|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
 | 
						|
<head>
 | 
						|
	<title>Etat de connectivité de Blankoworld</title>
 | 
						|
	<meta http-equiv="refresh" content="180" />
 | 
						|
	<link type="text/css" rel="stylesheet" media="screen" href="a.css" title="défaut" />
 | 
						|
</head>
 | 
						|
<body>
 | 
						|
	<div id="contenu_principal">
 | 
						|
		<h1>État de connexion de Blankoworld</h1>
 | 
						|
		<div id="etatActualise">
 | 
						|
			<h2>État actualisé : </h2>
 | 
						|
			<p><img src="b.png" alt="<?php echo $commentaire_image; ?>" title="État de connexion de Blankoworld" /><!-- Personne  --><?php //echo $etat; ?>.</p>
 | 
						|
		</div>
 | 
						|
		<div id="infosup">
 | 
						|
			<h2>Informations complémentaires</h2>
 | 
						|
			<p>Blankoworld est disponible à l'adresse BLANKOWORLD [AROBASE] JABBER [POINT] DK.<br />
 | 
						|
			(Traduire le tout en minuscule et en remplaçant [AROBASE] par @ et [POINT] par un vrai point '.').<br />
 | 
						|
			Il vous suffit de vous connecter au <a href="http://fr.wikipedia.org/wiki/Jabber">réseau Jabber</a>
 | 
						|
			à l'aide d'un <a href="http://wiki.jabberfr.org/Clients#Clients_Jabber">client compatible</a>, puis 
 | 
						|
			de <a href="http://wiki.jabberfr.org/Cr%C3%A9er_un_compte">créer une adresse Jabber</a> en choisissant
 | 
						|
			l'un des <a href="http://wiki.jabberfr.org/Serveurs">serveurs disponibles</a>.</p>
 | 
						|
		</div>
 | 
						|
		<div id="liens">
 | 
						|
			<h2>Liens utiles</h2>
 | 
						|
			<ul>
 | 
						|
				<li><a href="http://wiki.jabberfr.org/Accueil">Débuter sur Jabber</a> : Tout ce qu'il faut pour débuter 
 | 
						|
				sous Jabber, réponses à toutes les questions qe nous nous posons.</li>
 | 
						|
				<li><a href="http://wiki.jabberfr.org/Clients#Clients_Jabber">Liste des clients : logiciels à utiliser pour se connecter à Jabber (liste de choix).</a></li>
 | 
						|
				<li><a href="http://wiki.jabberfr.org/Serveurs">Liste des serveurs Jabber disponibles : les serveurs Jabber, tout simplement !</a></li><br />
 | 
						|
				<li><a href="http://olivier.dossmann.net/" title="Aller chez Blanko">La Maison de Blanko</a></li>
 | 
						|
			</ul>
 | 
						|
		</div>
 | 
						|
	</div>
 | 
						|
</body>
 | 
						|
</html>
 |