Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script> $(document).ready(function() {
- $(".videoe").click(function(){
- $('video').each(function(){this.player.pause()})
- });
- $(".videoee").click(function(){
- $('video').each(function(){this.player.pause()})
- });
- $(".fa-long-arrow-right").click(function(){
- $('video').each(function(){this.player.pause()})
- });
- $(".fa-long-arrow-left").click(function(){
- $('video').each(function(){this.player.pause()})
- });
- $( "#send_friend_request" ).click(function() {
- if(document.getElementById("skills").value=="")
- {
- alert("Enter name or Email address");
- return false;
- } var data = $("#form_send_friend_request").serialize();
- $.ajax({ type : 'POST',url : '<?php echo $domain_root; ?>/response-friend-request.php', data : data, beforeSend: function() {
- $("#loading").fadeIn();
- $("#suc-friend").fadeOut();
- $("#error-friend").fadeOut();
- },
- success : function(response)
- { if(response== "no")
- {
- $("#error-friend").fadeIn();
- $("#suc-friend").fadeOut();
- }
- if(response== "ok")
- {
- document.getElementById("skills").value="";
- $("#suc-friend").fadeIn();
- $("#error-friend").fadeOut();
- }
- if(response== "allno")
- {
- alert("Friend not found, please search again.")
- $("#suc-friend").fadeOut();
- $("#error-friend").fadeOut();
- }
- } });
- return false; });
- $( "#skills" ).autocomplete({
- source: '<?php echo $domain_root;?>/friend-search.php'
- });
- $('.dropdown-item').click(function() {
- var data = $(this).data('datac');
- $('#sfspincode').val(data);
- });
- $('.sendp').click(function() {
- var data = $(this).data('datac');
- $('#sfspincodep').val(data);
- });
- $('.sid').click(function() {
- var data = $(this).data('datac');
- $('#sfspincodec').val(data);
- }); });
- <h4 class="modal-title">Request</h4>
- </div>
- <div class="modal-body">
- <div id="loading" style="text-align: center;display:none;"><img src="<?php echo $domain_root; ?>/images/loadingProd.gif"/></div>
- <?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