$usermanagementHTMLTemplate->set_context("branches"); break; case "customers": // Set template placeholders $content->setVariable("VALUE_HEADLINE_ADD_CUSTOMER", "Neues Unternehmen hinzufügen"); $content->setVariable("VALUE_HEADLINE_MODIFY_CUSTOMER", "Unternehmen bearbeiten"); $content->setVariable("LABEL_NAME", "Name*"); $content->setVariable("LABEL_ID", "ID*"); $content->setVariable("VALUE_ADD_BUTTON", "Unternehmen anlegen"); $content->setVariable("TABLE_COL_1", "ID"); $content->setVariable("TABLE_COL_2", "Name"); $content->setVariable("TABLE_COL_3", "Aktionen"); // Set table rows for all customers foreach ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getAllCustomers() as $customerID => $customerName) { $content->setCurrentBlock("BLOCK_CUSTOMERS"); $content->setVariable("CUSTOMER_ENTRY", $viewHelper->getCustomerRow($customerID, $customerName, $GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getObjectDesc($customerID))); $content->parse("BLOCK_CUSTOMERS"); } // Add some JavaScript $portal->add_javascript_code("usermanagement_index", $viewHelper->jsSetCommandValue()); // Set context $usermanagementHTMLTemplate->set_context("customers"); break; case "courses-overview": $counter = 0; foreach ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getCourseDataForCustomer($_SESSION["CURRENT_CUSTOMER_ID"]) as $courseID) { $content->setCurrentBlock("BLOCK_COURSES_ENTRY"); $content->setVariable("COURSE_ENTRY", $viewHelper->getCourseRowOverview($courseID)); $content->parse("BLOCK_COURSES_ENTRY"); $counter++; }