close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

job notification

Thread began 1/12/2020 12:13 pm by Gizza372666 | Last modified 1/14/2020 5:09 pm by Gizza372666 | 886 views | 8 replies

Gizza372666

job notification

Hi,
Can you please let me know how to create a job notification?
I have creted a php qry which will extract all records where a customer has requested a callback.
What I need is on the admin side at the top, a notification to show with the number of customers who expecting a callback.
It has to show the number of customers without the page being refreshed.

I have found this script and works fine however it is conflicting with the webassist script and my cms doent's work properly.
Is there a build in functionality which will allow me to do this?

Here is the current js script:
=========================Script Starts========================================
<script src="jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="bootstrap.min.js"></script>
<br /><br />
<div>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#"></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="label label-pill label-danger count" style="border-radius:10px;"></span> <span class="glyphicon glyphicon-bell" style="font-size:18px;"></span></a>
<ul class="dropdown-menu"></ul>
</li>
</ul>
</div>
</nav>
<br />
<script>
$(document).ready(function(){

function load_unseen_notification(view = '')
{
$.ajax({
url:"fetch.php",
method:"POST",
data:{view:view},
dataType:"json",
success:function(data)
{
$('.dropdown-menu').html(data.notification);
if(data.unseen_notification > 0)
{
$('.count').html(data.unseen_notification);
}
}
});
}

load_unseen_notification();


$(document).on('click', '.dropdown-toggle', function(){
$('.count').html('');
load_unseen_notification('yes');
});

setInterval(function(){
load_unseen_notification();;
}, 5000);

});
</script>





==============================Script End======================================


=========================php script starts======fetch.php====================================


<?php
include("connect.php");


if(isset($_POST['view'])){


if($_POST["view"] != '')
{

}
$query = "SELECT * FROM tblcustomer WHERE job=1 LIMIT 5";
$result = mysqli_query($con, $query);
$output = '';
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
$output .= '
<li>
<a href="#">
<a href="http://domain.com/tblcustomer_update.php?ID='.$row["ID"].'" <strong>'.$row["Email"].'</strong></a>

</a>
</li>
<br /><br />
';

}
}
else{
$output .= '
<li><a href="#" class="text-bold text-italic">No Noti Found</a></li>';
}



$status_query = "SELECT * FROM tblcustomer WHERE job=1";
$result_query = mysqli_query($con, $status_query);
$count = mysqli_num_rows($result_query);
$data = array(
'notification' => $output,
'unseen_notification' => $count
);

echo json_encode($data);

}

?>

=========================php script end==========================================

I hope you will understand what I'm trying to achive and that it will be an easy way to be created with webassist.
Looking forward to your reply

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...