get_image_link fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / configure_poll.inc
1 <?php
2
3 function configure_poll() {
4 //poll is special node with serialized option.text and option.number array in node_content
5
6 global $db,$node;
7 $user_id=$_SESSION['user_id'];
8 if ($node['node_creator']==$user_id || $node['node_permission']=='master') {
9
10 $options=explode(";",$_POST['options']);
11 if (!Is_array($options)) {
12 $error="ain't any optionz for da poll h3r3 mista'";
13 return false;
14 }
15 foreach ($options as $option) {
16 $optionz[]=array("text"=>nodes::processContent($option),"number"=>"0");
17 }
18
19 $optionz=serialize($optionz);
20
21 $params['node_content']=$optionz;
22 $params['node_name']=$_POST['question'];
23 $params['template_id']="1549834";
24 $params['node_creator']=$_SESSION['user_id'];
25 nodes::addNode($params);
26 Header("Location: /id/".$node['node_parent']."/");
27
28 }
29
30
31 }
32
33 ?>
34
This page took 0.475245 seconds and 4 git commands to generate.