1
|
<html>
|
2
|
<head>
|
3
|
<script type="text/javascript" src="Scripts/json2.js"></script>
|
4
|
<script type="text/javascript" src="Scripts/webtoolkit.base64.js"></script>
|
5
|
<script language="JavaScript" type="text/javascript">
|
6
|
|
7
|
$(window).load(function () {
|
8
|
var parm = {
|
9
|
DocumentItemID : DocumentItemID,
|
10
|
bPartner : false,
|
11
|
CreateFinalPDFPermission : bCreatFinalPDFPermission,
|
12
|
NewCommentPermission : bNewCommentPermission,
|
13
|
ProjectNO : ProjectNo,
|
14
|
UserID : UserID,
|
15
|
Mode : 0
|
16
|
};
|
17
|
var parm_str = JSON.stringify(parm);
|
18
|
var encoding_str = Base64.encode(parm_str);
|
19
|
|
20
|
|
21
|
var url = "KCOM://"+encoding_str;
|
22
|
location.href = url;
|
23
|
}
|
24
|
|
25
|
function getParameter (strValue, parameterName, sep) {
|
26
|
strValue = RTrim(LTrim(strValue));
|
27
|
var lists = strValue.split(sep);
|
28
|
for (var i=0; i < lists.length; i++) {
|
29
|
if (Left(lists[i], "=").toLowerCase() == parameterName.toLowerCase()) {
|
30
|
return (Right(lists[i], "="));
|
31
|
}
|
32
|
}
|
33
|
return "";
|
34
|
}
|
35
|
|
36
|
function Left(SourceStr, FindStr) {
|
37
|
Index = SourceStr.indexOf(FindStr);
|
38
|
if(Index < 0) {
|
39
|
return ("");
|
40
|
}else{
|
41
|
return (SourceStr.substring(0, Index));
|
42
|
}
|
43
|
}
|
44
|
|
45
|
function Right(SourceStr, FindStr) {
|
46
|
Index = SourceStr.indexOf(FindStr);
|
47
|
if(Index < 0) {
|
48
|
return ("");
|
49
|
}else{
|
50
|
Len = SourceStr.length;
|
51
|
return(SourceStr.substring(Index+FindStr.length, Len));
|
52
|
}
|
53
|
}
|
54
|
|
55
|
function Trim(SourceStr) {
|
56
|
newStr = SourceStr.replace(/ /gi, "");
|
57
|
return (newStr);
|
58
|
}
|
59
|
|
60
|
function LTrim(value) {
|
61
|
var pos = 0;
|
62
|
for(var i=0; i < value.length; i++) {
|
63
|
if(value.substr(i,1) != " ") { pos = i; break; }
|
64
|
}
|
65
|
return (value.substring(pos, value.length));
|
66
|
}
|
67
|
|
68
|
function RTrim(value) {
|
69
|
var pos = 0;
|
70
|
for(var i=value.length-1; i >= 0; i--) {
|
71
|
if(value.substr(i,1) != " ") { pos = i; break; }
|
72
|
}
|
73
|
return (value.substring(0, pos+1));
|
74
|
}
|
75
|
|
76
|
</script>
|
77
|
</head>
|
78
|
<body text="#000000" bgcolor="#FFFFFF" onload="init();">
|
79
|
|
80
|
<script>
|
81
|
var ACTION = getParameter(location.search, "action", "&");
|
82
|
var CALLBACK = getParameter(location.search, "callback", "&");
|
83
|
var TARGET_HOST = getParameter(location.search, "host", "&");
|
84
|
var ProjectNo = getParameter(location.search, "ProjectNo", "&");
|
85
|
var UserID = getParameter(location.search, "UserID", "&");
|
86
|
var DocumentItemID = getParameter(location.search, "DocumentItemID", "&");
|
87
|
var bNewCommentPermission = getParameter(location.search, "NewCommentPermission", "&");
|
88
|
var bCreatFinalPDFPermission = getParameter(location.search, "CreateFinalPDFPermission", "&");
|
89
|
var bPartner = getParameter(location.search, "bPartner", "&");
|
90
|
var locationY = getParameter(location.search, "locationY", "&");
|
91
|
</script>
|
92
|
<DIV ID="PersistData" style="behavior:url(#default#userdata);"></DIV>
|
93
|
|
94
|
</body>
|
95
|
</html>
|