本文整理汇总了PHP中HTML_TEMPLATE_IT类的典型用法代码示例。如果您正苦于以下问题:PHP HTML_TEMPLATE_IT类的具体用法?PHP HTML_TEMPLATE_IT怎么用?PHP HTML_TEMPLATE_IT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTML_TEMPLATE_IT类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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_cache_function
$cache = get_cache_function($user->get_name());
$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...
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:group_subscribe.php
示例4: 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
示例5: lms_wiki
<?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
示例6: get_cache_function
}
$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":
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:groups_members.php
示例7: gettext
$content->setVariable("LABEL_BB_STRIKETHROUGH", gettext("S"));
$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();
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:groups_edit.php
示例8: 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
示例9: HTML_TEMPLATE_IT
<?php
if (sizeof($portlet_content) > 0) {
$template = new HTML_TEMPLATE_IT();
$template->loadTemplateFile(PATH_CURRENT_EXTENSION . "portlets/headline/templates/view.html");
$template->setVariable("ALIGNMENT", trim($portlet_content["alignment"]));
$template->setVariable("SIZE", trim($portlet_content["size"]));
$template->setVariable("HEADLINE", $portlet_content["headline"]);
if ($portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
$template->setVariable("PORTLET_ID", $portlet->get_id());
$template->setVariable("PORTLET_ROOT", PATH_CURRENT_EXTENSION . "./portlets/headline");
}
echo $template->get();
} else {
echo "";
}
开发者ID:rolwi,项目名称:koala,代码行数:16,代码来源:view.php
示例10: gettext
$content->setVariable("HINT_WIKI_BULLET_LIST", gettext("bullet list"));
$content->setVariable("LABEL_WIKI_NUMBERED_LIST", gettext("# list"));
$content->setVariable("HINT_WIKI_NUMBERED_LIST", gettext("numbered list"));
$content->setVariable("LABEL_WIKI_LINE", gettext("-----"));
$content->setVariable("HINT_WIKI_LINE", gettext("horizontal line"));
$content->setVariable("LABEL_WIKI_LINK", gettext("[[wiki]]"));
$content->setVariable("HINT_WIKI_LINK", gettext("wiki link"));
$content->setVariable("LABEL_WIKI_URL", gettext("[URL]"));
$content->setVariable("HINT_WIKI_URL", gettext("web link"));
//$content->setVariable( "LABEL_WIKI_IMAGE", gettext( "IMG" ) );
//$content->setVariable( "HINT_WIKI_IMAGE", gettext( "image" ) );
$content->setVariable("LABEL_PREVIEW", gettext("Preview"));
$content->setVariable("LABEL_SAVE_CHANGES", gettext("Save changes"));
$content->setVariable("LABEL_RETURN", gettext("back"));
// widget: Images
$widget = new HTML_TEMPLATE_IT();
$widget->loadTemplateFile(PATH_TEMPLATES . "widget_wiki_images.template.html");
$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) {
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:wiki_edit.php
示例11: 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
示例12: koala_html_course
$eoDatabase->calculateExamResults($course);
//$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();
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:show_and_import_participants.php
示例13: 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
示例14: Cache_Lite
}
/*
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"));
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:profile_edit.php
示例15: array
// Filter out duplications and non-objects
$result_filtered = array();
$visitors_tmp = array();
$visitor = 0;
foreach ($result as $visitor_data) {
$visitor = 0;
if (isset($visitor_data["visitor"])) {
$visitor = $visitor_data["visitor"];
}
if (is_object($visitor) && !isset($visitors_tmp[$visitor->get_id()])) {
$visitors_tmp[$visitor->get_id()] = TRUE;
$result_filtered[] = $visitor_data;
}
}
$result = $result_filtered;
$html_people = new HTML_TEMPLATE_IT();
$html_people->loadTemplateFile(PATH_TEMPLATES . "list_users.template.html");
$no_people = count($result);
$start = $portal->set_paginator($html_people, 10, $no_people, "(" . gettext("%TOTAL visitors currently visited your profile") . ")");
$end = $start + 10 > $no_people ? $no_people : $start + 10;
$html_people->setVariable("LABEL_CONTACTS", gettext("Visitors") . " (" . str_replace(array("%a", "%z", "%s"), array($start + 1, $end, $no_people), gettext("%a-%z out of %s")) . ")");
if ($no_people > 0) {
$html_people->setCurrentBlock("BLOCK_CONTACT_LIST");
$html_people->setVariable("LABEL_NAME_POSITION", gettext("Name, position"));
$html_people->setVariable("LABEL_SUBJECT_AREA", gettext("Origin/Focus"));
$html_people->setVariable("LABEL_COMMUNICATION", gettext("Communication"));
$html_people->setVariable("TH_MANAGE_CONTACT", '');
for ($i = $start; $i < $end; $i++) {
$visitor = $result[$i]["visitor"];
$referer = $result[$i]["referer"];
if (!is_object($visitor)) {
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:profile_visitors.php
示例16: Cache_Lite
$cache = new Cache_Lite(array("cacheDir" => PATH_CACHE));
$cache->clean($wid);
// clean wiki cache (not used by wiki)
$fcache = get_cache_function($object->get_id(), 600);
$fcache->drop("lms_wiki::get_items", $object->get_id());
// Clean communication summary cache für the group/course
if (is_object($workroom)) {
$cache = get_cache_function(lms_steam::get_current_user()->get_name(), 600);
$cache->drop("lms_steam::get_inventory_recursive", $workroom->get_id(), CLASS_CONTAINER | CLASS_ROOM, array("OBJ_TYPE", "WIKI_LANGUAGE"));
$cache->drop("lms_steam::get_group_communication_objects", $workroom->get_id(), CLASS_MESSAGEBOARD | CLASS_CALENDAR | CLASS_CONTAINER | CLASS_ROOM);
}
header("Location: " . $values["return_to"]);
exit;
}
}
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "object_delete.template.html");
if ($object->check_access_write($user)) {
$content->setVariable("LABEL_ARE_YOU_SURE", str_replace("%NAME", h($object->get_name()), gettext("Are you sure you want to delete the wiki '%NAME' ?")));
$rootlink = lms_steam::get_link_to_root($object);
$content->setVariable("DELETE_BACK_LINK", $rootlink[1]["link"] . "communication/");
$content->setCurrentBlock("BLOCK_DELETE");
$content->setVariable("FORM_ACTION", $_SERVER["REQUEST_URI"]);
$content->setVariable("LABEL_DELETE_IT", gettext("yes, delete it"));
$content->setVariable("BACK_LINK", $_SERVER["HTTP_REFERER"]);
$content->setVariable("LABEL_RETURN", gettext("back"));
$content->parse("BLOCK_DELETE");
} else {
$content->setVariable("LABEL_ARE_YOU_SURE", gettext("You have no rights to delete this wiki!"));
}
$content->setVariable("TEXT_INFORMATION", gettext("The Wiki and all its entries will be deleted."));
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:wiki_delete.php
示例17: HTML_TEMPLATE_IT
<?php
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "home.template.html");
$content->setVariable("LABEL_GREETING", gettext("Welcome") . " " . $portal->get_user()->get_forename() . " " . $portal->get_user()->get_surname());
$content->setVariable("INFO_TODO_MAILS", "<a href=\"" . PATH_SERVER . "/bid/journal/1599/\">zum Test Journal</a>");
开发者ID:rolwi,项目名称:koala,代码行数:6,代码来源:home.php
示例18: HTML_TEMPLATE_IT
<?php
$public = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), STEAM_PUBLIC_GROUP, CLASS_GROUP);
$user = lms_steam::get_current_user();
$content = new HTML_TEMPLATE_IT();
$content->loadTemplateFile(PATH_TEMPLATES . "groups_public.template.html");
if (MANAGE_GROUPS_MEMBERSHIP || CREATE_GROUPS) {
$content->setCurrentBlock("BLOCK_ACTION_BAR_GROUPS");
if (MANAGE_GROUPS_MEMBERSHIP) {
$content->setCurrentBlock("BLOCK_MANAGE_GROUPS_MEMBERSHIP");
$content->setVariable("LINK_MANAGE_SUBSCRIPTIONS", PATH_URL . "user/" . $user->get_name() . "/groups/");
$content->setVariable("LABEL_MANAGE_SUBSCRIPTIONS", gettext("Manage subscriptions"));
$content->parse("BLOCK_MANAGE_GROUPS_MEMBERSHIP");
}
if (CREATE_GROUPS) {
$content->setCurrentBlock("BLOCK_CREATE_GROUPS");
$content->setVariable("LINK_CREATE_NEW_GROUP", PATH_URL . "groups_create_dsc.php?parent=" . (isset($_GET["cat"]) ? $_GET["cat"] : $public->get_id()));
$content->setVariable("LABEL_CREATE_NEW_GROUP", gettext("Create new group"));
$content->parse("BLOCK_CREATE_GROUPS");
}
$content->parse("BLOCK_ACTION_BAR_GROUPS");
}
$content->setVariable("LABEL_NAME", gettext("Name"));
$content->setVariable("LABEL_DESC", gettext("Description"));
if (!empty($_GET["cat"])) {
// EINE KATEGORIE ANZEIGEN
if (!($category = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $_GET["cat"]))) {
include "bad_link.php";
exit;
}
if (!$category instanceof steam_container) {
开发者ID:rolwi,项目名称:koala,代码行数:31,
|
请发表评论