Jump to content

HOW TO: View different ports on server status page


Joweb

Recommended Posts

<div align="center">{if !$loggedin}You must be logged in to check if any of the services on

our servers

are down or to check your individual server status. {else}{if $loggedin}To locate the server name you are on, please view

your hosting account details. {/if}

</div>

 

<table width="100%">

<tr>

<td height="29"> <div align="center">Live Uptime Status as of Today:

{$todaysdate}

</div></td>

</tr>

</table>

<table width="100%" bordercolor="efefef" >

<tr bgcolor="efefef">

<td width="55" height="30"> <div align="center">SERVER</div></td>

<td width="45"> <div align="center">HTTP</div></td>

<td width="45"> <div align="center">POP3</div></td>

<td width="50"> <div align="center">WEBMAIL</div></td>

<td width="45" > <div align="center">SMTP</div></td>

<td width="45" > <div align="center">FTP</div></td>

<td width="45"> <div align="center">DNS</div></td>

<td width="45"> <div align="center">WHM</div></td>

<td width="50"> <div align="center">CPanel</div></td>

<td width="50"> <div align="center">UPTIME</div></td>

<td width="45"> <div align="center">LOAD</div></td>

</tr>

{foreach key=num item=server from=$servers}

<tr>

<td width="50" height="35" bgcolor="#F9F9F9"> <div align="center">{$server.name}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="80"}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="110"}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="2095"}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="25"}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="21"}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="53"}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="2087"}</div></td>

<td width="40" bgcolor="#F9F9F9"> <div align="center">{get_port_status num="$num"

port="2082"}</div></td>

<td bgcolor="#F9F9F9" > <div align="center">{$server.uptime}</div></td>

<td width="30" bgcolor="#F9F9F9"> <div align="center">{$server.serverload}</div></td>

</tr>

{foreachelse}

<tr>

<td height="24" colspan="14" id="serverstatusrow">{$LANG.serverstatusnoservers}</td>

</tr>

{/foreach}

</table>

 

{/if}

 

-------------------------

 

Then add this to your clientareaproductdetails.tpl

 

Server Name:{$server.name}-Server Status

 

This should show what server the client is on

Link to comment
Share on other sites

I think a better idea would be do somehow customize this to set it up for a single server, in the client's control panel.

 

That way you can have serverstatus.php to show all server's in a simple format, but when a client views their OWN server, they can see more details (eg: what you posted, pop, webmail, smtp, etc.)

 

*ponders the idea*

Link to comment
Share on other sites

Oh, I figured that was why ;); But just reading through it one more time, really sounded like a perfect idea to create a personalized server status page.

 

I think it would be better to get rid of that Javascript though. A lot of people have this disabled; You can just use PHP to display current time.

 

Might want to just switch it with that instead; It'll also lighten the code/load time for the page.

Link to comment
Share on other sites

  • 2 years later...
  • 3 months later...

Old post I know... but to MarcAlle - yes, the code posted by OP is generally still working even with 4.1.2. I am using it, the only problem is SMTP always shows as down even though it isn't. I tried changing the port to 26 (which is what my server uses) but it still shows down. The rest show up.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated