-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeletemail.php
31 lines (22 loc) · 904 Bytes
/
deletemail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include('incsession.php');
require 'vendor/autoload.php';
use Parse\ParseClient;
use Parse\ParseObject;
use Parse\ParseQuery;
ParseClient::initialize('OLEbxaLakkb6SVn5t7Qzbewdyy70LSwHp6PQYilb', '6DOD3bArSx2LgNCuE67GDVDPfi9HAKGmkrKLajL1', 'IVNd1TnoknddgQ2F2qCZf7FUPbBWLe21rz2rP1LN');
date_default_timezone_set('Asia/Taipei');
parse_str($_SERVER['QUERY_STRING']); //已註冊 $postId 為Parse Server objectId
// 刪除信件 start
$query = New ParseObject("mailbox", $postId);
$query->set("isDelete", "1");
$query->save();
echo "<script>alert('信件已刪除!');window.location.replace('mailbox.php');</script>";
// 刪除信件 end
?>
<!DOCTYPE html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<title>PTFast</title>
</head>