'; return $html; } /* * funkcija koja kreira text polje * @params $name, $value = '', $htmlParams = '', $text = '', $type = 'text' */ public function input($name, $value = '', $htmlParams = '', $text = '', $type = 'text'){ $html = '
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } public function textField($name, $value = '', $htmlParams = '', $text = ''){ return $this->input($name, $value, $htmlParams, $text, 'text'); } public function inputSimple($name, $value = '', $htmlParams = '', $textTitle = '' , $type = 'text'){ $html = $textTitle.''; return $html; } //funkcija koja kreira select public function select($array, $id_select, $name, $all=true , $atr = '' ,$onchange = '', $textTitle = '', $text_prvo = 'Izaberi', $nameForObject = 'name'){ $html = '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= '
'; $html .= '
'; return $html; } //funkcija koja kreira select za YES i NO public function selectYesNo($id_select, $name, $all=true , $atr = '' ,$onchange = '', $textTitle = '', $text_prvo = 'Izaberi', $nameForObject = 'name'){ $array = array('1' => 'Ne', '2' => 'Da'); return $this->select($array, $id_select, $name, $all, $atr, $onchange, $textTitle, $text_prvo, $nameForObject); } //dugme public function buttun($name, $value = '', $htmlParams = '', $textTitle = '', $type = 'button'){ $html = '
'; $html = $html.'
'; $html = $html.$textTitle; $html = $html.'
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } public function submit($name, $value = '', $htmlParams = '', $text = ''){ return $this->buttun($name, $value, $htmlParams, $text, 'submit'); } /* * f-ja koja kreira dugme i duge odustani koje zatvara datu formu */ public function buttunAndCloseButton($name, $value = '', $htmlParams = '', $ostalo_html_close = '', $value_close = '', $textTitle = ''){ $html = '
'; $html .= '
'; $html .= $textTitle; $html .= '
'; $html .= '
'; $html .= ''; $html .= ' '; $html .= ''; $html .= '
'; $html .= '
'; return $html; } /* *f-ja koja kreira file upload */ public function create_file_dugme($name, $ostalo_html = '', $textTitle = '' ){ $html = '
'; $html = $html.'
'; $html = $html.$textTitle; $html = $html.'
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } /* * obicno dugme * @params $url = '#', $textLink = 'Link' , $htmlLinkParams = '', $htmlParams = '',$name = 'link' */ public function buttunSimple($name, $value = '', $textTitle = '', $htmlParams = '', ){ return ''; } /* * kreira link * @params $url = '#', $textLink = 'Link' , $htmlLinkParams = '', $htmlParams = '',$name = 'link' */ public function link($url = '#', $textLink = 'Link' , $htmlLinkParams = '', $htmlParams = '',$name = 'link'){ $html = '
'; $html .= '
'; $html .= ''.$textLink.''; $html .= '
'; $html .= '
'; return $html; } /* * f-ja koja kreira labelu */ public function label($name, $text = 'nema_ime' , $html_ostalo = ''){ $html = '
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } /* * f-ja koja kreira textareu */ public function textarea($name, $value = '', $ostalo_html = '', $textTitle = ''){ $html = '
'; $html = $html.'
'; $html = $html.$textTitle; $html = $html.'
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } public function htmleditor($name, $value = '', $ostalo_html = '', $textTitle = ''){ $html = '
'; $html = $html.'
'; $html = $html.$textTitle; $html = $html.'
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } /* * kreiranje HTML forme START * @params $nameForm = 'forma', $method = "get", $action = '' , $htmlParams = '' */ public function formStart($nameForm = 'forma', $method = "get", $action = '' , $htmlParams = ''){ return '
'; } /* * kreiranje HTML forme END * @params no */ public function formEnd(){ return '
'; } /* * F-ja koja kreira print box fieldset and legend * @params $titleText, $stil, $name = '' */ public function boxFormSart($titleText, $stil, $name = ''){ return '
'.$titleText.''; } /* * zatvaranje boxFormEnd elementa * no params */ public function boxFormEnd(){ return '
'; } /* * F-ja koja kreira naslov strane * @params $text, $htmlParams = '' */ public function pageTitie($text, $htmlParams = ''){ return '
'.$text.'
'; } public function create_radio_button($name, $value = array(), $textIspred = '', $chekId = -11, $htmlOstalo = '', $vertikalno = false){ $html = '
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; foreach($value as $id => $vName){ $checkedRadio = ''; if($chekId == $id){ $checkedRadio = 'checked'; } $html = $html.' '.$vName.' '; if($vertikalno){ $html = $html.'
'; } } $html = $html.'
'; $html = $html.'
'; return $html; } public function createRadioButton($name, $value = array(), $textIspred = '', $chekId = -11, $htmlOstalo = '', $vertikalno = false){ $html = '
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; foreach($value as $id => $vName){ $checkedRadio = ''; if($chekId == $id){ $checkedRadio = 'checked'; } $html = $html.' '.$vName.' '; if($vertikalno){ $html = $html.'
'; } } $html = $html.'
'; $html = $html.'
'; return $html; } public function checkbox($name, $value = array(), $textIspred = '', $chekId = array(), $htmlOstalo = '', $vertikalno = false, $checkBoxPanelHtml = ''){ $html = '
'; $html = $html.'
'; $html = $html.''; $html = $html.'
'; $html = $html.'
'; foreach($value as $id => $vName){ $checkedRadio = ''; if(array_key_exists(intval($id), $chekId)){ $checkedRadio = 'checked'; } if($vertikalno){ $checkboxOmotHtml = 'style="clear:both;"'; }else { $checkboxOmotHtml = 'style="float:left;"'; } $html = $html.'
'; } $html = $html.'
'; $html = $html.'
'; return $html; } /* * box za poruke * @params $text, $htmlParams = '' */ public function boxMessage($text, $htmlParams, $name = ''){ return '
'.$text.'
'; } public function create_element_for_picture($name, $value_text, $text_dugme = "Izaberi", $ostalo_html_text = '',$ostalo_html_button = '', $textTitle = ''){ $html = '
'; $html = $html.'
'; $html = $html.$textTitle; $html = $html.'
'; $html = $html.'
'; //$html = $html.'
izabrana slika
'; $html = $html.''; $html = $html.''; $html = $html.'
'; $html = $html.'
'; return $html; } //filter select public function selectFilter($array, $id_select, $name, $all=true , $atr = '', $onChange = 'doSearch(arguments[0]||event)', $textFirst = 'Svi', $nameForObject = 'name'){ $html = ''; return $html; } /* * box za poruke OK * @params $textMesagge, $htmlParams = '', $name = 'boxMesaggeOK' */ public function messageOK($textMesagge, $htmlParams = '', $name = 'boxMesaggeOK'){ return '
'.$this->getAlertImage('ok').$textMesagge.'
'; } /* * box za poruke ERROR * @params $textMesagge, $htmlParams = '', $name = 'boxMesaggeError' */ public function messageError($textMesagge, $htmlParams = '', $name = 'boxMesaggeError'){ return '
'.$this->getAlertImage('error').$textMesagge.'
'; } /* * box za poruke INFO * @params $textMesagge, $htmlParams = '', $name = 'boxMesaggeInfo' */ public function messageInfo($textMesagge, $htmlParams = '', $name = 'boxMesaggeInfo'){ return '
'.$this->getAlertImage('info').$textMesagge.'
'; } /* * porka, nottification BOX Attention * @params $textMesagge, $htmlParams = '', $name = 'boxMesaggeAttention' */ public function messageAttention($textMesagge, $htmlParams = '', $name = 'boxMesaggeAttention'){ return '
'.$this->getAlertImage('attention').$textMesagge.'
'; } /* * vraca sliku za prosledjeni tip poruke * type = ok, error, info, attention * @params $type = '', $size = '18' */ public function getAlertImage($type = '', $size = '18'){ global $CFG; $image = ''; switch ($type) { case 'ok': $image = ''; break; case 'error': $image = ''; break; case 'info': $image = ''; break; case 'attention': $image = ''; break; default: $image = ''; break; } return $image; } } ?>