public function belbestandQuery(){
$database = $this->verversBelbestand();
if($database == null){
$database = 'secret';
} else {
$config['hostname'] = 'secret';
$config['username'] = 'secret';
$config['password'] = 'secret';
$config['database'] = $database;
$config['dbdriver'] = 'sqlsrv';
$config['dbprefix'] = '';
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['cache_on'] = FALSE;
$config['cachedir'] = '';
$config['char_set'] = 'utf8';
$config['dbcollat'] = 'utf8_general_ci';
$this->customDb = $this->load->database($config, true);
$this->load->library('table');
$campagne = '';
$datum = date("Y/m/d");
$bmnrlic = $this->getBmnrLicentie();
$this->table->set_heading('Campagne ', 'Aantal agenten', 'Nog benaderbaar', 'Terugbellers', 'Nog na te kijken', 'BMNR uitgesloten', 'Geparkeerd', 'Maxbeldatum');
$objquery = $this->customDb->query("Aantallen_datum_intranet '".$campagne."','".$datum."','".$bmnrlic."'");
//
$template = array(
'table_open' => '<table border="1" cellpadding="4" cellspacing="0">',
'thead_open' => '<thead>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
$this->table->set_template($template);
return $this->table->generate($objquery);
}
}