Last change
on this file since 169 was
168,
checked in by fpvanagthoven, 13 years ago
|
- moveStep() [js] werkt weer, editor is nu op delete/clear na helemaal functioneel
- Zit nog steeds een creator bug in savesession.php en selectSession.php
- getInfo.php is nu aangepast om voor meerdere objecttypes te werken en relevante informatie terug te geven, geformatteerd als table. De styling hiervan moet wel nog beter geregeld worden.
|
File size:
1.4 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | require 'classes/master.php'; //should be at top of every page |
---|
4 | |
---|
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']); |
---|
10 | |
---|
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 | |
---|
28 | $session->pipeline = array(); |
---|
29 | for ($i = 0; $i < $count; $i++) { |
---|
30 | $results = $dbi->get($t[$i], array("uid" => $pl[$i])); |
---|
31 | if (count($results) > 0) { |
---|
32 | $result = $results[0]; |
---|
33 | } |
---|
34 | $session->pipeline[] = $result; |
---|
35 | } |
---|
36 | |
---|
37 | $dbi->set($session); |
---|
38 | var_dump($session); |
---|
39 | } |
---|
40 | } |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.