status.xsl 2.94 KB
Newer Older
1
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
j's avatar
j committed
2
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
3
<xsl:template match = "/icestats" >
4 5 6 7 8
<html>
<head>
<title>Icecast Streaming Media Server</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
j's avatar
j committed
9
<body>
10 11 12 13 14 15
<h2>Icecast Status Page</h2>
<div class="roundcont">
<div class="roundtop">
<img src="corner_topleft.jpg" class="corner" style="display: none" />
</div>
<div class="newscontent">
16
<xsl:for-each select="source">
17 18
<xsl:choose>
<xsl:when test="listeners">
19 20
<h3>
<xsl:if test="server_name"><xsl:value-of select="server_name" /> </xsl:if>
21 22 23
(<xsl:value-of select="@mount" />)
<xsl:if test="authenticator"> <a href="/auth.xsl"><img border="0" src="/key.gif"/></a> </xsl:if>
</h3>
24 25 26
<table border="0" cellpadding="4">
<xsl:if test="server_name">
<tr><td>Stream Title:</td><td class="streamdata"> <xsl:value-of select="server_name" /></td></tr>
27
</xsl:if>
28 29
<xsl:if test="server_description">
<tr><td>Stream Description:</td><td class="streamdata"> <xsl:value-of select="server_description" /></td></tr>
30
</xsl:if>
31 32
<xsl:if test="type">
<tr><td width="130"> Stream Type:</td><td class="streamdata"><xsl:value-of select="type" /></td></tr>
33
</xsl:if>
34 35
<xsl:if test="bitrate">
<tr><td>Bitrate:</td><td class="streamdata"> <xsl:value-of select="bitrate" /></td></tr>
36
</xsl:if>
37 38 39
<xsl:if test="quality">
<tr><td>Quality:</td><td class="streamdata"> <xsl:value-of select="quality" /></td></tr>
</xsl:if>
40
<xsl:if test="listeners">
41
<tr><td>Stream Listeners:</td><td class="streamdata"> <xsl:value-of select="listeners" /></td></tr>
42
</xsl:if>
43 44 45 46
<xsl:if test="genre">
<tr><td>Stream Genre:</td><td class="streamdata"> <xsl:value-of select="genre" /></td></tr>
</xsl:if>
<xsl:if test="server_url">
47
<tr><td>Stream URL:</td><td class="streamdata"> <a href="{server_url}"><xsl:value-of select="server_url" /></a></td></tr>
48 49 50
</xsl:if>
<tr><td>Current Song:</td><td class="streamdata"> 
<xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if><xsl:value-of select="title" /></td></tr>
51 52 53 54 55 56
<tr><td>Listen:</td><td class="streamdata"> 
<xsl:choose>
<xsl:when test="authenticator">
<a href="auth.xsl">Click to Listen</a>
</xsl:when>
<xsl:otherwise>
57
<a href="{@mount}.m3u">Click to Listen</a>
58 59 60
</xsl:otherwise>
</xsl:choose>
</td></tr>
61
</table>
62 63 64 65 66
</xsl:when>
<xsl:otherwise>
<h3><xsl:value-of select="@mount" /> - Not Connected</h3>
</xsl:otherwise>
</xsl:choose>
67 68 69
<br></br>
<br></br>
</xsl:for-each>
70
<xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp;
71 72 73 74 75
</div>
<div class="roundbottom">
<img src="corner_bottomleft.jpg" class="corner" style="display: none" />
</div>
</div>
j's avatar
j committed
76

77 78 79
<div class="poster"><img align="left" src="/icecast.png" />Support icecast development at <a class="nav" href="http://www.icecast.org">www.icecast.org</a></div>
</body>
</html>
80 81
</xsl:template>
</xsl:stylesheet>