Esempio n. 1
1
 /**	Constructor which will set the column_fields in this object
  */
 function __construct()
 {
     global $log;
     $this->column_fields = getColumnFields(get_class($this));
     $this->db = PearDatabase::getInstance();
     $this->log = $log;
 }
Esempio n. 2
0
 function __construct()
 {
     $log = vglobal('log');
     $this->column_fields = getColumnFields(get_class($this));
     $this->db = new PearDatabase();
     $this->log = $log;
 }
Esempio n. 3
0
 /**	Constructor which will set the column_fields in this object
  */
 function __construct()
 {
     global $log;
     $this->column_fields = getColumnFields('Services');
     $this->db = PearDatabase::getInstance();
     $this->log = $log;
 }
Esempio n. 4
0
 function PBXManager()
 {
     global $log;
     $this->column_fields = getColumnFields('PBXManager');
     $this->db = PearDatabase::getInstance();
     $this->log = $log;
 }
 function __construct()
 {
     global $log;
     $this->column_fields = getColumnFields('ServiceContracts');
     $this->db = new PearDatabase();
     $this->log = $log;
 }
Esempio n. 6
0
 function __construct()
 {
     global $log, $currentModule;
     $this->column_fields = getColumnFields($currentModule);
     $this->db = PearDatabase::getInstance();
     $this->log = $log;
 }
Esempio n. 7
0
/**
 * Function to get the field information from module name and field label
 */
function getFieldByReportLabel($module, $label)
{
    // this is required so the internal cache is populated or reused.
    getColumnFields($module);
    //lookup all the accessible fields
    $cachedModuleFields = VTCacheUtils::lookupFieldInfo_Module($module);
    if ($module == 'Calendar') {
        $cachedEventsFields = VTCacheUtils::lookupFieldInfo_Module('Events');
        if ($cachedModuleFields == false) {
            $cachedModuleFields = $cachedEventsFields;
        } else {
            $cachedModuleFields = array_merge($cachedModuleFields, $cachedEventsFields);
        }
    }
    if (empty($cachedModuleFields)) {
        return null;
    }
    $label = decode_html($label);
    foreach ($cachedModuleFields as $fieldInfo) {
        $fieldLabel = str_replace(' ', '_', $fieldInfo['fieldlabel']);
        if ($label == $fieldLabel) {
            return $fieldInfo;
        }
    }
    return null;
}
Esempio n. 8
0
 /**	Constructor which will set the column_fields in this object
  */
 function Vendors()
 {
     $this->log = LoggerManager::getLogger('vendor');
     $this->log->debug("Entering Vendors() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('Vendors');
     $this->log->debug("Exiting Vendor method ...");
 }
Esempio n. 9
0
 /**	Constructor which will set the column_fields in this object
  */
 function Consignment()
 {
     $this->log = LoggerManager::getLogger('Consignment');
     $this->log->debug("Entering Consignment() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('Consignment');
     $this->log->debug("Exiting Consignment method ...");
 }
Esempio n. 10
0
 /**	Constructor which will set the column_fields in this object
  */
 function PriceBooks()
 {
     $this->log = LoggerManager::getLogger('pricebook');
     $this->log->debug("Entering PriceBooks() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('PriceBooks');
     $this->log->debug("Exiting PriceBook method ...");
 }
Esempio n. 11
0
 function __construct()
 {
     global $log, $currentModule, $singlepane_view;
     //$singlepane_view = true;
     $this->column_fields = getColumnFields($currentModule);
     $this->db = new PearDatabase();
     $this->log = $log;
 }
Esempio n. 12
0
 function Qunfatmps()
 {
     $this->log = LoggerManager::getLogger('qunfatmps');
     $this->log->debug("Entering Qunfatmps() method ...");
     $this->db =& getSingleDBInstance();
     $this->column_fields = getColumnFields('Qunfatmps');
     $this->log->debug("Exiting Qunfatmps method ...");
 }
Esempio n. 13
0
 /**	Constructor which will set the column_fields in this object
  */
 function Products()
 {
     $this->log = LoggerManager::getLogger('product');
     $this->log->debug("Entering Products() method ...");
     $this->db =& getSingleDBInstance();
     $this->column_fields = getColumnFields('Products');
     $this->log->debug("Exiting Product method ...");
 }
Esempio n. 14
0
 function Notes()
 {
     $this->log = LoggerManager::getLogger('notes');
     $this->log->debug("Entering Notes() method ...");
     $this->db =& getSingleDBInstance();
     $this->column_fields = getColumnFields('Notes');
     $this->log->debug("Exiting Note method ...");
 }
Esempio n. 15
0
 /**	Constructor which will set the column_fields in this object
  */
 function HelpDesk()
 {
     $this->log = LoggerManager::getLogger('helpdesk');
     $this->log->debug("Entering HelpDesk() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('HelpDesk');
     $this->log->debug("Exiting HelpDesk method ...");
 }
Esempio n. 16
0
 /**	Constructor which will set the column_fields in this object
  */
 function Invoice()
 {
     $this->log = LoggerManager::getLogger('Invoice');
     $this->log->debug("Entering Invoice() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('Invoice');
     $this->log->debug("Exiting Invoice method ...");
 }
Esempio n. 17
0
 function Maillists()
 {
     $this->log = LoggerManager::getLogger('maillists');
     $this->log->debug("Entering Maillists() method ...");
     $this->db =& getSingleDBInstance();
     $this->column_fields = getColumnFields('Maillists');
     $this->log->debug("Exiting Maillists method ...");
 }
Esempio n. 18
0
 function Leads()
 {
     $this->log = LoggerManager::getLogger('lead');
     $this->log->debug("Entering Leads() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('Leads');
     $this->log->debug("Exiting Lead method ...");
 }
Esempio n. 19
0
 function __construct()
 {
     $currentModule = vglobal('currentModule');
     $log = vglobal('log');
     $this->column_fields = getColumnFields($currentModule);
     $this->db = PearDatabase::getInstance();
     $this->log = $log;
 }
Esempio n. 20
0
 function Relsettings()
 {
     $this->log = LoggerManager::getLogger('relsettings');
     $this->log->debug("Entering Relsettings() method ...");
     $this->db =& getSingleDBInstance();
     $this->column_fields = getColumnFields('Relsettings');
     $this->log->debug("Exiting Relsettings method ...");
 }
Esempio n. 21
0
 function Documents()
 {
     $this->log = LoggerManager::getLogger('notes');
     $this->log->debug("Entering Documents() method ...");
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('Documents');
     $this->log->debug("Exiting Documents method ...");
 }
Esempio n. 22
0
 /** This function will set the columnfields for Email module 
  */
 function Emails()
 {
     $this->log = LoggerManager::getLogger('email');
     $this->log->debug("Entering Emails() method ...");
     $this->log = LoggerManager::getLogger('email');
     $this->db = PearDatabase::getInstance();
     $this->column_fields = getColumnFields('Emails');
     $this->log->debug("Exiting Email method ...");
 }
Esempio n. 23
0
 function __construct()
 {
     global $log;
     $log->debug("Entering ./CRMEntity.php::__construct");
     global $log;
     $this->column_fields = getColumnFields(get_class($this));
     $this->db = new PearDatabase();
     $this->log = $log;
 }
Esempio n. 24
0
 function ClearColumnFields()
 {
     $this->log = LoggerManager::getLogger('import_salesorder');
     $this->db =& getSingleDBInstance();
     $colf = getColumnFields("SalesOrder");
     foreach ($colf as $key => $value) {
         $this->column_fields[$key] = '';
     }
 }
Esempio n. 25
0
 function ClearColumnFields()
 {
     $this->log = LoggerManager::getLogger('import_account');
     $this->db =& getSingleDBInstance();
     $colf = getColumnFields("Accounts");
     foreach ($colf as $key => $value) {
         //$this->importable_fields[$key]=1;
         $this->column_fields[$key] = '';
     }
 }
Esempio n. 26
0
 /** Constructor which will set the importable_fields as $this->importable_fields[$key]=1 in this object where key is the fieldname in the field table
  */
 function ImportLead()
 {
     $this->log = LoggerManager::getLogger('import_lead');
     $this->db =& getSingleDBInstance();
     $this->db->println("IMP ImportLead");
     $colf = getColumnFields("Leads");
     foreach ($colf as $key => $value) {
         $this->importable_fields[$key] = 1;
     }
     $this->db->println($this->importable_fields);
 }
Esempio n. 27
0
 function __construct()
 {
     global $log, $currentModule;
     $this->column_fields = getColumnFields($currentModule);
     $this->db = PearDatabase::getInstance();
     $this->log = $log;
     $sql = 'SELECT 1 FROM vtiger_field WHERE uitype=69 and tabid = ?';
     $tabid = getTabid($currentModule);
     $result = $this->db->pquery($sql, array($tabid));
     if ($result and $this->db->num_rows($result) == 1) {
         $this->HasDirectImageField = true;
     }
 }
Esempio n. 28
0
 /** constructor function for the main user class
 	 instantiates the Logger class and PearDatabase Class
 	 */
 function __construct()
 {
     $this->log = LoggerManager::getLogger('user');
     $this->log->debug("Entering Users() method ...");
     $this->db = PearDatabase::getInstance();
     $this->DEFAULT_PASSWORD_CRYPT_TYPE = version_compare(PHP_VERSION, '5.3.0') >= 0 ? 'PHP5.3MD5' : 'MD5';
     $this->column_fields = getColumnFields('Users');
     $this->column_fields['currency_name'] = '';
     $this->column_fields['currency_code'] = '';
     $this->column_fields['currency_symbol'] = '';
     $this->column_fields['conv_rate'] = '';
     $this->log->debug("Exiting Users() method ...");
 }
Esempio n. 29
0
/**
 * Function to get the field information from module name and field label
 */
function getFieldByReportLabel($module, $label)
{
    // this is required so the internal cache is populated or reused.
    getColumnFields($module);
    //lookup all the accessible fields
    $cachedModuleFields = VTCacheUtils::lookupFieldInfo_Module($module);
    if (empty($cachedModuleFields)) {
        return null;
    }
    foreach ($cachedModuleFields as $fieldInfo) {
        $fieldLabel = str_replace(' ', '_', $fieldInfo['fieldlabel']);
        if ($label == $fieldLabel) {
            return $fieldInfo;
        }
    }
    return null;
}
/**
 * Function to get the field information from module name and field label
 */
function getFieldByReportLabel($module, $label)
{
    $cacheLabel = VTCacheUtils::getReportFieldByLabel($module, $label);
    if ($cacheLabel) {
        return $cacheLabel;
    }
    // this is required so the internal cache is populated or reused.
    getColumnFields($module);
    //lookup all the accessible fields
    $cachedModuleFields = VTCacheUtils::lookupFieldInfo_Module($module);
    $label = decode_html($label);
    if ($module == 'Calendar') {
        $cachedEventsFields = VTCacheUtils::lookupFieldInfo_Module('Events');
        if ($cachedEventsFields) {
            if (empty($cachedModuleFields)) {
                $cachedModuleFields = $cachedEventsFields;
            } else {
                $cachedModuleFields = array_merge($cachedModuleFields, $cachedEventsFields);
            }
        }
        if ($label == 'Start_Date_and_Time') {
            $label = 'Start_Date_&_Time';
        }
    }
    if (empty($cachedModuleFields)) {
        return null;
    }
    foreach ($cachedModuleFields as $fieldInfo) {
        $fieldLabel = str_replace(' ', '_', $fieldInfo['fieldlabel']);
        $fieldLabel = decode_html($fieldLabel);
        //SalesPlatform.ru begin fix get field info by label
        if ($label == $fieldLabel || $label == getTranslatedString($fieldLabel, $module)) {
            //if($label == $fieldLabel) {
            //SalesPlatform.ru end
            VTCacheUtils::setReportFieldByLabel($module, $label, $fieldInfo);
            return $fieldInfo;
        }
    }
    return null;
}