english/administrator/components/com_aicontactsafe/views/default/view.html.php
// function to generate the html code to select a status
function to generate the html code to select a status
function to generate the html code to select a status
function selectStatus( $id = 0, $html_name = 'select_status', $addSelect = 1, $onlyPublished = 0, $html_params = 'class="inputbox" size="1"', $key = 'id', $text = 'name', $idtag = false, $translate = true ) {
		$db = & JFactory::getDBO();
		$query_condition = '';
		if ($onlyPublished) {
			$query_condition = ' where published = 1 ';
		}
		$query = 'SELECT name as ' . $text . ', id as ' . $key . ' FROM #__aicontactsafe_statuses ' . $query_condition . ' ORDER BY ordering';
		$db->setQuery($query);
		$select_combo = $db->loadObjectList();
		if ($addSelect > 0) {
			$txtSelect = new stdClass;
			$txtSelect->$text = $this->setSelectText($addSelect);
			$txtSelect->$key = 0;
			array_unshift($select_combo, $txtSelect);
		}
		$html_select_combo = JHTML::_('select.genericlist',  $select_combo, $html_name, $html_params, $key, $text, $id, $idtag, $translate);
		return $html_select_combo;
	}
function selectStatus ( $ id = 0 , $ html_name = 'select_status' , $ addSelect = 1 , $ onlyPublished = 0 , $ html_params = 'class="inputbox" size="1"' , $ key = 'id' , $ text = 'name' , $ idtag = false , $ translate = true ) { $ db = & JFactory :: getDBO ( ) ; $ query_condition = '' ; if ( $ onlyPublished ) { $ query_condition = ' where published = 1 ' ; } $ query = 'SELECT name as ' . $ text . ', id as ' . $ key . ' FROM #__aicontactsafe_statuses ' . $ query_condition . ' ORDER BY ordering' ; $ db -> setQuery ( $ query ) ; $ select_combo = $ db -> loadObjectList ( ) ; if ( $ addSelect > 0 ) { $ txtSelect = new stdClass ; $ txtSelect -> $ text = $ this -> setSelectText ( $ addSelect ) ; $ txtSelect -> $ key = 0 ; array_unshift ( $ select_combo , $ txtSelect ) ; } $ html_select_combo = JHTML :: _ ( 'select.genericlist' , $ select_combo , $ html_name , $ html_params , $ key , $ text , $ id , $ idtag , $ translate ) ; return $ html_select_combo ; }
function to generate the html code to select a status
function to generate the html code to select a status