Facebook
From CerberuS, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 574
  1. function BildirimleriGetir()
  2. {
  3. $('.sampturk_bildirimler_ic').html( '<img src="https://www.sampturk.net/forum/Themes/sampturk/images/loading.gif" style="width: 10%;text-align:center;">' );
  4. $.ajax({
  5.                 url: 'https://www.sampturk.net/forum/SAMPTurk_Plugin/notifications.php',
  6.                 type: 'post',
  7.                 data: "bildirimler=1",
  8.                 success: function( donen_veri ){
  9.                         $('.sampturk_bildirimler_ic').html( donen_veri );
  10.                 },             
  11.                 error: function( jqXhr, textStatus, errorThrown ){
  12.                        
  13.                 }
  14. });
  15. }
  16.  
  17. function BildirimSayac()
  18. {
  19. $.ajax({
  20.                 url: 'https://www.sampturk.net/forum/SAMPTurk_Plugin/notifications.php',
  21.                 type: 'post',
  22.                 data: "sayac=1",
  23.                 success: function( donen_veri ){
  24.                         var iNum = parseInt(donen_veri);
  25.                         $('.sampturk_counter').html( donen_veri );
  26.                         if(iNum == 0) { $('.sampturk_counter').hide(); }
  27.                         else { $('.sampturk_counter').fadeIn(); }
  28.                 },             
  29.                 error: function( jqXhr, textStatus, errorThrown ){
  30.                        
  31.                 }
  32. });
  33. }
  34.  
  35.  
  36. function BildirimleriGetir2()
  37. {
  38. $('.sampturk_bildirimler_ic').html( '<img src="https://www.sampturk.net/forum/Themes/sampturk/images/loading.gif" style="width: 10%;">' );
  39. $.ajax({
  40.                 url: 'https://www.sampturk.net/forum/SAMPTurk_Plugin/notifications.php',
  41.                 type: 'post',
  42.                 data: "bildirimler=1&okundu=1",
  43.                 success: function( donen_veri ){
  44.                         $('.sampturk_bildirimler_ic').html( donen_veri );
  45.                 },             
  46.                 error: function( jqXhr, textStatus, errorThrown ){
  47.                        
  48.                 }
  49. });
  50. BildirimSayac();
  51. }
  52.  
  53. function BildirimlerOkundu()
  54. {
  55. $.ajax({
  56.                 url: 'https://www.sampturk.net/forum/SAMPTurk_Plugin/notifications.php',
  57.                 type: 'post',
  58.                 data: "okunduisaretle=1",
  59.                 success: function( donen_veri ){
  60.                         $(".sampturk_bildirim").removeClass("yeni");
  61.                 },             
  62.                 error: function( jqXhr, textStatus, errorThrown ){
  63.                        
  64.                 }
  65. });
  66. BildirimSayac();
  67. }
  68.  
  69. $(document).ready(function() {
  70.  
  71.         BildirimSayac();
  72.         BildirimleriGetir();
  73. });
  74.