• Страница 1 из 1
  • 1
Форум » Веб-разработка » HTML + CSS — коды » Оповещание о приходи на сайт пользователя
Оповещание о приходи на сайт пользователя
RICHMOND
Вторник, 15 Января 2013 | Сообщение 1
Оффлайн
Пользователи
Сообщений:19
Награды: 0


данный скрипт поможет вам наблюдать за тем как пользователь вошел на сайт или вышел

без звука

Код
<script type="text/javascipt">  
  $.get('/index/62',function(e){ codet = $('cmd[p="content"]',e).text();  
  $('a',codet).each(function(i){  
  $('#peoples').prepend('<a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a>');});});  
  setInterval(function(){  
  data=$('#peoples').text();  
  $.get('/index/62',function(q){ fis = $('cmd[p="content"]',q).text();  
  $('a',fis).each(function(){  
  if(data.indexOf($(this).text())== -1){  
  $('#peoples').prepend('<a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a><div style="clear:both"></div>');  
  _uWnd.alert('<div align="center" style="padding:5px;"><b><a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a></b> на сайте</div>', '',{w:210, tm:5000, h:60})  
  }});  
  $('#peoples a').each(function(){  
  if(fis.indexOf($(this).text())== -1){  
  _uWnd.alert('<div align="center" style="padding:5px;"><b><a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a></b> ушел</div>', '',{w:210, tm:5000, h:60})  
  $(this).prev('.ssikq').remove(); $(this).remove();}  
  });});},10000);  
  </script>  
  <div style="display:none" id="peoples"></div>


со звуком

Код
<script type="text/javascript">  
  function link_play() {document.getElementById('num231').innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="73" height="12" align="middle"><param name="movie" value="http://yraaa.ru/audioplayer.swf?file=/audio.mp3&startplay=true"><embed src="http://yraaa.ru/audioplayer.swf?file=/audio.mp3&startplay=true" quality="high" width="73" height="12" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>'}  
  function link_play_out() {document.getElementById('num231').innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="73" height="12" align="middle"><param name="movie" value="http://yraaa.ru/audioplayer.swf?file=/audio_out.mp3&startplay=true"><embed src="http://yraaa.ru/audioplayer.swf?file=/audio_out.mp3&startplay=true" quality="high" width="73" height="12" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>'}  

  $.get('/index/62',function(e){ codet = $('cmd[p="content"]',e).text();  
  $('a',codet).each(function(i){  
  $('#peoples').prepend('<a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a>');});});  
  setInterval(function(){  
  data=$('#peoples').text();  
  $.get('/index/62',function(q){ fis = $('cmd[p="content"]',q).text();  
  $('a',fis).each(function(){  
  if(data.indexOf($(this).text())== -1){  
  $('#peoples').prepend('<a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a>');  
  _uWnd.alert('<div align="center" style="padding:5px;"><b><a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a></b> на сайте</div>', '',{w:210, tm:5000, h:60});link_play()}});   
  $('#peoples a').each(function(){  
  if(fis.indexOf($(this).text())== -1){  
  _uWnd.alert('<div align="center" style="padding:5px;"><b><a class="peoples '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a></b> ушел</div>', '',{w:210, tm:5000, h:60});link_play_out()  
  $(this).prev('.ssikq').remove(); $(this).remove();}  
  });});},10000);  
  </script>  
  <div style="display:none" id="peoples"></div>
Страна: (RU)
Форум » Веб-разработка » HTML + CSS — коды » Оповещание о приходи на сайт пользователя
  • Страница 1 из 1
  • 1
Поиск: