예제 #1
0
    static function allServers($opts)
    {
        $sql = 'SELECT SQL_CALC_FOUND_ROWS id, name, ipaddress, hostname
			FROM tblservers WHERE disabled=0 
			ORDER BY ' . $opts['sort'] . ' ' . $opts['sortorder'] . ' LIMIT ' . $opts['start'] . ',' . $opts['limit'];
        return monitisSqlHelper::pageQuery($sql);
    }
예제 #2
0
파일: log.php 프로젝트: carriercomm/WHMCS
<?php

$limit = MONITIS_LOG_PAGE_LIMIT;
define('MONITIS_LOG_EXPAND', false);
if ($_POST['clean']) {
    monitisSqlHelper::altQuery('DELETE FROM ' . MONITIS_LOG_TABLE);
}
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0;
$list = monitisSqlHelper::pageQuery('SELECT SQL_CALC_FOUND_ROWS * FROM ' . MONITIS_LOG_TABLE . ' ORDER BY `id` DESC LIMIT ' . $start . ', ' . $limit);
$start = ($page - 1) * $limit;
$total = $list[0]['total'];
$pages = intval($total / $limit);
if ($total % $limit) {
    $pages++;
}
?>
<style type="text/css">
.datatable th,  .datatable td{
	word-wrap:break-word;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
//	$(".description").tabs(  );
});
</script> 


<form method="post" action="" id="serversListId">
<table width="100%" border="0" cellpadding="3" cellspacing="0">