улучшение вида статистики сайта ucoz
Данный скрипт ничего не изменяет, он просто добавляет красивую таблицу, показывающую соотношение гостей и пользователей на сайте. Скрипт улучшит вид любого портала и предоставит наглядно данные, которые могут быть вам полезны.
<br><br>
<style>
.cross
{padding-top:2px; display:inline-block; padding-bottom:3px; color:#fff;
text-align:center; text-shadow:0px 1px 0px rgba(0,0,0,0.25)}
</style>
<div
style="float:right;"><span
style="">Пользователи</span><span style="margin:0px;
margin-left:2px; padding:1px; display:inline-block; border:1px solid
#ccc; background:#fff;"><img style="height:7px; width:7px;
background:#34a61e;" src="http://imagepost.ru/images/1/px/1px.gif"
border="0" alt="" /></span></div>
<div><span
style="margin:0px; margin-right:3px; padding:1px; display:inline-block;
border:1px solid #ccc; background:#fff;"><img style="height:7px;
width:7px; background:#7d7d7d;" src="/images/1px.gif" border="0" alt=""
/></span><span style="">Гости
сайта</span></div>
<div style="border:1px solid #ccc; background:#fff; padding:1px; margin-top:2px;" id="Statku" align="left"></div>
<script type="text/javascript">
var allusers = $(".tOnline b").text(); var gostusers = $(".gOnline b").text(); var siteusers = $(".uOnline b").text();
var uGosti = (gostusers/allusers).toFixed(2)*100; var uUsers = (siteusers/allusers).toFixed(2)*100;
$("#Statku").html('<div
class="cross" style="width:'+uGosti+'%;
background:#7d7d7d;">'+Math.floor(uGosti)+'%</div><div
class="cross" style="width:'+uUsers+'%;
background:#34a61e;">'+Math.floor(uUsers)+'%</div>').after('<div
style="border:0px; padding:2px; text-align:center;">Всего —
'+allusers+'</div>');
</script>
<br><br>