mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
operating system templated
This commit is contained in:
@@ -1135,7 +1135,6 @@ class siteStats
|
||||
$var = array('TOTAL' => number_format($total),
|
||||
);
|
||||
$text .= $tp->simpleParse($template['end'], $var);
|
||||
$text .= "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1235,17 +1234,12 @@ class siteStats
|
||||
}
|
||||
|
||||
$total = array_sum($osArray);
|
||||
$text .= "
|
||||
<table class='table table-striped fborder' style='width: 100%;'>\n
|
||||
<tr>
|
||||
<th class='fcaption' colspan='4' style='text-align:center'>".$this->browser_headings[$act].$pars['hdg_extra']."</th>
|
||||
</tr>\n
|
||||
<tr>
|
||||
<th class='fcaption' style='width: 20%;'>
|
||||
<a title='".($this -> order ? "sort by total" : "sort alphabetically")."' href='".e_SELF."?".($show_version ? "4" : "15").($this -> order ? "" : ".1" )."'>".ADSTAT_L27."</a></th>\n
|
||||
<th class='fcaption' style='width: 70%;' colspan='2'>".ADSTAT_L21."</th>
|
||||
<th class='fcaption' style='width: 10%; text-align: center;'>%</th>
|
||||
</tr>\n";
|
||||
$var = array('START_CAPTION' => $this->browser_headings[$act].$pars['hdg_extra'],
|
||||
'START_TITLE' => ($this -> order ? "sort by total" : "sort alphabetically"),
|
||||
'START_URL' => e_SELF."?".($show_version ? "4" : "15").($this -> order ? "" : ".1" ),
|
||||
);
|
||||
$text .= $tp->simpleParse($template['start'], $var);
|
||||
|
||||
|
||||
if (count($osArray))
|
||||
{
|
||||
@@ -1265,19 +1259,22 @@ class siteStats
|
||||
elseif(stristr($key, "Android")) { $image = "android.png"; }
|
||||
|
||||
$percentage = round(($info/$total) * 100, 2);
|
||||
$text .= "<tr>
|
||||
<td class='forumheader3' style='width: 20%;'>".($image ? "<img src='".e_PLUGIN_ABS."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : "").$key."</td>".
|
||||
($entries == 1 ? "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>" : "<td class='forumheader3' style='width: 70%;'>".$this -> bar($percentage, $info)."</td>")."
|
||||
<td class='forumheader3' style='width: 10%; text-align: center;'>".$percentage."%</td>
|
||||
</tr>\n";
|
||||
$var = array(
|
||||
'ITEM_IMAGE' => ($image ? "<img src='".e_PLUGIN_ABS."log/images/{$image}' alt='' style='vertical-align: middle;' /> " : ""),
|
||||
'ITEM_KEY' => $key,
|
||||
'ITEM_BAR' => $this -> bar($percentage, $info),
|
||||
'ITEM_PERC'=> $percentage,
|
||||
);
|
||||
$text .= $tp->simpleParse($template['item'], $var);
|
||||
}
|
||||
$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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@@ -107,9 +107,28 @@ $LOG_TEMPLATE['browsers']['end'] = "
|
||||
$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']['item'] = "";
|
||||
$LOG_TEMPLATE['oses']['end'] = "";
|
||||
$LOG_TEMPLATE['oses']['start'] = "
|
||||
<div class='table-responsive' id='oses'>
|
||||
<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_L27."</a></th>\n
|
||||
<th class='fcaption' style='width: 70%;' colspan='2'>".ADSTAT_L21."</th>
|
||||
<th class='fcaption' style='width: 10%; text-align: center;'>%</th>
|
||||
</tr>";
|
||||
$LOG_TEMPLATE['oses']['item'] = $LOG_TEMPLATE['browsers']['item'];
|
||||
$LOG_TEMPLATE['oses']['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['oses']['nostatistic'] = $LOG_TEMPLATE['browsers']['nostatistic'];
|
||||
|
||||
|
||||
$LOG_TEMPLATE['domains']['start'] = "";
|
||||
$LOG_TEMPLATE['domains']['item'] = "";
|
||||
|
Reference in New Issue
Block a user