-
Notifications
You must be signed in to change notification settings - Fork 60
/
pagetestcompare.php
38 lines (31 loc) · 913 Bytes
/
pagetestcompare.php
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
<?php
require_once(dirname(__FILE__).'/global.php');
if (!is_null($webPageTestKey) && array_key_exists('compare', $_POST) && is_array($_POST['compare']))
{
$comparison_url = $webPageTestBase.'video/compare.php?tests=';
$repeat = 0;
if (array_key_exists('repeat', $_POST)) {
$repeat = 1;
}
$labels = null;
if (array_key_exists('label', $_POST)) {
$labels = array_reverse($_POST['label']);
}
$first = true;
foreach (array_reverse($_POST['compare']) as $test_id) {
if ($first) {
$first = false;
} else {
$comparison_url .= ',';
}
$comparison_url .= $test_id.'-r:1-c:'.$repeat; // -l:labelname
if (is_array($labels) && count($labels) > 0) {
$label = str_replace('-', '/', array_shift($labels));
$label = str_replace(':', '.', $label);
$comparison_url .= '-l:'.urlencode($label);
}
}
header('Location: '.$comparison_url);
exit;
}
header('Location: '.$showslow_base);