YaWK  24.1
Yet another WebKit
message-read.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 db object if not exists...
17  $db = new \YAWK\db();
18 }
19 
20 $msg_id = $_POST['msg_id'];
21 
22  if ($db->query("UPDATE {plugin_msg} SET msg_read='1' WHERE msg_id='".$msg_id."'"))
23  {
24  echo "message marked as unread";
25  }
26  else
27  {
28  die ("failed to mark as unread");
29  }
die
Definition: block-user.php:27
if(!isset($db)) $msg_id