[QUOTE=Greggers]
Is there anyway these could be made available to resellers? Maybe with domain alias?
[/QUOTE]
Greg, i don’t know if this help you (or others resellers here), but with this small piece of code (VbScript, ASP) it is possible to be implemented perfectly anywhere adapting it completely.
I use it in my host domain, you can see how it is in action on: http://enterprisedreams.net/datacenter.asp
<%
'' In order to get this thing working you need to do only one thing
'' 1) The variable below "TextDomain" needs to be assigned to be the domain name you use for your hosting
'' 1) Enter the domain name you use for your hosting here, eg: yourdomain.com
TextDomain = "YourDomain"
StrPage = Request.ServerVariables("SCRIPT_NAME")
'' Of course I know most of you will be able to adapt this more to suit your own needs, but at least it gets you started.
'' Please, no remove this
'' Code By Juan C. Barreiro
'' EnterpriseDreams Solutions
'' www.enterprisedreams.net
Function ReplaceHTML(CodeHtml,TextDomain,CodeBase)
CodeHtml = replace(CodeHtml,"<a href=""http://www.paessler.com"">www.paessler.com</a>","<a href=""http://www.paessler.com"" target=""_blank"">www.paessler.com</a>")
CodeHtml = Replace(CodeHtml,"JodoHost",TextDomain)
CodeHtml = Replace(CodeHtml,"Probe","Test...")
CodeHtml = Replace(CodeHtml,"Linux","Unix")
'' CodeHtml = Replace(CodeHtml,"VPS3","VPS3")
CodeHtml = replace(CodeHtml,"<table border=0 cellpadding=2 cellspacing=1 bgcolor=""#ffffff"">","<table width=""515"" border=""0"" cellpadding=""2"" cellspacing=""3"" bgcolor=""FFFAF7"">")
CodeHtml = replace(CodeHtml,"bgcolor=#CCFFCC","class=info")
CodeHtml = replace(CodeHtml,"bgcolor=#FF9999","class=alert")
CodeHtml = replace(CodeHtml,"bgcolor=FF9999","bgcolor=FF0000")
CodeHtml = replace(CodeHtml,"bgcolor=CCFFCC","bgcolor=FFFAF7")
CodeHtml = replace(CodeHtml,"bgcolor=#ccccff","class=paused")
CodeHtml = replace(CodeHtml,"bgcolor=""#efefef""","class=heads")
CodeHtml = replace(CodeHtml,"/smallgraph?","/status.asp?image")
CodeHtml = replace(CodeHtml,"tdclass=pie","td class=pie")
ReplaceHTML = CodeHtml
End Function
Function ServerStatus(CodeBase,varOpenURL,InicioCadena,FinCadena,TextDomain)
On Error Resume Next
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", CodeBase, False
objXMLHTTP.Send
CodeHtml = objXMLHTTP.responseText
Set objXMLHTTP = Nothing
CodeHtml = ReplaceHTML(RemoveHTML(CodeHtml,InicioCadena,FinCadena),TextDomain,CodeBase)
If Len(CodeHtml) > 0 Then
ServerStatus = CodeHtml & VBCrlf
Else
ServerStatus = MsgError() & VBCrlf
End If
End Function
Function RemoveHTML(CodeHtml,InicioCadena,FinCadena)
While InStr(1, CodeHtml, InicioCadena, vbTextCompare) > 0
ini = InStr(1, CodeHtml, InicioCadena, vbTextCompare) + Len(InicioCadena)
fin = InStr(1, CodeHtml, FinCadena, vbTextCompare)
CodeHtml = Mid(CodeHtml, ini, fin - ini)
Wend
RemoveHTML = CodeHtml
End Function
Function MsgError()
MsgError = MsgError & "<div class=""pie"">" & VBCrlf
MsgError = MsgError & "<p>Currently, your account credentials are not sufficient to perform this action. </p>" & VBCrlf
MsgError = MsgError & "<p>" & VBCrlf
MsgError = MsgError & "<p>To go back to the previous html page, <a href=""javascript:window.history.back();"">click here</a>.</p>" & VBCrlf
MsgError = MsgError & "<p>" & VBCrlf
MsgError = MsgError & "<p>If the account credentials you specified are sufficient for this action, an ip lockout may be in effect, " & VBCrlf
MsgError = MsgError & TextDomain & " Monitor has an automatic lockout mechanism which will prevents unauthorized access from:</p>" & VBCrlf
MsgError = MsgError & "<p>" & VBCrlf
MsgError = MsgError & "<ul>" & VBCrlf
MsgError = MsgError & "<li> specified ip ranges</li>" & VBCrlf
MsgError = MsgError & "<li> repeated attempts at actions outside of their account permissions</li>" & VBCrlf
MsgError = MsgError & "</ul>" & VBCrlf
MsgError = MsgError & "</p>" & VBCrlf
MsgError = MsgError & "</div>" & VBCrlf
End Function
If Len(request.querystring) > 0 Then varOpenURL = request.querystring Else varOpenURL = "unix"
If Left(varOpenURL,5) = "image" Then
On Error Resume Next
Response.ContentType = "image/png"
Set HTTPObj = Server.CreateObject("AspHTTP.Conn")
HTTPObj.Url = "http://jodopulse.com:8080"&Replace(varOpenURL,"image","/smallgraph?")
HTTPObj.GetURL
Response.BinaryWrite HTTPObj.BinaryData
Set HTTPObj = Nothing
Response.End
End If
Select Case(varOpenURL)
Case "win"
CodeBase = "http://jodopulse.com:8080/pubgrp?uid=76EE495F-1D11-4F06-A9CE-A5BAEB0EED3F"
Case "mssql"
CodeBase = "http://jodopulse.com:8080/pubgrp?uid=6CB20798-874F-44E1-AA7A-48ADD6BAC62E"
Case "mail"
CodeBase = "http://jodopulse.com:8080/pubgrp?uid=7E7F4896-DFB7-4958-BA97-A37E416F27AC"
Case "unix"
CodeBase = "http://jodopulse.com:8080/pubgrp?uid=7FD1F035-6A2A-4023-A41F-EE65F77D6953"
Case else
CodeBase = "http://jodopulse.com:8080/pubgrp?uid=7FD1F035-6A2A-4023-A41F-EE65F77D6953"
End Select
TextoCorteInicio = "<body>"
TextoCorteFinal = "</body>"
%>
<html>
<head>
<title><%=TextDomain%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta HTTP-EQUIV="refresh" content="60;URL=<%=StrPage%>?<%=varOpenURL%>">
<style>
td {font-size: 8pt; font-family: Arial, Verdana, Tahoma;}
.info { background-color: #FFFAF7; color: #636B70; font-weigth: bold;}
.heads { color: #FFFFFF; background-color: #5656A9; font-weigth: bold;}
.paused { background-color: #FFCC99; color: #5656A9; font-weigth: bold;}
.alert {background-color: #FF0000;color:#000000;}
</style>
</head>
<body>
<table width="520" border="0" cellspacing="4" cellpadding="5" align="center">
<tr>
<td align="center"><a href="<%=StrPage%>?win">Windows Servers</a></td>
<td align="center"><a href="<%=StrPage%>?unix">Unix Servers</a></td>
<td align="center"><a href="<%=StrPage%>?mssql">MS-SQL Servers</a></td>
<td align="center"><a href="<%=StrPage%>?mail">Mail Servers</a></td>
</tr>
</table>
<table width="520" border="0" cellspacing="0" cellpadding="0" align="center" style="border: solid 1px #000000;">
<tr>
<td valign="top"><%=ServerStatus(CodeBase,varOpenURL,TextoCorteInicio,TextoCorteFinal,TextDomain)%></td>
</tr>
</table>
</body>
</html>
Note: Save this code as status.asp to work (in any case also it can be including in another page by means of includes files, but status.asp to have to exist to “create” the images)
I hope that this can help.