<?php /* Smarty version 2.6.27, created on 2014-03-26 17:02:05
         compiled from /home/vinhostm/public_html/order/templates/portal/serverstatus.tpl */ ?>
<?php echo '
<script>
function getStats(num) {
    jQuery.post(\'serverstatus.php\', \'getstats=1&num=\'+num, function(data) {
        jQuery("#load"+num).html(data.load);
        jQuery("#uptime"+num).html(data.uptime);
    },\'json\');
}
function checkPort(num,port) {
    jQuery.post(\'serverstatus.php\', \'ping=1&num=\'+num+\'&port=\'+port, function(data) {
        jQuery("#port"+port+"_"+num).html(data);
    });
}
</script>
'; ?>


<p><?php echo $this->_tpl_vars['LANG']['serverstatusheadingtext']; ?>
</p>

<table width="100%" border="0" align="center" cellpadding="10" cellspacing="0" class="data">
  <tr>
    <th><?php echo $this->_tpl_vars['LANG']['servername']; ?>
</th>
    <th>HTTP</th>
    <th>FTP</th>
    <th>POP3</th>
    <th><?php echo $this->_tpl_vars['LANG']['serverstatusphpinfo']; ?>
</th>
    <th><?php echo $this->_tpl_vars['LANG']['serverstatusserverload']; ?>
</th>
    <th><?php echo $this->_tpl_vars['LANG']['serverstatusuptime']; ?>
</th>
  </tr>
  <?php $_from = $this->_tpl_vars['servers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['num'] => $this->_tpl_vars['server']):
?>
  <tr>
    <td><?php echo $this->_tpl_vars['server']['name']; ?>
</td>
    <td id="port80_<?php echo $this->_tpl_vars['num']; ?>
"><img src="images/loadingsml.gif" alt="<?php echo $this->_tpl_vars['LANG']['loading']; ?>
" /></td>
    <td id="port21_<?php echo $this->_tpl_vars['num']; ?>
"><img src="images/loadingsml.gif" alt="<?php echo $this->_tpl_vars['LANG']['loading']; ?>
" /></td>
    <td id="port110_<?php echo $this->_tpl_vars['num']; ?>
"><img src="images/loadingsml.gif" alt="<?php echo $this->_tpl_vars['LANG']['loading']; ?>
" /></td>
    <td><a href="<?php echo $this->_tpl_vars['server']['phpinfourl']; ?>
" target="_blank"><?php echo $this->_tpl_vars['LANG']['serverstatusphpinfo']; ?>
</a></td>
    <td id="load<?php echo $this->_tpl_vars['num']; ?>
"><img src="images/loadingsml.gif" alt="<?php echo $this->_tpl_vars['LANG']['loading']; ?>
" /></td>
    <td id="uptime<?php echo $this->_tpl_vars['num']; ?>
"><img src="images/loadingsml.gif" alt="<?php echo $this->_tpl_vars['LANG']['loading']; ?>
" /><script> checkPort(<?php echo $this->_tpl_vars['num']; ?>
,80); checkPort(<?php echo $this->_tpl_vars['num']; ?>
,21); checkPort(<?php echo $this->_tpl_vars['num']; ?>
,110); getStats(<?php echo $this->_tpl_vars['num']; ?>
); </script></td>
  </tr>
  <?php endforeach; else: ?>
  <tr>
    <td colspan="7"><?php echo $this->_tpl_vars['LANG']['serverstatusnoservers']; ?>
</td>
  </tr>
  <?php endif; unset($_from); ?>
</table>

<br />