| @@ 476-485 (lines=10) @@ | ||
| 473 | } |
|
| 474 | ||
| 475 | $interactions = array(); |
|
| 476 | if (isset($_REQUEST['interact'])) { |
|
| 477 | if (is_array($_REQUEST['interact'])) { |
|
| 478 | foreach ($_REQUEST['interact'] as $idx => $interac) { |
|
| 479 | $interactions[$idx] = preg_split('/,/', substr($interac, 1, -1)); |
|
| 480 | if (!isset($interactions[$idx][7])) { // Make sure there are 7 elements. |
|
| 481 | $interactions[$idx][7] = ''; |
|
| 482 | } |
|
| 483 | } |
|
| 484 | } |
|
| 485 | } |
|
| 486 | ||
| 487 | echo save_item( |
|
| 488 | (!empty($_REQUEST['lid']) ? $_REQUEST['lid'] : null), |
|
| @@ 42-52 (lines=11) @@ | ||
| 39 | return $return; |
|
| 40 | } |
|
| 41 | $objectives = array(); |
|
| 42 | if (isset($_REQUEST['objectives'])) { |
|
| 43 | if (is_array($_REQUEST['objectives'])) { |
|
| 44 | foreach ($_REQUEST['objectives'] as $idx => $ob) { |
|
| 45 | $objectives[$idx] = explode(',', substr($ob, 1, -1)); |
|
| 46 | if (!isset($objectives[$idx][4])) { |
|
| 47 | // Make sure there are 7 elements. |
|
| 48 | $objectives[$idx][4] = ''; |
|
| 49 | } |
|
| 50 | } |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| 54 | echo save_objectives( |
|
| 55 | $_REQUEST['lid'], |
|