'.__('Error updating export target').'';
} else {
echo '
'.__('Successfully updated export target').'
';
}
}
// Delete
if ($delete) {
$sql = sprintf("DELETE FROM tserver_export WHERE id = '%d'", $delete);
if (process_sql ($sql) === false) {
echo ''.__('Error deleting export target').'
';
} else {
echo ''.__('Successfully deleted export target').'
';
}
}
// Create
if ($create) {
$sql = sprintf ("INSERT INTO tserver_export
(`name`, `id_export_server`, `preffix`, `interval`, `ip_server`, `connect_mode`,
`user`, `pass`, `port`, `directory`, `options`)
VALUES ('%s', %d, '%s', %d, '%s', '%s', '%s', '%s', %d, '%s', '%s')",
$name, $export_server, $preffix, $interval, $ip_server, $connect_mode,
$user, $password, $port, $directory, $options);
if (process_sql ($sql) === false) {
echo ''.__('Error creating export target').'
';
} else {
echo ''.__('Successfully created export target').'
';
}
}
// List export servers
echo "".__('Pandora servers')." » ".__('Export targets')."
";
$result = get_db_all_rows_in_table ("tserver_export");
if (!$result) {
echo ''.__('There are no export targets configured').'
';
echo '';
echo '';
echo '
';
return;
}
$table->head = array (__('Name'), __('Preffix'), __('Interval'), __('Address'), __('Transfer mode'), __('Action'));
//$table->align = array ("","","","center","","","center","center");
$table->width = 700;
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->class = "databox";
foreach ($result as $row) {
$table->data[] = array (
// Name
'' . $row['name'] . '',
$row['preffix'],
$row['interval'],
$row['ip_server'],
$row['connect_mode'],
// Action
'
'
);
}
print_table ($table);
echo '';
echo '';
echo '
';
?>