-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
157 lines (142 loc) · 4.85 KB
/
Copy pathtest.php
File metadata and controls
157 lines (142 loc) · 4.85 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
<!doctype html>
<html>
<head>
<title>siteanalyze_ng test</title>
<!--<script type="text/javascript" src="siteanalyze_beautiful.js"></script>-->
<meta name="groups" content="Metagroups" />
<meta charset="utf-8" />
<style type="text/css">
body {
font-family:Arial;
font-size:90%;
background:#ccc;
line-height:135%;
}
#main {
width:750px;
padding:20px;
margin:auto;
margin-top:40px;
background:white;
min-height:700px;
}
#bc {
background:#eee;
font-size:11px;
padding:5px;
margin:5px 0;
}
#sz_fields input, #sz_fields label {
float:left;
width:350px;
margin-bottom:5px;
font-size:12px;
}
#sz_fields label {
text-align:right;
padding-right:20px;
color:#666;
line-height:25px;
width:80px;
}
#sz_fields br {
clear:left;
}
input[type="submit"] {
margin-left:100px;
}
h1 {
font-size:30px;
margin-bottom:30px;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
// Initialize array containing user-supplied variables, function calls etc.
var _sz = _sz || [];
var _szfb_config = _szfb_config || [];
_szfb_config.push({"feedbackid": 10, "layout": {"anim": true, "anim_duration": 300, "colors": {"background": "#9e9eff", "text": "black" }, "comment": false, "corners": 5, "font": {"name": "Verdana", "size": 11 }, "position": "E", "preset": {"count": 2, "highlightRange": false, "reversed": false, "type": "janej" }, "width": 250 }, "matches": {"include": [ {"m": 1, "s": "test" } ], "exclude": [] }, "texts": {"button": "BUTTON_VALUE", "close": "Close", "comment": "DEFAULT_COMMENT_BOX_VALUE", "confirmation": "CONFIRMATION_VALUE", "errors": {"commit": "Der opstod en fejl...", "grade": "ERROR_IF_NO_SCALE_VALUE" }, "hide": "Hide", "question": "Mortens", "title": "Udfyld tekstfelt" } });
_sz.push(['accountid', '1239539']);
_sz.push(['groups', 'Tester']);
_sz.push(['metagroup', 'groups']);
_sz.push(['breadcrumbs', 'id:bc']);
_sz.push(['sw', 'Search test']);
_sz.push(['hits', '20']);
_sz.push(['callback', 'load', buildfields]);
_sz.push(['callback', 'request', debugreq]);
_sz.push(['callback', 'feedback', function() {
console.log('fb loaded');
}]);
_sz.push(['feedback', null]);
// Load siteanalyze_ng, async style
(function() {
var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true;
//sz.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://') + '.siteimprove.com/siteanalyze_ng.js';
sz.src = 'siteanalyze_ng.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s);
})();
function buildfields() {
$(document).ready(function() {
$e = $('#sz_fields');
for(field in _sz.opts) {
$e.append(_sz.util.fmt('<label for="sz_{0}">{0}</label><input type="text" name="{0}" id="{0}" value="{1}" /><br />',
field,
(_sz.opts[field] != null) ? _sz.opts[field] : ""
));
}
});
}
function debugreq(req) {
p = req.params;
out = _sz.util.fmt('<li><strong>generated url</strong>:<br /><code>{0}</code></li>', new String(req.url).replace(/&/g, '<br /> &'));
for(field in p) {
if(_sz.util.empty(p[field])) continue;
out += _sz.util.fmt('<li><strong>{0}</strong>: {1}</li>', field, p[field]);
}
$('#sz_debug').prepend('<ul class="request">' + out + '</ul>');
}
$(document).ready(function() {
$('#sz_request').submit(function() {
var params = {};
$(this).find('input[type="text"]').each(function() {
params[this.name] = $(this).val();
});
_sz.push(['request', params]);
return false;
});
});
</script>
</head>
<body>
<div id="main">
<h1>siteanalyze_ng test</h1>
<div id="bc">Du > er > her</div>
<h3>Test onclick-handler</h3>
<ul>
<li><a href="link.html">Live link</a></li>
<li><a href="link2.html">Dead link</a></li>
<li><a href="#">Skip me (anchor link)</a></li>
<li><a href="slow.php">Slow link</a></li>
<li><a href="slow.php?ext" target="_blank">Slow external link</a></li>
</ul>
<h3>Scriptet</h3>
<p>
<strong>Initialisering</strong><br />
(Se kilden for denne side)
</p>
<p>
<strong>Koden</strong><br />
<a href="siteanalyze_ng.js">siteanalyze_ng.js</a>
</p>
<h3>Debug</h3>
<p><a href="dump.txt">Debugging-output</a> fra alle requests (<?php printf('%.2f mb', filesize('dump.txt')/(1024*1024)); ?>). <em>Nyest nederst</em>.</p>
<h2>Generér request</h2>
<p>Brug denne formular til at generere requests. Alle felter der ses her er gyldige felter for en request. Tomme felter ignoreres.</p>
<form method="get" id="sz_request" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<div id="sz_fields"></div>
<input type="submit" value="Send request" />
</form>
<div id="sz_debug"></div>
</div>
</body>
</html>