function getEdit($formname, $var_prefix = "") { switch ($this->extra) { case "name": $value = $_SESSION['murrix']['user']->name; break; case "userid": $value = $_SESSION['murrix']['user']->id; break; case "username": $value = $_SESSION['murrix']['user']->username; break; case "date": $value = date("Y-m-d"); break; case "datetime": $value = date("Y-m-d H:i:s"); break; default: $value = $this->getValue(true); break; } return compiletpl("datatypes/hidden/edit", $this->getStandardArgs($formname, $var_prefix)); }
function eventHandler(&$system, $event, $args) { if (is_array($this->events[$event])) { foreach ($this->events[$event] as $key) $system->setZoneData($key, utf8e(compiletpl($this->zones[$key], array()))); } }
function draw(&$system, $args) { $node_id = $this->getNodeId($args); $data = ""; if ($node_id > 0) { $object = new mObject($node_id); $data = compiletpl("scripts/versions", array(), $object); } else $data = compiletpl("message", array("titel"=>ucf(i18n("error")), "message"=>ucf(i18n("the specified path is invalid")))); $system->setZoneData($this->zone, utf8e($data)); }
function getEdit($formname, $var_prefix = "") { $selections = explode(",", $this->extra); $list = array(); foreach ($selections as $selection) { $parts = explode("=", $selection); $list[$parts[1]] = $parts[0]; } return compiletpl("datatypes/selection/edit", array_merge($this->getStandardArgs($formname, $var_prefix), array("list"=>$list))); }
function draw(&$system, $args) { $node_id = $this->getNodeId($args); if ($node_id > 0) { $object = new mObject($node_id); if ($object->hasRight("read")) $data = compiletpl("scripts/show/view", array("children_show_page"=>$args['children_show_page']), $object); else $data = compiletpl("message", array("title"=>ucf(i18n("error")), "message"=>ucf(i18n("not enough rights"))), $object); } else $data = compiletpl("message", array("title"=>ucf(i18n("error")), "message"=>ucf(i18n("the specified path is invalid"))), $object); $system->setZoneData($this->zone, utf8e($data)); }
function draw(&$system, $args) { $object = new mObject($this->getNodeId($args)); $data = ""; if ($object->getNodeId() > 0) { if ($object->hasRight("write")) $data = compiletpl("scripts/delete", array(), $object); else $data = compiletpl("message", array("title"=>ucf(i18n("error")), "message"=>ucf(i18n("not enough rights")))); } else $data = compiletpl("message", array("title"=>ucf(i18n("error")), "message"=>ucf(i18n("the specified path is invalid")))); $system->setZoneData($this->zone, utf8e($data)); }
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)))); }
function draw(&$system, $args) { $events = $this->getEvents(); $data = compiletpl("scripts/calendar/view", array("date"=>$this->date, "calendars"=>$this->calendars, "view"=>$this->view, "events"=>$events,"firstday"=>strtotime($this->date))); $system->setZoneData($this->zone, utf8e($data)); }
<?php echo compiletpl("title/big", array("left" => "Configuration")); ?> <form name="sInstall" id="sInstall" action="javascript:void(null);" onsubmit="Post('install','sInstall')"> <input class="hidden" type="hidden" name="action" value="finish"> Default theme<br/> <select class="selectbox" name="theme"> <? global $abspath; $folders = GetSubfolders("$abspath/design"); foreach ($folders as $folder) echo "<option ".($folder == $args['theme'] ? "selected" : "")." value=\"$folder\">".ucf($folder)."</option>"; ?> </select><br/> Imagesize<br/> <input class="textline" name="imgsize" value="<?php echo $args['imgsize']; ?> " type="text"><br/> Thumbnailsize<br/> <input class="textline" name="thumbsize" value="<?php echo $args['thumbsize']; ?> " type="text"><br/> Instant thumbnail creation<br/> <select class="selectbox" name="instantthumbs"> <option <?php echo "true" == $args['instantthumbs'] ? "selected" : ""; ?>
function draw(&$system, $args) { $system->setZoneData($this->zone, utf8e(compiletpl("scripts/poll/view", array()))); }
$itemlist[] = array(cmd(img(geticon("back"))." ".ucf(i18n("parent folder")), "exec=import&view=upload&node_id=".$object->getNodeId()."&path=".urlencode(GetParentPath($path)."/"))); foreach ($subitems as $subitem) { $checkbox = "<input checked class=\"input\" type=\"checkbox\" name=\"filenames[]\" value=\"$subitem\"/>"; if (is_dir("$abspath/upload/$path$subitem")) $itemlist[] = array("$checkbox ".cmd(img(geticon("file_folder"))." ".$subitem, "exec=import&view=upload&node_id=".$object->getNodeId()."&path=".urlencode("$path$subitem/"))); else { $type = getfiletype(pathinfo("$abspath/upload/$path$subitem", PATHINFO_EXTENSION)); $itemlist[] = array("$checkbox ".img(geticon($type))." ".$subitem); } } echo compiletpl("table", array("list"=>$itemlist, "endstring"=>"% ".i18n("rows"))); ?> <input class="submit" type="button" onclick="checkUncheckAll(this)" value="<?php echo ucf(i18n("invert selection")); ?> "/> <input class="submit" id="submitButton" type="submit" value="<?php echo ucf(i18n("import")); ?> "/> <? } else { ?> <div class="main">
<br/> <? echo compiletpl("title/medium", array("left"=>ucf(i18n("log")), "right"=>runjs(img(geticon("delete"))." ".ucf(i18n("clear")), "Exec('','import',Hash('action','clearlog'))"))); echo $_SESSION['murrix']['system']->createZone("zone_import_log"); ?>
<? $args_title = array(); $args_title['left'] = img(geticon("comment"))." ".ucf(i18n("comments")); if ($object->hasRight("create") || $object->hasRight("comment")) $args_title['right'] = cmd(img(geticon("comment"))." ".ucf(i18n("post")), "exec=new&node_id=".$object->getNodeId()."&class_name=comment"); echo compiletpl("title/medium", $args_title, $object); $pagername = "comments_show"; $children = fetch("FETCH node WHERE link:node_top='".$object->getNodeId()."' AND link:type='sub' AND property:class_name='comment' NODESORTBY property:version SORTBY !property:created"); $children = getReadable($children); if (count($children) > 0) { include(gettpl("pager/start", $object)); for ($i = $start; $i < $end; $i++) echo compiletpl("scripts/show/line", array(), $children[$i]); include(gettpl("pager/end", $object)); } ?>
<? echo compiletpl("title/big", array("left"=>"License")); global $abspath; ?> <div class="text_height"> <?php echo nl2br(getFile("{$abspath}/docs/LICENSE.txt")); ?> </div> <center> <? echo cmd(img(imgpath("left.png")), "exec=install&action=preinstall"); echo cmd(img(imgpath("right.png")), "exec=install&action=database"); ?> </center>
<div style="font-weight: bold; text-align: center;"><?php echo ucw(i18n("this")); ?> </div> <?php echo ucf(i18n("file")) . " {$n} " . i18n("of") . " " . count($family); ?> </td> <td style="vertical-align: top; text-align: center;"> <? if ($next !== false) { ?> <div class="show_item_wrapper"> <?php echo compiletpl("scripts/show/item", array(), $next); ?> <div class="clear"></div> </div> <div style="font-weight: bold; text-align: center;"><?php echo ucw(i18n("next")); ?> </div> <? } else { ?> <div class="show_item_wrapper"> <div class="show_item"> </div> <div class="clear"></div>
<? global $abspath; echo compiletpl("title/big", array("left"=>img(geticon("list"))." XML ".ucf(i18n("import"))."/".ucf(i18n("export")))); ?> <div class="xml_wrapper"> <div class="main"> <fieldset> <legend> <?php echo ucf(i18n("export")); ?> </legend> <form name="sExport" id="sExport" action="index.php?xml"> <div> <input class="hidden" type="hidden" name="xml" value=""/> <?php echo ucf(i18n("name")); ?> <br/> <input class="input" type="input" name="name" value="MURRiX Export"/><br/> <?php echo ucf(i18n("description")); ?> <br/> <textarea class="input"></textarea><br/> <br/> <?php echo ucf(i18n("options")); ?>
function draw(&$system, $args) { $system->setZoneData($this->zone, utf8e(compiletpl("scripts/langswitch", array()))); }
</div> <div class="container"> <div id="calendar_main_zone"> <? $data = $_SESSION['murrix']['system']->getZoneData("calendar_main_zone"); if (!empty($data)) echo $data; else { switch ($args['view']) { case "month": echo compiletpl("scripts/calendar/month_view", array("date"=>$args['date'], "calendars"=>$args['calendars'], "view"=>$args['view'], "events"=>$args['events'], "firstday"=>strtotime(date("Y-m", strtotime($args['date']))."-01"))); break; case "week": echo compiletpl("scripts/calendar/week_view", array("date"=>$args['date'], "calendars"=>$args['calendars'], "view"=>$args['view'], "events"=>$args['events'], "firstday"=>strtotime($args['date']))); break; case "day": echo compiletpl("scripts/calendar/day_view", array("date"=>$args['date'], "calendars"=>$args['calendars'], "view"=>$args['view'], "events"=>$args['events'], "firstday"=>strtotime($args['date']))); break; } } ?> </div> </div> </td> </tr> </table>
?> </div> <div class="title"> <a class="right" href="javascript:void(null)" onclick="toggleSidebarContainer('calendar')"><?php echo img(imgpath("1downarrow.png"), "", "", "calendar_arrow"); ?> </a> <?php echo cmd(ucf(i18n("calendar")), "exec=calendar", "sidebar"); ?> </div> <div id="calendar_container" class="container"> <div class="container"> <?php echo compiletpl("scripts/calendar/small_month", array("firstday" => strtotime(date("Y-m") . "-01"))); ?> </div> </div> <?php echo $_SESSION['murrix']['system']->createZone("zone_poll"); ?> <?php echo $_SESSION['murrix']['system']->createZone("zone_info"); ?> </td> </tr> </table>
for ($i = $args['start']; $i < $args['end']; $i++) { $object = $args['objects'][$i]; ?> <div class="sub_title"> <a class="right" href="javascript:void(null)" onclick="toggleSidebarContainer('<?php echo $object->getNodeId(); ?> ')"><?php echo img(imgpath("1downarrow.png"), "", "", $object->getNodeId() . "_arrow"); ?> </a> <?php echo cmd(img(getIcon($object->getIcon())) . " " . $object->getName(), "exec=show&node_id=" . $object->getNodeId()); ?> <div class="clear"></div> </div> <div id="<?php echo $object->getNodeId(); ?> _container"> <?php echo compiletpl("scripts/show/data", array(), $object); ?> <?php echo compiletpl("scripts/show/children", array(), $object); ?> </div> <? } ?>
<? echo compiletpl("title/big", array("left"=>"Finish")); echo $args['logtext']; ?> <center> <? echo cmd(img(imgpath("left.png")), "exec=install&action=config"); echo "<a href=\"./\">".img(imgpath("right.png"))."</a>"; ?> </center>
function getShow() { return compiletpl("datatypes/thumbnail/show", $this->getStandardArgs($formname, $var_prefix)); }
function getEdit($formname, $var_prefix = "") { return compiletpl("datatypes/date/edit", $this->getStandardArgs($formname, $var_prefix)); }
function draw(&$system, $args) { $parent_id = $this->getNodeId($args); $object = new mObject($parent_id); $javascript = ""; $data = ""; if ($object->hasRight("create") || $object->hasRight("comment") && $args['class_name'] == "comment") { $newobject = new mObject(); $newobject->setClassName(isset($args['class_name']) ? $args['class_name'] : "folder"); $newobject->loadVars(); $newobject->loadClassIcon(); $new_args = array("parent_node_id"=>$object->getNodeId()); $data = compiletplWithOutput("scripts/new", $new_args, $newobject); $javascript = $new_args['output']['js']; } else $data = compiletpl("message", array("title"=>ucf(i18n("error")), "message"=>ucf(i18n("not enough rights"))), $object); $system->setZoneData($this->zone, utf8e($data)); if (!empty($javascript)) $system->addScript($javascript); }
<? for ($i = $args['start']; $i < $args['end']; $i++) echo compiletpl("scripts/show/line", array(), $args['objects'][$i]); ?>
else echo $child->getName(); } } ?> </fieldset> </td> </tr> </table> </div> <? } if (count($events) > 0) { echo compiletpl("title/medium", array("center"=>ucf(i18n("timeline")))); ?> <div class="timeline_wrapper"> <? foreach ($events as $event) { $persons = fetch("FETCH node WHERE link:node_bottom='".$event->getNodeId()."' AND link:type='sub' AND property:class_name='contact' AND !property:node_id='".$object->getNodeId()."' NODESORTBY property:version SORTBY property:name"); $datetime = $event->getVarValue("date"); $time = $event->getVarValue("time"); if (!empty($time)) $datetime .= " $time"; $description = $event->getVarShow("description"); ?> <div class="event">
<? echo compiletpl("scripts/show/tabs", array("view"=>"delete"), $object); echo compiletpl("title/big", array("left"=>img(geticon($object->getIcon()))." ".$object->getName()), $object); ?> <div class="main"> <center> <?php echo "<span style=\"font-weight: bold; font-size: 16px;\">" . ucf(i18n("are you sure you want to delete")) . " \"" . $object->getName() . "\"?</span>"; ?> <br/> <table class="invisible" width="50%"> <tr> <td align="center"> <?php echo cmd(img(geticon("yes", 32)) . "<br/>" . ucf(i18n("yes")), "exec=delete&action=delete&node_id=" . $object->getNodeId()); ?> </td> <td align="center"> <?php echo cmd(img(geticon("no", 32)) . "<br/>" . ucf(i18n("no")), "exec=show&node_id=" . $object->getNodeId()); ?> </td> </tr> </table> </center> </div>
case "upload": $chroot = "$abspath/upload"; $path = empty($args['path']) ? "/" : urldecode($args['path']); $fullpath = extractPath("$chroot$path"); $testpath = substr($fullpath, 0, strlen($chroot)); if ($testpath != $chroot) { $system->addAlert(ucf(i18n("this path is not allowed"))); $args['path'] = "/"; } else $args['path'] = empty($args['path']) ? "/" : urldecode($args['path']); echo compiletplWithOutput("scripts/import/upload", $args, $object); break; case "files": echo compiletplWithOutput("scripts/import/files", $args, $object); break; default: case "xml": echo compiletplWithOutput("scripts/import/xml", $args, $object); break; } echo compiletpl("scripts/import/log", array()); ?>
<? $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)); } ?>
<?php echo compiletpl("title/big", array("left" => $args['title']), $object); ?> <div class="main"> <div class="container"> <?php echo $args['message']; ?> </di> </div>