/** * Returns all extra fields fields for a company. * * @param integer candidate ID * @return array extra fields data */ public function getValues($record_id) { $arrTableInfo = getTableInfoByDataItemType($this->_dataItemType); $sql = sprintf("SELECT\n *\n FROM\n {$arrTableInfo["table"]}\n WHERE\n {$arrTableInfo["table"]}.{$arrTableInfo["primary_key"]} = %s\n AND\n {$arrTableInfo["table"]}.site_id = %s", $this->_db->makeQueryInteger($record_id), $this->_siteID); return $this->_db->getAssoc($sql); }
function getModules() { static $arrModule=false; if(empty($arrModule)) { $site_id=$_SESSION["CATS"]->getSiteID(); $sql="select * from data_item_type where site_id={$site_id}"; $objDB=DatabaseConnection::getInstance(); $arrRecord=$objDB->getAllAssoc($sql); foreach($arrRecord as $records) { $arrTmp=getTableInfoByDataItemType($records["data_item_type_id"]); $arrTmp["data_item_type_id"]=$records["data_item_type_id"]; $arrModule[$records["data_item_type_id"]]=$arrTmp; } } return $arrModule; }