Skip to content

Commit

Permalink
Mais problemas de DOCUMENT_ROOT e adição da forma de pagamento na lis…
Browse files Browse the repository at this point in the history
…tagem de transações
  • Loading branch information
herberthamaral committed Nov 5, 2010
1 parent 09efb8e commit e0929fc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
31 changes: 29 additions & 2 deletions ajax.php
Expand Up @@ -51,7 +51,7 @@
<th scope="col"><?php _e("Status pagamento"); ?></th>
<!--<th scope="col"><?php //_e('Forma pagamento'); ?></th>-->
<th scope="col"><?php _e('Tipo pagamento'); ?></th>
<th scope="col"><?php _e('Forma de Pagamento'). ?></th>
<th scope="col"><?php _e('Forma de Pagamento'); ?></th>
<th scope="col"><?php _e('Email consumidor'); ?></th>

</tr>
Expand All @@ -66,7 +66,7 @@
<td><?php echo(convertStatusPagamento($show->status_pagamento)); ?></td>
<!--<td><?php //echo($show->forma_pagamento); ?></td>-->
<td><?php echo(preg_replace('/([a-z0-9])([A-Z])/','$1 $2',$show->tipo_pagamento)); ?></td>
<td><?php echo($show->forma_pagamento) ?></td>
<td><?php echo(convertFormaPagamento($show->forma_pagamento)); ?></td>
<td><?php echo($show->email_consumidor); ?></td>
</tr>
<?php } ?>
Expand All @@ -92,4 +92,31 @@ function convertStatusPagamento($status){
return $statusArray[$status];
}

function convertFormaPagamento($status)
{
$formaArray = array("1" => "Saldo MoIP pela Internet",
"3" => "Visa Crédito",
"4" => "Visa Débito",
"5" => "Mastercad Débito",
"6" => "Diners Crédito",
"7" => "Amex Crédito",
"8" => "BB Transferência",
"9" => "BB Boleto",
"10" => "BB Financiamento",
"12" => "Itaú ainda não escolhido",
"13" => "Itaú Transferência",
"14" => "Itaú Boleto",
"21" => "Bradesco Financiamento",
"22" => "Bradesco Transferência",
"24" => "Bradesco Boleto",
"31" => "Real Financiamento",
"32" => "Real Transferência",
"35" => "Real Boleto",
"58" => "MoIP Pelo Celular",
"73" => "Boleto Bancário",
"75" => "Hipercard",
"76" => "Oi Paggo");
return $formaArray[$status];
}

?>
6 changes: 3 additions & 3 deletions ajax_button.php
@@ -1,9 +1,9 @@
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-config.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-includes/wp-db.php');
require_once('../../../wp-config.php');
require_once('../../../wp-includes/wp-db.php');

?>
<div class="mn_ajax_reload" id="mn_ajax_reload" style="float:right;margin: 0px 30px 10px;">
<input type="submit" name="mn_ajax_submit" id="mn_ajax_submit" value="<?php _e('Update Now! &raquo;') ?>" />
<input type="hidden" id="mn_show_table" value="<?=get_option("mn_ajax_reload") == "true" ? 1 : 0?>"/>
</div>
</div>

0 comments on commit e0929fc

Please sign in to comment.