YaWK
24.1
Yet another WebKit
message-trash.php
Go to the documentation of this file.
1
<?php
2
/*
3
if (!isset($_POST['token'])) {
4
die ('no direct access allowed.');
5
}
6
else if ($_POST['token'] != "U3E44ERG0H0M3") {
7
die ('no direct access allowed!');
8
}
9
*/
10
include
'../../../classes/db.php'
;
11
include
'../../../classes/alert.php'
;
12
include
'../classes/messages.php'
;
13
14
/* set database object */
15
if
(!isset(
$db
))
16
{
// create new db object
17
$db
= new \YAWK\db();
18
}
19
20
$msg_id
= $_POST[
'msg_id'
];
21
22
// UPDATE STATEMENT
23
if
(
$db
->query(
"UPDATE {plugin_msg} SET msg_read='1', trash='1' WHERE msg_id = '"
.$msg_id.
"'"
))
24
{
25
echo
"message trashed"
;
26
}
27
else
28
{
29
echo \YAWK\alert::draw(
"warning"
,
"Ooops, Sorry!"
,
"Could not move message to trash, please try again."
,
""
,2000);
30
}
$db
$db
Definition:
dismiss-notifications.php:4
$msg_id
if(!isset($db)) $msg_id
Definition:
message-trash.php:20
yawk.io
system
plugins
messages
js
message-trash.php
Generated on Tue Jan 16 2024 21:59:02 for YaWK by
doxygen 1.9.1