当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_TEMPLATE_IT::loadTemplateFile方法代码示例

本文整理汇总了PHP中HTML_TEMPLATE_IT::loadTemplateFile方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_TEMPLATE_IT::loadTemplateFile方法的具体用法?PHP HTML_TEMPLATE_IT::loadTemplateFile怎么用?PHP HTML_TEMPLATE_IT::loadTemplateFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_TEMPLATE_IT的用法示例。


在下文中一共展示了HTML_TEMPLATE_IT::loadTemplateFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 function execute($request, $response)
 {
     $content = new HTML_TEMPLATE_IT();
     $content->loadTemplateFile(Explorer::getInstance()->getExtensionPath() . "ui/html/menu.template.html");
     $response->setStatus("200 OK");
     $response->write("Test");
     return $response;
 }
开发者ID:rolwi,项目名称:koala,代码行数:8,代码来源:GetMenu.class.php

示例2: processData

 public function processData(\IRequestObject $requestObject)
 {
     if ($requestObject instanceof \UrlRequestObject) {
         $this->params = $requestObject->getParams();
         isset($this->params[0]) ? $this->id = $this->params[0] : "";
     } else {
         if ($requestObject instanceof \IdRequestObject) {
             $this->id = $requestObject->getId();
         }
     }
     $steam = $GLOBALS["STEAM"];
     //get singleton and portlet path
     $portalInstance = \Portal::getInstance();
     $portalPath = $portalInstance->getExtensionPath();
     //template
     $templateFileName = $portalPath . "/ui/html/index.html";
     $tmpl = new \HTML_TEMPLATE_IT();
     $tmpl->loadTemplateFile($templateFileName);
     $this->getExtension()->addCSS();
     $this->getExtension()->addJS();
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     $object = $currentUser->get_workroom();
     $objectId = $this->id;
     //get the portal object
     $this->portalObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $type = getObjectType($this->portalObject);
     if (!($type === "portal")) {
         \ExtensionMaster::getInstance()->send404Error();
         die;
     }
     \Portal::getInstance()->setPortalObject($this->portalObject);
     //get the content of the portal object
     $portalColumns = $this->portalObject->get_inventory();
     $htmlBody = "";
     $extensionMaster = \ExtensionMaster::getInstance();
     $count = 0;
     $htmlCollectorColRow[][] = array();
     $col = 0;
     $row = 0;
     $this->rawHtmlWidget = new \Widgets\RawHtml();
     foreach ($portalColumns as $columnObject) {
         $columnObjectId = $columnObject->get_id();
         $widgets = $extensionMaster->getWidgetsByObjectId($columnObjectId, "view");
         $this->rawHtmlWidget->addWidgets($widgets);
         $data = \Widgets\Widget::getData($widgets);
         $htmlBody .= $data["html"];
         $count++;
     }
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     if (isset($this->portalObject) && $this->portalObject->check_access_write($currentUser)) {
         $htmlBody .= "<script>if (readCookie(\"portalEditMode\") === \"{$objectId}\") {portalLockButton({$objectId})}</script>";
     }
     $tmpl->setVariable("BODY", $htmlBody);
     $htmlBodyTemplated = $tmpl->get();
     $this->rawHtmlWidget->setHtml($htmlBodyTemplated);
 }
开发者ID:rolwi,项目名称:koala,代码行数:56,代码来源:Index.class.php

示例3: get_calendar_html

function get_calendar_html($steam_calendar, $link, $timestamp = "")
{
    if (empty($timestamp)) {
        $timestamp = time();
    }
    $html = new HTML_TEMPLATE_IT();
    $html->loadTemplateFile(PATH_TEMPLATES . "widget_calendar.template.html");
    $html->setVariable("VALUE_MONTH", strftime("%b %G", $timestamp));
    $html->setVariable("ABBR_SUNDAY", "S");
    $html->setVariable("ABBR_MONDAY", "M");
    $html->setVariable("ABBR_TUESDAY", "T");
    $html->setVariable("ABBR_WEDNESDAY", "W");
    $html->setVariable("ABBR_THURSDAY", "T");
    $html->setVariable("ABBR_FRIDAY", "F");
    $html->setVariable("ABBR_SATURDAY", "S");
    $month = date("m", $timestamp);
    $year = date("Y", $timestamp);
    $next_month = $month == 12 ? 1 : $month + 1;
    $next_months_year = $month == 12 ? $year + 1 : $year;
    $first_day_of_month = strtotime("{$year}-{$month}-01");
    $last_day_of_month = strtotime("-1 day", strtotime("{$next_months_year}-{$next_month}-01"));
    $calendar_entries = $steam_calendar->get_entries($first_day_of_month, $last_day_of_month);
    $weekday_offset = strftime("%w", $first_day_of_month);
    $current_day = $first_day_of_month;
    for ($w = 1; $w <= 6; $w++) {
        if ($current_day > $last_day_of_month) {
            break;
        }
        $html->setCurrentBlock("BLOCK_WEEK");
        for ($wd = 0; $wd <= 6; $wd++) {
            if ($weekday_offset > 0) {
                $html->setVariable("WD{$wd}", "&nbsp;");
                $weekday_offset--;
                continue;
            }
            if ($current_day > $last_day_of_month) {
                $html->setVariable("WD{$wd}", "&nbsp;");
                $current_day = strtotime("+1 day", $current_day);
                continue;
            }
            $wdstr = strftime("%e", $current_day);
            $wdentries = $calendar_entries[$current_day];
            $wdlabel = $wdentries > 0 ? "<b>{$wdstr}</b>" : $wdstr;
            $html->setVariable("WD{$wd}", $wdlabel);
            $current_day = strtotime("+1 day", $current_day);
        }
        $html->parse("BLOCK_WEEK");
    }
    return $html->get();
}
开发者ID:rolwi,项目名称:koala,代码行数:50,代码来源:widget_calendar.inc.php

示例4:

 function get_question_script_exam_html($pathprefix, $eid)
 {
     $content = new HTML_TEMPLATE_IT();
     $content->loadTemplateFile(PATH_TEMPLATES_UNITS_ELEARNING . "elearning_question_multiplechoice.template.html");
     $content->setCurrentBlock("BLOCK_CHECKBOX");
     $content->setVariable("IMAGE_CHECKBOX_SELECTED_ENABLED", IMAGE_CHECKBOX_SELECTED_ENABLED);
     $content->setVariable("IMAGE_CHECKBOX_SELECTED_DISENABLED", IMAGE_CHECKBOX_SELECTED_DISABLED);
     $content->setVariable("IMAGE_CHECKBOX_UNSELECTED_ENABLED", IMAGE_CHECKBOX_UNSELECTED_ENABLED);
     $content->setVariable("IMAGE_CHECKBOX_UNSELECTED_DISENABLED", IMAGE_CHECKBOX_UNSELECTED_DISABLED);
     $content->setVariable("IMAGE_CHECKBOX_LOADER", IMAGE_CHECKBOX_LOADER);
     $content->parseCurrentBlock();
     $content->setCurrentBlock("BLOCK_EXAM_QUESTION_JAVASCRIPT");
     $content->setVariable("PATHPREFIX", $pathprefix);
     $content->setVariable("EID", $eid);
     $content->parseCurrentBlock();
     return $content->get();
 }
开发者ID:rolwi,项目名称:koala,代码行数:17,代码来源:elearning_question_multiplechoice.class.php

示例5: set_content

 public function set_content()
 {
     $template = new HTML_TEMPLATE_IT();
     $template->loadTemplateFile(PORTFOLIO_PATH_TEMPLATES . "manage.template.html");
     // Set content on right side
     $template->setCurrentBlock("BLOCK_DESKTOP_LEFT");
     $template->setCurrentBlock("BLOCK_NEXTSTEPS");
     $template->setVariable("LABEL_NEXTSTEPS", "Nächste Schritte");
     $template->setCurrentBlock("BLOCK_NEXTSTEP");
     $template->setVariable("CONTENT_NEXTSTEPS", "Nummer 1");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_NEXTSTEPS", "Nummer 2");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_NEXTSTEPS", "Nummer 3");
     $template->parseCurrentBlock();
     $template->parseCurrentBlock();
     $template->setCurrentBlock("BLOCK_VISIBLE_PORTFOLIOS");
     $template->setVariable("LABEL_VISIBLE", "Sichtbare Portfolios");
     $template->setCurrentBlock("BLOCK_VISIBLE_BOX");
     $template->setVariable("CONTENT_VISIBLE", "Nummer 1");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_VISIBLE", "Nummer 2");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_VISIBLE", "Nummer 3");
     $template->parseCurrentBlock();
     $template->parseCurrentBlock();
     // Set content on left side
     $template->setCurrentBlock("BLOCK_DESKTOP_RIGHT");
     $template->setCurrentBlock("BLOCK_COMMENTS");
     $template->setVariable("LABEL_COMMENTS", "Kommentare");
     $template->setCurrentBlock("BLOCK_COMMENTS_BOX");
     $template->setVariable("CONTENT_COMMENTS", "Nummer 1");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_COMMENTS", "Nummer 2");
     $template->parseCurrentBlock();
     $template->setVariable("CONTENT_COMMENTS", "Nummer 3");
     $template->parseCurrentBlock();
     $template->parseCurrentBlock();
     $this->template->setVariable("HTML_CODE_LEFT", $template->get());
 }
开发者ID:rolwi,项目名称:koala,代码行数:40,代码来源:portfolio_html_manage.class.php

示例6: header

            $cache->drop("lms_steam::user_get_profile", $user->get_name());
            $cache->drop("lms_portal::get_menu_html", $user->get_name(), TRUE);
            if (!$group->is_member($user)) {
                $backlink = PATH_URL . 'desktop/';
            }
            header('Location: ' . $backlink);
        } else {
            $portal->set_problem_description($result["problem"], $result["hint"]);
        }
    } else {
        $portal->set_problem_description(gettext("You are already member of tutorial") . " " . $in_group->get_name() . ".", gettext("Resign from the tutorial to become member here."));
    }
}
// GET
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "groups_join.template.html");
$content->setVariable("BACKLINK", $backlink);
if ($group->requested_membership($user)) {
    if (empty($_SESSION['confirmation'])) {
        // don't warn if we came here on successful membership request...
        if ($group instanceof koala_group_course) {
            $portal->set_problem_description(gettext("You have already requested a membership for this course."));
        } else {
            $portal->set_problem_description(gettext("You have already requested a membership for this group."));
        }
    }
} else {
    if ($group->is_member($user)) {
        if (empty($_SESSION['confirmation'])) {
            // don't warn if we came here on successful membership request...
            if ($group instanceof koala_group_course) {
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:group_subscribe.php

示例7: get_comment_html

function get_comment_html($document, $url)
{
    $cache = get_cache_function($document->get_id(), 600);
    $user = lms_steam::get_current_user();
    $write_access = $document->check_access(SANCTION_ANNOTATE, $user);
    $template = new HTML_TEMPLATE_IT();
    $template->loadTemplateFile(PATH_TEMPLATES . "comments.template.html");
    $headline = gettext("Add your comment");
    if ($_SERVER["REQUEST_METHOD"] == "POST" && $write_access) {
        $values = $_POST["values"];
        if (!empty($values["preview_comment"])) {
            $template->setCurrentBlock("BLOCK_PREVIEW_COMMENT");
            $template->setVariable("TEXT_COMMENT", $values["comment"]);
            $template->setVariable("PREVIEW", gettext("Preview"));
            $template->setVariable("POST_COMMENT", gettext("Post comment"));
            $template->setVariable("LABEL_PREVIEW_YOUR_COMMENT", gettext("Preview your comment"));
            $template->setVariable("VALUE_PREVIEW_COMMENT", get_formatted_output($values["comment"]));
            $template->parse("BLOCK_PREVIEW_COMMENT");
            $headline = gettext("Change it?");
        }
        if (!empty($values["submit_comment"]) && !empty($values["comment"])) {
            $new_comment = steam_factory::create_textdoc($GLOBALS["STEAM"]->get_id(), $user->get_name() . "-" . time(), $values["comment"]);
            $all_user = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), STEAM_ALL_USER);
            $new_comment->set_acquire($document);
            $new_comment->set_read_access($all_user);
            $document->add_annotation($new_comment);
            $cache->drop("lms_steam::get_annotations", $document->get_id());
        }
    }
    $comments = $cache->call("lms_steam::get_annotations", $document->get_id());
    if (count($comments) > 0) {
        $template->setVariable("LABEL_COMMENTS", gettext("comments"));
    }
    $comments = array_reverse($comments);
    //reverse comment order (oldest first)
    foreach ($comments as $comment) {
        $obj_comment = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $comment["OBJ_ID"]);
        $template->setCurrentBlock("BLOCK_ANNOTATION");
        $template->setVariable("COMMENT_ID", $comment["OBJ_ID"]);
        $template->setVariable("AUTHOR_LINK", PATH_URL . "user/" . $comment["OBJ_CREATOR_LOGIN"] . "/");
        $template->setVariable("AUTHOR_NAME", $comment["OBJ_CREATOR"]);
        $template->setVariable("IMAGE_LINK", PATH_URL . "get_document.php?id=" . $comment["OBJ_ICON"]);
        $template->setVariable("LABEL_SAYS", gettext("says"));
        $template->setVariable("ANNOTATION_COMMENT", get_formatted_output($comment["CONTENT"], 80, "\n"));
        $template->setVariable("HOW_LONG_AGO", how_long_ago($comment["OBJ_CREATION_TIME"]));
        $template->setVariable('LINK_PERMALINK', $url . '/#comment' . $comment['OBJ_ID']);
        $template->setVariable("LABEL_PERMALINK", gettext("permalink"));
        if ($obj_comment->check_access_write($user)) {
            $template->setCurrentBlock("BLOCK_OWN_COMMENT");
            $template->setVariable("LINK_DELETE", $url . "/deletecomment" . $comment["OBJ_ID"] . "/");
            $template->setVariable("LABEL_DELETE", gettext("delete"));
            $template->setVariable("LINK_EDIT", $url . "/editcomment" . $comment["OBJ_ID"] . "/");
            $template->setVariable("LABEL_EDIT", gettext("edit"));
            $template->parse("BLOCK_OWN_COMMENT");
        }
        $template->parse("BLOCK_ANNOTATION");
    }
    if ($write_access) {
        $template->setCurrentBlock("BLOCK_ADD_COMMENT");
        $template->setVariable("LABEL_ADD_YOUR_COMMENT", $headline);
        $template->setVariable("LABEL_PREVIEW", gettext("Preview"));
        $template->setVariable("LABEL_OR", gettext("or"));
        $template->setVariable("LABEL_COMMENT", gettext("Add comment"));
        $template->setVariable("LABEL_BB_BOLD", gettext("B"));
        $template->setVariable("HINT_BB_BOLD", gettext("boldface"));
        $template->setVariable("LABEL_BB_ITALIC", gettext("I"));
        $template->setVariable("HINT_BB_ITALIC", gettext("italic"));
        $template->setVariable("LABEL_BB_UNDERLINE", gettext("U"));
        $template->setVariable("HINT_BB_UNDERLINE", gettext("underline"));
        $template->setVariable("LABEL_BB_STRIKETHROUGH", gettext("S"));
        $template->setVariable("HINT_BB_STRIKETHROUGH", gettext("strikethrough"));
        $template->setVariable("LABEL_BB_IMAGE", gettext("IMG"));
        $template->setVariable("HINT_BB_IMAGE", gettext("image"));
        $template->setVariable("LABEL_BB_URL", gettext("URL"));
        $template->setVariable("HINT_BB_URL", gettext("web link"));
        $template->setVariable("LABEL_BB_MAIL", gettext("MAIL"));
        $template->setVariable("HINT_BB_MAIL", gettext("email link"));
        $template->parse("BLOCK_ADD_COMMENT");
    }
    return $template->get();
}
开发者ID:rolwi,项目名称:koala,代码行数:81,代码来源:comments_handling.inc.php

示例8: array

<?php

$wiki_html_handler = new lms_wiki($wiki_container);
$wiki_html_handler->set_admin_menu("mediathek", $wiki_container);
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "wiki_mediathek.template.html");
// get images
$inventory = $wiki_container->get_inventory();
if (!is_array($inventory)) {
    $inventory = array();
}
if (sizeof($inventory) > 0) {
    steam_factory::load_attributes($GLOBALS["STEAM"]->get_id(), $inventory, array(OBJ_NAME, OBJ_DESC, DOC_MIME_TYPE));
    $images = array();
    foreach ($inventory as $object) {
        $mime = strtolower($object->get_attribute(DOC_MIME_TYPE));
        if ($mime === "image/jpg" || $mime === "image/jpeg" || $mime === "image/gif" || $mime === "image/png") {
            $images[] = $object;
        }
    }
    foreach ($images as $image) {
        $actions = '<a href="' . PATH_URL . 'doc/' . $image->get_id() . '/">' . gettext("show properties") . '</a><br>';
        $actions .= '<a href="' . PATH_URL . 'doc/' . $image->get_id() . '/edit/">' . gettext("edit properties") . '</a><br>';
        $actions .= '<a href="' . PATH_URL . 'doc/' . $image->get_id() . '/deleteImage/" onclick="return confirmDeletion();">' . gettext("delete image") . '</a>';
        $imageData = imagecreatefromstring($image->get_content());
        $width = $newWidth = imagesx($imageData);
        $height = $newHeight = imagesy($imageData);
        if ($width > 160) {
            $newHeight = (int) ($height * 160 / $width);
            $newWidth = 160;
        }
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:wiki_mediathek.php

示例9: gettext

$cache = get_cache_function($group->get_id(), CACHE_LIFETIME_STATIC);
switch (get_class($group)) {
    case "koala_group_course":
        $html_handler_group = new koala_html_course($group);
        $html_handler_group->set_context("members");
        $members = $cache->call("lms_steam::group_get_members", $group->steam_group_learners->get_id());
        break;
    default:
        $html_handler_group = new koala_html_group($group);
        $html_handler_group->set_context("members");
        $members = $cache->call("lms_steam::group_get_members", $group->get_id());
        break;
}
$is_admin = $group->is_admin($user);
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "list_users.template.html");
$is_member = $group->is_member($user);
//echo "is_member? " . $is_member;
$privacy_deny_participants = $group->get_attribute("GROUP_PRIVACY");
//echo "attribute: ''" . $privacy_deny_participants . "''";
if ($privacy_deny_participants == PERMISSION_GROUP_PRIVACY_DENY_PARTICIPANTS && !$is_member) {
    //echo "*** deny ***";
    //TODO
    $content->setVariable("LABEL_PRIVACY_DENY_PARTICIPANTS", gettext("Participants are hidden."));
} else {
    //echo "*** permit ***";
    $no_members = count($members);
    if ($no_members > 0) {
        switch (get_class($group)) {
            case "koala_group_course":
                $groupname = $group->get_course_id();
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:groups_members.php

示例10: gettext

$content->setVariable("HINT_BB_STRIKETHROUGH", gettext("strikethrough"));
$content->setVariable("LABEL_BB_IMAGE", gettext("IMG"));
$content->setVariable("HINT_BB_IMAGE", gettext("image"));
$content->setVariable("LABEL_BB_URL", gettext("URL"));
$content->setVariable("HINT_BB_URL", gettext("web link"));
$content->setVariable("LABEL_BB_MAIL", gettext("MAIL"));
$content->setVariable("HINT_BB_MAIL", gettext("email link"));
//hier Voreinstellung?!
//$values[ "privacy_deny_participants" ] = PERMISSION_GROUP_PRIVACY_DENY_PARTICIPANTS; //TODO
//$values[ "privacy_deny_documents" ] = PERMISSION_GROUP_PRIVACY_DENY_DOCUMENTS;
//$privacy_deny_participants_default = PERMISSION_GROUP_PRIVACY_DENY_PARTICIPANTS;
//$privacy_deny_documents_default = PERMISSION_GROUP_PRIVACY_DENY_DOCUMENTS;
if ($create_new && $is_public || $grouptype !== "group_moderated" && $grouptype !== "group_private") {
    // Add group maxsize field
    $m = new HTML_TEMPLATE_IT();
    $m->loadTemplateFile(PATH_TEMPLATES . "groups_maxsize_widget.template.html");
    $m->setCurrentBlock("BLOCK_MAXSIZE");
    $m->setVariable("LABEL_MAXSIZE", gettext("Max number of participants"));
    $m->setVariable("LABEL_MAXSIZE_DSC", gettext("To limit the max number of participants for your course enter a number greater than 0. Leave this field blank or enter a '0' for no limitation."));
    isset($values["maxsize"]) ? $m->setVariable("VALUE_MAXSIZE", h($values["maxsize"])) : "";
    $mhtml = $m->get();
}
$content->setVariable("BACKLINK", "<a class=\"button\" href=\"{$backlink}\">" . gettext("back") . "</a>");
// extensions:
if (count($extensions) > 0) {
    $content->setCurrentBlock("BLOCK_EXTENSIONS");
    $content->setVariable("LABEL_EXTENSIONS", gettext("Extensions"));
    $extension_list = array();
    foreach ($extensions as $extension) {
        $extension_name = $extension->get_name();
        $content->setCurrentBlock("BLOCK_EXTENSION");
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:groups_edit.php

示例11: processData

 public function processData(\IRequestObject $requestObject)
 {
     $objectId = $requestObject->getId();
     $portlet = $portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     //icon
     $referIcon = \Portal::getInstance()->getAssetUrl() . "icons/refer_white.png";
     //reference handling
     $params = $requestObject->getParams();
     if (isset($params["referenced"]) && $params["referenced"] == true) {
         $portletIsReference = true;
         $referenceId = $params["referenceId"];
     } else {
         $portletIsReference = false;
     }
     $portletName = $portlet->get_attribute(OBJ_DESC);
     $this->getExtension()->addCSS();
     $this->getExtension()->addJS();
     //old bib
     include_once PATH_BASE . "koala-core/lib/bid/slashes.php";
     //get content of portlet
     $content = $portlet->get_attribute("bid:portlet:content");
     if (is_array($content) && count($content) > 0) {
         array_walk($content, "_stripslashes");
     } else {
         $content = array();
     }
     $portletInstance = \PortletRss::getInstance();
     $portletPath = $portletInstance->getExtensionPath();
     $num_items = isset($content["num_items"]) ? $content["num_items"] : 0;
     if (isset($content["address"])) {
         $feed = new \SimplePie();
         $feed->set_cache_location(PATH_CACHE);
         $feed->set_feed_url(derive_url($content["address"]));
         $feed->init();
         if ($num_items == 0) {
             $items = $feed->get_items();
         } else {
             $items = array_slice($feed->get_items(), 0, $num_items);
         }
     }
     $desc_length = isset($content["desc_length"]) ? $content["desc_length"] : 0;
     if (isset($content["allow_html"])) {
         $allow_html = $content["allow_html"] == "checked" ? true : false;
     } else {
         $allow_html = false;
     }
     $UBB = new \UBBCode();
     include_once PATH_BASE . "koala-core/lib/bid/derive_url.php";
     $portletFileName = $portletPath . "/ui/html/index.html";
     $tmpl = new \HTML_TEMPLATE_IT();
     $tmpl->loadTemplateFile($portletFileName);
     $tmpl->setVariable("EDIT_BUTTON", "");
     $tmpl->setVariable("PORTLET_ID", $portlet->get_id());
     $tmpl->setVariable("RSS_NAME", $portletName);
     //refernce icon
     if ($portletIsReference) {
         $tmpl->setVariable("REFERENCE_ICON", "<img src='{$referIcon}'>");
     }
     //popupmenu
     if (!$portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("PortletRss");
         $popupmenu->setElementId("portal-overlay");
         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
     }
     if ($portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("Portal");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setParams(array(array("key" => "sourceObjectId", "value" => $portlet->get_id()), array("key" => "linkObjectId", "value" => $referenceId)));
         $popupmenu->setCommand("PortletGetPopupMenuReference");
         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
     }
     if (sizeof($content) > 0) {
         if ($feed->error()) {
             $tmpl->setVariable("NOITEMSTEXT", "RSS-Ladefehler");
         } else {
             if (count($items) == 0) {
                 $tmpl->setVariable("NOITEMSTEXT", "RSS-Feed ist leer.");
             } else {
                 foreach ($items as $item) {
                     $tmpl->setCurrentBlock("BLOCK_RSS_ITEM");
                     if ($allow_html) {
                         $itemtitle = $item->get_title();
                         $itemdesc = $item->get_description();
                     } else {
                         $itemtitle = strip_tags($item->get_title());
                         $itemdesc = strip_tags($item->get_description());
                     }
                     if ($desc_length == 0) {
                         $itemdesc = "";
                     } else {
                         if ($desc_length > 0 && strlen($itemdesc) > $desc_length) {
                             $itemdesc = substr($itemdesc, 0, $desc_length) . "...";
                         }
                     }
                     $tmpl->setVariable("ITEMTITLE", $itemtitle);
                     $tmpl->setVariable("ITEMDESC", $itemdesc);
//.........这里部分代码省略.........
开发者ID:rolwi,项目名称:koala,代码行数:101,代码来源:Index.class.php

示例12: catch

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if ($_POST["id"] == $unit->get_id()) {
        try {
            $unit->delete();
            $owner = koala_object::get_koala_object(steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $_POST["owner"]));
            $backlink = $owner->get_url() . "units/";
        } catch (Exception $exception) {
            $problems = $exception->get_message();
        }
    }
    if (empty($problems)) {
        $_SESSION["confirmation"] = str_replace("%NAME", $unitname, gettext("The unit '%NAME' has been deleted."));
        header("Location: " . $backlink);
        exit;
    } else {
        $portal->set_problem_description($problems, $hints);
    }
}
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES_UNITS_POINTLIST . "units_pointlist_delete.template.html");
$content->setVariable("UNIT_ID", $unit->get_id());
$content->setVariable("OWNER_ID", $owner->get_id());
$content->setVariable("BACK_LINK", $backlink);
$content->setVariable("INFO_TEXT", gettext("Do you really want to delete this pointlist ?"));
$content->setVariable("LABEL_OK", gettext("Delete unit"));
$content->setVariable("BACKLINK", "<a href=\"{$backlink}\">" . gettext("back") . "</a>");
$semester = $course->get_semester()->get_name();
$breadcrumb = array(array("name" => $semester, "link" => PATH_URL . SEMESTER_URL . "/" . $semester . "/"), array("name" => $course->get_display_name(), "link" => PATH_URL . SEMESTER_URL . "/" . $semester . "/" . $course->get_name() . "/"), array("name" => gettext("Units"), "link" => PATH_URL . SEMESTER_URL . "/" . $semester . "/" . $course->get_name() . "/units/"), $unit->get_link(), array("name" => gettext("Delete this unit")));
$portal->set_page_main($breadcrumb, $content->get());
$portal->show_html();
exit;
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:units_pointlist_delete.php

示例13: foreach

//$participants = $eoDatabase->getParticipantsForTerm($examTerm); //better done below
$current_user = lms_steam::get_current_user();
$examOffice = exam_office_file_handling::getInstance();
$showedParsedTable = false;
//create portal
if (!isset($portal)) {
    $portal = lms_portal::get_instance();
    $portal->initialize(GUEST_ALLOWED);
} else {
    $portal->set_guest_allowed(GUEST_ALLOWED);
}
$html_handler = new koala_html_course($course);
$html_handler->set_context("exam_organization");
//set context for context menu
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_EXTENSIONS . PATH_TEMPLATES_EXAM_ORGANIZATION . "exam_organization_show_and_import_participants.template.html");
$container = $course->get_workroom();
$is_admin = $course->is_admin($current_user);
//post data
//save to database - case list loaded
if (isset($_POST["import_participants_save"]) || isset($_POST["import_participants_save_replace"])) {
    if (isset($_POST["import_participants_save_replace"])) {
        $replace = true;
        $eoDatabase = exam_organization_database::getInstance();
        $deleteCourseResult = $eoDatabase->deleteTerm($examTerm);
    } else {
        $replace = false;
    }
    //pre caching
    $ldapManager = exam_organization_ldap_manager::getInstance();
    foreach ($_POST as $postKey => $postValue) {
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:show_and_import_participants.php

示例14: define

<?php

if (!defined("PATH_TEMPLATES_UNITS_PYRAMID")) {
    define("PATH_TEMPLATES_UNITS_PYRAMID", PATH_EXTENSIONS . "units_pyramiddiscussion/templates/");
}
//$portal = lms_portal::get_instance();
//$portal->initialize( GUEST_ALLOWED );
$html_handler_course = new koala_html_course($course);
$html_handler_course->set_context("units", array("subcontext" => "unit"));
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES_UNITS_PYRAMID . "units_pyramiddiscussion.template.html");
$content->setVariable("VALUE_DESC", $unit->get_attribute("OBJ_DESC"));
$content->setVariable("VALUE_LONG_DESC", get_formatted_output($unit->get_attribute("OBJ_LONG_DESC")));
$appearance = $unit->get_attribute("UNIT_PYRAMIDDISCUSSION_APPEARANCE");
if ($appearance === 0 || $appearance === "") {
    $appearance = "direct";
}
$unit_url = "https://" . $GLOBALS["STEAM"]->get_config_value("web_server") . ($GLOBALS["STEAM"]->get_config_value("web_port_http") != "443" ? ":" . $GLOBALS["STEAM"]->get_config_value("web_port_http") : "") . $unit->get_steam_object()->get_path() . "/";
$unit_url = str_replace("?", "%3f", $unit_url);
if ($appearance === "direct") {
    header("Location: " . $unit_url);
    exit;
} else {
    if ($appearance == "2") {
        $content->setCurrentBlock("BLOCK_IFRAME");
        $content->setVariable("VALUE_IFRAME_URL", $unit_url);
        $content->parse("BLOCK_IFRAME");
    } else {
        $content->setCurrentBlock("BLOCK_LINK");
        $content->setVariable("VALUE_LINK_URL", $unit_url);
        $content->setVariable("VALUE_LINK_TEXT", gettext("Show pyramiddiscussion"));
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:units_pyramiddiscussion.php

示例15: array

    /*
    	require_once( "Cache/Lite.php" );
    	$cache = new Cache_Lite( array( "cacheDir" => PATH_CACHE ) );
    	$cache->clean( $user->get_name() );
    	$cache->clean( $user->get_id() );*/
    $lang_index = language_support::get_language_index();
    language_support::choose_language($lang_index[$values["USER_LANGUAGE"]]);
    $cache = get_cache_function(lms_steam::get_current_user()->get_name());
    $cache->drop("lms_portal::get_menu_html", lms_steam::get_current_user()->get_name(), TRUE);
    $cache = get_cache_function($user->get_name());
    $cache->drop("lms_steam::user_get_profile", $user->get_name());
    $_SESSION["confirmation"] = gettext("Your profile data has been saved.");
    header("Location: " . PATH_URL . "profile_edit.php");
}
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "profile_edit.template.html");
$content->setVariable("LABEL_INFO", gettext("Please complete your profile. None of the fields are mandatory. Some of the fields can not be changed due to central identity management at the IMT.<br/><b>Note: With the button <i>Profile Privacy</i> you can control which information can be seen by other users.</b>"));
$content->setVariable("LABEL_PROFILE", gettext("General Information"));
$content->setVariable("LABEL_LOOKING", gettext("Your buddy icon"));
$content->setVariable("LABEL_MAIL_PREFS", gettext("Your mail preferences"));
$content->setVariable("LABEL_PROFILE_PRIVACY", gettext("Profile Privacy"));
$content->setVariable("LINK_BUDDY_ICON", PATH_URL . "profile_icon.php");
$content->setVariable("LINK_MAIL_PREFS", PATH_URL . "messages_prefs.php");
$content->setVariable("LINK_PROFILE_PRIVACY", PATH_URL . "profile_privacy.php");
$content->setVariable("LABEL_FIRST_NAME", gettext("First name"));
$content->setVariable("LABEL_LAST_NAME", gettext("Last name"));
$content->setVariable("LABEL_TITLE", gettext("Academic title"));
$content->setVariable("LABEL_DEGREE", gettext("Academic degree"));
$content->setVariable("LABEL_IF_AVAILABLE", gettext("only if available"));
$content->setVariable("LABEL_STATUS", gettext("Status"));
$content->setVariable("LABEL_GENDER", gettext("Gender"));
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:profile_edit.php


注:本文中的HTML_TEMPLATE_IT::loadTemplateFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。