get_image_link fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / configure_template_id.inc
1 <?php
2 function configure_template_id() {
3 global $db,$error,$node;
4 $node_id=$node['node_id'];
5 $user_id=$_SESSION['user_id'];
6
7 if (($node['node_permission']=='owner') || ($node['node_permission']=='master')) {
8
9 if (is_numeric($_POST['template_id'])) $template_id=$_POST['template_id'];
10 else {
11 $error=$error_messages['INCORRECT_TEMPLATE_ID'];
12 return false;
13 }
14
15 if ($_POST['apply_on_vector']) {
16 $vector=$node['node_vector'];
17 if (empty($vector)) {
18 $error=$error_messages['INCORRECT_VECTOR'];
19 return false;
20 }
21 $q="update nodes set template_id='$template_id' where node_vector like '$vector%'";
22 $db->query($q);
23 }
24
25 else {
26 $q="update nodes set template_id='$template_id' where node_id='$node_id'";
27 $db->query($q);
28 }
29 }else{
30 $error=$error_messages['EVENT_PERMISSION_ERROR'];
31 return false;
32 }
33 }
34 ?>
This page took 0.255057 seconds and 4 git commands to generate.