Jump to content

Server Status Improvements


keliix06

Recommended Posts

Hi guys, just updated this to work on 4.1.1 portal template:

 

<p>{$LANG.serverstatusheadingtext}</p>
<table width="100%" border="0" align="center" cellpadding="10" cellspacing="0" class="data">
 <tr>
   <th>{$LANG.servername}</th>
   <th>HTTP</th>
   <th>FTP</th>
   <th>POP3</th>
   <th>{$LANG.serverstatusphpinfo}</th>
   <th>{$LANG.serverstatusserverload}</th>
   <th>{$LANG.serverstatusuptime}</th>
 </tr>
 {foreach key=num item=server from=$servers}
 {php}
$query = '';
$server = $this->get_template_vars('server');
$servername = $server['name'];
$serverip = $server['ipaddress'];
$query = "SELECT s.* FROM tblservers AS s LEFT JOIN tblhosting AS h ON h.server=s.id WHERE h.userid = ".$_SESSION['uid']." AND (h.domainstatus = 'Active' OR h.domainstatus = 'Suspended') AND s.name = '$servername'";
$result = mysql_query($query);
if(mysql_num_rows($result) > 0){
 {/php}

 <tr>
   <td>{$server.name}</td>
   <td>{get_port_status num="$num" port="80"}</td>
   <td>{get_port_status num="$num" port="21"}</td>
   <td>{get_port_status num="$num" port="110"}</td>
   <td><a href="{$server.phpinfourl}" target="_blank">{$LANG.serverstatusphpinfo}</a></td>
   <td>{$server.serverload}</td>
   <td>{$server.uptime}</td>
 </tr>
 {php}}{/php}
 {foreachelse}
 <tr>
   <td colspan="7">{$LANG.serverstatusnoservers}</td>
 </tr>
 {/foreach}
</table><br />

Link to comment
Share on other sites

  • 1 year later...

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