function draw(&$system, $args) { foreach ($this->zones as $key => $value) { $zone_args = array(); $data = compiletplWithOutput($value, $zone_args); $system->setZoneData($key, utf8e($data)); if (!empty($zone_args['output']['js'])) $system->addScript($zone_args['output']['js']); } }
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()); ?>
echo ucf(i18n("year")); ?> <?php echo cmd(img(imgpath("right.png")), "exec=calendar&view=" . $args['view'] . "&date=" . date("Ymd", strtotime("+1 year", strtotime($args['date'])))); ?> </fieldset> <div style="margin-right: 20px;"> <? $firstday = strtotime(date("Y-m", strtotime($args['date']))."-01"); for ($p = 1; $p <= 3; $p++) { $args_small = array("events"=>$args['events'],"firstday"=>$firstday); ?> <div style="float: left; display: inline; width: 150px; margin-right: 10px;"> <?php echo compiletplWithOutput("scripts/calendar/small_month", $args_small); ?> </div> <? $firstday = strtotime("+1 month", $firstday); } ?> </div> <div class="clear"></div> <div id="calendar_main_zone"> <? $data = $_SESSION['murrix']['system']->getZoneData("calendar_main_zone"); if (!empty($data)) echo $data; else {
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); }
function draw(&$system, $args) { if (isset($args['object_id'])) { $object = new mObject(); $object->loadByObjectId($args['object_id']); } else $object = new mObject($this->getNodeId($args)); $javascript = ""; $data = ""; if ($object->getNodeId() > 0) { if ($object->hasRight("write")) { $edit_args = array(); $data = compiletplWithOutput("scripts/edit", $edit_args, $object); $javascript = $edit_args['output']['js']; } 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)); if (!empty($javascript)) $system->addJSScript($javascript); }
function draw(&$system, $args) { if (empty($args['view'])) $args['view'] = "xml"; $object = new mObject($this->getNodeId($args)); $javascript = ""; $data = ""; if ($object->getNodeId() > 0) { if ($object->hasRight("create")) { $data = compiletplWithOutput("scripts/import/view", $args, $object); $javascript = $args['output']['js']; } else $data = compiletpl("message", array("title"=>ucf(i18n("error")), "message"=>ucf(i18n("not enough rights")))); } $system->setZoneData($this->zone, utf8e($data)); if (!empty($javascript)) $system->addJSScript($javascript); }