51ff3226 |
1 | <?php |
2 | function addSenateRequest() { |
3 | //first creates the request node, then request sub-nodes |
4 | |
5 | global $db,$node; |
6 | |
7 | $params['node_name']=$_POST['node_name']; |
8 | if (is_array($optionz)) $params['node_system_access']='moderated'; |
9 | else $params['node_system_access']='public'; |
10 | $params['node_creator']=$_SESSION['user_id']; |
11 | $params['node_content']=nodes::processContent($_POST['request_content']); |
12 | $id=nodes::addNode($params); |
13 | |
14 | |
15 | $options=explode(";",$_POST['options']); |
16 | $i=0; |
17 | foreach ($options as $option) { |
18 | ++$i; |
19 | $params['node_name']=$_POST['node_name']." $i. alternative"; |
20 | $params['node_system_access']='public'; |
21 | $params['node_creator']=UBIK_ID; |
22 | $params['node_parent']=$id; |
23 | $params['node_content']=nodes::processContent($option); |
24 | nodes::addNode($params); |
25 | } |
26 | |
27 | } |
28 | |
29 | ?> |
30 | |