getMessage()); exit; } $jid_md5 = md5($jid); // On récupère le statut dans tous les cas try { list($status, $img_status) = webStatus::getStatus($jid); } catch (Exception $e) { webStatus::sendErrorImage($e->getMessage()); exit; } // On essaye de récupérer le cache en fonction du statut $cache_file = webStatus::getCacheName('userbar', $jid, $status); if (webStatus::isCached($cache_file, 3600)) { webStatus::redirectImage($cache_file); } // Récupérons l'avatar try { $avatar = webStatus::getAvatar($jid, 32); } catch (Exception $e) { $avatar = webStatus::getDummyAvatar(32); } $st_msg = webStatus::getStatusMsg($status); $image = imagecreatetruecolor(350, 19); $noir = imagecolorallocate($image, 0, 0, 0); $blanc = imagecolorallocate($image, 255, 255, 255); $gris = imagecolorallocate($image, 120, 120, 120); $width = imagesx($avatar); $height = imagesy($avatar); imagefill($image, 0, 0, $blanc); imagecopy($image, $avatar, 0, -7, 0, 0, $width, $height); imagerectangle($image, 0, 0, 349, 18, $noir); imagerectangle($image, 0, 0, $width, 19, $noir); imagecopyresampled($image, $img_status, 35, 2, 0, 0, 14, 14, imagesx($img_status), imagesy($img_status)); imagettftext($image, 10, 0, 53, 14, $noir, get_font('FreeSansBold'), $st_msg); $size = imagettfbbox(8, 0, get_font('FreeSans'), 'Jabber : ' . $jid); $width = abs($size[0]) + abs($size[2]); $pos_x = 350 - $width; imagettftext($image, 8, 0, $pos_x, 13, $gris, get_font('FreeSans'), 'Jabber : '.$jid); imagetruecolortopalette($image, false, 256); webStatus::displayImage($image, $cache_file); ?>