/** * This method is used to display the form add edit object. * * @return string HTML form tag. */ public function Display() { $return_value = '<form id="' . $_REQUEST['Page'] . 'Form"' . ($this->Action == '' || $this->Action == null ? '' : ' action="' . $this->Action . '"') . ($this->Upload == '' || $this->Upload == null || !$this->Upload ? '' : ' enctype="multipart/form-data"') . ' class="Content_Form" method="post">'; $return_value .= '<table class="new_form"' . ($this->TableStyle === '' || $this->TableStyle === null ? '' : ' style="' . $this->TableStyle . '"') . '><tbody>'; foreach ($this->Row_Header_Array as $key => $value) { $return_value .= '<tr id="' . $_REQUEST['Page'] . 'FormRow' . $key . '"' . ($this->TrMouseOver === '' || $this->TrMouseOver === null ? '' : ' onmouseover="' . $this->TrMouseOver . '"') . '>' . $value->Display() . $this->Row_Input_Array[$key]->Display() . '</tr>'; } $return_value .= '</tbody></table>'; $return_value .= $this->ExtraContent === '' || $this->ExtraContent === null ? '' : $this->ExtraContent; $buttons = '<br />'; foreach ($this->Button_Array as $value) { $buttons .= $value->Display(); } $contentfooter = new ContentFooter($buttons, $this->ButtonAlign); $return_value .= $contentfooter->Display(); $return_value .= '</form>'; return $return_value; }
$tdAddress = new Td(OwnLibrary::Utf8Encode($value->Street_Name) . ' ' . OwnLibrary::Utf8Encode($value->Street_No), 'Street_' . OwnLibrary::Utf8Encode($value->Id)); $tdZip = new Td(OwnLibrary::Utf8Encode($value->Zip), 'Zip_' . OwnLibrary::Utf8Encode($value->Id), null, 'text-align: center;'); $tdCity = new Td(OwnLibrary::Utf8Encode($value->City), 'City_' . OwnLibrary::Utf8Encode($value->Id), null, 'text-align: center;'); $tdCountry = new Td(OwnLibrary::Utf8Encode($country), 'Country_' . OwnLibrary::Utf8Encode($value->Id), null, 'text-align: center;'); $tdEmail = new Td('<a href="mailto:' . OwnLibrary::Utf8Encode($value->Email) . '">' . OwnLibrary::Utf8Encode($value->Email) . '</a>', 'Email_' . OwnLibrary::Utf8Encode($value->Id), null, 'text-align: center;'); $tdFunctions = new Td($tdFunctionContent, null, 'funcs', 'text-align: center; width: 1px;'); $tdArray = array(); $tdArray[] = $tdName; $tdArray[] = $tdAddress; $tdArray[] = $tdZip; $tdArray[] = $tdCity; $tdArray[] = $tdCountry; $tdArray[] = $tdEmail; $tdArray[] = $tdFunctions; $trContent = new Tr($tdArray, null, 'TrMain' . ($key % 2 ? ' tr_even' : '')); $trArray[] = $trContent; } $viewTable = new ViewTable($trHeader, $trArray); $pagination = new Pagination($Persons_List[1]); $contentfooter = new ContentFooter($pagination->Display()); $viewPersons = new ViewPersons(); $viewPersons->par = $this; $viewPersons->page_title = 'Adressbuch'; $viewPersons->page_title_right = $buttonNewPerson->Display(); if (empty($Persons_List[0])) { $viewPersons->content = '<br />' . $notFoundMassage->Display() . '<br /><br />'; } $viewPersons->content .= $viewTable->Display(); $viewPersons->contentFooter = $contentfooter->Display(); include_once 'view/javascripts/' . $this->get_values['Page'] . '.javascript.php'; $viewPersons->Display();