_SWF_Window.html
6.08 KB
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/mediaWindow.css"/>
<title>鹿屋体育大学連携[RENKEI] :: ActiBook</title>
<meta name="keywords" content="鹿屋体育大学連携[RENKEI],電子ブック,ebook,デジタルカタログ,アクティブック,ActiBook,書籍" />
<meta name="description" content="鹿屋体育大学連携[RENKEI] :: ActiBook" />
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true" />
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script src="js/aws-sdk-2.1.10.min.js"></script>
<script language="javascript">
var isIE = navigator.appName.indexOf("Microsoft") != -1;
var isSWFActive = false;
var lostFocusflag = true;
function swfActivity(){
thisMovie("ActiBook").focus();
isSWFActive = true;
checkWindow();
}
function thisMovie(movieName) {
return (isIE) ? window[movieName] : document[movieName];
}
function checkWindow(){
if(isSWFActive == true){
var hf = document.hasFocus();
if(hf == true){
thisMovie("ActiBook").focus();
thisMovie("ActiBook").hideProtectPanel();
setFlagTrue();
}else{
if(lostFocusflag){
thisMovie("ActiBook").showProtectPanel();
}
}
}
}
function lostFocus(){
if(isSWFActive == true && lostFocusflag){
thisMovie("ActiBook").showProtectPanel();
}
}
function catchFocus(){
if(isSWFActive == true){
thisMovie("ActiBook").focus();
thisMovie("ActiBook").hideProtectPanel();
setFlagTrue();
}
}
function init(){
}
function setFlagFalse(){
lostFocusflag = false;
}
function setFlagTrue(){
lostFocusflag = true;
}
</script>
</head>
<style type="text/css">
@media print {
body { display: none !important; }
}
body { -ms-touch-action: manipulation; }
</style>
<script language="javascript">
setInterval('checkWindow()',250);
document.write('<body bgcolor="#ffffff" onLoad="init()">');
</script>
<script src="js/WindowOpen.js" language="javascript"></script>
<script language="javascript">
var protocol = ("https:" == document.location.protocol) ? "https" : "http";
if (AC_FL_RunContent == 0) {
alert("このページでは \"AC_RunActiveContent.js\" が必要です。");
} else {
AC_FL_RunContent(
'codebase', protocol + '://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
'width', '100%',
'height', '100%',
'src', 'ActiBook',
'quality', 'high',
'pluginspage', protocol + '://get.adobe.com/jp/flashplayer',
'align', 'center',
'play', 'true',
'loop', 'true',
'scale', 'noborder',
'wmode', 'window',
'devicefont', 'false',
'id', 'ActiBook',
'bgcolor', '#ffffff',
'name', 'ActiBook',
'menu', 'true',
'allowFullScreen', 'true',
'allowScriptAccess','sameDomain',
'movie', 'ActiBook',
'salign', ''
); //end AC code
}
function sendToSwfInfo(){
return location.href;
}
function getUserAgentInfo(){
return navigator.userAgent;
}
function getReferrer(){
var url = encodeURIComponent(document.referrer);
return url;
}
</script>
<input type="button" id="open" name="open" value="open" style="display:none;" onClick="openMediaWindow(mediaWindow.params);" />
<script type="text/javascript">
var secretAccessKey;
var expiration;
var accessKeyId;
var sessionToken;
var certificationNum = 0;
function AccessRequest(str){
try{
if(accessKeyId == undefined){
if(certificationNum <= 3){
Authentication(str);
}else{
return;
}
}else{
var removeTimeT = expiration.replace("T"," ");
var removeTimeZ = removeTimeT.replace("Z","");
var removeTime = removeTimeZ.replace(/-/g,"/");
var validTime = new Date(removeTime).getTime();
var d = new Date();
var hours = d.getTimezoneOffset()*60000;
var strTime = d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate()+" "+d.getHours() +":"+d.getMinutes()+":"+d.getSeconds();
var localTime = new Date(strTime).getTime();
var strlocalTime = localTime + hours;
if((validTime - strlocalTime)/60000 >= 10){
putLog(str);
}else{
Authentication(str);
}
}
}catch(e){
AccessRequest(str);
certificationNum++;
}
}
function Authentication(str){
var URL = "https://token.heatmaplog.com/api/token.php";
var params = "id=HeatMapLog&pass=xLAZsasTXQKm";
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST",URL,true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.onreadystatechange = function(){AuthenticationParams(xmlhttp,str)};
xmlhttp.send(params);
}
function AuthenticationParams(xmlhttp,str){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var jsonString = xmlhttp.responseText;
var jsonValue = JSON.parse(jsonString);
secretAccessKey = jsonValue.result.SecretAccessKey;
expiration = jsonValue.result.Expiration;
accessKeyId = jsonValue.result.AccessKeyId;
sessionToken = jsonValue.result.SessionToken;
putLog(str);
}
}
function putLog(str){
try{
var kinesis = new AWS.Kinesis(options = {
accessKeyId: accessKeyId,
secretAccessKey: secretAccessKey,
sessionToken: sessionToken,
region: 'ap-northeast-1'
});
var guid='';
for (var i=1; i<=32; i++){
var n = Math.floor(Math.random()*16.0).toString(16);
guid += n;
if((i==8)||(i==12)||(i==16)||(i==20))
guid += "-";
}
guid = guid.toUpperCase();
var params = {
Data: str,
PartitionKey:guid,
StreamName: 'prod-log-kinesis',
}
kinesis.putRecord(params,function(err,data){
if(err){
console.log(err,err.stack);
}else{
console.log(data);
}
});
}catch(e){
if(e.code == "ProvisionedThroughputExceeded"){
return;
}
}
}
</script>
</body>
</html>