syntax fix
[mirrors/Kyberia-bloodline.git] / wwwroot / nodes.php
index 22ec5fc1dbe0da8e42de021ce7f53e2c9665df51..2ace75364fb1e679f25b6b24ab90bec1142e195f 100644 (file)
@@ -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 "</pre>";
 }
 
-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');
This page took 0.113626 seconds and 4 git commands to generate.