Пример #1
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     $this->create_data_dir();
     DB::CreateTable('libs_tcpdf_pdf_index', 'created_on T,' . 'filename C(32)', array('constraints' => ''));
     return true;
 }
Пример #2
0
	public function install() {
		Base_ThemeCommon::install_default_theme($this->get_type());
		$ret = true;
		$ret &= DB::CreateTable('utils_messenger_message','
			id I4 AUTO KEY,
			callback_method C(255) NOTNULL,
			callback_args X,
			message X,
			created_by I4 NOTNULL,
			created_on T NOTNULL,
			alert_on T,
			parent_module C(32) NOTNULL,
			page_id C(32) NOTNULL',
			array('constraints'=>', FOREIGN KEY (created_by) REFERENCES user_login(ID)'));
		if(!$ret){
			print('Unable to create table utils_messenger_message.<br>');
			return false;
		}
		$ret &= DB::CreateTable('utils_messenger_users','
			message_id I4,
			done I1 DEFAULT 0,
			user_login_id I4,
			done_on T,
			follow I1 DEFAULT 0',
			array('constraints'=>' , FOREIGN KEY (message_id) REFERENCES utils_messenger_message(id), FOREIGN KEY (user_login_id) REFERENCES user_login(ID)'));
		if(!$ret){
			print('Unable to create table utils_messenger_users.<br>');
			return false;
		}
		Base_AclCommon::add_permission(_M('Messenger Alerts'),array('ACCESS:employee'));
		
		return $ret;
	}
Пример #3
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     DB::CreateTable('utils_currency', 'id I AUTO KEY,' . 'symbol C(16),' . 'code C(8),' . 'decimal_sign C(2),' . 'thousand_sign C(2),' . 'decimals I1,' . 'active I1,' . 'default_currency I1,' . 'pos_before I1', array('constraints' => ''));
     DB::Execute('INSERT INTO utils_currency (symbol, code, decimal_sign, thousand_sign, decimals, pos_before, active, default_currency) VALUES (%s, %s, %s, %s, %d, %d, %d, %d)', array('$', 'USD', '.', ',', 2, 1, 1, 1));
     return true;
 }
Пример #4
0
 public function install()
 {
     $ret = DB::CreateTable('user_password', "user_login_id I KEY, password C(256) NOTNULL, mail C(255) NOTNULL", array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id)'));
     if ($ret === false) {
         print 'Invalid SQL query - user_password table install';
         return false;
     }
     $ret = DB::CreateTable('user_autologin', "user_login_id I NOTNULL, autologin_id C(32) NOTNULL, last_log T, description C(64)", array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id)'));
     if ($ret === false) {
         print 'Invalid SQL query - user_autologin table install';
         return false;
     }
     $ret = DB::CreateTable('user_login_ban', "failed_on I4, from_addr C(32)");
     if ($ret === false) {
         print 'Invalid SQL query - user_login_ban table install';
         return false;
     }
     $ret = DB::CreateTable('user_reset_pass', "user_login_id I NOTNULL, hash_id C(32) NOTNULL, created_on T DEFTIMESTAMP", array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id)'));
     if ($ret === false) {
         print 'Invalid SQL query - user_autologin table install';
         return false;
     }
     Variable::set('host_ban_time', 300);
     Variable::set('host_ban_nr_of_tries', 3);
     Variable::set('host_ban_by_login', 0);
     Base_ThemeCommon::install_default_theme(Base_User_LoginInstall::module_name());
     return true;
 }
Пример #5
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     DB::CreateTable('base_home_page', 'id I4 AUTO KEY,' . 'priority I4,' . 'home_page C(64)', array('constraints' => ''));
     DB::CreateTable('base_home_page_clearance', 'id I4 AUTO KEY,' . 'home_page_id I,' . 'clearance C(64)', array('constraints' => ', FOREIGN KEY (home_page_id) REFERENCES base_home_page(id)'));
     return true;
 }
Пример #6
0
 public function install()
 {
     Base_AclCommon::add_permission(_M('View Activity Report'), array('ACCESS:employee', 'ACCESS:manager'));
     Base_ThemeCommon::install_default_theme($this->get_type());
     Utils_RecordBrowserCommon::new_addon('contact', 'Apps/ActivityReport', 'contact_addon', array('Apps_ActivityReportCommon', 'contact_addon_label'));
     return true;
 }
Пример #7
0
 public function install()
 {
     $ret = true;
     if ($ret) {
         $ret = Variable::set('mail_from_addr', '*****@*****.**');
     }
     if ($ret) {
         $ret = Variable::set('mail_from_name', 'Administrator');
     }
     if ($ret) {
         $ret = Variable::set('mail_use_replyto', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_method', 'mail');
     }
     if ($ret) {
         $ret = Variable::set('mail_user', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_password', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_host', 'smtp.example.com:25');
     }
     if ($ret) {
         $ret = Variable::set('mail_security', '');
     }
     if ($ret) {
         $ret = Variable::set('mail_auth', false);
     }
     Base_ThemeCommon::install_default_theme($this->get_type());
     return $ret;
 }
Пример #8
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme('CRM/Contacts/Activities');
     Utils_RecordBrowserCommon::new_addon('company', 'CRM/Contacts/Activities', 'company_activities', _M('Activities'));
     Utils_RecordBrowserCommon::new_addon('contact', 'CRM/Contacts/Activities', 'contact_activities', _M('Activities'));
     return true;
 }
Пример #9
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     Variable::set('error_mail', '');
     $this->create_data_dir();
     return true;
 }
Пример #10
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme('CRM/Calendar');
     Base_AclCommon::add_permission(_M('Calendar'), array('ACCESS:employee'));
     DB::CreateTable('crm_calendar_custom_events_handlers', 'id I4 AUTO KEY,' . 'group_name C(64),' . 'handler_callback C(128)', array('constraints' => ''));
     return true;
 }
Пример #11
0
    public function install()
    {
        global $database;
        $ret = true;
        $ret &= DB::CreateTable('base_user_settings', '
			user_login_id I4 NOTNULL,
			module C(128) NOTNULL,
			variable C(64) NOTNULL,
			value X NOTNULL', array('constraints' => ', FOREIGN KEY (user_login_id) REFERENCES user_login(id), PRIMARY KEY(user_login_id,module,variable)'));
        if (!$ret) {
            print 'Unable to create table base_user_settings.<br>';
            return false;
        }
        $ret &= DB::CreateTable('base_user_settings_admin_defaults', '
			module C(128) NOTNULL,
			variable C(64) NOTNULL,
			value X NOTNULL', array('constraints' => ', PRIMARY KEY(module,variable)'));
        if (!$ret) {
            print 'Unable to create table base_user_settings_defaults.<br>';
            return false;
        }
        Base_ThemeCommon::install_default_theme(Base_User_SettingsInstall::module_name());
        Base_AclCommon::add_permission(_M('Advanced User Settings'), array('ACCESS:employee'));
        return $ret;
    }
Пример #12
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     Utils_CommonDataCommon::new_id('Base_Notify/Timeout', true);
     Utils_CommonDataCommon::new_array('Base_Notify/Timeout', array(-1 => _M('Disable Notification'), 0 => _M('Manually')), true, true);
     Utils_CommonDataCommon::new_array('Base_Notify/Timeout', array(10000 => _M('10 seconds'), 30000 => _M('30 seconds'), 60000 => _M('1 minute')));
     return true;
 }
Пример #13
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     Utils_RecordBrowserCommon::new_addon('contact', 'CRM/Contacts/NotesAggregate', 'contact_addon', _M('Related Notes'));
     Utils_RecordBrowserCommon::new_addon('company', 'CRM/Contacts/NotesAggregate', 'company_addon', _M('Related Notes'));
     Utils_RecordBrowserCommon::new_addon('premium_salesopportunity', 'CRM/Contacts/NotesAggregate', 'salesopportunity_addon', _M('Related Notes'));
     return true;
 }
Пример #14
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     ModuleManager::include_common($this->get_type(), 0);
     Base_PrintCommon::register_document_type(new Base_Print_Document_HTML());
     Base_PrintCommon::register_document_type(new Base_Print_Document_PDF());
     return true;
 }
Пример #15
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     Base_AclCommon::add_permission(_M('Fax - Browse'), array('ACCESS:employee'));
     Base_AclCommon::add_permission(_M('Fax - Send'), array('ACCESS:employee'));
     $this->create_data_dir();
     return true;
 }
Пример #16
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     $ret = DB::CreateTable('base_login_audit', "id I AUTO KEY, user_login_id I, start_time T, end_time T, ip_address C(32), host_name C(64)");
     if ($ret === false) {
         die('Invalid SQL query - Database module (login_audit table)');
     }
     return true;
 }
Пример #17
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme('CRM/Contacts/Photo');
     Utils_RecordBrowserCommon::set_tpl('contact', Base_ThemeCommon::get_template_filename('CRM/Contacts/Photo', 'Contact'));
     Utils_RecordBrowserCommon::register_processing_callback('contact', array('CRM_Contacts_PhotoCommon', 'submit_contact'));
     $this->create_data_dir();
     ModuleManager::include_common('CRM_Contacts_Photo', 0);
     DB::CreateTable(CRM_Contacts_PhotoCommon::table_name, 'contact_id I4 KEY,' . 'filename C(48) NOTNULL');
     return true;
 }
Пример #18
0
 public function install()
 {
     DB::CreateTable('base_acl_permission', 'id I4 AUTO KEY,' . 'name C(255)', array('constraints' => ''));
     DB::CreateTable('base_acl_rules', 'id I4 AUTO KEY,' . 'permission_id I', array('constraints' => ', FOREIGN KEY (permission_id) REFERENCES base_acl_permission(id)'));
     DB::CreateTable('base_acl_rules_clearance', 'id I4 AUTO KEY,' . 'rule_id I,' . 'clearance C(64)', array('constraints' => ', FOREIGN KEY (rule_id) REFERENCES base_acl_rules(id)'));
     DB::CreateTable('base_acl_clearance', 'id I4 AUTO KEY,' . 'callback C(128)', array('constraints' => ''));
     DB::Execute('INSERT INTO base_acl_clearance (callback) VALUES (%s)', array('Base_AclCommon::basic_clearance'));
     Base_ThemeCommon::install_default_theme($this->get_type());
     return true;
 }
Пример #19
0
 public function install()
 {
     Variable::set('base_page_title', 'EPESI');
     Variable::set('show_caption_in_title', '1');
     Variable::set('show_module_indicator', '1');
     Variable::set('logo_file', '');
     Variable::set('login_logo_file', '');
     Base_ThemeCommon::install_default_theme(Base_MainModuleIndicatorInstall::module_name());
     $this->create_data_dir();
     return true;
 }
Пример #20
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme(CRM_ContactsInstall::module_name());
     Utils_RecordBrowserCommon::register_datatype('crm_company', 'CRM_ContactsCommon', 'crm_company_datatype');
     Utils_RecordBrowserCommon::register_datatype('crm_contact', 'CRM_ContactsCommon', 'crm_contact_datatype');
     Utils_RecordBrowserCommon::register_datatype('crm_company_contact', 'CRM_ContactsCommon', 'crm_company_contact_datatype');
     Utils_RecordBrowserCommon::register_datatype('email', 'CRM_ContactsCommon', 'email_datatype');
     ModuleManager::include_common('CRM_Contacts', 0);
     // ************ companies ************** //
     $fields = array(array('name' => _M('Company Name'), 'type' => 'text', 'required' => true, 'param' => '128', 'extra' => false, 'visible' => true, 'display_callback' => array('Utils_RecordBrowserCommon', 'display_linked_field_label'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_cname')), array('name' => _M('Short Name'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => false), array('name' => _M('Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Fax'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Email'), 'type' => 'email', 'required' => false, 'param' => array('unique' => true), 'extra' => true, 'visible' => false), array('name' => _M('Web address'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_webaddress'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_webaddress')), array('name' => _M('Group'), 'type' => 'multiselect', 'required' => false, 'visible' => true, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Companies_Groups'), 'extra' => false, 'filter' => true), array('name' => _M('Permission'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Access'), 'extra' => true), array('name' => _M('Address 1'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Address 2'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('City'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Country'), 'type' => 'commondata', 'required' => true, 'param' => array('Countries'), 'extra' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_country')), array('name' => _M('Zone'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country'), 'extra' => true, 'visible' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_zone')), array('name' => _M('Postal Code'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Tax ID'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_tax_id')));
     Utils_RecordBrowserCommon::install_new_recordset('company', $fields);
     // ************ contacts ************** //
     $fields = array(array('name' => _M('Last Name'), 'type' => 'text', 'required' => true, 'param' => '64', 'extra' => false, 'visible' => true, 'display_callback' => array('Utils_RecordBrowserCommon', 'display_linked_field_label')), array('name' => _M('First Name'), 'type' => 'text', 'required' => true, 'param' => '64', 'extra' => false, 'visible' => true, 'display_callback' => array('Utils_RecordBrowserCommon', 'display_linked_field_label')), array('name' => _M('Company Name'), 'type' => 'crm_company', 'param' => array('field_type' => 'select'), 'required' => false, 'extra' => false, 'visible' => true, 'filter' => true), array('name' => _M('Related Companies'), 'type' => 'crm_company', 'param' => array('field_type' => 'multiselect'), 'required' => false, 'extra' => true, 'visible' => false, 'filter' => true), array('name' => _M('Group'), 'type' => 'multiselect', 'required' => false, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Contacts_Groups'), 'extra' => true, 'filter' => true), array('name' => _M('Title'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Work Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Mobile Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Fax'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Email'), 'type' => 'email', 'required' => false, 'param' => array('unique' => true), 'extra' => false, 'visible' => false), array('name' => _M('Web address'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_webaddress'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_webaddress')), array('name' => _M('Address 1'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Address 2'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('City'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Country'), 'type' => 'commondata', 'required' => true, 'param' => array('Countries'), 'extra' => true, 'visible' => false, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_country')), array('name' => _M('Zone'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country'), 'extra' => true, 'visible' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_zone')), array('name' => _M('Postal Code'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Permission'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Access'), 'extra' => true), array('name' => _M('Details'), 'type' => 'page_split'), array('name' => _M('Home Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Home Address 1'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'home_maplink')), array('name' => _M('Home Address 2'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'home_maplink')), array('name' => _M('Home City'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'home_maplink')), array('name' => _M('Home Country'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries'), 'extra' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_country')), array('name' => _M('Home Zone'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Home Country'), 'extra' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_zone')), array('name' => _M('Home Postal Code'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Birth Date'), 'type' => 'date', 'required' => false, 'param' => 64, 'extra' => true), array('name' => _M('Login Panel'), 'type' => 'page_split', 'param' => 1), array('name' => _M('Login'), 'type' => 'integer', 'required' => false, 'param' => '64', 'extra' => false, 'display_callback' => array('CRM_ContactsCommon', 'display_login'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_login'), 'style' => ''), array('name' => _M('Username'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_username')), array('name' => _M('Set Password'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_password')), array('name' => _M('Confirm Password'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_repassword')), array('name' => _M('Admin'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_admin'), 'display_callback' => array('CRM_ContactsCommon', 'display_admin')), array('name' => _M('Access'), 'type' => 'multiselect', 'required' => false, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Contacts/Access'), 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_access')));
     Utils_RecordBrowserCommon::install_new_recordset('contact', $fields);
     DB::CreateIndex('contact_data_1__f_login_idx', 'contact_data_1', 'f_login,active');
     // ************ company settings ************** //
     Utils_RecordBrowserCommon::register_processing_callback('company', array('CRM_ContactsCommon', 'submit_company'));
     Utils_RecordBrowserCommon::set_quickjump('company', 'Company Name');
     Utils_RecordBrowserCommon::set_favorites('company', true);
     Utils_RecordBrowserCommon::set_recent('company', 15);
     Utils_RecordBrowserCommon::set_caption('company', _M('Companies'));
     Utils_RecordBrowserCommon::set_icon('company', Base_ThemeCommon::get_template_filename(CRM_ContactsInstall::module_name(), 'companies.png'));
     Utils_RecordBrowserCommon::set_description_callback('company', array('CRM_ContactsCommon', 'company_format_default'));
     Utils_RecordBrowserCommon::enable_watchdog('company', array('CRM_ContactsCommon', 'company_watchdog_label'));
     Utils_RecordBrowserCommon::set_clipboard_pattern('company', "%{{company_name}<BR>}\n%{{address_1}<BR>}\n%{{address_2}<BR>}\n%{%{{city} }%{{zone} }{postal_code}<BR>}\n%{{country}<BR>}\n%{tel. {phone}<BR>}\n%{fax. {fax}<BR>}\n%{{web_address}<BR>}");
     // ************ contacts settings ************** //
     Utils_RecordBrowserCommon::set_tpl('contact', Base_ThemeCommon::get_template_filename(CRM_ContactsInstall::module_name(), 'Contact'));
     Utils_RecordBrowserCommon::register_processing_callback('contact', array('CRM_ContactsCommon', 'submit_contact'));
     Utils_RecordBrowserCommon::set_quickjump('contact', 'Last Name');
     Utils_RecordBrowserCommon::set_favorites('contact', true);
     Utils_RecordBrowserCommon::set_recent('contact', 15);
     Utils_RecordBrowserCommon::set_caption('contact', _M('Contacts'));
     Utils_RecordBrowserCommon::set_icon('contact', Base_ThemeCommon::get_template_filename(CRM_ContactsInstall::module_name(), 'icon.png'));
     Utils_RecordBrowserCommon::set_description_callback('contact', array('CRM_ContactsCommon', 'contact_format_default'));
     Utils_RecordBrowserCommon::enable_watchdog('contact', array('CRM_ContactsCommon', 'contact_watchdog_label'));
     Utils_RecordBrowserCommon::set_clipboard_pattern('contact', "%{{first_name} {last_name}<BR>}\n%{{title}<BR>}\n%{{company_name}<BR>}\n%{{address_1}<BR>}\n%{{address_2}<BR>}\n%{%{{city} }%{{zone} }{postal_code}<BR>}\n%{{country}<BR>}\n%{tel. {work_phone}<BR>}\n%{{email}<BR>}");
     // ************ addons ************** //
     Utils_RecordBrowserCommon::new_addon('company', CRM_ContactsInstall::module_name(), 'company_addon', _M('Contacts'));
     Utils_AttachmentCommon::new_addon('company');
     Utils_AttachmentCommon::new_addon('contact');
     // ************ other ************** //
     Utils_CommonDataCommon::new_array('Companies_Groups', array('customer' => _M('Customer'), 'vendor' => _M('Vendor'), 'other' => _M('Other'), 'manager' => _M('Manager')), true, true);
     Utils_CommonDataCommon::new_array('Contacts_Groups', array('office' => _M('Office Staff'), 'field' => _M('Field Staff'), 'custm' => _M('Customer')), true, true);
     Utils_CommonDataCommon::new_array('Contacts/Access', array('manager' => _M('Manager')), true, true);
     Utils_BBCodeCommon::new_bbcode('contact', 'CRM_ContactsCommon', 'contact_bbcode');
     Utils_BBCodeCommon::new_bbcode('company', 'CRM_ContactsCommon', 'company_bbcode');
     Utils_RecordBrowserCommon::set_search('company', 1, 2);
     Utils_RecordBrowserCommon::set_search('contact', 1, 2);
     Base_AclCommon::add_clearance_callback(array('CRM_ContactsCommon', 'crm_clearance'));
     Utils_CommonDataCommon::extend_array('Contacts/Access', array('employee' => _M('Employee')));
     self::install_permissions();
     return true;
 }
Пример #21
0
	public function install() {
		$this->create_data_dir();
		
		Base_ThemeCommon::install_default_theme('Utils/RecordBrowser');
		DB::CreateTable('recordbrowser_table_properties',
						'id I2 AUTO KEY,'.
						'tab C(64),'.
						'quickjump C(64) DEFAULT \'\','.
						'tpl C(255) DEFAULT \'\','.
						'favorites I1 DEFAULT 0,'.
						'recent I2 DEFAULT 0,'.
						'full_history I1 DEFAULT 1,'.
						'caption C(32) DEFAULT \'\','.
						'icon C(255) DEFAULT \'\','.
						'access_callback C(128) DEFAULT \'\','.
						'description_callback C(128) DEFAULT \'\','.
                        'jump_to_id I1 DEFAULT 1,'.
                        'search_include I1 DEFAULT 0,'.
                        'search_priority I1 DEFAULT 0,'.
                        'printer C(255) DEFAULT \'\'',
						array('constraints'=>', UNIQUE(tab)'));
		DB::CreateTable('recordbrowser_datatype',
						'type C(32) KEY,'.
						'module C(64),'.
						'func C(128)',
						array('constraints'=>''));
		DB::CreateTable('recordbrowser_addon',
					'tab C(64),'.
					'module C(128),'.
					'func C(128),'.
					'pos I,'.
					'enabled I1,'.
					'label C(128)',
					array('constraints'=>', PRIMARY KEY(tab, module, func)'));
		DB::CreateTable('recordbrowser_browse_mode_definitions',
					'tab C(64),'.
					'module C(128),'.
					'func C(128)',
					array('constraints'=>', PRIMARY KEY(tab, module, func)'));
		DB::CreateTable('recordbrowser_processing_methods',
					'tab C(64),'.
					'func C(255)',
					array('constraints'=>', PRIMARY KEY(tab, func)'));
		DB::CreateTable('recordbrowser_clipboard_pattern', 'tab C(64) KEY, pattern X, enabled I4');

		DB::CreateTable('recordbrowser_words_index', 'id I AUTO KEY,word C(3)',
					array('constraints'=>', UNIQUE(word)'));
		DB::CreateTable('recordbrowser_words_map', 'word_id I, tab_id I2, record_id I, field_id I2, position I',
					array('constraints'=>', FOREIGN KEY (word_id) REFERENCES recordbrowser_words_index(id) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (tab_id) REFERENCES recordbrowser_table_properties(id) ON DELETE CASCADE ON UPDATE CASCADE'));
		DB::CreateIndex('recordbrowser_words_map__idx','recordbrowser_words_map','tab_id,record_id');
        Base_PrintCommon::register_printer(new Utils_RecordBrowser_RecordPrinter());
		return true;
	}
Пример #22
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     $fields = array(array('name' => _M('Name'), 'type' => 'text', 'required' => true, 'param' => 16, 'extra' => false, 'visible' => true), array('name' => _M('Description'), 'type' => 'long text', 'required' => false, 'extra' => false), array('name' => _M('Percentage'), 'type' => 'float', 'required' => true, 'extra' => false, 'visible' => true));
     Utils_RecordBrowserCommon::install_new_recordset('data_tax_rates', $fields);
     Utils_RecordBrowserCommon::new_record('data_tax_rates', array('name' => 'Non-taxable', 'percentage' => 0));
     Utils_RecordBrowserCommon::set_caption('data_tax_rates', _M('Tax Rates'));
     Utils_RecordBrowserCommon::set_icon('data_tax_rates', Base_ThemeCommon::get_template_filename('Data/TaxRates', 'icon.png'));
     Utils_RecordBrowserCommon::add_access('data_tax_rates', 'view', 'ACCESS:employee');
     Utils_RecordBrowserCommon::add_access('data_tax_rates', 'add', array('ACCESS:employee', 'ACCESS:manager'));
     Utils_RecordBrowserCommon::add_access('data_tax_rates', 'edit', array('ACCESS:employee', 'ACCESS:manager'));
     Utils_RecordBrowserCommon::add_access('data_tax_rates', 'delete', array('ACCESS:employee', 'ACCESS:manager'));
     return true;
 }
Пример #23
0
	public function install() {
		Base_ThemeCommon::install_default_theme($this->get_type());
		$ret = true;
		$ret &= DB::CreateTable('utils_watchdog_category',
					'id I AUTO KEY,'.
					'name C(32),'.
					'callback C(128)',
			array('constraints'=>''));
		if(!$ret){
			print('Unable to create table utils_watchdog_category.<br>');
			return false;
		}
		$ret &= DB::CreateTable('utils_watchdog_event',
					'id I AUTO KEY,'.
					'category_id I,'.
					'internal_id I,'.
					'message C(64),'.
					'event_time T',
			array('constraints'=>', FOREIGN KEY (category_id) REFERENCES utils_watchdog_category(id)'));
		if(!$ret){
			print('Unable to create table utils_watchdog_event.<br>');
			return false;
		}
		$ret &= DB::CreateTable('utils_watchdog_subscription',
					'category_id I,'.
					'internal_id I,'.
					'last_seen_event I,'.
					'user_id I',
			array('constraints'=>', FOREIGN KEY (user_id) REFERENCES user_login(id)'));
		if(!$ret){
			print('Unable to create table utils_watchdog_subscription.<br>');
			return false;
		}
		$ret &= DB::CreateTable('utils_watchdog_category_subscription',
					'category_id I,'.
					'user_id I',
			array('constraints'=>', FOREIGN KEY (user_id) REFERENCES user_login(id), FOREIGN KEY (category_id) REFERENCES utils_watchdog_category(id)'));
		if(!$ret){
			print('Unable to create table utils_watchdog_category_subscription.<br>');
			return false;
		}

		DB::CreateIndex('utils_watchdog_event__internal_id__idx', 'utils_watchdog_event', 'internal_id');
		DB::CreateIndex('utils_watchdog_event__cat_int__idx', 'utils_watchdog_event', array('category_id','internal_id'));
		DB::CreateIndex('utils_watchdog_subscription__cat_int__idx', 'utils_watchdog_subscription', array('category_id','internal_id'));
		DB::CreateIndex('utils_watchdog_subscription__user__idx', 'utils_watchdog_subscription', 'user_id');
		Base_AclCommon::add_permission(_M('Watchdog - subscribe to categories'),array('ACCESS:employee','ACCESS:manager'));
		return $ret;
	}
Пример #24
0
 public function install()
 {
     $ret = DB::CreateTable('comment', "id I AUTO KEY, text X(4000) NOTNULL, user_login_id I NOTNULL, parent I DEFAULT -1 NOTNULL, topic C(255) NOTNULL, created_on T NOTNULL");
     if ($ret === false) {
         print 'Invalid SQL query - Comment module install: ' . DB::error();
         return false;
     }
     $ret = DB::CreateTable('comment_report', "id I KEY, user_login_id I NOTNULL");
     if ($ret === false) {
         print 'Invalid SQL query - Comment module install: ' . DB::error();
         return false;
     }
     Base_ThemeCommon::install_default_theme('Utils/Comment');
     return true;
 }
Пример #25
0
	public function install() {
		$ret = true;
		$ret &= DB::CreateTable('utils_commondata_tree','
			id I4 AUTO KEY,
			parent_id I4 DEFAULT -1,
			akey C(64) NOTNULL,
			value X,
			readonly I1 DEFAULT 0',
			array('constraints'=>', UNIQUE(parent_id,akey)'));
		if(!$ret){
			print('Unable to create table utils_commondata_tree.<br>');
			return false;
		}
		Base_ThemeCommon::install_default_theme($this->get_type());
		return $ret;
	}
Пример #26
0
    public function install()
    {
        $ret = true;
        $ret &= DB::CreateTable('apps_shoutbox_messages', '
			id I4 AUTO KEY,
			base_user_login_id I4 NOTNULL,
			to_user_login_id I4,
			message X,
			posted_on T DEFTIMESTAMP', array('constraints' => ', FOREIGN KEY (base_user_login_id) REFERENCES user_login(ID)'));
        if (!$ret) {
            print 'Unable to create table apps_shoutbox_messages.<br>';
            return false;
        }
        Base_ThemeCommon::install_default_theme($this->get_type());
        Base_AclCommon::add_permission(_M('Shoutbox'), array('ACCESS:employee'));
        return $ret;
    }
Пример #27
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme($this->get_type());
     $ret = true;
     $ret &= DB::CreateTable('epesi_store_modules', '
         module_id I4 PRIMARY KEY,
         version C(10),
         module_license_id I4 NOTNULL,
         file C(20)');
     if (!$ret) {
         print 'Unable to create table epesi_store_modules.<br>';
         return false;
     }
     if ($this->create_data_dir()) {
         return true;
     }
     return false;
 }
Пример #28
0
    public function install()
    {
        $ret = true;
        DB::Execute('DROP TABLE IF EXISTS base_notify');
        DB::CreateTable('base_notify', '
			token C(32) NOTNULL PRIMARY KEY,
			cache X,
			last_refresh I8,
			single_cache_uid I,
			telegram I1 DEFAULT 0', array('constraints' => ', FOREIGN KEY (single_cache_uid) REFERENCES user_login(id)'));
        if (!$ret) {
            print 'Unable to create table base_notify.<br>';
            return false;
        }
        Base_ThemeCommon::install_default_theme($this->get_type());
        Utils_CommonDataCommon::new_id('Base_Notify/Timeout', true);
        Utils_CommonDataCommon::new_array('Base_Notify/Timeout', array(-1 => _M('Disable Notification'), 0 => _M('Manually')), true, true);
        Utils_CommonDataCommon::new_array('Base_Notify/Timeout', array(10000 => _M('10 seconds'), 30000 => _M('30 seconds'), 60000 => _M('1 minute')));
        return $ret;
    }
Пример #29
0
 public function install()
 {
     $ret = DB::CreateTable('available_modules', 'name C(128), vkey I NOTNULL, version C(64) NOTNULL', array('constraints' => ', PRIMARY KEY(name, vkey)'));
     if ($ret === false) {
         die('Invalid SQL query - Setup module (modules table)');
     }
     $ret = Variable::set('anonymous_setup', true);
     if ($ret === false) {
         print 'Invalid SQL query - Setup module (populating variables)';
         return false;
     }
     $ret = Variable::set('simple_setup', 1);
     if ($ret === false) {
         print 'Invalid SQL query - Setup module (populating variables)';
         return false;
     }
     $this->create_data_dir();
     Base_ThemeCommon::install_default_theme($this->get_type());
     return true;
 }
Пример #30
0
 public function install()
 {
     $calling_codes = array('US' => '+1', 'CA' => '+1', 'BS' => '+1242', 'BB' => '+1246', 'AI' => '+1264', 'AG' => '+1268', 'VG' => '+1284', 'VI' => '+1340', 'KY' => '+1345', 'BM' => '+1441', 'GD' => '+1473', 'TC' => '+1649', 'MS' => '+1664', 'MP' => '+1670', 'GU' => '+1671', 'AS' => '+1684', 'LC' => '+1758', 'DM' => '+1767', 'VC' => '+1784', 'PR' => '+1787', 'DO' => '+1809', 'TT' => '+1868', 'KN' => '+1869', 'JM' => '+1876', 'EG' => '+20', 'MA' => '+212', 'EH' => '+212', 'DZ' => '+213', 'TN' => '+216', 'LY' => '+218', 'GM' => '+220', 'SN' => '+221', 'MR' => '+222', 'ML' => '+223', 'GN' => '+224', 'CI' => '+225', 'BF' => '+226', 'NE' => '+227', 'TG' => '+228', 'BJ' => '+229', 'MU' => '+230', 'LR' => '+231', 'SL' => '+232', 'GH' => '+233', 'NG' => '+234', 'TD' => '+235', 'CF' => '+236', 'CM' => '+237', 'CV' => '+238', 'ST' => '+239', 'GQ' => '+240', 'GA' => '+241', 'CG' => '+242', 'CD' => '+243', 'AO' => '+244', 'GW' => '+245', 'IO' => '+246', 'AC' => '+247', 'SC' => '+248', 'SD' => '+249', 'RW' => '+250', 'ET' => '+251', 'SO' => '+252', 'QS' => '+252', 'DJ' => '+253', 'KE' => '+254', 'TZ' => '+255', 'UG' => '+256', 'BI' => '+257', 'MZ' => '+258', 'ZM' => '+260', 'MG' => '+261', 'RE' => '+262', 'YT' => '+262', 'ZW' => '+263', 'NA' => '+264', 'MW' => '+265', 'LS' => '+266', 'BW' => '+267', 'SZ' => '+268', 'KM' => '+269', 'ZA' => '+27', 'SH' => '+290', 'TA' => '+290', 'ER' => '+291', 'AW' => '+297', 'FO' => '+298', 'GL' => '+299', 'GR' => '+30', 'NL' => '+31', 'BE' => '+32', 'FR' => '+33', 'ES' => '+34', 'GI' => '+350', 'PT' => '+351', 'LU' => '+352', 'IE' => '+353', 'IS' => '+354', 'AL' => '+355', 'MT' => '+356', 'CY' => '+357', 'FI' => '+358', 'AX' => '+358', 'BG' => '+359', 'HU' => '+36', 'LT' => '+370', 'LV' => '+371', 'EE' => '+372', 'MD' => '+373', 'AM' => '+374', 'BY' => '+375', 'AD' => '+376', 'MC' => '+377', 'SM' => '+378', 'UA' => '+380', 'RS' => '+381', 'ME' => '+382', 'HR' => '+385', 'SI' => '+386', 'BA' => '+387', 'EU' => '+388', 'MK' => '+389', 'IT' => '+39', 'VA' => '+39', 'RO' => '+40', 'CH' => '+41', 'CZ' => '+420', 'SK' => '+421', 'LI' => '+423', 'AT' => '+43', 'GB' => '+44', 'GG' => '+44', 'IM' => '+44', 'JE' => '+44', 'DK' => '+45', 'SE' => '+46', 'NO' => '+47', 'SJ' => '+47', 'PL' => '+48', 'DE' => '+49', 'FK' => '+500', 'BZ' => '+501', 'GT' => '+502', 'SV' => '+503', 'HN' => '+504', 'NI' => '+505', 'CR' => '+506', 'PA' => '+507', 'PM' => '+508', 'HT' => '+509', 'PE' => '+51', 'MX' => '+52', 'CU' => '+53', 'AR' => '+54', 'BR' => '+55', 'CL' => '+56', 'CO' => '+57', 'VE' => '+58', 'GP' => '+590', 'BL' => '+590', 'MF' => '+590', 'BO' => '+591', 'GY' => '+592', 'EC' => '+593', 'GF' => '+594', 'PY' => '+595', 'MQ' => '+596', 'SR' => '+597', 'UY' => '+598', 'AN' => '+599', 'MY' => '+60', 'AU' => '+61', 'CX' => '+61', 'CC' => '+61', 'ID' => '+62', 'PH' => '+63', 'NZ' => '+64', 'SG' => '+65', 'TH' => '+66', 'TL' => '+670', 'NF' => '+672', 'AQ' => '+672', 'BN' => '+673', 'NR' => '+674', 'PG' => '+675', 'TO' => '+676', 'SB' => '+677', 'VU' => '+678', 'FJ' => '+679', 'PW' => '+680', 'WF' => '+681', 'CK' => '+682', 'NU' => '+683', 'WS' => '+685', 'KI' => '+686', 'NC' => '+687', 'TV' => '+688', 'PF' => '+689', 'TK' => '+690', 'FM' => '+691', 'MH' => '+692', 'RU' => '+7', 'KZ' => '+7', 'XT' => '+800', 'XS' => '+808', 'JP' => '+81', 'KR' => '+82', 'VN' => '+84', 'KP' => '+850', 'HK' => '+852', 'MO' => '+853', 'KH' => '+855', 'LA' => '+856', 'CN' => '+86', 'XN' => '+870', 'PN' => '+872', 'XP' => '+878', 'BD' => '+880', 'XG' => '+881', 'XV' => '+882', 'XL' => '+883', 'TW' => '+886', 'XD' => '+888', 'TR' => '+90', 'QY' => '+90', 'IN' => '+91', 'PK' => '+92', 'AF' => '+93', 'LK' => '+94', 'MM' => '+95', 'MV' => '+960', 'LB' => '+961', 'JO' => '+962', 'SY' => '+963', 'IQ' => '+964', 'KW' => '+965', 'SA' => '+966', 'YE' => '+967', 'OM' => '+968', 'PS' => '+970', 'AE' => '+971', 'IL' => '+972', 'BH' => '+973', 'QA' => '+974', 'BT' => '+975', 'MN' => '+976', 'NP' => '+977', 'XR' => '+979', 'IR' => '+98', 'XC' => '+991', 'TJ' => '+992', 'TM' => '+993', 'AZ' => '+994', 'GE' => '+995', 'KG' => '+996', 'UZ' => '+998');
     Utils_CommonDataCommon::new_id('Calling_Codes', true);
     Utils_CommonDataCommon::new_array('Calling_Codes', $calling_codes);
     $countries = array("AF" => _M('Afghanistan'), "AL" => _M('Albania'), "DZ" => _M('Algeria'), "AS" => _M('American Samoa'), "AD" => _M('Andorra'), "AO" => _M('Angola'), "AI" => _M('Anguilla'), "AG" => _M('Antigua & Barbuda'), "AR" => _M('Argentina'), "AA" => _M('Armenia'), "AW" => _M('Aruba'), "AU" => _M('Australia'), "AT" => _M('Austria'), "AZ" => _M('Azerbaijan'), "BS" => _M('Bahamas'), "BH" => _M('Bahrain'), "BD" => _M('Bangladesh'), "BB" => _M('Barbados'), "BY" => _M('Belarus'), "BE" => _M('Belgium'), "BZ" => _M('Belize'), "BJ" => _M('Benin'), "BM" => _M('Bermuda'), "BT" => _M('Bhutan'), "BO" => _M('Bolivia'), "BL" => _M('Bonaire'), "BA" => _M('Bosnia & Herzegovina'), "BW" => _M('Botswana'), "BR" => _M('Brazil'), "BC" => _M('British Indian Ocean Territory'), "BN" => _M('Brunei'), "BG" => _M('Bulgaria'), "BF" => _M('Burkina Faso'), "BI" => _M('Burundi'), "KH" => _M('Cambodia'), "CM" => _M('Cameroon'), "CA" => _M('Canada'), "IC" => _M('Canary Islands'), "CV" => _M('Cape Verde'), "KY" => _M('Cayman Islands'), "CF" => _M('Central African Republic'), "TD" => _M('Chad'), "CD" => _M('Channel Islands'), "CL" => _M('Chile'), "CN" => _M('China'), "CI" => _M('Christmas Island'), "CS" => _M('Cocos Islands'), "CO" => _M('Colombia'), "CC" => _M('Comoros'), "CG" => _M('Congo'), "CK" => _M('Cook Islands'), "CR" => _M('Costa Rica'), "CT" => _M('Cote D\'Ivoire'), "HR" => _M('Croatia'), "CU" => _M('Cuba'), "CB" => _M('Curacao'), "CY" => _M('Cyprus'), "CZ" => _M('Czech Republic'), "DK" => _M('Denmark'), "DJ" => _M('Djibouti'), "DM" => _M('Dominica'), "DO" => _M('Dominican Republic'), "TM" => _M('East Timor'), "EC" => _M('Ecuador'), "EG" => _M('Egypt'), "SV" => _M('El Salvador'), "GQ" => _M('Equatorial Guinea'), "ER" => _M('Eritrea'), "EE" => _M('Estonia'), "ET" => _M('Ethiopia'), "FA" => _M('Falkland Islands'), "FO" => _M('Faroe Islands'), "FJ" => _M('Fiji'), "FI" => _M('Finland'), "FR" => _M('France'), "GF" => _M('French Guiana'), "PF" => _M('French Polynesia'), "FS" => _M('French Southern Territories'), "GA" => _M('Gabon'), "GM" => _M('Gambia'), "GE" => _M('Georgia'), "DE" => _M('Germany'), "GH" => _M('Ghana'), "GI" => _M('Gibraltar'), "GR" => _M('Greece'), "GL" => _M('Greenland'), "GD" => _M('Grenada'), "GP" => _M('Guadeloupe'), "GU" => _M('Guam'), "GT" => _M('Guatemala'), "GN" => _M('Guinea'), "GY" => _M('Guyana'), "HT" => _M('Haiti'), "HW" => _M('Hawaii'), "HN" => _M('Honduras'), "HK" => _M('Hong Kong'), "HU" => _M('Hungary'), "IS" => _M('Iceland'), "IN" => _M('India'), "ID" => _M('Indonesia'), "IA" => _M('Iran'), "IQ" => _M('Iraq'), "IR" => _M('Ireland'), "IM" => _M('Isle of Man'), "IL" => _M('Israel'), "IT" => _M('Italy'), "JM" => _M('Jamaica'), "JP" => _M('Japan'), "JO" => _M('Jordan'), "KZ" => _M('Kazakhstan'), "KE" => _M('Kenya'), "KI" => _M('Kiribati'), "NK" => _M('Korea North'), "KS" => _M('Korea South'), "KW" => _M('Kuwait'), "KG" => _M('Kyrgyzstan'), "LA" => _M('Laos'), "LV" => _M('Latvia'), "LB" => _M('Lebanon'), "LS" => _M('Lesotho'), "LR" => _M('Liberia'), "LY" => _M('Libya'), "LI" => _M('Liechtenstein'), "LT" => _M('Lithuania'), "LU" => _M('Luxembourg'), "MO" => _M('Macau'), "MK" => _M('Macedonia'), "MG" => _M('Madagascar'), "MY" => _M('Malaysia'), "MW" => _M('Malawi'), "MV" => _M('Maldives'), "ML" => _M('Mali'), "MT" => _M('Malta'), "MH" => _M('Marshall Islands'), "MQ" => _M('Martinique'), "MR" => _M('Mauritania'), "MU" => _M('Mauritius'), "ME" => _M('Mayotte'), "MX" => _M('Mexico'), "MI" => _M('Midway Islands'), "MD" => _M('Moldova'), "MC" => _M('Monaco'), "MN" => _M('Mongolia'), "MS" => _M('Montserrat'), "MA" => _M('Morocco'), "MZ" => _M('Mozambique'), "MM" => _M('Myanmar'), "NA" => _M('Nambia'), "NU" => _M('Nauru'), "NP" => _M('Nepal'), "AN" => _M('Netherland Antilles'), "NL" => _M('Netherlands'), "NV" => _M('Nevis'), "NC" => _M('New Caledonia'), "NZ" => _M('New Zealand'), "NI" => _M('Nicaragua'), "NE" => _M('Niger'), "NG" => _M('Nigeria'), "NW" => _M('Niue'), "NF" => _M('Norfolk Island'), "NO" => _M('Norway'), "OM" => _M('Oman'), "PK" => _M('Pakistan'), "PW" => _M('Palau Island'), "PS" => _M('Palestine'), "PA" => _M('Panama'), "PG" => _M('Papua New Guinea'), "PY" => _M('Paraguay'), "PE" => _M('Peru'), "PH" => _M('Philippines'), "PO" => _M('Pitcairn Island'), "PL" => _M('Poland'), "PT" => _M('Portugal'), "PR" => _M('Puerto Rico'), "QA" => _M('Qatar'), "RE" => _M('Reunion'), "RO" => _M('Romania'), "RU" => _M('Russia'), "RW" => _M('Rwanda'), "NT" => _M('St Barthelemy'), "EU" => _M('St Eustatius'), "HE" => _M('St Helena'), "KN" => _M('St Kitts-Nevis'), "LC" => _M('St Lucia'), "MB" => _M('St Maarten'), "PM" => _M('St Pierre & Miquelon'), "VC" => _M('St Vincent & Grenadines'), "SP" => _M('Saipan'), "SO" => _M('Samoa'), "SM" => _M('San Marino'), "ST" => _M('Sao Tome & Principe'), "SA" => _M('Saudi Arabia'), "SN" => _M('Senegal'), "SC" => _M('Seychelles'), "SS" => _M('Serbia & Montenegro'), "SL" => _M('Sierra Leone'), "SG" => _M('Singapore'), "SK" => _M('Slovakia'), "SI" => _M('Slovenia'), "SB" => _M('Solomon Islands'), "OI" => _M('Somalia'), "ZA" => _M('South Africa'), "ES" => _M('Spain'), "LK" => _M('Sri Lanka'), "SD" => _M('Sudan'), "SR" => _M('Suriname'), "SZ" => _M('Swaziland'), "SE" => _M('Sweden'), "CH" => _M('Switzerland'), "SY" => _M('Syria'), "TA" => _M('Tahiti'), "TW" => _M('Taiwan'), "TJ" => _M('Tajikistan'), "TZ" => _M('Tanzania'), "TH" => _M('Thailand'), "TG" => _M('Togo'), "TK" => _M('Tokelau'), "TO" => _M('Tonga'), "TT" => _M('Trinidad & Tobago'), "TN" => _M('Tunisia'), "TR" => _M('Turkey'), "TU" => _M('Turkmenistan'), "TC" => _M('Turks & Caicos Is'), "TV" => _M('Tuvalu'), "UG" => _M('Uganda'), "UA" => _M('Ukraine'), "AE" => _M('United Arab Emirates'), "GB" => _M('United Kingdom'), "US" => _M('United States of America'), "UY" => _M('Uruguay'), "UZ" => _M('Uzbekistan'), "VU" => _M('Vanuatu'), "VS" => _M('Vatican City State'), "VE" => _M('Venezuela'), "VN" => _M('Vietnam'), "VB" => _M('Virgin Islands (Brit)'), "VA" => _M('Virgin Islands (USA)'), "WK" => _M('Wake Island'), "WF" => _M('Wallis & Futana Is'), "YE" => _M('Yemen'), "ZR" => _M('Zaire'), "ZM" => _M('Zambia'), "ZW" => _M('Zimbabwe'));
     Utils_CommonDataCommon::new_id('Countries', true);
     Utils_CommonDataCommon::new_array('Countries', $countries);
     $usa_states = array('AL' => _M('Alabama'), 'AK' => _M('Alaska'), 'AZ' => _M('Arizona'), 'AR' => _M('Arkansas'), 'CA' => _M('California'), 'CO' => _M('Colorado'), 'CT' => _M('Connecticut'), 'DE' => _M('Delaware'), 'DC' => _M('District Of Columbia'), 'FL' => _M('Florida'), 'GA' => _M('Georgia'), 'HI' => _M('Hawaii'), 'ID' => _M('Idaho'), 'IL' => _M('Illinois'), 'IN' => _M('Indiana'), 'IA' => _M('Iowa'), 'KS' => _M('Kansas'), 'KY' => _M('Kentucky'), 'LA' => _M('Louisiana'), 'ME' => _M('Maine'), 'MD' => _M('Maryland'), 'MA' => _M('Massachusetts'), 'MI' => _M('Michigan'), 'MN' => _M('Minnesota'), 'MS' => _M('Mississippi'), 'MO' => _M('Missouri'), 'MT' => _M('Montana'), 'NE' => _M('Nebraska'), 'NV' => _M('Nevada'), 'NH' => _M('New Hampshire'), 'NJ' => _M('New Jersey'), 'NM' => _M('New Mexico'), 'NY' => _M('New York'), 'NC' => _M('North Carolina'), 'ND' => _M('North Dakota'), 'OH' => _M('Ohio'), 'OK' => _M('Oklahoma'), 'OR' => _M('Oregon'), 'PA' => _M('Pennsylvania'), 'RI' => _M('Rhode Island'), 'SC' => _M('South Carolina'), 'SD' => _M('South Dakota'), 'TN' => _M('Tennessee'), 'TX' => _M('Texas'), 'UT' => _M('Utah'), 'VT' => _M('Vermont'), 'VA' => _M('Virginia'), 'WA' => _M('Washington'), 'WV' => _M('West Virginia'), 'WI' => _M('Wisconsin'), 'WY' => _M('Wyoming'));
     Utils_CommonDataCommon::new_array('Countries/US', $usa_states);
     $pl_wojew = array('DS' => _M('Lower Silesian'), 'KP' => _M('Kuyavian-Pomeranian'), 'LB' => _M('Lubusz'), 'LD' => _M('Łódź'), 'LU' => _M('Lublin'), 'MA' => _M('Masovian'), 'MP' => _M('Lesser Poland'), 'OP' => _M('Opole'), 'PD' => _M('Podlaskie'), 'PK' => _M('Subcarpathian'), 'PM' => _M('Pomeranian'), 'SL' => _M('Silesian'), 'SW' => _M('Świętokrzyskie'), 'WM' => _M('Warmian-Masurian'), 'WP' => _M('Greater Poland'), 'ZP' => _M('West Pomeranian'));
     Utils_CommonDataCommon::new_array('Countries/PL', $pl_wojew);
     $ro_wojew = array('AB' => _M('Alba'), 'AG' => _M('Arges'), 'AR' => _M('Arad'), 'B' => _M('Bucuresti'), 'BC' => _M('Bacau'), 'BH' => _M('Bihor'), 'BN' => _M('Bistrita-Nasaud'), 'BR' => _M('Braila'), 'BT' => _M('Botosani'), 'BV' => _M('Brasov'), 'BZ' => _M('Buzau'), 'CJ' => _M('Cluj'), 'CL' => _M('Calarasi'), 'CS' => _M('Caras-Severin'), 'CT' => _M('Constanta'), 'CV' => _M('Covasna'), 'DB' => _M('Dambovita'), 'DJ' => _M('Dolj'), 'GJ' => _M('Gorj'), 'GL' => _M('Galati'), 'GR' => _M('Giurgiu'), 'HD' => _M('Hunedoara'), 'HR' => _M('Harghita'), 'IF' => _M('Ilfov'), 'IL' => _M('Ialomita'), 'IS' => _M('Iasi'), 'MH' => _M('Mehedinti'), 'MM' => _M('Maramures'), 'MS' => _M('Mures'), 'NT' => _M('Neamt'), 'OT' => _M('Olt'), 'PH' => _M('Prahova'), 'SB' => _M('Sibiu'), 'SJ' => _M('Salaj'), 'SM' => _M('Satu-Mare'), 'SV' => _M('Suceava'), 'TL' => _M('Tulcea'), 'TM' => _M('Timis'), 'TR' => _M('Teleorman'), 'VL' => _M('Valcea'), 'VN' => _M('Vrancea'), 'VS' => _M('Vaslui'));
     Utils_CommonDataCommon::new_array('Countries/RO', $ro_wojew);
     $ca_provinces = array('ON' => _M('Ontario'), 'AB' => _M('Alberta'), 'BC' => _M('British Columbia'), 'MB' => _M('Manitoba'), 'QC' => _M('Quebec'), 'LB' => _M('Labrador'), 'NS' => _M('Nova Scotia'), 'PE' => _M('Prince Edwards Island'), 'YK' => _M('Yukon'), 'NT' => _M('Northwest Territories'), 'NU' => _M('Nunavut'), 'NB' => _M('New Brunswick'), 'SK' => 'Saskatchewan');
     Utils_CommonDataCommon::new_array('Countries/CA', $ca_provinces);
     $us_pa_county = array('philadelphia' => _M('Philadelphia'), 'montgomery' => _M('Montgomery'), 'delaware' => _M('Delaware'), 'lancaster' => _M('Lancaster'), 'chester' => _M('Chester'), 'bucks' => _M('Bucks'));
     Utils_CommonDataCommon::new_array('Countries/US/PA', $us_pa_county);
     Base_ThemeCommon::install_default_theme($this->get_type());
     return true;
 }