+ $query = "select substring_index(function,':',1) as port, total as number from ngnpro_logs_new_functions group by port order by number desc limit 0, 5";
dprint($query);
if (!$db->query($query)) {
$log = sprintf ("Database error for query %s: %s (%s)",$query,$db->Error,$db->Errno);
- $query = "select count(*)as number, function, substring_index(function,':',1) as port,substring_index(function,':',-1) as method from ngnpro_logs where function like '$key:%' group by function order by number desc limit 0,5 ;";
+ $query = "select total as number, function, substring_index(function,':',1) as port,substring_index(function,':',-1) as method from ngnpro_logs_new_functions where function like '$key:%' group by function order by number desc limit 0,5 ";
dprint("$query");
if (!$db->query($query)) {
$log=sprintf ("Database error for query %s: %s (%s)",$query,$db->Error,$db->Errno);
- $query ="select count(*) as number, function, substring_index(function,':',1) as port,substring_index(function,':',-1) as method, ip from ngnpro_logs group by ip,function order by number desc";
- $query = "select count(*) as number, date,sum(execution_time) as total from ngnpro_logs GROUP BY UNIX_TIMESTAMP(date) DIV 300";
+ if ($days <= 10) {
+ $period='600';
+ } else if ($days <= 20) {
+ $period='1200';
+ } else if ($days > 20) {
+ $period='2400';
+ }
+
+ #$query = "select sum(total) as number, date, concat('[',group_concat(data),']') as data from ngnpro_logs_new GROUP BY UNIX_TIMESTAMP(date) DIV 60 order by date";
+ $query = "select sum(total) as number, date, sum(total_time) as data from ngnpro_logs_new GROUP BY UNIX_TIMESTAMP(date) DIV 300 order by date";
dprint($query);
if (!$db->query($query)) {
$log = sprintf ("Database error for query %s: %s (%s)",$query,$db->Error,$db->Errno);
<input rel='popover' placeholder='This field is optional' data-trigger='hover' data-delay='1000'
data-original-title='OTP hardware authentication'
data-content=\"With this field you can login using a hardware OTP device called 'yubikey'.<br>
If you login the first time with a CDRTool account and the username, password and OTP key filled in, the key identifier is stored into you account.<br>
For info and purchase of this key see <a href='http://www.yubico.com' target='_blank'>http://www.yubico.com</a>