It is located inside includes/modules/payment and is a payment module. This is the part of the code that is displayed in the checkout screen. It is supposed to display the title of the module and two buttons. Once you press one of the buttons, it will open a new screen (another php file which is working - MODULE_PAYMENT_BOLETOPHP_URL). The other button confirms the order.

Here is a clean version of the code:
PHP Code:
 function confirmation() {
      global 
$order$n_pedido;
      global 
$db;

$pedido_query $db->Execute("select orders_id from " TABLE_ORDERS " order by orders_id desc limit 0,1");
$res_pedido $db->Execute($pedido_query);
if (
$res_pedido->fields['orders_id'] < 1) {
$n_pedido 1;
}else{
$n_pedido $res_pedido->fields['orders_id'] + 1;
}
     

 
$confirmation = array('title' => $this->title,
                            
'fields' => array(array('title' => 'Clique no botão "Exibir Boleto" ao lado e após ser exibido o boleto, confirme o Pedido clicando no botão abaixo.',
                                                    
'field' => zen_draw_form('boleto'MODULE_PAYMENT_BOLETOPHP_URL'post''target=_blank') .
                                                               
zen_draw_hidden_field('order_id'$n_pedido'') .
                                   
zen_draw_hidden_field('valor_boleto'$order->info['total'], '') .
                                       
zen_draw_hidden_field('sacado_id'session_is_registered('customer_id'), '') .
                                                               
zen_draw_hidden_field('sacado'$order->customer['firstname'] . ' ' $order->customer['lastname'], '') .
                                                               
zen_draw_hidden_field('endereco_sacado'$order->customer['street_address'] . " - " $order->customer['suburb'] . " / " $order->customer['city'] . "-" $order->customer['state'] . " / " .$order->customer['postcode'], '') .
                                                               
zen_draw_input_field('BGB''Exibir Boleto''''submit'true) .
                                                               
'</form>')));


      return 
$confirmation