function getAllEvents()
	{
		$events = fetch("FETCH node WHERE property:class_name='event' NODESORTBY property:version SORTBY var:date,var:time");
		$events = getReadable($events);
		
		for ($n = 0; $n < count($events); $n++)
		{
			if (!isset($events[$n]->rand_color))
				$events[$n]->rand_color = colour('light');
		}
			
		return $events;
	}
Beispiel #2
0
	function exec($args, $stdin, &$stdout, &$stderr, &$system)
	{
		$args = str_replace("*", "%", $args);
		
		$children = fetch("FETCH node WHERE property:name LIKE '%$args%' NODESORTBY property:version SORTBY property:name");
		$children = getReadable($children);
		
		$stdout .= "total ".count($children)."\n";
		if (count($children) > 0)
		{
			$stdout .= "<table cellspacing=\"0\">";
			$stdout .= "<tr class=\"table_title\">";
			$stdout .= "<td>Id</td>";
			$stdout .= "<td>Rev.</td>";
			$stdout .= "<td>Lang.</td>";
			$stdout .= "<td>Class</td>";
			$stdout .= "<td>Rights</td>";
			$stdout .= "<td>User</td>";
			$stdout .= "<td>Group</td>";
			$stdout .= "<td>Time</td>";
			$stdout .= "<td>Name</td>";
			$stdout .= "</tr>";
			foreach ($children as $child)
			{
				$user = $child->getUser();
				$group = $child->getGroup();
				
				$stdout .= "<tr>";
				$stdout .= "<td>".$child->getNodeId()."</td>";
				$stdout .= "<td>".$child->getVersion()."</td>";
				$stdout .= "<td>".$child->getLanguage()."</td>";
				$stdout .= "<td>".$child->getClassName()."</td>";
				$stdout .= "<td>".$child->getRights()."</td>";
				$stdout .= "<td>".$user->username."</td>";
				$stdout .= "<td>".$group->name."</td>";
				$stdout .= "<td>".$child->getCreated()."</td>";
				$stdout .= "<td>".cmd(img(geticon($child->getIcon(), 16))."&nbsp;".$child->getName(), "exec=show&node_id=".$child->getNodeId())."</td>";
				$stdout .= "</tr>";
			}
			$stdout .= "</table>";
		}
		return true;
	}
Beispiel #3
0
	function draw(&$system, $args)
	{
		$query_string = "";
		$class = "";
		$children = array();
			
		if (is_array($args) && !empty($args['query']))
		{
			$query_string = trim($args['query']);
			$query_string2 = str_replace(" ", "%", $query_string);
			$class = (isset($args['class_name']) ? $args['class_name'] : "");
			$class_query = (!empty($class) ? " AND property:class_name='$class'" : "");
			$children = fetch("FETCH node WHERE property:name LIKE '%$query_string2%' $class_query NODESORTBY property:version SORTBY property:name");

			$children = getReadable($children);
		}

		$system->setZoneData($this->zone, utf8e(compiletpl("scripts/search", array("objects"=>$children, "class"=>$class, "query_string"=>$query_string))));
	}
<?
$invert = $object->getMeta("sort_direction", "") == "asc" ? "!" : "";

$children = fetch("FETCH node WHERE link:node_top='".$object->getNodeId()."' AND link:type='sub' AND !property:class_name='comment' AND !property:class_name='poll_answer' AND !property:class_name='image_region' NODESORTBY property:version SORTBY $invert".$object->getMeta("sort_by", "property:name"));

$children = getReadable($children);

if (count($children) > 0)
{
	$pagername = "children_show";
	include(gettpl("pager/start", $object));
	
	$view = $object->getMeta("view", "list");
	
	echo compiletpl("scripts/show/children-$view", array("start"=>$start, "end"=>$end, "objects"=>$children), $object);

	include(gettpl("pager/end", $object));
}
?>
<div class="main">
	<div class="container">
		<center>
		<?
			global $wwwpath;
		
			$parent = new mObject(getNode(getParentPath($object->getPathInTree())));
			
			$invert = "";
			if ($parent->getMeta("sort_direction", "") == "asc")
				$invert = "!";
			
			$family = fetch("FETCH node WHERE link:node_top='".$parent->getNodeId()."' AND link:type='sub' AND !property:class_name='comment' AND !property:class_name='poll_answer' NODESORTBY property:version SORTBY $invert".$parent->getMeta("sort_by", "property:name"));
			
			$family = getReadable($family);
			
			$prev = false;
			$next = false;
			
			for ($n = 0; $n < count($family); $n++)
			{
				if ($family[$n]->getNodeId() == $object->getNodeId())
				{
					if ($n > 0)
						$prev = $family[$n-1];
						
					if ($n < count($family)-1)
						$next = $family[$n+1];
				
					break;
				}
function getMaillistAddresses($maillist)
{
	$children = fetch("FETCH node WHERE link:node_top='".getNode("/root/maillists/$maillist")."' AND link:type='sub' AND property:class_name='simple' NODESORTBY property:version");
	
	$children = getReadable($children);
	
	$addresses = array();
	
	foreach ($children as $child)
		$addresses[] = $child->getName();
		
	return $addresses;
}