diff --git a/index.php b/index.php index 4cf4579..5939e57 100755 --- a/index.php +++ b/index.php @@ -183,6 +183,47 @@ if (isset($_GET['rss'])) { /** * SVG **/ +if (isset($_GET['icon'])) +{ +header('Content-type: image/svg+xml'); +function svg_base($color) + { + $svg = ''; + return $svg; + } + + $svg_twitter=svg_base('#3aaae1'); + $svg_youtube=svg_base('#a00000'); + $svg_statusnet=svg_base('#ff6a00'); + $svg_shaarli=svg_base('#008000'); + $svg_generic=svg_base('#000000'); + +$svg_type = ''; + + switch ($_GET['icon']) { + case "twitter": + $svg_type = $svg_twitter; + break; + case "microblog": + $svg_type = $svg_statusnet; + break; + case "youtube": + $svg_type = $svg_youtube; + break; + case "identica": + $svg_type = $svg_youtube; + break; + case "shaarli": + $svg_type = $svg_shaarli; + break; + case "generic": + $svg_type = $svg_generic; + break; + } + +die($svg_type); +} + if (isset($_GET['check'])) { header('Content-type: image/svg+xml'); @@ -190,12 +231,15 @@ if (isset($_GET['check'])) $expire=time() -$randomtime ; /* SVG minimalistes */ - $svg_vert='OK'; - $svg_jaune='mv'; - $svg_rouge='err'; - $svg_twitter=''; - $svg_identica=''; - $svg_statusnet=''; + +function svg_status($fill, $stroke, $text) + { + $svg = ''.$text.''; + } + + $svg_vert=svg_status('#00ff00', '#008000', 'OK'); + $svg_jaune=svg_status('#ffff00', '#ffcc00', 'mv'); + $svg_rouge=svg_status('#ff0000', '#800000', 'err'); $errorlog="./".escape( $_GET['check'] ) ."/error.log"; @@ -912,7 +956,7 @@ if( !empty($_POST['opml_file']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY foreach ($autoblogs as $key => $autoblog) { $opml_link='opml'; $autoblogs_display .= '
-
'.escape($autoblog->site_title).'
+
'.escape($autoblog->site_title).'
config ini '.$opml_link.' | '.escape($autoblog->site_type).' source: '.escape($autoblog->site_url).'
'; }