示例#1
0
function luna_ajax_trash_notification()
{
    if (empty($_POST['_nonce'])) {
        luna_send_json_error(-1);
    }
    $response = array();
    if (false === LunaNonces::verify($_POST['_nonce'], 'trash-notification-nonce')) {
        $response['nonces_expired'] = true;
        luna_send_json($response);
    }
    $id = isset($_POST['id']) && !empty($_POST['id']) ? intval($_POST['id']) : 0;
    if (!$id) {
        luna_send_json_error();
    }
    global $luna_user;
    delete_notification($id, $luna_user['id']);
    luna_send_json_success();
}
示例#2
0
    $sql1 = "update application set history='{$history}' where id='{$id}'";
    mysql_query($sql1);
    $sql3 = "update notifications set notify_status='1' where fid='{$notice_id}'";
    mysql_query($sql3);
    $sql4 = "insert into log (user_id,action,comment) values('" . $_SESSION['id'] . "','update','application_id={$ides}')";
    mysql_query($sql4);
    if (!headers_sent()) {
        header('location: update_application.php?action=edit&id=' . $ides . '');
    } else {
        echo "<script>\r\n\t\t\twindow.location.href='update_application.php?action=edit&id={$ides}'\r\n\t\t\t </script>";
    }
    //header('location: update_application.php?action=edit&id='.$id.'');
}
if ($_GET['action'] == 'delete') {
    $id = $_REQUEST['notice_id'];
    delete_notification($id);
}
?>
    <body> <?php 
include_once 'include/menu.php';
?>

        <div class="content">

            <div class="welcome"><h3>Welcome <?php 
echo $_SESSION['username'];
?>
!</h3></div>
            <?php 
if ($_GET['action'] == 'snooze') {
    $id = $_GET['id'];