Changeset 166 for Dev/trunk/savesession.php
- Timestamp:
- 11/23/11 17:15:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/savesession.php
r164 r166 3 3 require 'classes/master.php'; //should be at top of every page 4 4 5 $session = $_SESSION['localSessionCopy']; 6 $dbi = new DatabaseInterface(); 7 $dbi->set($session); 5 if (isset($_POST['uids']) && isset($_POST['types']) && isset($_POST['sessionUid'])) { 6 if (!empty($_POST['uids']) && !empty($_POST['types']) && !empty($_POST['sessionUid'])) { 7 // user has passed a pipeline/type string from javascript in order to save the session. 8 $pl = explode(",", $_POST['uids']); 9 $t = explode(",", $_POST['types']); 8 10 9 redirect('pipelineEditor.php'); 11 $sessionUid = $_POST['sessionUid']; 12 //var_dump($t); 13 $dbi = new DatabaseInterface(); 14 $session_results = $dbi->get("Session", array("uid" => $sessionUid)); 15 if (count($session_results) > 0) { 16 $session = $session_results[0]; 17 } else { 18 echo "!!!!!!!!!!!!!!!!!!!!!!NO SESSION FOUND!!!!!!!!!!!!!!!!!!!!"; 19 die(); 20 } 21 if (count($pl) == count($t)) { 22 $count = count($pl); 23 } else { 24 echo "!!!!!!!!!!!!!!!!!NON MATCHING ARGUMENTS PASSED!!!!!!!!!!!!!!!"; 25 die(); 26 } 27 for ($i = 0; $i < count($pl); $i++) { 28 $results = $dbi->get($t[$i], array("uid" => $pl[$i])); 29 if (count($results) > 0) { 30 $result = $results[0]; 31 } 32 $session->pipeline[] = $result; 33 } 34 35 $dbi->set($session); 36 echo "true"; 37 } 38 } 10 39 ?>
Note: See TracChangeset
for help on using the changeset viewer.