本文整理汇总了PHP中getNode函数的典型用法代码示例。如果您正苦于以下问题:PHP getNode函数的具体用法?PHP getNode怎么用?PHP getNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getNode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: importDir
function importDir($parent, $path)
{
global $abspath;
$logtext = "";
$node_id = getNode($parent->getPath()."/".basename($path));
if ($node_id <= 0)
{
$node_id = createObject($parent, basename($path), "file_folder");
$logtext .= "Created ".$parent->getPathInTree()."/".basename($path)."<br/>";
if ($node_id === false)
return false;
}
$new_parent = new mObject($node_id);
$subitems = GetSubfilesAndSubfolders($path);
foreach ($subitems as $subitem)
{
if (is_dir("$path/$subitem"))
$logtext .= importDir($new_parent, "$path/$subitem");
else
{
createObject($new_parent, $subitem, "file", array("file" => "$subitem:$path/$subitem"));
$logtext .= "Created ".$new_parent->getPathInTree()."/$subitem<br/>";
}
}
return $logtext;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:33,代码来源:import.php
示例2: load
/**
* Load the activity object.
* @param String $itemid the id of the item whose activity was auditied.
* @param String $userid the id of the user who caused the audit to happen. Who performed the activity.
* @param String $type the type of audited item ('Vote', 'Node', 'Connection', 'Follow', 'View')
* @param int $modificationdate the time of the audit in seconds from epoch
* @param String $changetype the type of activity (view, edit, add, delete etc)
* @param String $xml the xml for the audited history object
* @param String $style (optional - default 'long') may be 'short' or 'long' or 'cif'
*/
function load($itemid, $userid, $type, $modificationdate, $changetype, $xml, $style = 'long')
{
$this->itemid = $itemid;
$this->userid = $userid;
$this->type = $type;
$this->modificationdate = $modificationdate;
$this->changetype = $changetype;
$this->xml = $xml;
$this->user = new User($userid);
if ($style != 'cif') {
$this->user = $this->user->load($style);
}
switch ($this->type) {
case "Node":
if ($style == 'long') {
$this->node = getIdeaFromAuditXML($this->xml);
}
$this->currentnode = getNode($this->itemid, $style);
if ($this->currentnode instanceof Error) {
if ($this->currentnode->code == 7007) {
// NODE NOT FOUND
$this->tombstone == true;
}
}
break;
case "Connection":
if ($style == 'long') {
$this->con = getConnectionFromAuditXML($this->xml);
}
$this->currentcon = getConnection($this->itemid, $style);
if ($this->currentcon instanceof Error) {
if ($this->currentcon->code == 7008) {
// CONNECTION NODE FOUND
$this->tombstone == true;
}
}
break;
}
try {
$this->canview($style);
} catch (Exception $e) {
$this->itemid = "";
$this->userid = "";
$this->type = "";
$this->modificationdate = "";
$this->changetype = "";
$this->xml = "";
$this->user = "";
$this->node = "";
$this->con = "";
$this->currentnode = "";
$this->currentcon = "";
return access_denied_error();
}
}
开发者ID:uniteddiversity,项目名称:DebateHub,代码行数:65,代码来源:activity.class.php
示例3: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
if (!empty($args))
{
$path = $args;
if ($path{0} != "/")
$path = $_SESSION['murrix']['path']."/$path";
$node_id = getNode($path);
if ($node_id > 0)
{
$stderr = ucf(i18n("object already exists"));
return true;
}
$parent = new mObject(getNode($_SESSION['murrix']['path']));
if (!(isAdmin() || $parent->hasRight("create")))
{
$stderr = ucf(i18n("not enough rights to create folder"));
return true;
}
$object = new mObject();
$object->setClassName("folder");
$object->loadVars();
$object->name = basename($path);
$object->language = $_SESSION['murrix']['language'];
$object->rights = $parent->getMeta("initial_rights", "rwcrwc---");
$object->group_id = $parent->getMeta("initial_group", $parent->getGroupId());
if (!$object->save())
{
$stderr = "Operation unsuccessfull.\n";
$stderr .= "Error output:\n";
$stderr .= $object->getLastError();
return true;
}
clearNodeFileCache($parent->getNodeId());
$object->linkWithNode($parent->getNodeId());
$stdout = ucf(i18n("created folder successfully"));
}
else
{
$stdout = "Usage: oadd [name]\n";
$stdout .= "Example: oadd newfolder";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:54,代码来源:oadd.php
示例4: sendMessage
function sendMessage($subject, $text, $attachment)
{
if ($this->id <= 0)
return false;
$user_id = $_SESSION['murrix']['user']->id;
$_SESSION['murrix']['user']->id = $this->id;
$home = new mObject($this->home_id);
$inbox_id = getNode($home->getPath()."/inbox", "eng");
if ($inbox_id < 0)
{
$inbox = new mObject();
$inbox->setClassName("folder");
$inbox->loadVars();
$inbox->name = "inbox";
$inbox->language = $_SESSION['murrix']['language'];
$inbox_id = $inbox->save();
$inbox->rights = $home->getMeta("initial_rights", $home->getRights());
clearNodeFileCache($home->getNodeId());
$inbox->linkWithNode($home->getNodeId());
}
else
$inbox = new mObject($inbox_id);
$message = new mObject();
$message->setClassName("message");
$message->loadVars();
$message->name = $subject;
$message->language = $_SESSION['murrix']['language'];
$message->setVarValue("text", $text);
$message->setVarValue("attachment", $attachment);
$message->setVarValue("sender", $_SESSION['murrix']['user']->name);
$message->save();
$message->rights = $inbox->getMeta("initial_rights", $inbox->getRights());
clearNodeFileCache($inbox->getNodeId());
$message->linkWithNode($inbox->getNodeId());
$_SESSION['murrix']['user']->id = $user_id;
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:53,代码来源:class.muser.php
示例5: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
if (!empty($args))
{
$args_split = splitArgs($args);
list($rights, $path, $recursive) = $args_split;
if ($path{0} != "/")
$path = $_SESSION['murrix']['path']."/$path";
$node_id = getNode($path);
if ($node_id <= 0)
{
$stderr = ucf(i18n("no such path"))." $path";
return true;
}
else
$object = new mObject($node_id);
if (!(isAdmin() || $object->hasRight("write")))
{
$stderr .= ucf(i18n("not enough rights to change ownership on"))." ".$object->getPathInTree();
}
else
{
$_SESSION['murrix']['objectcache']['disabled'] = true;
if ($recursive == "-r" || $recursive == "-R")
{
$stderr = $this->setOwnerOnObjectsRecursive($object, $stdout, $stderr, $rights);
}
else
{
if ($object->grantRight($rights))
$stdout = "";//ucf(i18n("changed ownership successfully on"))." ".$object->getPathInTree();
else
$stderr = ucf(i18n("failed to change ownership on"))." ".$object->getPathInTree();
}
$_SESSION['murrix']['objectcache']['disabled'] = false;
}
}
else
{
$stdout = "Usage: grant [groupname]=[rights] [path] [-R]\n";
$stdout .= "Example: grant admins=rwc /root";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:51,代码来源:grant.php
示例6: exec
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()))." ".$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;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:51,代码来源:llist.php
示例7: getNodeId
function getNodeId(&$args)
{
if (isset($args['node_id']))
return $args['node_id'];
else if (isset($args['path']))
$args['node_id'] = getNode($args['path']);
else
{
//if (empty($_SESSION['murrix']['path']) || $_SESSION['murrix']['path'] = "/")
// $_SESSION['murrix']['path'] = $_SESSION['murrix']['default_path'];
$args['node_id'] = getNode($_SESSION['murrix']['path']);
}
return $args['node_id'];
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:16,代码来源:class.script.php
示例8: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
$object = new mObject(getNode($_SESSION['murrix']['path']));
$children = fetch("FETCH node WHERE link:node_top='".$object->getNodeId()."' AND link:type='sub' NODESORTBY property:version SORTBY ".$object->getMeta("sort_by", "property:name"));
if ($args == "-l")
{
$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>Time</td>";
$stdout .= "<td>Name</td>";
$stdout .= "</tr>";
foreach ($children as $child)
{
$user = $child->getUser();
$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>".$child->getCreated()."</td>";
$stdout .= "<td>".cmd(img(geticon($child->getIcon(), 16))." ".$child->getName(), "exec=show&node_id=".$child->getNodeId())."</td>";
$stdout .= "</tr>";
}
$stdout .= "</table>";
}
}
else
{
foreach ($children as $child)
$stdout .= $child->getName()." ";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:47,代码来源:olist.php
示例9: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
if (!empty($args))
{
$object = new mObject(getNode($_SESSION['murrix']['path']));
if (!$object->hasRight("write"))
{
$stderr = ucf(i18n("not enough rights"));
return true;
}
$links = $object->getLinks();
$link_matched = false;
foreach ($links as $link)
{
if ($link['id'] == $args)
{
$link_matched = $link;
break;
}
}
if ($matched === false)
{
$stderr = ucf(i18n("unknown link specified"));
return true;
}
$object->deleteLink($args);
clearNodeFileCache($object->getNodeId());
clearNodeFileCache($link_matched['remote_id']);
$_SESSION['murrix']['path'] = $object->getPathInTree();
$system->TriggerEventIntern($response, "newlocation", array());
$stdout = ucf(i18n("removed link successfully"));
}
else
{
$stdout = "Usage: ldel [linkid]\n";
$stdout .= "Example: ldel 1";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:45,代码来源:ldel.php
示例10: execute
function execute(&$system, $args)
{
if (isset($args['language']))
{
if ($_SESSION['murrix']['language'] != $args['language']);
{
$_SESSION['murrix']['language'] = $args['language'];
unset($_SESSION['murrix']['querycache']);
$node_id = getNode($_SESSION['murrix']['path']);
$object = new mObject($node_id);
$_SESSION['murrix']['path'] = $object->getPath();
//$system->TriggerEventIntern($response, "newlang");
$system->addJSScript("window.location.reload()");
return;
}
}
$this->draw($system, $args);
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:20,代码来源:script.php
示例11: actionDelete
function actionDelete(&$system, $args)
{
$object = new mObject($this->getNodeId($args));
if ($object->getNodeId() > 0)
{
if ($object->hasRight("write"))
{
$parent_id = getNode(GetParentPath($object->getPathInTree()));
$object->deleteNode();
$system->addRedirect("exec=show&node_id=$parent_id");
}
else
$system->addAlert(ucf(i18n("not enough rights")));
}
else
$system->addAlert(ucf(i18n("the specified path is invalid")));
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:20,代码来源:script.php
示例12: exec
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;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:20,代码来源:oinfo.php
示例13: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
$object = new mObject(getNode($_SESSION['murrix']['path']));
$versions = fetch("FETCH object WHERE property:node_id='".$object->getNodeId()."' NODESORTBY property:language,property:version,property:name");
$stdout .= "total ".count($versions)."\n";
if (count($versions) > 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 ($versions as $version)
{
$user = $version->getUser();
$group = $version->getGroup();
$stdout .= "<tr>";
$stdout .= "<td>".$version->getId()."</td>";
$stdout .= "<td>".$version->getVersion()."</td>";
$stdout .= "<td>".$version->getLanguage()."</td>";
$stdout .= "<td>".$version->getClassName()."</td>";
$stdout .= "<td>".$version->getRights()."</td>";
$stdout .= "<td>".$user->username."</td>";
$stdout .= "<td>".$group->name."</td>";
$stdout .= "<td>".$version->getCreated()."</td>";
$stdout .= "<td>".img(geticon($version->getIcon(), 16))." ".$version->getName()."</td>";
$stdout .= "</tr>";
}
$stdout .= "</table>";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:41,代码来源:rlist.php
示例14: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
if (!empty($args))
{
list($rights, $path) = explode(" ", $args, 2);
if ($path{0} != "/")
$path = $_SESSION['murrix']['path']."/$path";
$node_id = getNode($path);
if ($node_id <= 0)
{
$stderr = ucf(i18n("no such path"));
return true;
}
else
$object = new mObject($node_id);
if (!(isAdmin() || $object->hasRight("write")))
{
$stderr = ucf(i18n("not enough rights to change rights"));
return true;
}
$object->setRights($rights);
if ($object->saveCurrent())
$stdout = ucf(i18n("changed rights successfully"));
else
$stderr = ucf(i18n("failed to change rights"));
}
else
{
$stdout = "Usage: chmod [rightstring] [path]\n";
$stdout .= "Example: chmod rwcrwcrwc /root";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:40,代码来源:chmod.php
示例15: exec
function exec($args, $stdin, &$stdout, &$stderr, &$system)
{
if (!empty($args))
{
$path = $args;
if ($path{0} != "/")
$path = $_SESSION['murrix']['path']."/$path";
$node_id = getNode($path);
if ($node_id <= 0)
{
$stderr = ucf(i18n("no such path"));
return true;
}
else
$object = new mObject($node_id);
if (!(isAdmin() || $object->hasRight("write")))
{
$stderr = ucf(i18n("not enough rights to delete"));
return true;
}
clearNodeFileCache($object->getNodeId());
$object->deleteNode();
$stdout = ucf(i18n("deleted node successfully"));
}
else
{
$stdout = "Usage: odel [name]\n";
$stdout .= "Example: odel oldfolder";
}
return true;
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:37,代码来源:odel.php
示例16: handleLexicon
private function handleLexicon(&$data, $curie)
{
require_once 'Config.php';
//include 'Globals.php';
//include 'JsonClientUtil.php';
//$curie = "NIFCELL:sao2128417084";
$data['curie'] = $curie;
$treeObj = getTreeObj($curie);
$data['treeObj'] = $treeObj;
$parentID = getParentID($treeObj, $curie);
$data['parentID'] = $parentID;
$node = getNode($treeObj, $parentID);
$data['node'] = $node;
$mainNode = getNode($treeObj, $curie);
$data['mainNode'] = $mainNode;
$list = getChildrenIDs($treeObj, $curie);
$data['list'] = $list;
$leafHTML = "";
$list->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
for ($list->rewind(); $list->valid(); $list->next()) {
$item = $list->current();
$leaf = getNode($treeObj, $item);
$leafLinkName = str_replace(" ", "_", $leaf->lbl);
$leafLinkName = str_replace("(", "_", $leafLinkName);
$leafLinkName = str_replace(")", "_", $leafLinkName);
//$leafLink = "/SciCrunchKS/index.php/pages/view/".$leafLinkName;
$leafLink = "/" . Config::$localContextName . "/index.php/pages/view/" . $leaf->id;
//$leafHTML = $leafHTML . "<ul><li><span><i class=\"icon-leaf\"></i><a href=\"".$leafLink."\">" . $leaf->lbl . "</a></span> <a href=\"\"></a></li></ul>\n";
$leafHTML = $leafHTML . "<ul><li><span id=\"" . $leaf->id . "," . $mainNode->id . "\"><i class=\"icon-plus-sign\"></i>" . $leaf->lbl . "</span> <a href=\"" . $leafLink . "\"><img src=\"/img/view-icon.png\" width=\"25\" height=\"25\"></a></li></ul>\n";
}
$data['leafHTML'] = $leafHTML;
require_once 'ServiceUtil.php';
require_once 'PropertyConfig.php';
$util = new ServiceUtil();
$list2 = $util->getOtherChildrenIDs($treeObj, $curie, PropertyConfig::$has_proper_part);
$partOfParentID = $util->getOtherParentID($treeObj, $curie, PropertyConfig::$has_proper_part);
$partOfParenttNode = getNode($treeObj, $partOfParentID);
$data['node2'] = $partOfParenttNode;
$leafHTML = null;
$list2->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
for ($list2->rewind(); $list2->valid(); $list2->next()) {
$item = $list2->current();
$leaf = getNode($treeObj, $item);
$leafLinkName = str_replace(" ", "_", $leaf->lbl);
$leafLinkName = str_replace("(", "_", $leafLinkName);
$leafLinkName = str_replace(")", "_", $leafLinkName);
//$leafLink = "/SciCrunchKS/index.php/pages/view/".$leafLinkName;
$leafLink = "/" . Config::$localContextName . "/index.php/pages/view/" . $leaf->id;
//$leafHTML = $leafHTML . "<ul><li><span><i class=\"icon-leaf\"></i><a href=\"".$leafLink."\">" . $leaf->lbl . "</a></span> <a href=\"\"></a></li></ul>\n";
$leafHTML = $leafHTML . "<ul><li><span id=\"" . $leaf->id . "," . $mainNode->id . "\"><i class=\"icon-plus-sign\"></i>" . $leaf->lbl . "</span> <a href=\"" . $leafLink . "\"><img src=\"/img/view-icon.png\" width=\"25\" height=\"25\"></a></li></ul>\n";
}
$data['leafHTML2'] = $leafHTML;
$list3 = $util->getChildrenIDsIncoming($treeObj, $curie, PropertyConfig::$part_of);
$partOfParentID3 = $util->getParentIDIncoming($treeObj, $curie, PropertyConfig::$part_of);
$partOfParenttNode3 = getNode($treeObj, $partOfParentID3);
$data['node3'] = $partOfParenttNode3;
$leafHTML = null;
$list3->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
for ($list3->rewind(); $list3->valid(); $list3->next()) {
$item = $list3->current();
$leaf = getNode($treeObj, $item);
$leafLinkName = str_replace(" ", "_", $leaf->lbl);
$leafLinkName = str_replace("(", "_", $leafLinkName);
$leafLinkName = str_replace(")", "_", $leafLinkName);
//$leafLink = "/SciCrunchKS/index.php/pages/view/".$leafLinkName;
$leafLink = "/" . Config::$localContextName . "/index.php/pages/view/" . $leaf->id;
//$leafHTML = $leafHTML . "<ul><li><span><i class=\"icon-leaf\"></i><a href=\"".$leafLink."\">" . $leaf->lbl . "</a></span> <a href=\"\"></a></li></ul>\n";
$leafHTML = $leafHTML . "<ul><li><span id=\"" . $leaf->id . "," . $mainNode->id . "\"><i class=\"icon-plus-sign\"></i>" . $leaf->lbl . "</span> <a href=\"" . $leafLink . "\"><img src=\"/img/view-icon.png\" width=\"25\" height=\"25\"></a></li></ul>\n";
}
$data['leafHTML3'] = $leafHTML;
}
开发者ID:NeuroscienceKnowledgeSpace,项目名称:KnowledgeSpace,代码行数:71,代码来源:Pages.php
示例17: validateUserSession
$response = validateUserSession($userid);
break;
case "login":
$username = required_param('username', PARAM_TEXT);
$password = required_param('password', PARAM_TEXT);
$response = login($username, $password);
break;
case "logout":
clearSession();
$response = new Result("logout", "logged out");
break;
/** NODES **/
/** NODES **/
case "getnode":
$nodeid = required_param('nodeid', PARAM_ALPHANUMEXT);
$response = getNode($nodeid, $style);
break;
case "addnode":
$name = required_param('name', PARAM_TEXT);
$desc = required_param('desc', PARAM_HTML);
$nodetypeid = optional_param('nodetypeid', "", PARAM_ALPHANUMEXT);
$imageurlid = optional_param('imageurlid', "", PARAM_TEXT);
$imagethumbnail = optional_param('imagethumbnail', "", PARAM_TEXT);
$response = addNode($name, $desc, $private, $nodetypeid, $imageurlid, $imagethumbnail);
break;
case "addnodeandconnect":
$name = required_param('name', PARAM_TEXT);
$desc = required_param('desc', PARAM_HTML);
$nodetypename = required_param('nodetypename', PARAM_TEXT);
$focalnodeid = required_param('focalnodeid', PARAM_ALPHANUMEXT);
$linktypename = required_param('linktypename', PARAM_TEXT);
开发者ID:uniteddiversity,项目名称:DebateHub,代码行数:31,代码来源:service.php
示例18: fillCalendars
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;
}
}
}
}
开发者ID:BackupTheBerlios,项目名称:murrix-svn,代码行数:65,代码来源:script.php
示例19: optional_param
$resourcetypesarray = optional_param("resourcetypesarray", "", PARAM_TEXT);
$resourcetitlearray = optional_param("resourcetitlearray", "", PARAM_TEXT);
$resourceurlarray = optional_param("resourceurlarray", "", PARAM_URL);
$identifierarray = optional_param("identifierarray", "", PARAM_TEXT);
$resourcenodeidsarray = optional_param("resourcenodeidsarray", "", PARAM_TEXT);
$resourcecliparray = optional_param("resourcecliparray", "", PARAM_TEXT);
$resourceclippatharray = optional_param("resourceclippatharray", "", PARAM_TEXT);
if (isset($_POST["editissue"])) {
if ($issue == "") {
array_push($errors, $LNG->FORM_ISSUE_ENTER_SUMMARY_ERROR);
}
if (empty($errors)) {
$private = optional_param("private", "Y", PARAM_ALPHA);
$r = getRoleByName("Issue");
$roleIssue = $r->roleid;
$issuenode = getNode($nodeid);
$filename = "";
if (isset($issuenode->filename)) {
$filename = $issuenode->filename;
}
$issuenode->edit($issue, $desc, $private, $roleIssue, $filename, '');
if (!$issuenode instanceof Error) {
/*if ($_FILES['image']['error'] == 0) {
$imagedir = $HUB_FLM->getUploadsNodeDir($issuenode->nodeid);
$photofilename = uploadImageToFit('image',$errors,$imagedir);
if($photofilename == ""){
$photofilename = $CFG->DEFAULT_ISSUE_PHOTO;
}
$issuenode->updateImage($photofilename);
}*/
开发者ID:uniteddiversity,项目名称:LiteMap,代码行数:31,代码来源:issueedit.php
示例20: array_push
} else {
// For IE security message avoidance
echo "var objWin = window.self;";
echo "objWin.open('','_self','');";
echo "objWin.close();";
}
echo '</script>';
//include_once($HUB_FLM->getCodeDirPath("ui/footerdialog.php"));
die;
} else {
array_push($errors, $LNG->FORM_ISSUE_CREATE_ERROR_MESSAGE . " " . $issuenode->message);
}
}
} else {
if ($clonenodeid != "") {
$clone = getNode($clonenodeid);
$issue = $clone->name;
$desc = $clone->description;
$private = $clone->private;
if (isset($clone->urls)) {
$urls = $clone->urls;
$count = count($urls);
for ($i = 0; $i < $count; $i++) {
$url = $urls[$i];
$resourcetypesarray[$i] = $url;
$identifierarray[$i] = $url->identifier;
$resourcetitlearray[$i] = $url->title;
$resourceurlarray[$i] = $url->url;
$resourcenodeidsarray[$i] = $url->urlid;
$resourcecliparray[$i] = $url->clip;
$resourceclippatharray[$i] = $url->clippath;
开发者ID:uniteddiversity,项目名称:LiteMap,代码行数:31,代码来源:issueadd.php
注:本文中的getNode函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论