Added rudimentary transport support to get_threaded_children
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / set_header_template.inc
1 <?php
2 // modifikacia ktora dovoli natiahnut iba spravny header template
3 function set_header_template() {
4 global $db,$error;
5 $header_id=mysql_real_escape_string($_POST['header_id']);
6 $user_id=$_SESSION['user_id'];
7
8 if (!$user_id) {
9 return false;
10 }
11 if ($header_id !=''){
12 $header_id = (int) $header_id; //integer only..[a odsekne medzery]
13 $set=$db->query("select * from nodes where external_link='template://$header_id'");
14 if($set->getNumRows()!=1) {
15 global $error;
16 $error="dana noda bud neexistuje alebo neni nakonfigurovana ako template";
17 return false; }
18 }
19
20 $db->query("update users set header_id='$header_id' where user_id='$user_id'");
21 $_SESSION['header_id']=$header_id;
22 }
23
24 ?>
This page took 0.259041 seconds and 4 git commands to generate.