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
|
<?php include('_init.php');
if (empty($_SESSION['member_login']) && empty($_SESSION['student_login'])) { header("Location: index.php"); exit; }
$sql = "select *,app_notification_user.id as app_notification_user_id from app_notification_user inner join app_notification on app_notification.id = app_notification_user.app_notification_id where app_notification.deleted = ? and app_notification_user.cmsloginid = ? order by app_notification.sent_date DESC"; $parameters = array(0, $_SESSION["cmsloginid"]); $result = bind_pdo($sql, $parameters, "selectall"); ?> <!DOCTYPE html> <html lang="en"> <head> <?php include('_head.php'); ?> <link href="css/style_k.css?v=<?= time(); ?>" type="text/css" rel="stylesheet"> </head>
<body> <?php include('_header.php') ?>
<?php include('_dialog.php') ?>
<div class="ProfileContent"> <div class="Profilecontainer"> <div class="row"> <div class="col-md-12"> <?php foreach ($result as $row) { $sql = "update app_notification_user set read_date = ? where id = ?"; $parameters = array(date("Y-m-d H:i:s"), $row["app_notification_user_id"]); bind_pdo($sql, $parameters);
echo _lang("Date").": ".$row["sent_date"]."<br>"; //echo _lang("Title").": ".$row["title"]."<br>"; echo _lang("Content").": ".$row["content"]."<br><hr>"; } ?> <br><br><br> </div> </div> </div> </div> <? include('_footer.php') ?> <script> function my_wish(type, id, _this) { jQuery.ajax({ url: '_ajax.php', type: 'POST', data: { ajax: "my_wish", type: type, id: id, }, dataType: 'html', //dataType (default: Intelligent Guess (xml, json, script, or html)) timeout: 1000, error: function (result) { //alert('Error Occur. Please try again.'); //console.log(result.responseText); }, success: function (result) { console.log(result); if (result == "1") { //change heart color $(_this).css("color", "#CC1342"); } else { $(_this).css("color", "#ccc"); } } }); } </script> </body> </html>
|