-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurl.php
42 lines (39 loc) · 1.24 KB
/
url.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
39
40
41
42
<?php
session_set_cookie_params(0,dirname($_SERVER['SCRIPT_NAME']));
session_start();
// Get the Full URL to the session.php file
$thisfile = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$parts = strtok("url.php", $thisfile);
if (isset($_GET["makechart"])) {
$baselink = $parts["0"]."session.php";
if (isset($_GET["seshid"])) {
$seshid = strval(mysql_escape_string($_GET["seshid"]));
if (isset($_POST["plotdata"])) {
$plotdataarray = $_POST["plotdata"];
$s1data = $plotdataarray[0];
$s2data = $plotdataarray[1];
$outurl = $baselink."?id=".$seshid."&s1=".$s1data."&s2=".$s2data;
}
else {
$seshid = $_SESSION['recent_session_id'];
$outurl = $baselink."?id=".$seshid;
}
}
else {
$seshid = $_SESSION['recent_session_id'];
$outurl = $baselink."?id=".$seshid;
}
}
else {
$baselink = $parts["0"]."session.php";
if (isset($_POST["seshidtag"])) {
$seshid = strval(mysql_escape_string($_POST["seshidtag"]));
$outurl = $baselink."?id=".$seshid;
}
else {
$seshid = $_SESSION['recent_session_id'];
$outurl = $baselink."?id=".$seshid;
}
}
header("Location: ".$outurl);
?>