-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaildetail.php
92 lines (52 loc) · 2.6 KB
/
maildetail.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?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
$guid = $_COOKIE['session_Mobile'];
$query = new ParseQuery("mailbox");
$query->equalTo("objectId", $postId);
$results = $query->find();
$posttitle = $results[0]->get('title');
$postcontent = $results[0]->get('content');
$parsetime = $results[0]->getCreatedAt();
$taipeiTimeZone = new DateTimeZone('Asia/Taipei');
$parsetime->setTimezone($taipeiTimeZone);
$parsetime = $parsetime->format('Y/m/d H:i:s');
// all_text 內容 start
$all_text='<table width="80%" border="1">';
$all_text = "$all_text
<tr><td align='right'>標題:</td><td align='left'>$posttitle</td></tr>
<tr><td align='right'>時間:</td><td align='left'>$parsetime</td></tr>
<tr><td align='right'>內文:</td><td align='left'>$postcontent</td></tr>
";
$all_text = "$all_text</table>";
// all_text 內容 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>
<body background="body-bg.jpg" style="background-attachment: fixed; color:#7e7a75; font-family: Arial, sans-serif; font-size: 18px; line-height: 1.5;">
<div id="box" style="width:90%; margin-left:10px; margin:0 auto;">
<div id="top" style="float:left; width:85%; text-align:left; "><p style="color:#FFFFFF; font-size:30px;">PTFast</p></div>
<div id="registerbox" style="float:left; width:80%; height:1050px; background-color:#fff; padding-left:5%; padding-right:5%; padding-top:5%; padding-bottom:5%;">
<p>
<input type="button" value="發新文章" onclick="window.location.assign('newpost.php');" />
<input type="button" value="文章列表" onclick="window.location.assign('main.php');" />
<input type="button" value="個人信箱" onclick="window.location.assign('mailbox.php');" />
<input type="button" value="個人資料" onclick="window.location.assign('profile.php');" />
<input type="button" value="登出帳號" onclick="window.location.assign('logout.php');" />
</p>
<p>信件內容:</p>
<?php echo $all_text; ?>
</div>
<div class="blank" style="float:left; width:80%; height:20px; padding-left:5%; padding-right:5%; padding-top:5%; padding-bottom:5%;"><p></p></div>
</body>
</html>