mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
browser stats templated
This commit is contained in:
@@ -956,7 +956,7 @@ class siteStats
|
|||||||
'ITEM_TITLE' => $this->getLabel($key),
|
'ITEM_TITLE' => $this->getLabel($key),
|
||||||
'ITEM_BAR' => $this->bar($percentage, $info['ttlv']),
|
'ITEM_BAR' => $this->bar($percentage, $info['ttlv']),
|
||||||
'ITEM_PERC'=> $percentage,
|
'ITEM_PERC'=> $percentage,
|
||||||
'ITEM_DELETE'=> ($can_delete ? "<a href='".e_SELF."?{$action}.rem.".rawurlencode($key)."'
|
'ITEM_DELETE'=> ($can_delete ? "<a href='".e_SELF."?{$action}.rem.".rawurlencode($key)."'>
|
||||||
<img src='".e_PLUGIN_ABS."log/images/remove.png' alt='".ADSTAT_L39."' title='".ADSTAT_L39."' style='vertical-align: middle;' /></a> " : ""),
|
<img src='".e_PLUGIN_ABS."log/images/remove.png' alt='".ADSTAT_L39."' title='".ADSTAT_L39."' style='vertical-align: middle;' /></a> " : ""),
|
||||||
);
|
);
|
||||||
$text .= $tp->simpleParse($template['item'], $var);
|
$text .= $tp->simpleParse($template['item'], $var);
|
||||||
@@ -1097,18 +1097,11 @@ class siteStats
|
|||||||
|
|
||||||
$total = array_sum($browserArray);
|
$total = array_sum($browserArray);
|
||||||
|
|
||||||
$text .= "
|
$var = array('START_CAPTION' => $this->browser_headings[$act].$pars['hdg_extra'],
|
||||||
<table class='table table-striped fborder' style='width: 100%;'>\n
|
'START_TITLE' => ($this -> order ? ADSTAT_L48 : ADSTAT_L49),
|
||||||
<tr>
|
'START_URL' => e_SELF."?".($show_version ? "3" : "14").($this -> order ? "" : ".1" ),
|
||||||
<th class='fcaption' colspan='4' style='text-align:center'>".$this->browser_headings[$act].$pars['hdg_extra']."</th>
|
);
|
||||||
</tr>\n
|
$text .= $tp->simpleParse($template['start'], $var);
|
||||||
<tr>
|
|
||||||
<th class='fcaption' style='width: 20%;'>
|
|
||||||
<a title='".($this -> order ? ADSTAT_L48 : ADSTAT_L49)."' href='".e_SELF."?".($show_version ? "3" : "14").($this -> order ? "" : ".1" )."'>".ADSTAT_L26."</a>
|
|
||||||
</th>
|
|
||||||
<th class='fcaption' style='width: 70%;' colspan='2'>".ADSTAT_L21."</th>\n
|
|
||||||
<th class='fcaption' style='width: 10%; text-align: center;'>%</th>
|
|
||||||
</tr>\n";
|
|
||||||
|
|
||||||
if (count($browserArray))
|
if (count($browserArray))
|
||||||
{
|
{
|
||||||
@@ -1128,20 +1121,26 @@ class siteStats
|
|||||||
$image = "unknown.png";
|
$image = "unknown.png";
|
||||||
}
|
}
|
||||||
$percentage = round(($info/$total) * 100, 2);
|
$percentage = round(($info/$total) * 100, 2);
|
||||||
$text .= "<tr>
|
$var = array(
|
||||||
<td class='forumheader3' style='width: 20%;'>".($image ? "<img src='".e_PLUGIN_ABS."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : "").$key."</td>".
|
'ITEM_IMAGE' => ($image ? "<img src='".e_PLUGIN_ABS."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : ""),
|
||||||
($entries == 1 ? "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>" : "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>")."
|
'ITEM_KEY' => $key,
|
||||||
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
|
'ITEM_BAR' => $this -> bar($percentage, $info),
|
||||||
</tr>\n";
|
'ITEM_PERC'=> $percentage,
|
||||||
|
);
|
||||||
|
$text .= $tp->simpleParse($template['item'], $var);
|
||||||
|
|
||||||
|
$text .= "";
|
||||||
}
|
}
|
||||||
$text .= "<tr><td class='forumheader' colspan='2'>".ADSTAT_L21."</td><td class='forumheader' style='text-align: center;'>{$total}</td>
|
|
||||||
<td class='forumheader'></td></tr>\n";
|
$var = array('TOTAL' => number_format($total),
|
||||||
|
);
|
||||||
|
$text .= $tp->simpleParse($template['end'], $var);
|
||||||
|
$text .= "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text .= "<tr><td class='fcaption' colspan='4' style='text-align:center'>".ADSTAT_L25."</td></tr>\n";
|
$text .= $tp->simpleParse($template['nostatistic']);
|
||||||
}
|
}
|
||||||
$text .= "</table><br />";
|
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
@@ -80,9 +80,32 @@ $LOG_TEMPLATE['alltimevisits_unique']['end'] = "
|
|||||||
<td class='forumheader'></td></tr>\n</table></div>";
|
<td class='forumheader'></td></tr>\n</table></div>";
|
||||||
|
|
||||||
|
|
||||||
$LOG_TEMPLATE['browsers']['start'] = "";
|
$LOG_TEMPLATE['browsers']['start'] = "
|
||||||
$LOG_TEMPLATE['browsers']['item'] = "";
|
<div class='table-responsive' id='browsers'>
|
||||||
$LOG_TEMPLATE['browsers']['end'] = "";
|
<table class='table table-striped fborder' style='width: 100%;'>\n
|
||||||
|
<tr>
|
||||||
|
<th class='fcaption' colspan='4' style='text-align:center'>{START_CAPTION}</th>
|
||||||
|
</tr>\n
|
||||||
|
<tr>
|
||||||
|
<th class='fcaption' style='width: 20%;'>
|
||||||
|
<a title='{START_TITLE}' href='{START_URL}'>".ADSTAT_L26."</a>
|
||||||
|
</th>
|
||||||
|
<th class='fcaption' style='width: 70%;' colspan='2'>".ADSTAT_L21."</th>\n
|
||||||
|
<th class='fcaption' style='width: 10%; text-align: center;'>%</th>
|
||||||
|
</tr>\n";
|
||||||
|
$LOG_TEMPLATE['browsers']['item'] = "
|
||||||
|
<tr>
|
||||||
|
<td class='forumheader3' style='width: 20%;'>{ITEM_IMAGE}{ITEM_KEY}</td>
|
||||||
|
<td class='forumheader3' style='width: 70%;'>{ITEM_BAR}</td>
|
||||||
|
<td class='forumheader3' style='width: 10%; text-align: center;'>{ITEM_PERC}%</td>
|
||||||
|
</tr>\n";
|
||||||
|
$LOG_TEMPLATE['browsers']['end'] = "
|
||||||
|
<tr><td class='forumheader' colspan='2'>".ADSTAT_L21."</td><td class='forumheader' style='text-align: center;'>{TOTAL}</td>
|
||||||
|
<td class='forumheader'></td></tr>
|
||||||
|
</table><br /></div>";
|
||||||
|
|
||||||
|
$LOG_TEMPLATE['browsers']['nostatistic'] =
|
||||||
|
"<tr><td class='fcaption' colspan='4' style='text-align:center'>".ADSTAT_L25."</td></tr></table><br /></div>";
|
||||||
|
|
||||||
$LOG_TEMPLATE['oses']['start'] = "";
|
$LOG_TEMPLATE['oses']['start'] = "";
|
||||||
$LOG_TEMPLATE['oses']['item'] = "";
|
$LOG_TEMPLATE['oses']['item'] = "";
|
||||||
|
Reference in New Issue
Block a user