protected function getPort() { $post = $this->input->post('odbc'); if ($post) { if (strlen($post['port']) == 0) { $port = OdbcManager::lookupPort($post['type']); } else { $port = $post['port']; } } else { $port = 0; } return $port; }
echo form::label('odbc[description]', 'Description'); echo form::textarea('odbc[description]'); ?> </div> <div class="field"> <?php echo form::label(array('for' => 'odbc[port]', 'hint' => 'Leave blank for default'), 'Port:'); echo form::input('odbc[port]'); ?> </div> <div class="field"> <?php echo form::label('odbc[type]', 'Type (driver):'); echo OdbcManager::dbmsSelector('odbc[type]'); ?> </div> <?php echo form::close_section(); ?> <?php if (isset($views)) { echo subview::renderAsSections($views); } ?> <?php echo form::close(TRUE);
<?php echo form::open(); ?> <?php echo form::open_section('Core Settings'); ?> <?php if (class_exists('OdbcManager')) { ?> <div class="field"> <?php echo form::label(array('for' => 'callcenter_settings[cc_odbc_dsn]', 'hint' => 'DSN to use for Call Center Data', 'help' => 'Select an ODBC DSN to save the Call Center Data to an external database for clustering, reporting, external application integration, etc.'), 'DSN:'); echo OdbcManager::dsnSelector('callcenter_settings[cc_odbc_dsn]', empty($cc_odbc_dsn) ? NULL : $cc_odbc_dsn); ?> </div> <?php } ?> <div class="field"> <?php echo form::label(array('for' => 'callcenter_settings[cc_db_name]', 'help' => 'Name or path and name of SQLite DB to use for Call Center data. Usefull for putting the DB on a Ram Drive for speed.', 'hint' => 'Enter a name or path/name for the SQLite DB.'), 'SQLite DB Path/Name:'); echo form::input('callcenter_settings[cc_db_name]'); ?> </div> <div class="field"> <?php echo form::label(array('for' => 'callcenter_settings[cc_update_mode]', 'help' => 'If set to real time, Bluebox attempts to make configuration changes real time. If batch is selected, the changes are attempted when the "Syncronize Configuration" button is selected. In Freeswitch, mod_callcenter maintains its own internal state data and does not depend on the xml config. This insures the integrity of the running system and provides protection from mistakes (like accidentally deleting a queue), but means that changes must be intentionally applied.', 'hint' => 'Real time or batch update.'), 'Update Mode:'); echo form::dropdown('callcenter_settings[cc_update_mode]', array('realtime' => 'Real Time', 'batch' => 'Batch'));
<?php echo form::open_section('ODBC Connection'); ?> <div class="field"> <?php echo form::label('DSN:'); echo OdbcManager::dsnSelector('odbc[odbc_id]', empty($odbc['odbc_id']) ? NULL : $odbc['odbc_id']); ?> </div> <?php echo form::close_section();