-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexplore.down.php
More file actions
571 lines (504 loc) · 20.3 KB
/
explore.down.php
File metadata and controls
571 lines (504 loc) · 20.3 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
<?php
$ixHost = $_SERVER["SERVER_NAME"];
if ($ixHost!='www.ixmaps.ca'){
header('Location: http://www.ixmaps.ca/explore.php');
exit;
}
// MaxMind Include Files needed to grab user's city
include('application/geoip/geoip.inc');
include('application/geoip/geoipcity.inc');
include('application/geoip/geoipregionvars.php');
// using MaxMind to find the city of client IP address
$myIp = $_SERVER['REMOTE_ADDR'];
$myCity = '';
$myCountry = '';
/*$gi1 = geoip_open("application/geoip/dat/GeoLiteCityv6.dat",GEOIP_STANDARD);
$record1 = geoip_record_by_addr_v6($gi1,"::".$myIp);
$myCity = ''.$record1->city;
$myCountry = ''.$record1->country_code;
geoip_close($gi1);*/
?>
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
<title>See where your data packets go | IXmaps</title>
<!-- Needed for skin of various UI components -->
<link rel="stylesheet" href="jquery-ui-1.10.1/development-bundle/themes/base/jquery-ui.css" />
<!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> -->
<!-- jQuery -->
<!-- Get here latest jQuery: using a fixed version now for testing ... -->
<script src="jquery-ui-1.10.1/js/jquery-1.9.1.js"></script>
<script src="jquery-ui-1.10.1/js/jquery-ui-1.10.1.custom.js"></script>
<!-- These are needed to enable table sorter -->
<script src="js/jquery.metadata.js"></script>
<script src="js/jquery.tablesorter.min.js"></script>
<link rel="stylesheet" href="css/tables.sorter.css" />
<link rel="stylesheet" href="css/themes/blue/style.css" />
<!-- Google Maps API -->
<!--
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
-->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&v=3&libraries=geometry"></script>
<!-- jQuery Utils -->
<script type="text/javaScript" src="js/underscore-min.js"></script>
<!-- IXmaps config files -->
<script type="text/javascript" src="js/config.js"></script>
<!--
<script type="text/javascript" src="js/ixmaps.js"></script>
<script type="text/javascript" src="js/ixmaps.gm.js"></script>
-->
<script>
var myIp = '<?php echo $myIp; ?>';
var myCity = '<?php echo $myCity; ?>';
var myCountry = '<?php echo $myCountry; ?>';
jQuery(function() {
jQuery("#tabs").tabs();
jQuery("#map-actions").tabs();
});
/*jQuery(document).ready(function() {
getChotel();
getPrivacyReport();
<?php
if($_GET && isset($_GET['data'])){
//echo '<hr/>';
//print_r($_GET);
?>
var postedData = '<?php echo $_GET['data'];?>';
processpostedData(postedData);
//processpostedData(boomerangJSON);
<?php
}
?>
jQuery('#news-btn').click(function() {
window.open("/documents/Keeping_Internet_Users_Summ_review_App_final_Jan_27.pdf","_newtab");
});
});*/
</script>
<script type="text/javascript">
var script = '<script type="text/javascript" src="http://google-maps-' +
'utility-library-v3.googlecode.com/svn/trunk/infobubble/src/infobubble';
if (document.location.search.indexOf('compiled') !== -1) {
script += '-compiled';
}
script += '.js"><' + '/script>';
document.write(script);
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24555700-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//--------------- END LOCALIZEABLE ---------------
</script>
<!-- STYLESHEETS -->
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<!-- <link rel="stylesheet" href="css/ix.redefined.css" type="text/css" /> -->
<link rel="stylesheet" href="css/ix.css" type="text/css" />
<link rel="stylesheet" href="css/ix-explore.css" type="text/css" />
<link rel="stylesheet" href="css/overwrites.css" type="text/css" />
<!-- this realy old stuff: NOT TO BE USED -->
<!--
<link rel="stylesheet" href="css/jquery-ui-1.8.24.custom.css"></script>
-->
</head>
<!-- <body onload="initialize()"> -->
<body>
<div id="wrapper"><!-- #wrapper -->
<header><!-- header -->
<img src="images/headerimage.jpg" width="1000" height="138"> <!-- <img src="images/headerimg.jpg" width="932" height="200" alt=""> header image -->
</header><!-- end of header -->
<!-- <span id="beta-message"><i>This beta version is being upgraded. We welcome your <a href="mailto: ixmaps@utoronto.ca?subject=IXmaps explore Page">feedback</a></i></span> -->
<?php include("includes/navigation.php"); ?>
<!-- <div id="beta-message-ok">
<i>This beta version is being upgraded. We welcome your <a href="mailto: ixmaps@utoronto.ca?subject=IXmaps Explore Page">feedback</a></i>
</div> -->
<div style="clear: both;"></div>
<br/><br/>
<div id="explore-content">
<div class="server-down-msg">
IXmaps <b>Explore page</b> has been taken off-line temporarily while a security issue is dealt with.
We hope it will be restored in the next day or two.
<br/><br/>
In the meantime, contact <a href="mailto:andrew.clement@utoronto.ca">Andrew Clement</a> with any questions or comments.
</div>
<!-- tabs -->
<div id="tabs" class="hide">
<ul>
<li><a href="#tabs-0">Quick Links</a></li>
<li><a href="#tabs-1">Custom Filters</a></li>
<li><a href="#tabs-2">Selected Routes</a></li>
<li><a href="#tabs-3">Map Options</a></li>
<li><a href="#tabs-4">Help</a></li>
</ul>
<!-- tabs-0 -->
<div id="tabs-0">
<h4>Quick Links:</h4>
<table>
<tr>
<td>
<form>
<button type="button" class="ql-button" id="last-submission-button">
Last submitted route
</button>
</form>
</td>
<td>
<form>
<button type="button" class="ql-button" id="recent-routes-button">
Last 50 submitted routes
</button>
</form>
</td>
</tr>
<tr>
<td>
</td>
<td>
<!-- <form>
<button type="button" class="ql-button" id="ix-geocorrect-button">
Examine traceroutes containing geo-corrections
</button>
</form> -->
</td>
</tr>
<tr>
<td>
<form method="get" action="../../cgi-bin/tr-query.cgi">
<button type="submit" class="ql-button" name="query_type" value="all_submitters">
Routes by submitter
</button>
</form>
</td>
<td>
<form method="get" action="../../cgi-bin/tr-query.cgi">
<button type="submit" class="ql-button" name="query_type" value="all_zip_codes">
Routes by postal codes/zip codes
</button>
</form>
</td>
</tr>
</table>
</div>
<!-- /tabs-0 -->
<!-- /tabs-1 -->
<div id="tabs-1">
<h3>Custom Filter Examples</h3>
<table>
<tr>
<td>
<form>
<button type="button" class="ql-button" id="all-boomerangs-button">
Boomerang routes
</button>
</form>
</td>
<td>
<form>
<button type="button" class="ql-button" id="non-CA-button">
Routes that do not go via Canada
</button>
</form>
</td>
</tr>
<tr>
<td>
<form>
<button type="button" class="ql-button" id="contain-NSA-button">
Routes that contain NSA cities
</button>
</form>
</td>
<td>
<form>
<button type="button" class="ql-button" id="non-US-button">
Routes that do not go via the US
</button>
</form>
</td>
<tr>
<td>
<form>
<button type="button" class="ql-button" id="my-city-button">
Routes from my city
</button>
</form>
</td>
<td>
<form>
<button type="button" class="ql-button" id="my-country-button">
Routes from my Country
</button>
</form>
</td>
</tr>
</table>
<br/>
<h3>Custom Filters</h3>
<!-- autocomplete data -->
<div id="autocomplete-data" class="hide"></div>
<div id="filter-container">
<!-- these will filled in by addFilterConstraint -->
</div>
<div>
<div style="float: left;">
<button id="reset-filters-button" class="action-button">Reset Values</button>
</div>
<div>
<button id="process-filters-button" class="action-button"><b>Submit</b></button>
</div>
</div>
</div>
<!-- /tabs-1 -->
<!-- /tabs-2 -->
<div id="tabs-2">
<h3>Selected Routes</h3>
<br/>
<a href="javascript:submitCustomQuery(1859);">Toronto to San Francisco (#1859)</a><br/>
<a href="javascript:submitCustomQuery(1486);">Vancouver to Halifax (#1486)</a><br/>
<a href="javascript:submitCustomQuery(1474);">Vancouver to Thunder Bay (#1474)</a><br/>
<a href="javascript:submitCustomQuery(3445);">New York to San Francisco (#3445)</a><br/>
<a href="javascript:submitCustomQuery(1751);">Austin to San Francisco (#1751)</a><br/>
<a href="javascript:submitCustomQuery(1577);">Honolulu to Prince Edward Island (#1577)</a>
<br/>
<br/>
<a href="javascript:showTestedCarriers();">Show Carriers TR Sample</a>
</div>
<!-- /tabs-2 -->
<!-- tabs-3 -->
<div id="tabs-3">
<div id="map-op-0" class="map-actions-controls">
<h3>Enable</h3>
<input id="map-allow-multiple" class="map-tool-off" type="button" onMouseDown="setAllowMultipleTrs()" value="Multiple TRs"/>
<input id="map-allow-recenter" class="map-tool-on" type="button" onMouseDown="setAllowRecenter()" value="Re-center"/>
</div>
<div id="map-op-1" class="map-actions-controls">
<h3>Display</h3>
<input id="map-show-hops" class="map-tool-on" type="button" onMouseDown="setShowHops()" value="Hops"/>
<input id="map-show-routers" class="map-tool-on" type="button" onMouseDown="setShowRouters()" value="Routers"/>
<input id="map-show-marker-origin" class="map-tool-off" type="button" onMouseDown="setAddMarkerInOrigin()" value="Marker in Origin"/>
<input id="map-show-info-global" class="map-tool-off" type="button" onMouseDown="setShowInfoGlobal()" value="Advanced Log"/>
</div>
<div id="map-op-2" class="map-actions-controls">
<h3>Exclude Routers</h3>
<input id="map-exclude-a" class="map-tool-on" type="button" onMouseDown="excludeA()" value="Lat/Long = 0"/>
<input id="map-exclude-b" class="map-tool-on" type="button" onMouseDown="excludeB()" value="Generic Locations"/>
<input id="map-exclude-d" class="map-tool-on" type="button" onMouseDown="excludeD()" value="Reserved AS"/>
<!-- <input id="map-exclude-c" class="map-tool-on" type="button" onMouseDown="excludeC()" value="Impossible Distances"/> -->
<input id="map-exclude-e" class="map-tool-on" type="button" onMouseDown="excludeE()" value="User-flagged"/>
</div>
<div id="map-op-3" class="map-actions-controls">
<h3>IXmaps Layers</h3>
<input id="map-show-nsa" class="map-tool-off" type="button" onMouseDown="setShowNsa()" value="NSA"/>
<input id="map-show-hotel" class="map-tool-off" type="button" onMouseDown="setShowHotel()" value="Hotel"/>
<input id="map-show-google" class="map-tool-off" type="button" onMouseDown="setShowGoogle()" value="Google"/>
<input id="map-show-uc" class="map-tool-off" type="button" onMouseDown="setShowUc()" value="Undersea Cable Landing Site"/>
</div>
</div>
<!-- /tabs-3 -->
<!-- tabs-4 -->
<div id="tabs-4">
<h3>Help</h3>
<p>
If you're a <i>new user</i>, it may be easiest to begin with some of our canned queries in the Quick Links section.
For example, if you've just generated a route, you'll be able to find it be clicking on 'Examine last submitted route'
or by clicking on 'Examine routes by submitter' and locating your submitter name.
</p>
<div>
For users more comfortable with querying databases, the Custom Filters section allows dynamic, extensible queries based
on many of the data fields collected by the route generator program
</div>
<div class="expandable- hide-">
<div>For example, to view routes that neither start nor end in Canada, a user could query:</div>
<div><b>| Does not | Originate in | Country | CA | AND | +</b></div>
<div><b>| Does not | Terminate in | Country | CA |</b></div>
<div>Or, to browse routes ending in Toronto or Ottawa, a user could query:</div>
<div><b>| Does | Terminate in | City | Toronto | OR | +</b></div>
<div><b>| Does | Terminate in | City | Ottawa |</b></div>
<div>
Note that, while the query is performed on the entire IXmaps database, due to computational and bandwidth limitations
the server only returns the first 200 results. If you do not see the route you were looking for, it is best to add additional
filter constraints (e.g. Submitter).
</div>
</div>
</div>
<!-- /tabs-4 -->
</div>
<!-- /tabs -->
<!-- <div id="quick-links-table"></div> -->
<div style="clear: both"></div>
<br/>
<div id="filter-results-log" class="hide"></div>
<!-- Map options -->
<!-- FIXME add all this calls to javascript functions in jquery -->
<a name="tot-trs" id="tot-trs"></a>
<div id="map-container" class="hide">
<div id="map-core-controls" class="hide" style="float:right;">
<div id="map-status-info" class="" style="float:left;">
<span id="map-loading-status"></span>
</div>
<div style="float:left;">
<input class="map-tool-off" type="button" onMouseDown="addAllTrs()" value="Add All"/>
<input class="map-tool-off" type="button" onMouseDown="removeAllTrs()" value="Remove All"/>
<!-- <input id="map-render-stop-play" class="map-tool-off" type="button" onMouseDown="stopRender()" value="Stop (Experimental)"/> -->
</div>
</div>
<div id="map-stats-container">
<!-- Check the css for this, some not used now -->
<div id="map-info-global" class="map-info-containers hide">
<span id="map-info-total"></span>
<br/>
<span id="map-router-exclusion"></span>
<br/>
<span id="map-impossible-distance-log"></span>
</div>
</div>
<!-- / map-stats-container -->
</div>
<!-- / map-container -->
<div style="clear:both;"></div>
<!-- map-canvas-container -->
<div id="map-canvas-container" class="hide">
<div style="float:left;">
<div id="map_canvas" class="map-canvas"></div>
</div>
<div style="">
<div id="map-legend" class="map-info-containers--">map-legend</div>
<div id="map-tr-active" class="map-info-containers">map-tr-active</div>
<div id="map-info" class="map-info-containers">map-mouse-actions</div>
</div>
</div>
<!-- /map-canvas-container -->
<div style="clear:both;"></div>
<div id="filter-results" class="hide">
<!-- filled in when queries are returned -->
</div>
<div id="filter-results-ixmaps-data" class="hide">
<!-- filled in when queries are returned -->
</div>
<div id="loader" style="display: none">
<div id="loader-mask"></div>
<div class="loader-image">
<img width="100px" src="images/loading2.gif"/>
<br/><br/>
<div id="cancel-query-div">
<button id="cancel-query">Cancel</button>
</div>
</div>
</div>
</div><!-- #content -->
<!-- <div class="btn-container">
<button id="news-btn">
<span>
<div><span id="news-btn-new-tag">NEW:</span><i> Keeping Internet Users in the Know or in the Dark 2013</i></div>
<div>A Report on the Data Privacy Transparency of the Canadian Internet Service Providers</div>
</span>
</button>
</div> -->
<footer>
<?php include("includes/footer.php"); ?>
</footer>
</div><!-- #wrapper -->
<br/>
<?php //include("includes/sidebar.php"); ?>
<div id="tr-details" class="hide">
<div id="tr-details-close">
<a href="javascript:closeTrDetails();">
<img src="images/icon-close.png">
</a>
</div>
<div id="tr-details-data">
<iframe id="tr-details-iframe" src=""></iframe>
</div>
</div>
<div id="privacy-details" class="hide">
<div id="privacy-details-close">
<a href="javascript:closePrivacy();">
<img src="images/icon-close.png">
</a>
</div>
<div id="carrier-title"></div>
<div style="clear: both;"></div>
<div id="privacy-details-data">privacy-details-data</div>
</div>
<div id="ip-flags" class="hide">
<div id="ip-flags-close">
<a href="javascript:closeIpFlags();">
<img src="images/icon-close.png">
</a>
</div>
<div id="ip-flags-new">
<a href="javascript:newIpFlag();">Create a new Report</a>
</div>
<div id="ip-flags-Title">
<h2>User generated flags</h2>
</div>
<div id="ip-flag-active"></div>
<div style="clear: both;"></div>
<div>
<div id="ip-flag-info"></div>
<div id="ip-flag-first-msg">
<p>Please flag routers you believe are shown in the wrong place. Flagged routers alert other users to possible inaccuracies and can be eliminated from traceroute mapping so what you see is more reliable (See Explore>Map options>Exclude routers>User-flagged). Flagging routers will also help us to re-locate them more accurately, especially if you can provide us with good clues as to their correct position. We periodically review the database and review flagged routes for correction.</p>
<p>We appreciate helpful details, but all fields are optional.</p>
<p>Thanks.</p>
<div id="ip-flag-log"></div>
</div>
</div>
<div style="clear: both;"></div>
<div id="ip-flag-insert" class="hide">
<h3>Create a new report</h3>
<table>
<tr>
<td>Username</td>
<td><input id="user_nick" type="text"/></td>
</tr>
<!-- <tr>
<td>Reasons for the error: </td>
<td>
Type 1: <input id="ip-t-1" type="checkbox" value="1"/>
| Type 2: <input id="ip-t-2" type="checkbox" value="2"/>
| Type 3: <input id="ip-t-3" type="checkbox" value="3"/>
| Type 4: <input id="ip-t-4" type="checkbox" value="4"/>
| Type 5: <input id="ip-t-5" type="checkbox" value="5"/>
| Type 6: <input id="ip-t-6" type="checkbox" value="6"/>
</td>
</tr> -->
<tr>
<td>Comment:</td>
<td><textarea id="user_msg"></textarea></td>
</tr>
<tr>
<td>Suggested Location:</td>
<td><textarea id="ip_new_loc"></textarea></td>
</tr>
</table>
<br/>
<input type="button" id="submit-ip-flag" value="Submit" onclick="saveIpFlag()"/>
<input type="button" id="cancel-ip-flag" value="Cancel" onclick="cancelIpFlag()"/>
</div>
<div id="ip-flags-data">
<!-- <div id="ip-flags-data-title">
<h3>List of user flags</h3>
<br/>
</div> -->
<div id="ip-flags-data-list"></div>
</div>
</div>
<!-- <form action="/explore.php" method="post" id="send-to-explore">
<input id="data" name="data" type="hidden" value=""/>
</form> -->
</body>
</html>