'crmid','faq'=>'id','faqcomments'=>'faqid'); var $entity_table = "crmentity"; var $column_fields = Array(); var $sortby_fields = Array('question','category','id'); // This is the list of fields that are in the lists. var $list_fields = Array( 'FAQ Id'=>Array('faq'=>'id'), 'Question'=>Array('faq'=>'question'), 'Category'=>Array('faq'=>'category'), 'Product Name'=>Array('faq'=>'product_id'), 'Created Time'=>Array('crmentity'=>'createdtime'), 'Modified Time'=>Array('crmentity'=>'modifiedtime') ); var $list_fields_name = Array( 'FAQ Id'=>'', 'Question'=>'question', 'Category'=>'faqcategories', 'Product Name'=>'product_id', 'Created Time'=>'createdtime', 'Modified Time'=>'modifiedtime' ); var $list_link_field= 'question'; var $list_mode; var $popup_type; var $search_fields = Array( 'Account Name'=>Array('account'=>'accountname'), 'City'=>Array('accountbillads'=>'bill_city'), ); var $search_fields_name = Array( 'Account Name'=>'accountname', 'City'=>'bill_city', ); function Faq() { $this->log =LoggerManager::getLogger('account'); $this->db = new PearDatabase(); $this->column_fields = getColumnFields('Faq'); } function getFAQComments($faqid) { global $mod_strings; $sql = "select * from faqcomments where faqid=".$faqid; $result = $this->db->query($sql); $noofrows = $this->db->num_rows($result); if($noofrows == 0) return ''; $list .= '
'; for($i=0;$i<$noofrows;$i++) { $comment = $this->db->query_result($result,$i,'comments'); $createdtime = $this->db->query_result($result,$i,'createdtime'); if($comment != '') { $list .= '
  '.$comment.'
'; $list .= '
'.$mod_strings['Created Time']; $list .= ' : '.$createdtime.'
'; } } $list .= '
'; return $list; } } ?>