Last change
on this file since 248 was
246,
checked in by hendrikvanantwerpen, 13 years ago
|
Created first page mainmenu in new system.
Moved old pages out of project root.
Fixed RDFAPI.php case for people with proper OS'es.
|
File size:
1.5 KB
|
Rev | Line | |
---|
[208] | 1 | <?php |
---|
| 2 | |
---|
| 3 | require 'classes/master.php'; //should be at top of every page |
---|
| 4 | |
---|
| 5 | /* |
---|
| 6 | * Dit kan een STUK sneller. Vervang gewoon de hele pipeline string met de lokale versie. |
---|
| 7 | * Daarna: $session->eval |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | if (isset($_POST['uids']) && isset($_POST['types']) && isset($_POST['sessionUid'])) { |
---|
| 11 | if (!empty($_POST['uids']) && !empty($_POST['types']) && !empty($_POST['sessionUid'])) { |
---|
| 12 | // user has passed a pipeline/type string from javascript in order to save the session. |
---|
[238] | 13 | $uids = explode(",", $_POST['uids']); |
---|
| 14 | $types = explode(",", $_POST['types']); |
---|
[208] | 15 | |
---|
| 16 | $sessionUid = $_POST['sessionUid']; |
---|
[238] | 17 | $session_results = Session::get(array("uid" => $sessionUid)); |
---|
[208] | 18 | if (count($session_results) > 0) { |
---|
| 19 | $session = $session_results[0]; |
---|
| 20 | } else { |
---|
| 21 | echo "!!!!!!!!!!!!!!!!!!!!!!NO SESSION FOUND!!!!!!!!!!!!!!!!!!!!"; |
---|
| 22 | die(); |
---|
| 23 | } |
---|
[238] | 24 | if (count($uids) == count($types)) { |
---|
| 25 | $count = count($uids); |
---|
[208] | 26 | } else { |
---|
| 27 | echo "!!!!!!!!!!!!!!!!!NON MATCHING ARGUMENTS PASSED!!!!!!!!!!!!!!!"; |
---|
| 28 | die(); |
---|
| 29 | } |
---|
[238] | 30 | |
---|
[208] | 31 | $session->pipeline = array(); |
---|
| 32 | for ($i = 0; $i < $count; $i++) { |
---|
[238] | 33 | $type = $types[$i]; |
---|
| 34 | $results = $type::get(array("uid" => $uids[$i])); |
---|
[208] | 35 | if (count($results) > 0) { |
---|
| 36 | $result = $results[0]; |
---|
| 37 | } |
---|
| 38 | $session->pipeline[] = $result; |
---|
| 39 | } |
---|
| 40 | |
---|
[238] | 41 | $session->save(); |
---|
[208] | 42 | //var_dump($session); |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.