$tpl->set_block("content", "quest_row", "QUEST_ROW"); $tpl->set_block("content", "feedback_row", "FEEDBACK_ROW"); $tpl->set_block("content", "button_previous", "BUTTON_PREV"); $tpl->set_block("content", "form", "FORM"); $tpl->set_block("content", "form_edit", "DUMMY"); $tpl->set_block("content", "button_next", "BUTTON_NEXT"); $tpl->set_block("content", "button_finish", "BUTTON_FIN"); $tpl->set_block("content", "button_home", "BUTTON_HOME"); $tpl->set_block("content", "hidden_row", "HIDDEN_ROW"); $tpl->set_block("content", "progress_row", "PROGRESS_ROW"); $tpl->set_var(array("DUMMY" => "", "MENU" => "", "OBJECT_ID" => $questionary->get_id(), "ANSWER_ID" => $answer_id, "QUESTIONARY_NAME" => $questionary_display_name, "HIDDEN_ROW" => "", "QUEST_ROW" => "", "FEEDBACK_ROW" => "", "PROGRESS_ROW" => "", "BUTTON_HOME" => "", "FORM" => "")); $UBB = new UBBCode(); if ($is_author) { $tpl->set_var("MENU", derive_menu("questionary", $questionary, "", 3)); } else { $tpl->set_var("MENU", derive_menu("questionary", $questionary, "", 0)); } //check if input is possible => exit if (!$is_editor || $forbidden || !$enabled || $no_write_access) { //check if user is allowed to write in object if (!$is_editor || $no_write_access) { $tpl->parse("FEEDBACK", "error_no_write_access"); $tpl->parse("FEEDBACK_ROW", "feedback_row", true); } else { if ($forbidden) { $tpl->parse("FEEDBACK", "error_multiple_input"); $tpl->parse("FEEDBACK_ROW", "feedback_row", true); } else { if (!$enabled) { $tpl->parse("FEEDBACK", "error_not_enabled"); $tpl->parse("FEEDBACK_ROW", "feedback_row", true);
$tpl->set_block("content", "error_not_allowed", "DUMMY"); $tpl->set_block("content", "header_creator", "DUMMY"); $tpl->set_block("content", "header_creation_time", "DUMMY"); $tpl->set_block("content", "button_ascending", "DUMMY"); $tpl->set_block("content", "button_descending", "DUMMY"); $tpl->set_block("content", "button_ascending_selected", "DUMMY"); $tpl->set_block("content", "button_descending_selected", "DUMMY"); $tpl->set_block("content", "header_cell", "HEADER_CELL"); $tpl->set_block("content", "header_cell_selected", "DUMMY"); $tpl->set_block("content", "header_cell_blank", "DUMMY"); $tpl->set_block("content", "result_cell", "RESULT_CELL"); $tpl->set_block("content", "edit_cell", "DUMMY"); $tpl->set_block("content", "delete_cell", "DUMMY"); $tpl->set_block("content", "result_row", "RESULT_ROW"); $tpl->set_block("content", "result_row_none", "DUMMY"); $tpl->set_var(array("DUMMY" => "", "MENU" => derive_menu("questionary", $questionary, "", $is_author ? 3 : 1), "OBJECT_ID" => $questionary->get_id(), "QUESTIONARY_NAME" => $questionary_name, "COLSPAN" => $colspan, "CURRENT_PAGE" => $page_number, "SELECTED_10" => $breakresult === "10" ? "SELECTED" : "", "SELECTED_30" => $breakresult === "30" ? "SELECTED" : "", "SELECTED_50" => $breakresult === "50" ? "SELECTED" : "", "SELECTED_ALL" => $breakresult === "all" ? "SELECTED" : "", "BREAKRESULT" => $breakresult, "CREATOR" => $creator->get_name(), "LAST_CHANGED" => date("d.m.Y H:i", $questionary_last_changed))); //parse out error message if forbidden if ($forbidden) { $tpl->parse("content", "error_not_allowed"); out(); } //get navigation bar $navbar = new nav_bar($_SERVER["REQUEST_URI"], count($answer_folder->get_inventory()), $page_number, $breakresult); $tpl->set_var("NAV_BAR", $navbar->get_bar()); //parse out header $q_number = 1; foreach ($header as $header_element) { if ($numbering) { $number_output = $q_number . ". "; $q_number++; } else {
//** Display Stuff //****************************************************** //template stuff $tpl = new Template("./templates/{$language}", "keep"); $tpl->set_file("content", "trashbin.ihtml"); $tpl->set_block("content", "trashbin_name", "DUMMY"); $tpl->set_block("content", "no_content", "DUMMY"); $tpl->set_block("content", "item", "DUMMY"); $tpl->set_block("content", "item_list", "DUMMY"); $tpl->set_block("content", "mark", "MARK"); $tpl->set_block("content", "unmark", "UNMARK"); $tpl->parse("TRASHBIN_NAME", "trashbin_name"); $tpl->set_var(array("DUMMY" => "", "MARK" => "", "UNMARK" => "", "TRASHBIN_ID" => $trashbin->get_id(), "TRASHBIN_ICON" => "{$config_webserver_ip}/icons/mimetype/trashbin.gif", "MENU" => derive_menu("trashbin", $trashbin, $trashbin_path, 1))); //set menu to write mode, if the user's access rights allow so if ($write_allowed) { $tpl->set_var("MENU", derive_menu("trashbin", $trashbin, $trashbin_path, 2)); } //display directory $tnr = array(); foreach ($inventory as $item) { $tnr[$item->get_id()] = array(); $tnr[$item->get_id()]["creator"] = $item->get_creator(1); $tnr[$item->get_id()]["writeaccess"] = $item->check_access_write($steam->get_login_user(), 1); if ($item instanceof steam_document) { $tnr[$item->get_id()]["contentsize"] = $item->get_content_size(1); } if ($item instanceof steam_link) { $tnr[$item->get_id()]["link_object"] = $item->get_link_object(1); } } $result = $steam->buffer_flush();
$tpl->set_block("content", "broken_link", "DUMMY"); $tpl->set_block("content", "www-link", "DUMMY"); $tpl->set_block("content", "folder", "DUMMY"); $tpl->set_block("content", "item", "DUMMY"); $tpl->set_block("item", "item_properties_on", "ITEM_PROPERTIES"); $tpl->set_block("item", "item_properties_off", "DUMMY"); $tpl->set_block("content", "mark", "MARK"); $tpl->set_block("content", "unmark", "UNMARK"); $tpl->set_var(array("DUMMY" => "", "MARK" => "", "UNMARK" => "", "FOLDER_ID" => $current_room->get_id(), "FOLDER_NAME" => $current_room_display_name, "FOLDER_PATH" => $config_webserver_ip . $current_room_path . '/', "FOLDER_ICON" => $current_room_data["bid:presentation"] === "index" ? "{$config_webserver_ip}/icons/mimetype/folder_closed_index.gif" : "{$config_webserver_ip}/icons/mimetype/folder_closed.gif", "FOLDER_CREATOR" => $current_room_creator_name, "FOLDER_LAST_CHANGED" => date("d.m.Y H:i", $current_room_data[OBJ_LAST_CHANGED]), "MENU" => derive_menu("contentframe", $current_room, $current_room_path, 1), "HEAD_MOUNTED" => $head_mounted ? "{$head_mounted_content}<hr>" : "")); if (sizeof($inventory) == 0) { $tpl->set_block("content", "folderview", "no_content"); $tpl->parse("DOCUMENTS", ""); } //set menu to write mode, if the user's access rights allow so and the user is not the guest user if ($write_allowed && $steam->get_login_user()->get_name() != "guest") { $tpl->set_var("MENU", derive_menu("contentframe", $current_room, $current_room_path, 2)); } //display directory $content = false; $tnr = array(); foreach ($inventory as $item) { $tnr[$item->get_id()] = array(); $tnr[$item->get_id()]["creator"] = $item->get_creator(1); $tnr[$item->get_id()]["writeaccess"] = $item->check_access_write($steam->get_login_user(), 1); if ($item instanceof steam_document) { $tnr[$item->get_id()]["contentsize"] = $item->get_content_size(1); } if ($item instanceof steam_link) { $tnr[$item->get_id()]["link_object"] = $item->get_link_object(1); } }
$allowed = $current_room->check_access_read($steam->get_login_user()); if ($allowed) { $inventory = $current_room->get_inventory(); } else { $inventory = array(); } //****************************************************** //** Display Stuff //****************************************************** //template stuff $tpl = new Template("./templates/{$language}", "keep"); $tpl->set_file("content", "cluster.ihtml"); $tpl->set_block("content", "document", "DUMMY"); $tpl->set_block("content", "link", "DUMMY"); $tpl->set_block("content", "folder", "DUMMY"); $tpl->set_var(array("DUMMY" => "", "MENU" => derive_menu("contentframe", $current_room))); //display directory $content = false; foreach ($inventory as $item) { //get values in handsome format $attributes = $item->get_attributes(array(OBJ_NAME, DOC_MIME_TYPE, DOC_EXTERN_URL, "bid:doctype", "bid:collectiontype", "bid:presentation", "bid:hidden")); //skip hidden if ($item->get_attribute("bid:hidden") != 0) { continue; } //parse out doc content or appropriate link if ($item instanceof steam_document) { $content = new doc_content($steam, $item); $tpl->set_var("DOCUMENT_CONTENT", $content->get_content($config_webserver_ip)); $tpl->parse("DOCUMENTS", "document", true); } else {