template = $template; $this->template->set_file(array("body" => 'uiwidgets.tpl')); } /** * create multiselectbox * * this function will create a multiselect box. Hard to describe! :) * * @param _selectedValues Array of values for already selected values(the left selectbox) * @param _predefinedValues Array of values for predefined values(the right selectbox) * @param _valueName name for the variable containing the selected values * @param _boxWidth the width of the multiselectbox( example: 100px, 100%) * * @returns the html code, to be added into the template */ function multiSelectBox($_selectedValues, $_predefinedValues, $_valueName, $_boxWidth="100%") { $this->template->set_block('body','multiSelectBox'); if(is_array($_selectedValues)) { foreach($_selectedValues as $key => $value) { $options .= ""; } $this->template->set_var('multiSelectBox_selected_options',$options); } $options = ''; if(is_array($_predefinedValues)) { foreach($_predefinedValues as $key => $value) { if($key != $_selectedValues["$key"]) $options .= ""; } $this->template->set_var('multiSelectBox_predefinded_options',$options); } $this->template->set_var('multiSelectBox_valueName', $_valueName); $this->template->set_var('multiSelectBox_boxWidth', $_boxWidth); return $this->template->fp('out','multiSelectBox'); } function tableView($_headValues, $_tableWidth="100%") { $this->template->set_block('body','tableView'); $this->template->set_block('body','tableViewHead'); if(is_array($_headValues)) { foreach($_headValues as $head) { $this->template->set_var('tableHeadContent',$head); $this->template->parse('tableView_Head','tableViewHead',True); } } if(is_array($this->tableViewRows)) { foreach($this->tableViewRows as $tableRow) { $rowData .= "