english/administrator/components/com_aicontactsafe/views/profiles/view.html.php
// function to generate the html code to select a field used for send to sender
function to generate the html code to select a field used for send to sender
function to generate the html code to select a field used for send to sender
function selectFieldSendToSender( $id = 0, $field_types = array(), $html_name = 'select_field', $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 ';
		} else {
			$query_condition = ' where 1 ';
		}
		if (count($field_types) > 0) {
			$query_condition .= ' and field_type IN ( \''.implode('\',\'', $field_types).'\' )';
		}
		$query = 'SELECT CONCAT(TRIM(name),\' - \',TRIM(field_label)) as ' . $text . ', id as ' . $key . ' FROM #__aicontactsafe_fields ' . $query_condition . ' ORDER BY ' . $text;
		$db->setQuery($query);
		$select_combo = $db->loadObjectList();
		$txtSelect = new stdClass;
		$txtSelect->$text = JText::_('COM_AICONTACTSAFE_ALWAYS_SEND_TO_SENDER');
		$txtSelect->$key = -1;
		array_unshift($select_combo, $txtSelect);
		$txtSelect = new stdClass;
		$txtSelect->$text = $this->setSelectText(4);
		$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 selectFieldSendToSender ( $ id = 0 , $ field_types = array ( ) , $ html_name = 'select_field' , $ 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 ' ; } else { $ query_condition = ' where 1 ' ; } if ( count ( $ field_types ) > 0 ) { $ query_condition .= ' and field_type IN ( \'' . implode ( '\',\'' , $ field_types ) . '\' )' ; } $ query = 'SELECT CONCAT(TRIM(name),\' - \',TRIM(field_label)) as ' . $ text . ', id as ' . $ key . ' FROM #__aicontactsafe_fields ' . $ query_condition . ' ORDER BY ' . $ text ; $ db -> setQuery ( $ query ) ; $ select_combo = $ db -> loadObjectList ( ) ; $ txtSelect = new stdClass ; $ txtSelect -> $ text = JText :: _ ( 'COM_AICONTACTSAFE_ALWAYS_SEND_TO_SENDER' ) ; $ txtSelect -> $ key = - 1 ; array_unshift ( $ select_combo , $ txtSelect ) ; $ txtSelect = new stdClass ; $ txtSelect -> $ text = $ this -> setSelectText ( 4 ) ; $ 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 field used for send to sender
function to generate the html code to select a field used for send to sender