Ejemplo n.º 1
0
	function exec($args, $stdin, &$stdout, &$stderr, &$system)
	{
		$object = new mObject(getNode($_SESSION['murrix']['path']));
		$links = $object->getLinks();
		
		if ($args == "-l")
		{
			$stdout .= "total ".count($links)."\n";
			if (count($links) > 0)
			{
				$stdout .= "<table cellspacing=\"0\">";
				$stdout .= "<tr class=\"table_title\">";
				$stdout .= "<td>Id</td>";
				$stdout .= "<td>Type</td>";
				$stdout .= "<td>Remote node</td>";
				$stdout .= "<td>Remote node is on...</td>";
				$stdout .= "</tr>";
				foreach ($links as $link)
				{
					if ($link['remote_id'] <= 0)
						$remote = ucf(i18n("unknown"));
					else
					{
						$remote_obj = new mObject($link['remote_id']);
						$remote = cmd(img(geticon($remote_obj->getIcon()))."&nbsp;".$remote_obj->getName(), "exec=show&node_id=".$remote_obj->getNodeId());
					}
	
					$stdout .= "<tr>";
					$stdout .= "<td>".$link['id']."</td>";
					$stdout .= "<td>".$link['type']."</td>";
					$stdout .= "<td>".$remote."</td>";
					$stdout .= "<td>".ucf(i18n($link['direction']))."</td>";
					$stdout .= "</tr>";
				}
				$stdout .= "</table>";
			}
		}
		else
		{
			foreach ($links as $link)
			{
				if ($link['remote_id'] > 0)
				{
					$remote_obj = new mObject($link['remote_id']);
					$stdout .= cmd($remote_obj->getName(), "exec=show&node_id=".$remote_obj->getNodeId())." ";
				}
			}
		}
		
		return true;
	}
Ejemplo n.º 2
0
	function exec($args, $stdin, &$stdout, &$stderr, &$system)
	{
		$object = new mObject(getNode($_SESSION['murrix']['path']));

		$user = $object->getUser();
			
		$stdout .= "<table cellspacing=\"0\">";
		$stdout .= "<tr><td class=\"titlename\">Name</td><td>".cmd($object->getName(), "exec=show'&node_id=".$object->getNodeId())."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Icon</td><td>".img(geticon($object->getIcon(), 16))."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Id</td><td>".$object->getNodeId()."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Revision</td><td>".$object->getVersion()."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Language</td><td>".$object->getLanguage()."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Class</td><td>".$object->getClassName()."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Rights</td><td>".$object->getRights()."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">User</td><td>".$user->username."</td></tr>";
		$stdout .= "<tr><td class=\"titlename\">Time</td><td>".$object->getCreated()."</td></tr>";
		$stdout .= "</table>";
		
		return true;
	}
Ejemplo n.º 3
0
	function fillCalendars()
	{
		$this->calendars = array();
		$home_id = $_SESSION['murrix']['user']->home_id;
		if ($home_id > 0)
		{
			$home = new mObject($home_id);
			$calendar_id = getNode($home->getPath()."/calendar", "eng");
			if ($calendar_id > 0)
			{
				$name = $home->getName();
				$count = 0;
				while (isset($this->calendars[$name]))
				{
					$count++;
					$name .= $count;
				}
				
				$children = fetch("FETCH node WHERE link:node_top='$calendar_id' AND link:type='sub' AND property:class_name='folder' NODESORTBY property:version SORTBY property:name");
				
				for ($n = 0; $n < count($children); $n++)
				{
					$children[$n]->color = colour('light');
					$children[$n]->active = true;
				}
				
				$this->calendars[$name] = $children;
			}
		}
			
		$groups = $_SESSION['murrix']['user']->getGroups();
		foreach ($groups as $groupname)
		{
			$group = new mGroup();
			$group->setByName($groupname);
			
			$home_id = $group->home_id;
			
			if ($home_id > 0)
			{
				$home = new mObject($home_id);
				$calendar_id = getNode($home->getPath()."/calendar", "eng");
				if ($calendar_id > 0)
				{
					$name = $home->getName();
					$count = 0;
					while (isset($this->calendars[$name]))
					{
						$count++;
						$name .= $count;
					}
					
					$children = fetch("FETCH node WHERE link:node_top='$calendar_id' AND link:type='sub' AND property:class_name='folder' NODESORTBY property:version SORTBY property:name");
				
					for ($n = 0; $n < count($children); $n++)
					{
						$children[$n]->color = colour('light');
						$children[$n]->active = true;
					}
				
					$this->calendars[$name] = $children;
				}
			}
		}
	}
Ejemplo n.º 4
0
</div>
<div class="menu_login">
	<center>
		<div style="display: table-cell; text-align: left">
		<?
			$home_id = $_SESSION['murrix']['user']->home_id;
				
			if ($home_id > 0)
			{
				$home = new mObject($home_id);
				echo cmd(img(geticon("home"))."&nbsp;".ucf($home->getName()), "exec=show&node_id=$home_id")."<br/>";
			}
			
			$groups = $_SESSION['murrix']['user']->getGroups();
			
			foreach ($groups as $group_name)
			{
				$group = new mGroup();
				$group->setByName($group_name);
				$home_id = $group->home_id;
				
				if ($home_id > 0)
				{
					$home = new mObject($home_id);
					echo cmd(img(geticon($home->getIcon()))."&nbsp;".ucf($home->getName()), "exec=show&node_id=$home_id")."<br/>";
				}
			}
		?>
		</div>
	</center>
</div>
Ejemplo n.º 5
0
										$partner = new mObject($links[0]['remote_id']);
										?>
										<tr>
											<td class="left">
												<?php 
echo ucf(i18n("partner"));
?>
											</td>
											<td>
												<?php 
echo img(geticon("user"));
?>
											</td>
											<td class="right">
												<?php 
echo cmd($partner->getName(), "exec=show&node_id=" . $partner->getNodeId());
?>
											</td>
										</tr>
									<?
									}
									
									$data = $object->getVarValue("mobilephones");
									if (!empty($data)) {
									?>
									<tr>
										<td class="left">
											<?php 
echo ucf(i18n("mobilephones"));
?>
										</td>
Ejemplo n.º 6
0
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
		
		<link rel="shortcut icon" href="<?php 
echo geticon("murrix");
?>
" type="image/x-icon"/>
			
		<link rel="stylesheet" type="text/css" href="<?php 
echo "{$wwwpath}/design/" . $_SESSION['murrix']['theme'] . "/stylesheets/nodebrowse.css";
?>
"/>
	</head>
	
	<body class="nodebrowse">
		<?php 
echo compiletpl("title/big", array("left" => img(geticon($object->getIcon())) . " " . $object->getName(), "right" => $object->getNodeId()));
?>
		<div class="main">
			<div class="container">
				<?php 
echo $object->getPathInTree();
?>
			</div>
		</div>
		<div class="container">
			<center>
				<input type="button" class="submit" onclick="<?php 
echo "opener.document.getElementById('" . $_GET['input_id'] . "').value='" . $object->getNodeId() . "';";
?>
;parent.window.close();" value="<?php 
echo ucf(i18n("select"));
Ejemplo n.º 7
0
		?>
		<div class="title">
		<?
			if (count($children) > 0)
			{
			?>
				<a class="right" href="javascript:void(null)" onclick="toggleSidebarContainer('<?php 
echo $home_id;
?>
')"><?php 
echo img(imgpath("1downarrow.png"), "", "", $home_id . "_arrow");
?>
</a>
			<?
			}
			echo cmd(ucf($home->getName()), "exec=show&node_id=$home_id", $class);
		?>
		</div>
		<div id="<?php 
echo $home_id;
?>
_container" class="container">
		<?
			foreach ($children as $child)
				echo compiletpl("scripts/show/small_line", array("class"=>$class), $child);
		?>
		</div>
	<?
	}
}
?>
Ejemplo n.º 8
0
			<?php 
echo $args['message'];
?>
		</form>
	</fieldset><br/>
<?
}

$links = $object->getLinks();
$linklist = array();
$linklist[] = array(ucf(i18n("type")), ucf(i18n("remote node")), ucf(i18n("remote node is on"))."...", "&nbsp;");
foreach ($links as $link)
{
	if ($link['remote_id'] <= 0)
		$remote = ucf(i18n("unknown"));
	else
	{
		$remote_obj = new mObject($link['remote_id']);
		$remote = cmd(img(geticon($remote_obj->getIcon()))."&nbsp;".$remote_obj->getName(), "exec=show&node_id=".$remote_obj->getNodeId());
	}

	if ($object->hasRight("write") && ($object->getNumLinksSubBottom() > 1 || ($link['type'] != "sub" && $link['direction'] != "bottom")))
		$delete = cmd(img(geticon("delete"))."&nbsp;".ucf(i18n("delete")), "exec=links&action=deletelink&node_id=".$object->getNodeId()."&remote_id=".$link['remote_id']."&type=".$link['type']."&direction=".($link['direction'] == "top" ? "bottom" : "top"));
	else
		$delete = "";

	$linklist[] = array($link['type'], $remote, ucf(i18n($link['direction'])), $delete);
}

echo compiletpl("table", array("list"=>$linklist, "endstring"=>"% ".i18n("rows")), $object);
?>