$val){ if(!isset($json['state']['data'][$key])&&$key!='password'){ $json['state']['data'][$key] = $val; } } } // Title if(is_null($title)){ $title = $_GET['id']; } $json['state']['title'] = $title; // URL switch($type){ case 'user':$url='~'.$id;break; case 'group':$url='+'.$id;break; case 'issue':$url='!'.$id;break; case 'action':$url='';break; default:$url=$type.'-'.$id; } $json['state']['url'] = $url; // Tobar if($LOGGEDIN){ $context = Array( 'user'=>userObj($_SESSION['username']), 'key'=>true ); }else{ $context = Array(); } $context['title'] = $title; $context['url'] = $url; $json['topbar'] = Array( 'template'=>file_get_contents(PATH_DATA.'pages/topbar.template'), 'context'=>$context ); die(json_encode($json)); } function isvalid($col,$v=null){ if($v == null){ $v = $_GET; } return isset($v[$col]) && !empty($v[$col]); } ?>