english/administrator/components/com_aicontactsafe/models/messages.php
// function to detect if a message has a reply
function to detect if a message has a reply
function to detect if a message has a reply
function hasReply( $id = 0 ) {
		$id = (int)$id;
		$db = &JFactory::getDBO();
		$query = 'SELECT message_reply FROM #__aicontactsafe_messages WHERE id = '.$id;
		$db->setQuery($query);
		$message_reply = $db->loadResult();
		$has_reply = strlen(trim($message_reply))>0?1:0;
		return $has_reply;
	}
function hasReply ( $ id = 0 ) { $ id = ( int ) $ id ; $ db = & JFactory :: getDBO ( ) ; $ query = 'SELECT message_reply FROM #__aicontactsafe_messages WHERE id = ' . $ id ; $ db -> setQuery ( $ query ) ; $ message_reply = $ db -> loadResult ( ) ; $ has_reply = strlen ( trim ( $ message_reply ) ) > 0 ? 1 : 0 ; return $ has_reply ; }
function to detect if a message has a reply
function to detect if a message has a reply
// initialize the database