Exemplo n.º 1
0
require_once '../authentication.php';
$date = $_POST['date'];
$username = $_POST['username'];
$ro = new storedProcedure();
echo "<html>";
echo "<head>";
echo "<script src='http://" . $ro->getMyUrl() . "/jquery.js'></script>";
echo "<script>";
?>

function playBuzzer(){
        $("body").append("<embed src='/COCONUT/bell.mp3' autostart='true' loop='false' width='2' height='0'></embed>");
}

<?php 
if ($ro->totalRequest($date) != $ro->selectNow("admin2request_forApproved_total", "currentTotal", "code", "1")) {
    if ($ro->totalRequest($date) > $ro->selectNow("admin2request_forApproved_total", "currentTotal", "code", "1")) {
        ?>
playBuzzer();
<?php 
    } else {
    }
    $ro->editNow("admin2request_forApproved_total", "code", "1", "currentTotal", $ro->totalRequest($date));
} else {
}
?>

<?php 
if ($ro->totalRequest($date) > 0) {
    echo "   \nvar title = document.title;\ndocument.title = (title == 'For Approval' ? '(" . $ro->totalRequest($date) . ") New Request' : 'For Approval');";
} else {