Guest User

Untitled

a guest
Jan 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. <script> $(document).ready(function() {
  2. $(".videoe").click(function(){
  3. $('video').each(function(){this.player.pause()})
  4. });
  5. $(".videoee").click(function(){
  6. $('video').each(function(){this.player.pause()})
  7. });
  8. $(".fa-long-arrow-right").click(function(){
  9. $('video').each(function(){this.player.pause()})
  10. });
  11. $(".fa-long-arrow-left").click(function(){
  12. $('video').each(function(){this.player.pause()})
  13. });
  14. $( "#send_friend_request" ).click(function() {
  15. if(document.getElementById("skills").value=="")
  16. {
  17. alert("Enter name or Email address");
  18. return false;
  19. } var data = $("#form_send_friend_request").serialize();
  20. $.ajax({ type : 'POST',url : '<?php echo $domain_root; ?>/response-friend-request.php', data : data, beforeSend: function() {
  21. $("#loading").fadeIn();
  22. $("#suc-friend").fadeOut();
  23. $("#error-friend").fadeOut();
  24. },
  25. success : function(response)
  26. { if(response== "no")
  27. {
  28. $("#error-friend").fadeIn();
  29. $("#suc-friend").fadeOut();
  30.  
  31. }
  32. if(response== "ok")
  33. {
  34. document.getElementById("skills").value="";
  35. $("#suc-friend").fadeIn();
  36. $("#error-friend").fadeOut();
  37.  
  38. }
  39. if(response== "allno")
  40. {
  41. alert("Friend not found, please search again.")
  42. $("#suc-friend").fadeOut();
  43. $("#error-friend").fadeOut();
  44.  
  45. }
  46.  
  47. } });
  48. return false; });
  49. $( "#skills" ).autocomplete({
  50. source: '<?php echo $domain_root;?>/friend-search.php'
  51. });
  52. $('.dropdown-item').click(function() {
  53. var data = $(this).data('datac');
  54. $('#sfspincode').val(data);
  55. });
  56. $('.sendp').click(function() {
  57. var data = $(this).data('datac');
  58. $('#sfspincodep').val(data);
  59. });
  60. $('.sid').click(function() {
  61. var data = $(this).data('datac');
  62. $('#sfspincodec').val(data);
  63. }); });
  64.  
  65. <h4 class="modal-title">Request</h4>
  66. </div>
  67. <div class="modal-body">
  68. <div id="loading" style="text-align: center;display:none;"><img src="<?php echo $domain_root; ?>/images/loadingProd.gif"/></div>
  69.  
  70. <?php include "includes/config.php"; include "includes/functions.php"; $friend_search = get_results($connection,"select * from ".$table_prefix."login where first_name LIKE '%".$_GET['term']."%' or last_name LIKE '%".$_GET['term']."%' or email_id LIKE '%".$_GET['term']."%'"); foreach($friend_search as $key => $value) { $data[] = $value['first_name'].' '.$value['last_name'].' -'.$value['email_id']; } echo json_encode($data); ?>
Add Comment
Please, Sign In to add comment