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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
<?php //not specific setting $page_settings = array( 'formid' => 'Approval', // for permission 'section' => 'Master', // parent/page title 'subsection' => 'Musical Instrument Link', // page title 'domain' => 'musical_instrument_link', // table/model name 'access' => 'GNr', // for permission ); require_once "check_login.php";
$notification_title = "234中文"; $notification_body = "211134中文"; $postData = array( //"to" => aes_crypt2($result["app_notification_token"], 2), "to" => 'cRaPV-YpIZo:APA91bGtSnY0MPIOopIxWB1M5etA_I83CvYflN4YtWwaWazjKyiNCr997K5AB6jNjTvmlfjH_pEwWD6FfXGutOHoXJ3NamjU-LD-fwBTALUsHHbONLIdZclx94N-SUKqT68lEdofkqiv', "priority" => 'high', "notification" => array("title" => $notification_title, "body" => $notification_body) ); var_dump(json_encode($postData));
$response = call_curl("https://fcm.googleapis.com/fcm/send", json_encode($postData), 1, array('Content-Type: application/json', 'Authorization: key=AAAA3KamHxU:APA91bHz0qc77CALD1ubOZ6DDihxoRD5SdzRRKUaqFvjR8WXt6wNicWqLBVoXWZZ_eB5VCr0SXtmBoR6bR1v4ttajmxvMG_fC7KUxZNDR1jkX3oDPoUOVGJMxotFltJUcsjusQW0zI-u'));
var_dump($response); exit; $postData = array( //"to" => aes_crypt2($result["app_notification_token"], 2), "to" => "cRaPV-YpIZo:APA91bGtSnY0MPIOopIxWB1M5etA_I83CvYflN4YtWwaWazjKyiNCr997K5AB6jNjTvmlfjH_pEwWD6FfXGutOHoXJ3NamjU-LD-fwBTALUsHHbONLIdZclx94N-SUKqT68lEdofkqiv", "notification" => array("title" => $notification_title, "body" => $notification_body) );
$url = "https://fcm.googleapis.com/fcm/send";
$option = array('http' => array( 'header' => 'Content-Type: application/json; Authorization: key=AAAA3KamHxU:APA91bHz0qc77CALD1ubOZ6DDihxoRD5SdzRRKUaqFvjR8WXt6wNicWqLBVoXWZZ_eB5VCr0SXtmBoR6bR1v4ttajmxvMG_fC7KUxZNDR1jkX3oDPoUOVGJMxotFltJUcsjusQW0zI-u', 'method' => 'POST', 'content' => http_build_query($postData) ));
$context = stream_context_create($option); var_dump($context); $result = file_get_contents($url, false, $context); var_dump($result); //var_dump($url); //var_dump($postData); //$response = call_curl($url, $postData, 1, array('Content-Type: application/json', 'Authorization: key=AAAA3KamHxU:APA91bHz0qc77CALD1ubOZ6DDihxoRD5SdzRRKUaqFvjR8WXt6wNicWqLBVoXWZZ_eB5VCr0SXtmBoR6bR1v4ttajmxvMG_fC7KUxZNDR1jkX3oDPoUOVGJMxotFltJUcsjusQW0zI-u')); //$response = call_curl($url, $postData, 1);
//var_dump(aes_crypt2($site_info["app_notification_key"], 2)); //var_dump($response);
exit;
$instrument_list = get_master_type_code("INSTRUMENT");
?> <!DOCTYPE html> <html> <head> <?php require_once "_html_head.php"; ?> </head> <body class="hold-transition skin-blue sidebar-mini"> <div class="wrapper"> <?php require_once "_header.php"; ?> <?php require_once "_menu.php"; ?>
<!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <?= _lang($page_settings['subsection']) ?> <small> <?= _lang("Index") ?> </small> </h1> <ol class="breadcrumb"> <li> <?= _lang("Home") ?> </li> <li class="active"><a href="<?= $page_settings['domain'] ?>_index.php"><i class="fa"></i> <?= _lang($page_settings['subsection']) ?> </a></li> </ol> </section>
<!-- Main content --> <section class="content">
<!-- Your Page Content Here -->
<!-- main table --> <div class="row"> <div class="col-xs-12"> <div class="box">
<div class="box-body">
<div class="table-responsive"> <table id="example2" class="table table-bordered table-hover datatable-with-filter"> <thead> <tr> <th class="" style="width: 140px;"><?= lang("Musical Instrument") ?></th> <th class="no-filter"><?= lang("Link") ?></th> </tr> </thead> <tbody> <?php foreach ($instrument_list as $row) { ?> <tr> <td style="width: 140px;"> <?= $row["name_".$_SESSION["wlangcode"]] ?> </td>
<td style=""> <a href="https://www.musiccircle.hk/category.php?id=<?= $row["id"] ?>" target="_blank"> https://www.musiccircle.hk/category.php?id=<?= $row["id"] ?></a> </td> </tr> <?php } ?> </tbody>
</table> </div>
</div> <!-- /.box-body --> </div> <!-- /.box --> </div> <!-- /.col --> </div> <!-- /.row -->
<!-- End of Your Page Content Here -->
</section> <!-- /.content --> </div> <!-- /.content-wrapper -->
<?php require_once "_footer.php"; ?> <?php require_once "_aside.php"; ?> </div> <!-- ./wrapper -->
<!-- REQUIRED JS SCRIPTS --> <?php require_once "_html_script.php"; ?>
<script> $(function () { alert(1); }) </script> </body> </html>
|