get_image_link fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / set_header_template.inc
CommitLineData
51ff3226 1<?php
2// modifikacia ktora dovoli natiahnut iba spravny header template
3function set_header_template() {
4global $db,$error;
5$header_id=mysql_real_escape_string($_POST['header_id']);
6$user_id=$_SESSION['user_id'];
7
8if (!$user_id) {
9return false;
10}
11if ($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'");
14if($set->getNumRows()!=1) {
15global $error;
16$error="dana noda bud neexistuje alebo neni nakonfigurovana ako template";
17return 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.859444 seconds and 4 git commands to generate.