0) { echo ''; $_SESSION["message"] = ""; } ?>

Experiments Archive

'; $current_user = $_SESSION['username']; $myfile = fopen("archive/databases.csv", "r") or die("No experiments to display,"); echo " Experiment name "; if (strcmp(trim($current_user[2]), "admin") === 0) { echo "Username "; } echo " Start Time Finish Time Time Interval Nodes Params Action "; function display_entries($is_admin, $myArray) { echo ""; $name = $myArray[0]; if ($is_admin) { echo "" . $myArray[0] . ""; echo "" . trim($myArray[6]) . ""; } else { echo "" . $myArray[0] . ""; } echo "" . $myArray[1] . ""; echo "" . $myArray[2] . ""; echo "" . $myArray[3] . ""; echo "" . $myArray[4] . ""; echo "" . $myArray[5] . ""; echo "" . " CSV Download
XML Download
Delete" . ""; echo ""; } echo ""; while(($line = fgets($myfile)) !== false){ $myArray = explode(',', $line); if (strcmp(trim($current_user[2]), "admin") === 0) { display_entries(true, $myArray); } else { if (strcmp($current_user[0], trim($myArray[6])) === 0) { display_entries(false, $myArray); } } } echo ""; fclose($myfile); echo "

"; } else{ echo "Please log in to see experiments"; } ?>