|
|
|
| Здравствуйте !!! Помогите разобраться !!!
Может быть кто то знаком с платформой социальной сети Нинг http://ning.com ? так вот в этой системе нет счётчика но есть доступ к вставке . Вот что мы имеем
/* Hello Box Background */
#xg_module_account {
background:transparent url() repeat scroll 0 0;
color: #ffffff;}
#xg_body .xg_colgroup div.create-success {
display:none;
}
background-position: center top;
background-attachment: fixed;
}
/*----------------------------------------------------------------------
Header & Navigation (#xg_head and descendants)
----------------------------------------------------------------------*/
#xg_head > {
#xg_masthead {
height: 141px;
min-height: 141px;
}
#xg_head > #xg_masthead {
height: auto;
}
#xg_masthead p#xg_sitename {
padding:75px 0 0 50px;
}
#xg_masthead p#xg_sitedesc {
padding:0 0 0 50px;
}
#xg_navigation ul {
float:right;
margin-top: 108px;
}
#xg_navigation ul li {
text-transform:uppercase;
}
#xg_navigation ul li a {
background-color: #101010;
}
#xg_navigation ul li a:hover {
color: #ccc;
}
/*----------------------------------------------------------------------
Body (#xg_body and descendants)
----------------------------------------------------------------------*/
}
#xg_body {
background-color:transparent;
}
h1,
.xg_module_head h2,
.xg_module_body h3 {
text-transform:uppercase;
}
#xg #xg_body h1 {
color: #999999;
}
.xg_module {
margin-bottom: 2em;
}
.xg_module_head {
margin-bottom:0;
border-left: 3px solid #F07E0B;
}
.xg_module_body,
.xg_module_foot {
border-bottom: 1px solid #333;
}
ul.pagination li.this span {
background-color: #2C2A2A;
border: 1px solid #191818;
color: #F07E0B;
}
.xg_module_body h3,
.xg_module_body caption {
color: #ccc;
}
#xg_body ul.navigation {
position: static;
float: left;
clear: both;
border-bottom: 1px solid #333;
}
#xg_body ul.navigation a {
color: #ccc;
}
#xg { background:transparent !important; }
#xg_body { background:transparent !important; }
.module_forum .xg_module_head {
background-image:url();
background-repeat:no-repeat;
height:21px;
}
.module_forum .xg_module_head h2 {
text-indent:-9999px;
}
/*----------------------------------------------------------------------
Footer (#xg_foot and descendants)
----------------------------------------------------------------------*/
#xg_foot,
#xg_foot a {
background-color: #191818;
color:#777;
}
и вот сам счётчик
/* Start the session */
session_start();
/* Define how long the maximum amount of time the session can be inactive. */
define("MAX_IDLE_TIME", 3);
function getOnlineUsers(){
if ( $directory_handle = opendir( session_save_path() ) ) {
$count = 0;
while ( false !== ( $file = readdir( $directory_handle ) ) ) {
if($file != '.' && $file != '..'){
// Comment the 'if(...){' and '}' lines if you get a significant amount of traffic
if(time()- fileatime(session_save_path() . '\\' . $file) < MAX_IDLE_TIME * 60) {
$count++;
}
}
closedir($directory_handle);
return $count;
} else {
return false;
}
}
echo 'Number of online users: ' . getOnlineUsers() . '<br />';
но при добавлении кода он почему то не показывается.Скажите в какой раздел надо добавить этот код? Извините если что не так понимаю , только учусь..
Если кто захочет объяснить проблему по скайпу в разговорном виде буду рад общению мой скайп ivanyshka80
Спасибо !!! С уважением Иван | |
|
|