Experiments with times #3

This commit is contained in:
pezcurrel 2022-06-07 14:46:08 +02:00
parent 03f1258086
commit e0ce37c469

View file

@ -511,7 +511,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
$out.='</div>'.N;
$out.='<div><span class="ilab">'._('Most used hashtags (last week)').'</span> ';
$rres=mysqli_query($link,'SELECT * FROM InstTrends WHERE InstID='.$row['ID'].' ORDER BY Pos ASC') or muorimeglio(__LINE__.': '.mysqli_error($link),true);
$rres=tquery('SELECT * FROM InstTrends WHERE InstID='.$row['ID'].' ORDER BY Pos ASC');
if (mysqli_num_rows($rres)>0) {
$buf=array();
while ($rrow=mysqli_fetch_assoc($rres))
@ -530,7 +530,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
$out.='<div class="ghost"><div class="idlab">'._('Stats').'</div><div class="istat">';
$rres=mysqli_query($link,'SELECT COUNT(InstID) AS cnt, SUM(Statuses) AS tstatuses, SUM(Logins) AS tlogins, SUM(Registrations) AS tregs FROM InstActivity WHERE InstID='.$row['ID']) or muorimeglio(__LINE__.': '.mysqli_error($link),true);
$rres=tquery('SELECT COUNT(InstID) AS cnt, SUM(Statuses) AS tstatuses, SUM(Logins) AS tlogins, SUM(Registrations) AS tregs FROM InstActivity WHERE InstID='.$row['ID']);
$out.='<div class="dida">'._('Last 12 weeks activity');
if (mysqli_num_rows($rres)>0) {
$rrow=mysqli_fetch_assoc($rres);
@ -538,7 +538,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
$out.=' ('._('totals:').' '.$rrow['tstatuses'].' '._('statuses').', '.$rrow['tlogins'].' '._('logins').', '.$rrow['tregs'].' '._('registrations').')';
}
$out.='</div>'.N;
$rres=mysqli_query($link,'SELECT * FROM InstActivity WHERE InstID='.$row['ID'].' ORDER BY Week ASC') or muorimeglio(__LINE__.': '.mysqli_error($link),true);
$rres=tquery('SELECT * FROM InstActivity WHERE InstID='.$row['ID'].' ORDER BY Week ASC');
$out.='<table class="abar"><tr>';
$tot=mysqli_num_rows($rres);
if ($tot>0) {
@ -550,7 +550,7 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
}
$out.='</tr></table>'.N;
$rres=mysqli_query($link,'SELECT * FROM InstChecks WHERE InstID='.$row['ID'].' ORDER BY Time DESC LIMIT 0,8') or muorimeglio(__LINE__.': '.mysqli_error($link),true);
$rres=tquery($link,'SELECT * FROM InstChecks WHERE InstID='.$row['ID'].' ORDER BY Time DESC LIMIT 0,8');
$tot=mysqli_num_rows($rres);
$buf=array();
while ($rrow=mysqli_fetch_assoc($rres)) $buf[]=$rrow;