equal
deleted
inserted
replaced
26 { |
26 { |
27 $currID = 1; |
27 $currID = 1; |
28 } |
28 } |
29 // read session IDs from cookie, if cookie doesn't exist, set to 1 (master) |
29 // read session IDs from cookie, if cookie doesn't exist, set to 1 (master) |
30 |
30 |
31 echo $_COOKIE["sid1"]; |
31 //echo $_COOKIE["sid1"]; |
32 $currSID1 = $_COOKIE['sid1']; |
32 $currSID1 = $_COOKIE['sid1']; |
33 if ($currSID1 == "") |
33 if ($currSID1 == "") |
34 { |
34 { |
35 $currSID1 = "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa"; |
35 $currSID1 = "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa"; |
36 } |
36 } |
39 if ($currSID2 == "") |
39 if ($currSID2 == "") |
40 { |
40 { |
41 $currSID2 = "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa"; |
41 $currSID2 = "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa"; |
42 } |
42 } |
43 |
43 |
44 print_r($_COOKIE); |
44 //print_r($_COOKIE); |
45 |
45 |
46 $status = $_GET['alert']; |
46 $status = $_GET['alert']; |
47 $view_mode = $_GET['view_mode']; |
47 $view_mode = $_GET['view_mode']; |
48 $view_order = $_GET['view_order']; |
48 $view_order = $_GET['view_order']; |
49 |
49 |
52 $conn = mysql_connect('localhost','www-data','www-data') or die(mysql_error()); |
52 $conn = mysql_connect('localhost','www-data','www-data') or die(mysql_error()); |
53 mysql_select_db('members'); |
53 mysql_select_db('members'); |
54 |
54 |
55 // search server cache for received websites |
55 // search server cache for received websites |
56 // anonymous uid=1, sid1=06D5VlLQTbM57LL7IBMW38yHkFpb1XVa & sid2 =06D5VlLQTbM57LL7IBMW38yHkFpb1XVa |
56 // anonymous uid=1, sid1=06D5VlLQTbM57LL7IBMW38yHkFpb1XVa & sid2 =06D5VlLQTbM57LL7IBMW38yHkFpb1XVa |
57 if (($currID != 1) && ($currSID1 != "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa") && ($currSID2 != "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa")) |
57 if (($currID != 1) && ($currSID1 != "06D5VlLQTbM57LL7IBMW38yHkFpb1XVa")) |
58 { |
58 { |
59 $query_cache = mysql_query("SELECT * FROM requests_tbl WHERE (uid = '$currID' OR uid = 1)"); |
59 $query_cache = mysql_query("SELECT * FROM requests_tbl WHERE (uid = '$currID' OR uid = 1)"); |
60 } |
60 } |
61 else |
61 else |
62 { |
62 { |
71 //echo $commandline; |
71 //echo $commandline; |
72 |
72 |
73 // exec($commandline, $wget_results); |
73 // exec($commandline, $wget_results); |
74 //$commandline = "squidclient -m HEAD -p 8080 -H \"Cache-Control: only-if-cached\n\" -u " . $db_fieldcache["req_ID"] . " -w " . $db_fieldcache["uid"] . " " . $db_fieldcache["req_val"] . " |grep X-Cache: |grep MISS"; |
74 //$commandline = "squidclient -m HEAD -p 8080 -H \"Cache-Control: only-if-cached\n\" -u " . $db_fieldcache["req_ID"] . " -w " . $db_fieldcache["uid"] . " " . $db_fieldcache["req_val"] . " |grep X-Cache: |grep MISS"; |
75 |
75 |
76 $filename = "/var/www/private/HTMLrequester/staging/{$db_fieldcache["req_ID"]}/"; |
76 $filename = "/var/www/private/HTMLrequester/router_stage/{$db_fieldcache["req_ID"]}/"; |
77 |
77 |
78 //$commandline = "squidclient -m HEAD -p 8080 -H \"Cache-Control: only-if-cached\n\" -u " . $db_fieldcache["req_ID"] . " -w " . $db_fieldcache["uid"] . " " . $db_fieldcache["req_val"] . " |grep X-Cache: |grep MISS"; |
78 //$commandline = "squidclient -m HEAD -p 8080 -H \"Cache-Control: only-if-cached\n\" -u " . $db_fieldcache["req_ID"] . " -w " . $db_fieldcache["uid"] . " " . $db_fieldcache["req_val"] . " |grep X-Cache: |grep MISS"; |
79 |
79 |
80 // exec($commandline, $cache_results); |
80 // exec($commandline, $cache_results); |
81 |
81 |
231 print "<span class='result_output_none'>Result pending</span>"; |
231 print "<span class='result_output_none'>Result pending</span>"; |
232 print "<a href='delete.php?req_id=" . $db_field['req_ID'] . "'><img src='images/x.gif' width='14' height='20' /></a>"; |
232 print "<a href='delete.php?req_id=" . $db_field['req_ID'] . "'><img src='images/x.gif' width='14' height='20' /></a>"; |
233 } else { |
233 } else { |
234 //header ('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . dirname($db_fieldcache["req_ID"])); |
234 //header ('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . dirname($db_fieldcache["req_ID"])); |
235 //strip_tags($text, '<p><a>') |
235 //strip_tags($text, '<p><a>') |
236 print "<span class='result_output'><a href='". 'staging/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val']) ."' target='_blank'>View website</a></span>"; |
236 print "<span class='result_output'><a href='". 'router_stage/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val']) ."' target='_blank'>View website</a></span>"; |
237 // print "<span class='result_output'><a href='" . $db_field['req_val'] ."' target='_blank'>View website</a></span>"; |
237 // print "<span class='result_output'><a href='" . $db_field['req_val'] ."' target='_blank'>View website</a></span>"; |
238 print "<a href='delete.php?req_id=" . $db_field['req_ID'] . "'><img src='images/x.gif' width='14' height='20' /></a>"; |
238 print "<a href='delete.php?req_id=" . $db_field['req_ID'] . "'><img src='images/x.gif' width='14' height='20' /></a>"; |
239 } |
239 } |
240 print "<div class='clear'></div></div>"; |
240 print "<div class='clear'></div></div>"; |
241 |
241 |