17:27
Logical-Portal.ru
Forum Logo

  • Страница 1 из 1
  • 1
Уведомление о вошедших и ушедшых с сайта в ajax окне
pro_ronf Вторник, 22.05.2012, 19:21 | Сообщение # 1
Сообщений: 121
Награды:0

В глобальный блок или в самы низ

Code
<script type="text/javascript" id="userList">     
     $.get('/index/62',function(e){ fuu = $('cmd[p="content"]',e).text();     
     $('a',fuu).each(function(i){     
     $('#userList').prepend('<a class="userList '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a><div style="clear:both"></div>');     
     });     
     });     
     setInterval(function(){     
     data=$('#userList').text();     
     $.get('/index/62',function(q){ fis = $('cmd[p="content"]',q).text();     
     // Здесь должно было быть авторство     
     $('a',fis).each(function(){     
     if(data.indexOf($(this).text())== -1){     
     $('#userList').prepend('<a class="userList '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a><div style="clear:both"></div>');     
     _uWnd.alert('<div align="center" style="padding:5px;"><b>'+$(this).text()+'</b> прибыл на сайт</div>', '',{w:210, tm:5000, h:60});     
     }     
     }); // вошли     
     $('#userList a').each(function(){     
     if(fis.indexOf($(this).text())== -1){     
     _uWnd.alert('<div align="center" style="padding:5px;"><b>'+$(this).text()+'</b> свалил с сайта</div>', '',{w:210, tm:5000, h:60});     
     $(this).prev('.ssikq').remove(); $(this).remove();     
     }     
     }); // вышли     
     //     
     });     
     },7000);     
     </script>
brokens Суббота, 16.06.2012, 23:55 | Сообщение # 2
Сообщений: 27
Награды:0
Бредовый скрипт, т.к если у тебя будет ~1000 хостов в день, замучаешся смотреть)
  • Страница 1 из 1
  • 1
Поиск:
Design by pro_ronf. | Copyright torrent-portal Project © 2025 |