X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fnodes.php;h=2ace75364fb1e679f25b6b24ab90bec1142e195f;hb=12425f118c94f4c30d09b1f196d6c209a2b816dc;hp=22ec5fc1dbe0da8e42de021ce7f53e2c9665df51;hpb=9850bdc46997f51024a8e6d2dc183e8745eacf78;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index 22ec5fc..2ace753 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -5,9 +5,6 @@ if (!empty($_POST['FORCE_OB']) && $_POST['FORCE_OB'] == 'true') ob_start(); //header("Location: http://web.archive.org/web/20020925021139/http://kyberia.sk"); //echo "je to uz uplne v pici. vsetky data su stratene, prajem pekny den :)"; //exit; -error_reporting(1); -$_SESSION['debugging']=1; -//exit; //starting timer for benchmarking purposes $timer_start=Time()+SubStr(MicroTime(),0,8); @@ -15,6 +12,10 @@ $timer_start=Time()+SubStr(MicroTime(),0,8); //setting PHPSESSID cookie and starting user session session_start(); +error_reporting(1); +//$_SESSION['debugging']=1; +//exit; + if ($_SESSION['debugging']) { @@ -42,7 +43,6 @@ require(INCLUDE_DIR.'error_messages.inc'); require(INCLUDE_DIR.'database.inc'); $db = new CLASS_DATABASE(); -//$logger = new logger; //XXX if (!empty($_GET['template_id'])) { $template_id=$_GET['template_id']; @@ -67,7 +67,7 @@ $smarty->template_dir = TEMPLATE_DIR; //echo TEMPLATE_DIR.TEMPLATE_SET; //echo $smarty->template_dir; $smarty->compile_dir = SYSTEM_DATA."templates_c/"; -$smarty->config_dir = SMARTY_DIR.'configs/'; #XXX neexistuje +$smarty->config_dir = SMARTY_DIR.'configs/'; //XXX neexistuje $smarty->cache_dir = SMARTY_DIR.'cache/'; $smarty->plugins_dir = SMARTY_PLUGIN_DIR ; if ($_SESSION['debugging']) $smarty->debugging=true; @@ -84,9 +84,11 @@ if ($_SESSION['debugging']) { echo ""; } -if ($node['node_creator']==$_SESSION['user_id']) $node['node_permission']='owner'; +if ((isset($_SESSION['user_id']) && ($node['node_creator']==$_SESSION['user_id']))) { + $node['node_permission']='owner'; +} -if ($_SESSION['cube_vector']) { +if (isset($_SESSION['cube_vector']) && ($_SESSION['cube_vector'])) { if (strpos($node['node_vector'],$_SESSION['cube_vector'])===false) { echo "node::".$node['node_vector']; echo "cube_Vector::".$_SESSION['cube_vector']; @@ -109,14 +111,16 @@ if (empty($node)) { } } -//modifying node glass pearl -if (is_array($children_types[$node['node_type']])) $smarty->assign('children_types',$children_types[$node['node_type']]); +//modifying node glass pearl //XXX WTF +if (is_array($children_types[$node['node_type']])) { + $smarty->assign('children_types',$children_types[$node['node_type']]); +} $smarty->assign('types',$types); //$node['node_type']=$types[$node['node_type']]; -$node['node_content']=StripSlashes($node['node_content']); -$node['node_name']=StripSlashes($node['node_name']); +$node['node_content']= StripSlashes($node['node_content']); +$node['node_name']= StripSlashes($node['node_name']); //checking permissions function _checkPermissions() @@ -361,7 +365,7 @@ if ($user_id=$_SESSION['user_id']) { $user_id); $newmailset = $db->query($newmail_q); -# $newmailset=$db->query("select user_mail,user_mail_name,user_k,k_wallet from users where user_id='$user_id'"); +//$newmailset=$db->query("select user_mail,user_mail_name,user_k,k_wallet from users where user_id='$user_id'"); $newmailset->next(); $new_mail=$newmailset->getString('user_mail');