Ir para conteúdo
Fórum Script Brasil

Henrique Flausino

Membros
  • Total de itens

    67
  • Registro em

  • Última visita

Tudo que Henrique Flausino postou

  1. Olá. Caros. Estou com um problema que está me matando. Tenho um sistema de Newsletter que funciona em php. Estava hospedado na locaweb no plano PHP e agora mudei para ASP. Depois desta alteração começou a aparecer esse erro de vez em quando. Vou enviar um e-mail e aparece o mesmo. HTTP 500 Sempre se refere à linha 21 que é essa: if(mail($email,$class->news_assunto, $content,$theheaders)){ Código completo: <?php include("class_admin.php"); $class = new catalogue(); $class->connect(); $class->select_newsletter($_GET[newsletter_id]); if(strlen($_POST["emails"])>0){ $old_emails=$class->news_emails; $all_emails = $old_emails.",".$_POST["emails"]; $class->update_newsletter($newsletter_id,'emails',$all_emails); $arr_emails = explode(",",$_POST["emails"]); $content = file_get_contents("../email/".$newsletter_id.".html",1); $theheaders = "From:XXXX<xxxxx@xxxxxxx.com.br>\nReply-To:xxxxxxx@xxxxxxxxxx.com.br\nContent-Type: text/html; charset=iso-8859-1"; foreach($arr_emails as $e=>$email){ if(mail($email,$class->news_assunto, $content,$theheaders)){ $resposta .= "mail enviado para:".$email."<br>"; flush(); } } } ?> Caso alguém possa me ajudar ficarei muito grato. Att. Henrique Flausino
  2. Já tentei e não funcionou. Algum outra dica? :unsure:
  3. Olá. Caros. Estou com um grande problema. Estou utilizando um script que encontrei na net para acréscimo financeiro para oscommerce, porém não consigo encontrar o nome do campo que devo enviar ao pagamento digital. <?php /* $Id: ot_lev_members.php,v 1.0 2002/04/08 01:13:43 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_payment { var $title, $output; function ot_payment() { $this->code = 'ot_payment'; $this->title = MODULE_PAYMENT_DISC_TITLE; $this->description = MODULE_PAYMENT_DISC_DESCRIPTION; $this->enabled = MODULE_PAYMENT_DISC_STATUS; $this->sort_order = MODULE_PAYMENT_DISC_SORT_ORDER; $this->include_shipping = MODULE_PAYMENT_DISC_INC_SHIPPING; $this->include_tax = MODULE_PAYMENT_DISC_INC_TAX; $this->percentage = MODULE_PAYMENT_DISC_PERCENTAGE; $this->minimum = MODULE_PAYMENT_DISC_MINIMUM; $this->calculate_tax = MODULE_PAYMENT_DISC_CALC_TAX; // $this->credit_class = true; $this->output = array(); } function process() { global $order, $currencies; $od_amount = $this->calculate_credit($this->get_order_total()); if ($od_amount>0) { $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] + $od_amount; } } function calculate_credit($amount) { global $order, $customer_id, $payment; $od_amount=0; $od_pc = $this->percentage; $do = false; if ($amount > $this->minimum) { $table = split("[,]" , MODULE_PAYMENT_DISC_TYPE); for ($i = 0; $i < count($table); $i++) { if ($payment == $table[$i]) $do = true; } if ($do) { // Calculate tax reduction if necessary if($this->calculate_tax == 'true') { // Calculate main tax reduction $tod_amount = round($order->info['tax']*10)/10*$od_pc/100; $order->info['tax'] = $order->info['tax'] - $tod_amount; // Calculate tax group deductions reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { $god_amount = round($value*10)/10*$od_pc/100; $order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] - $god_amount; } } $od_amount = round($amount*10)/10*$od_pc/100; $od_amount = $od_amount + $tod_amount; } } return $od_amount; } function get_order_total() { global $order, $cart; $order_total = $order->info['total']; // Check if gift voucher is in cart and adjust total $products = $cart->get_products(); for ($i=0; $i<sizeof($products); $i++) { $t_prid = tep_get_prid($products[$i]['id']); $gv_query = tep_db_query("select products_price, products_tax_class_id, products_model from " . TABLE_PRODUCTS . " where products_id = '" . $t_prid . "'"); $gv_result = tep_db_fetch_array($gv_query); if (ereg('^GIFT', addslashes($gv_result['products_model']))) { $qty = $cart->get_quantity($t_prid); $products_tax = tep_get_tax_rate($gv_result['products_tax_class_id']); if ($this->include_tax =='false') { $gv_amount = $gv_result['products_price'] * $qty; } else { $gv_amount = ($gv_result['products_price'] + tep_calculate_tax($gv_result['products_price'],$products_tax)) * $qty; } $order_total=$order_total - $gv_amount; } } if ($this->include_tax == 'false') $order_total=$order_total-$order->info['tax']; if ($this->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost']; return $order_total; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_DISC_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_PAYMENT_DISC_STATUS', 'MODULE_PAYMENT_DISC_SORT_ORDER','MODULE_PAYMENT_DISC_PERCENTAGE','MODULE_PAYMENT_DISC_MINIMUM', 'MODULE_PAYMENT_DISC_TYPE', 'MODULE_PAYMENT_DISC_INC_SHIPPING', 'MODULE_PAYMENT_DISC_INC_TAX', 'MODULE_PAYMENT_DISC_CALC_TAX'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Acréscimos', 'MODULE_PAYMENT_DISC_STATUS', 'true', 'Você deseja ativar sistema de acréscimo por forma de pagamento?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordem de exibição.', 'MODULE_PAYMENT_DISC_SORT_ORDER', '9', 'Determina a ordem de exibição do meio de envio. ', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Incluir no Envio', 'MODULE_PAYMENT_DISC_INC_SHIPPING', 'false', 'Calcular acréscimo somando o acréscimo?', '6', '5', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Incluir Taxas Regionais', 'MODULE_PAYMENT_DISC_INC_TAX', 'false', 'Calcular acréscimo somando as Taxas?', '6', '6','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Percentual de acréscimo', 'MODULE_PAYMENT_DISC_PERCENTAGE', '6', 'Informar valores (Percentual).', '6', '7', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Calcular Taxa', 'MODULE_PAYMENT_DISC_CALC_TAX', 'false', 'Re-calcular Imposto sobre o valor descontado.', '6', '5','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Mínimo de pedido.', 'MODULE_PAYMENT_DISC_MINIMUM', '0', 'Informar valor mínimo da compra para obter acréscimo.', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tipo de pagamento', 'MODULE_PAYMENT_DISC_TYPE', 'pagamentodigital', 'Tipo de pagamento para obter acréscimo', '6', '2', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } } ?> Como não entendo muito de PHP estou quebrando a cabeça para encontrar este campo. Será que alguém poderia me ajudar. Preciso encontrar este campo para usar o mesmo desta <input type="hidden" name="acrescimo" id="acrescimo" value="<?= number_format($od_amount['ot_payment'], 2, '.', ''); ?>" /> somente assim o pagamento digital irá entender o acréscimo financeiro do pedido. Desde já fico grato pela ajuda e atenção. Att. Henrique Flausino
  4. Pessoal. Tenho uma loja oscommerce e estou usando o pagamento digital com acréscimo financeiro na própria loja. Preciso puxar o acréscimo da loja, porém não estou conseguindo. Código que estou usando para acréscimo. <?php /* $Id: ot_lev_members.php,v 1.0 2002/04/08 01:13:43 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_payment { var $title, $output; function ot_payment() { $this->code = 'ot_payment'; $this->title = MODULE_PAYMENT_DISC_TITLE; $this->description = MODULE_PAYMENT_DISC_DESCRIPTION; $this->enabled = MODULE_PAYMENT_DISC_STATUS; $this->sort_order = MODULE_PAYMENT_DISC_SORT_ORDER; $this->include_shipping = MODULE_PAYMENT_DISC_INC_SHIPPING; $this->include_tax = MODULE_PAYMENT_DISC_INC_TAX; $this->percentage = MODULE_PAYMENT_DISC_PERCENTAGE; $this->minimum = MODULE_PAYMENT_DISC_MINIMUM; $this->calculate_tax = MODULE_PAYMENT_DISC_CALC_TAX; // $this->credit_class = true; $this->output = array(); } function process() { global $order, $currencies; $od_amount = $this->calculate_credit($this->get_order_total()); if ($od_amount>0) { $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] + $od_amount; } } function calculate_credit($amount) { global $order, $customer_id, $payment; $od_amount=0; $od_pc = $this->percentage; $do = false; if ($amount > $this->minimum) { $table = split("[,]" , MODULE_PAYMENT_DISC_TYPE); for ($i = 0; $i < count($table); $i++) { if ($payment == $table[$i]) $do = true; } if ($do) { // Calculate tax reduction if necessary if($this->calculate_tax == 'true') { // Calculate main tax reduction $tod_amount = round($order->info['tax']*10)/10*$od_pc/100; $order->info['tax'] = $order->info['tax'] - $tod_amount; // Calculate tax group deductions reset($order->info['tax_groups']); while (list($key, $value) = each($order->info['tax_groups'])) { $god_amount = round($value*10)/10*$od_pc/100; $order->info['tax_groups'][$key] = $order->info['tax_groups'][$key] - $god_amount; } } $od_amount = round($amount*10)/10*$od_pc/100; $od_amount = $od_amount + $tod_amount; } } return $od_amount; } function get_order_total() { global $order, $cart; $order_total = $order->info['total']; // Check if gift voucher is in cart and adjust total $products = $cart->get_products(); for ($i=0; $i<sizeof($products); $i++) { $t_prid = tep_get_prid($products[$i]['id']); $gv_query = tep_db_query("select products_price, products_tax_class_id, products_model from " . TABLE_PRODUCTS . " where products_id = '" . $t_prid . "'"); $gv_result = tep_db_fetch_array($gv_query); if (ereg('^GIFT', addslashes($gv_result['products_model']))) { $qty = $cart->get_quantity($t_prid); $products_tax = tep_get_tax_rate($gv_result['products_tax_class_id']); if ($this->include_tax =='false') { $gv_amount = $gv_result['products_price'] * $qty; } else { $gv_amount = ($gv_result['products_price'] + tep_calculate_tax($gv_result['products_price'],$products_tax)) * $qty; } $order_total=$order_total - $gv_amount; } } if ($this->include_tax == 'false') $order_total=$order_total-$order->info['tax']; if ($this->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost']; return $order_total; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_DISC_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_PAYMENT_DISC_STATUS', 'MODULE_PAYMENT_DISC_SORT_ORDER','MODULE_PAYMENT_DISC_PERCENTAGE','MODULE_PAYMENT_DISC_MINIMUM', 'MODULE_PAYMENT_DISC_TYPE', 'MODULE_PAYMENT_DISC_INC_SHIPPING', 'MODULE_PAYMENT_DISC_INC_TAX', 'MODULE_PAYMENT_DISC_CALC_TAX'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Acréscimos', 'MODULE_PAYMENT_DISC_STATUS', 'true', 'Você deseja ativar sistema de acréscimo por forma de pagamento?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordem de exibição.', 'MODULE_PAYMENT_DISC_SORT_ORDER', '9', 'Determina a ordem de exibição do meio de envio. ', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Incluir no Envio', 'MODULE_PAYMENT_DISC_INC_SHIPPING', 'false', 'Calcular acréscimo somando o acréscimo?', '6', '5', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Incluir Taxas Regionais', 'MODULE_PAYMENT_DISC_INC_TAX', 'false', 'Calcular acréscimo somando as Taxas?', '6', '6','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Percentual de acréscimo', 'MODULE_PAYMENT_DISC_PERCENTAGE', '6', 'Informar valores (Percentual).', '6', '7', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Calcular Taxa', 'MODULE_PAYMENT_DISC_CALC_TAX', 'false', 'Re-calcular Imposto sobre o valor descontado.', '6', '5','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Mínimo de pedido.', 'MODULE_PAYMENT_DISC_MINIMUM', '0', 'Informar valor mínimo da compra para obter acréscimo.', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tipo de pagamento', 'MODULE_PAYMENT_DISC_TYPE', 'pagamentodigital', 'Tipo de pagamento para obter acréscimo', '6', '2', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } } ?> Preciso puxar conforme exemplo abaixo, porém não estou conseguindo. <input name="acrescimo" id="acrescimo" value="<?= number_format($showOrder['tax'], 2, '.', ''); ?>" /> Agradeço desde já pela ajuda. Atenciosamente. Henrique Flausino
  5. Olá ESerra Esta consulta já fiz e não resolveu meu problema, por isso estou pedindo ajuda ao pessoal do forum. Estes módulos não funcionam para o 2.2 rc2a do oscommerce. Somente para a versão anterior. Será que alguém poderia me dar uma luz?
  6. Pessoal. Estou pesquisando na net e não estou encontrando nada. Será que alguém teria algum gerador de boleto para oscommerce 2.2 rc2a (ultima versão do oscommerce). Todos que encontrei não funcionam. Na hora de finalizar a compra o botão funcionam como o continuar ao invés de mostrar o boleto. Será que alguém poderia me ajudar? Att. Henrique Flausino
  7. Olá Paulo Web. No meu caso tive atualizar algumas funções do formulário. Usei $_POST ao invés de $HTTP_POST_VARS e no final do código tem uma atualização também. "From: $Form_Email_Remetente\nReply-To: $Form_Email_Remetente\nReturn-Path: $Form_Email_Remetente\nDomain-From: $HTTP_REFERER\nContent-Type: text/html; charset=iso-8859-1" Com essas alterações voltou a funciona. Caso seu problema seja esse esta ai a solução. Caso contrário poste seu código ai para que o pessoal possa analizar, e se eu puder ajudar também estou aqui ok. Atenciosamente. Henrique Flausino
  8. Pessoal. Venho falando com a locaweb que é meu provedor e até agora nenhuma solução. Será que alguém tem alguma idéia do que possa ser? Já coloquei em outro site e funcionou normalmente, mas preciso que funcione neste site que está. Será que tem algum erro de script? Atenciosamente. Henrique Flausino
  9. Consegui... :rolleyes: :lol: :D Segue abaixo código caso alguém precise. Arquivo: product_info.php <?php ###################################### #/* # #Editado por Henrique Flausino # #Data do projeto 15/12/2008 # #Contato: rique_tec@ig.com.br # #*/ # ###################################### require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?> - <?php echo $product_info['products_name']; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> &lt;script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script> <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" /> &lt;script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0"> <tr> <td rowspan="2" class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?> <?php if ($product_check['total'] < 1) { ?> <?php echo tep_draw_top();?> <?php echo tep_draw_title_top();?> <?php echo TEXT_PRODUCT_NOT_FOUND; ?> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw1_top();?> <?php echo tep_draw_infoBox2_top();?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td></tr> </table> <?php echo tep_draw_infoBox2_bottom();?> <?php echo tep_draw1_bottom();?> <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = '<span class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</span>'; } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br> <span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <?php echo tep_draw_top();?> <?php echo tep_draw_title_top();?> <div class="left_part"><?php echo $products_name; ?></div><div class="right_part" style="text-align:right;"><?php echo $products_price; ?></div> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw1_top();?> <?php /* echo tep_draw2_top(); */ ?> <?php echo tep_pixel_trans();?> <?php if (tep_not_null($product_info['products_image'])) { ?> <div style="clear:both;"></div> <?php } ?> <?php echo tep_pixel_trans();?> <?php /* echo tep_draw2_bottom(); */ ?> <div class="prod_line_x"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div> <?php echo tep_draw2_top();?> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <?php echo tep_pixel_trans();?> <table border="0" cellspacing="4" cellpadding="2"> <tr> <td class="main" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <?php } else { ?> <table border="0" cellspacing="4" cellpadding="2"> <tr> <td class="main" colspan="2"> </td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <?php } ?> </table> <table border="0"> <tr> <td><div class="main" style="float:left;padding:1px 1px 1px 1px;margin:0px 20px 0px 0px; text-align:center; width:<?php echo (SMALL_IMAGE_WIDTH +2);?>px;"> <?php echo tep_draw_prod_pic_top();?> &lt;script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>'; ?> </noscript> <?php echo tep_draw_prod_pic_bottom();?> &lt;script language="javascript"><!-- document.write('<?php echo '<a class="enlarge" href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </div></td> <td > <?php include_once("pag_digital.php");?> <? if ($new_price = tep_get_products_special_price($product_info['products_id'])) { ?> <?=splitCredit($new_price); } else { ?> <?=splitCredit($product_info['products_price']); }?> <?php } if (tep_not_null($product_info['products_url'])) { ?></td> </tr> </table> <table cellpadding="0" cellspacing="4" border="0"> <tr> <td height="37" class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?> </td> </tr> </table> <?php echo tep_pixel_trans();?> <?php } ?> <?php echo tep_draw2_bottom();?> <?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <?php echo tep_pixel_trans();?> <table cellpadding="0" cellspacing="4" border="0"> <tr> <td class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> </table> <?php } else { ?> <?php echo tep_pixel_trans();?> <?php } ?> <?php echo tep_pixel_trans();?> <?php /* echo tep_draw2_top(); */ ?> <?php echo tep_pixel_trans();?> <?php echo tep_draw_infoBox2_top(); ?> <table width="100%" border="0" bgcolor="#FF0000"> <tr> <td class="descricao"><img src="images/infobox/arrow_right.gif" width="12" height="10"> Descrição do produto</td> </tr> </table> <table class="tbdescricao"> <tr> <td> <div class="main"><?php echo stripslashes($product_info['products_description']); ?><br> <br> <?php echo $products_price?> </div></td></tr></table> <table width="100%" border="0"> <tr> <td class="main button_marg"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main button_marg" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td> </tr> </table> <?php echo tep_draw_infoBox2_bottom(); ?> <?php /* echo tep_draw2_bottom(); */ ?> <?php echo tep_draw1_bottom();?> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> <?php echo tep_draw_bottom();?> </form> </div></td> <!-- body_text_eof //--> <td rowspan="2" class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> <tr> <td colspan="2" class="<?php echo CONTENT_WIDTH_TD; ?>"> </td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> SpryCollapsiblePanel.js /* Desenvolvido por Henrique Flausino Data do projeto 15/12/2008 Contato: rique_tec@ig.com.br */ var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {}; Spry.Widget.CollapsiblePanel = function(element, opts) { this.element = this.getElement(element); this.focusElement = null; this.hoverClass = "CollapsiblePanelTabHover"; this.openClass = "CollapsiblePanelOpen"; this.closedClass = "CollapsiblePanelClosed"; this.focusedClass = "CollapsiblePanelFocused"; this.enableAnimation = true; this.enableKeyboardNavigation = true; this.animator = null; this.hasFocus = false; this.contentIsOpen = true; this.openPanelKeyCode = Spry.Widget.CollapsiblePanel.KEY_DOWN; this.closePanelKeyCode = Spry.Widget.CollapsiblePanel.KEY_UP; Spry.Widget.CollapsiblePanel.setOptions(this, opts); this.attachBehaviors(); }; Spry.Widget.CollapsiblePanel.prototype.getElement = function(ele) { if (ele && typeof ele == "string") return document.getElementById(ele); return ele; }; Spry.Widget.CollapsiblePanel.prototype.addClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1)) return; ele.className += (ele.className ? " " : "") + className; }; Spry.Widget.CollapsiblePanel.prototype.removeClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)) return; ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), ""); }; Spry.Widget.CollapsiblePanel.prototype.hasClassName = function(ele, className) { if (!ele || !className || !ele.className || ele.className.search(new RegExp("\\b" + className + "\\b")) == -1) return false; return true; }; Spry.Widget.CollapsiblePanel.prototype.setDisplay = function(ele, display) { if( ele ) ele.style.display = display; }; Spry.Widget.CollapsiblePanel.setOptions = function(obj, optionsObj, ignoreUndefinedProps) { if (!optionsObj) return; for (var optionName in optionsObj) { if (ignoreUndefinedProps && optionsObj[optionName] == undefined) continue; obj[optionName] = optionsObj[optionName]; } }; Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver = function(e) { this.addClassName(this.getTab(), this.hoverClass); return false; }; Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut = function(e) { this.removeClassName(this.getTab(), this.hoverClass); return false; }; Spry.Widget.CollapsiblePanel.prototype.open = function() { this.contentIsOpen = true; if (this.enableAnimation) { if (this.animator) this.animator.stop(); this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, true, { duration: this.duration, fps: this.fps, transition: this.transition }); this.animator.start(); } else this.setDisplay(this.getContent(), "block"); this.removeClassName(this.element, this.closedClass); this.addClassName(this.element, this.openClass); }; Spry.Widget.CollapsiblePanel.prototype.close = function() { this.contentIsOpen = false; if (this.enableAnimation) { if (this.animator) this.animator.stop(); this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, false, { duration: this.duration, fps: this.fps, transition: this.transition }); this.animator.start(); } else this.setDisplay(this.getContent(), "none"); this.removeClassName(this.element, this.openClass); this.addClassName(this.element, this.closedClass); }; Spry.Widget.CollapsiblePanel.prototype.onTabClick = function(e) { if (this.isOpen()) this.close(); else this.open(); this.focus(); return this.stopPropagation(e); }; Spry.Widget.CollapsiblePanel.prototype.onFocus = function(e) { this.hasFocus = true; this.addClassName(this.element, this.focusedClass); return false; }; Spry.Widget.CollapsiblePanel.prototype.onBlur = function(e) { this.hasFocus = false; this.removeClassName(this.element, this.focusedClass); return false; }; Spry.Widget.CollapsiblePanel.KEY_UP = 38; Spry.Widget.CollapsiblePanel.KEY_DOWN = 40; Spry.Widget.CollapsiblePanel.prototype.onKeyDown = function(e) { var key = e.keyCode; if (!this.hasFocus || (key != this.openPanelKeyCode && key != this.closePanelKeyCode)) return true; if (this.isOpen() && key == this.closePanelKeyCode) this.close(); else if ( key == this.openPanelKeyCode) this.open(); return this.stopPropagation(e); }; Spry.Widget.CollapsiblePanel.prototype.stopPropagation = function(e) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; return false; }; Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers = function() { var tab = this.getTab(); if (!tab) return; var self = this; Spry.Widget.CollapsiblePanel.addEventListener(tab, "click", function(e) { return self.onTabClick(e); }, false); Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseover", function(e) { return self.onTabMouseOver(e); }, false); Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseout", function(e) { return self.onTabMouseOut(e); }, false); if (this.enableKeyboardNavigation) { var tabIndexEle = null; var tabAnchorEle = null; this.preorderTraversal(tab, function(node) { if (node.nodeType == 1) { var tabIndexAttr = tab.attributes.getNamedItem("tabindex"); if (tabIndexAttr) { tabIndexEle = node; return true; } if (!tabAnchorEle && node.nodeName.toLowerCase() == "a") tabAnchorEle = node; } return false; }); if (tabIndexEle) this.focusElement = tabIndexEle; else if (tabAnchorEle) this.focusElement = tabAnchorEle; if (this.focusElement) { Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "focus", function(e) { return self.onFocus(e); }, false); Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "blur", function(e) { return self.onBlur(e); }, false); Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "keydown", function(e) { return self.onKeyDown(e); }, false); } } }; Spry.Widget.CollapsiblePanel.addEventListener = function(element, eventType, handler, capture) { try { if (element.addEventListener) element.addEventListener(eventType, handler, capture); else if (element.attachEvent) element.attachEvent("on" + eventType, handler); } catch (e) {} }; Spry.Widget.CollapsiblePanel.prototype.preorderTraversal = function(root, func) { var stopTraversal = false; if (root) { stopTraversal = func(root); if (root.hasChildNodes()) { var child = root.firstChild; while (!stopTraversal && child) { stopTraversal = this.preorderTraversal(child, func); try { child = child.nextSibling; } catch (e) { child = null; } } } } return stopTraversal; }; Spry.Widget.CollapsiblePanel.prototype.attachBehaviors = function() { var panel = this.element; var tab = this.getTab(); var content = this.getContent(); if (this.contentIsOpen || this.hasClassName(panel, this.openClass)) { this.addClassName(panel, this.openClass); this.removeClassName(panel, this.closedClass); this.setDisplay(content, "block"); this.contentIsOpen = true; } else { this.removeClassName(panel, this.openClass); this.addClassName(panel, this.closedClass); this.setDisplay(content, "none"); this.contentIsOpen = false; } this.attachPanelHandlers(); }; Spry.Widget.CollapsiblePanel.prototype.getTab = function() { return this.getElementChildren(this.element)[0]; }; Spry.Widget.CollapsiblePanel.prototype.getContent = function() { return this.getElementChildren(this.element)[1]; }; Spry.Widget.CollapsiblePanel.prototype.isOpen = function() { return this.contentIsOpen; }; Spry.Widget.CollapsiblePanel.prototype.getElementChildren = function(element) { var children = []; var child = element.firstChild; while (child) { if (child.nodeType == 1) children.push(child); child = child.nextSibling; } return children; }; Spry.Widget.CollapsiblePanel.prototype.focus = function() { if (this.focusElement && this.focusElement.focus) this.focusElement.focus(); }; Spry.Widget.CollapsiblePanel.PanelAnimator = function(panel, doOpen, opts) { this.timer = null; this.interval = 0; this.fps = 60; this.duration = 500; this.startTime = 0; this.transition = Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition; this.onComplete = null; this.panel = panel; this.content = panel.getContent(); this.doOpen = doOpen; Spry.Widget.CollapsiblePanel.setOptions(this, opts, true); this.interval = Math.floor(1000 / this.fps); var c = this.content; var curHeight = c.offsetHeight ? c.offsetHeight : 0; this.fromHeight = (doOpen && c.style.display == "none") ? 0 : curHeight; if (!doOpen) this.toHeight = 0; else { if (c.style.display == "none") { c.style.visibility = "hidden"; c.style.display = "block"; } c.style.height = ""; this.toHeight = c.offsetHeight; } this.distance = this.toHeight - this.fromHeight; this.overflow = c.style.overflow; c.style.height = this.fromHeight + "px"; c.style.visibility = "visible"; c.style.overflow = "hidden"; c.style.display = "block"; }; Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition = function(time, begin, finish, duration) { time /= duration; return begin + ((2 - time) * time * finish); }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start = function() { var self = this; this.startTime = (new Date).getTime(); this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval); }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop = function() { if (this.timer) { clearTimeout(this.timer); this.content.style.overflow = this.overflow; } this.timer = null; }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation = function() { var curTime = (new Date).getTime(); var elapsedTime = curTime - this.startTime; if (elapsedTime >= this.duration) { if (!this.doOpen) this.content.style.display = "none"; this.content.style.overflow = this.overflow; this.content.style.height = this.toHeight + "px"; if (this.onComplete) this.onComplete(); return; } var ht = this.transition(elapsedTime, this.fromHeight, this.distance, this.duration); this.content.style.height = ((ht < 0) ? 0 : ht) + "px"; var self = this; this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval); }; Spry.Widget.CollapsiblePanelGroup = function(element, opts) { this.element = this.getElement(element); this.opts = opts; this.attachBehaviors(); }; Spry.Widget.CollapsiblePanelGroup.prototype.setOptions = Spry.Widget.CollapsiblePanel.prototype.setOptions; Spry.Widget.CollapsiblePanelGroup.prototype.getElement = Spry.Widget.CollapsiblePanel.prototype.getElement; Spry.Widget.CollapsiblePanelGroup.prototype.getElementChildren = Spry.Widget.CollapsiblePanel.prototype.getElementChildren; Spry.Widget.CollapsiblePanelGroup.prototype.setElementWidget = function(element, widget) { if (!element || !widget) return; if (!element.spry) element.spry = new Object; element.spry.collapsiblePanel = widget; }; Spry.Widget.CollapsiblePanelGroup.prototype.getElementWidget = function(element) { return (element && element.spry && element.spry.collapsiblePanel) ? element.spry.collapsiblePanel : null; }; Spry.Widget.CollapsiblePanelGroup.prototype.getPanels = function() { if (!this.element) return []; return this.getElementChildren(this.element); }; Spry.Widget.CollapsiblePanelGroup.prototype.getPanel = function(panelIndex) { return this.getPanels()[panelIndex]; }; Spry.Widget.CollapsiblePanelGroup.prototype.attachBehaviors = function() { if (!this.element) return; var cpanels = this.getPanels(); var numCPanels = cpanels.length; for (var i = 0; i < numCPanels; i++) { var cpanel = cpanels[i]; this.setElementWidget(cpanel, new Spry.Widget.CollapsiblePanel(cpanel, this.opts)); } }; Spry.Widget.CollapsiblePanelGroup.prototype.openPanel = function(panelIndex) { var w = this.getElementWidget(this.getPanel(panelIndex)); if (w && !w.isOpen()) w.open(); }; Spry.Widget.CollapsiblePanelGroup.prototype.closePanel = function(panelIndex) { var w = this.getElementWidget(this.getPanel(panelIndex)); if (w && w.isOpen()) w.close(); }; Spry.Widget.CollapsiblePanelGroup.prototype.openAllPanels = function() { var cpanels = this.getPanels(); var numCPanels = cpanels.length; for (var i = 0; i < numCPanels; i++) { var w = this.getElementWidget(cpanels[i]); if (w && !w.isOpen()) w.open(); } }; Spry.Widget.CollapsiblePanelGroup.prototype.closeAllPanels = function() { var cpanels = this.getPanels(); var numCPanels = cpanels.length; for (var i = 0; i < numCPanels; i++) { var w = this.getElementWidget(cpanels[i]); if (w && w.isOpen()) w.close(); } }; Pag_digital.php Obs: calculo feito com base de juros de 1.99% <?php ###################################### #/* # #Desenvolvido por Henrique Flausino # #Data do projeto 15/12/2008 # #Contato: rique_tec@ig.com.br # #*/ # ###################################### function splitCredit($totalValue){ $minvalor = 1.00; $desconto = 0; $parcelaqtminimacc = '24'; $taxaboleto = '0'; $tablewidth = '0'; $desconto = '0.06'; $splits = (int) ($totalValue/$minvalor); $valor = ( $totalValue / ($i+1) ); $totaldesconto = $valor - (($desconto/100)*$valor); $minSemJuroscc = 1; $table= '<table width="400" class="tbdescricao" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" align="center"><span class="headtop">FORMAS DE PAGAMENTO</span></td> </tr> <tr height="5"> <td></td> <td></td> <td></td> </tr> <tr> <td colspan="3" bgcolor="#FF0000" align="center" class="descricao">Pagamento à vista</td> </tr>'; $table .= '<tr height="5"> <td></td> <td></td> <td></td> </tr>'; $table .= '<tr> <td class="res1" bgcolor="#FFC6C6">Depósito ou<br>Transferência Bancária</td> <td class="res1" bgcolor="#FF9999">R$ '. number_format($totalValue-$totalValue*$desconto+$taxa0 , 2 , "," , ".") .'</td> <td class="res1" bgcolor="#FF9999">R$ '. number_format($totalValue-$totalValue*$desconto+$taxa0*1 , 2 , "," , ".") .'</td> </tr>'; $parcela = $valor - (($desconto/100)*$valor); $table .= '<tr height="1"> <td></td> <td></td> <td></td> </tr>'; $table .= '<tr> <td class="res2" bgcolor="#FFC6C6"><b>Boleto Bancário</b></td> <td class="res2" bgcolor="#FF9999" ><b>R$ '. number_format($totalValue+$taxa1+$taxaboleto , 2 , "," , ".") .'</b></td> <td class="res2" bgcolor="#FF9999"><b>R$ '. number_format($totalValue+$taxa1+$taxaboleto*1 , 2 , "," , ".") .'</b></td> </tr>'; $table .= '<tr height="5"> <td></td> <td></td> <td></td> </tr>'; $table .= ' <tr height="5"> <td colspan="3" align="center" class="descricao"> <div id="CollapsiblePanel2" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> <span class="descricao">Pagamento parcelado</span> </div> <div class="CollapsiblePanelContent">'; $table .= '<table width="100%" cellpadding="0" cellspacing="0" class="tbdescricao">'; $table .= '<tr height="5"> <td class="res1" bgcolor="#CCCCCC">Quantidade de<br />parcelas</td> <td class="res1" bgcolor="#999999">Valor da<br />Parcela</td> <td class="res1" bgcolor="#999999">Total<br />Parcelado</td> </tr> <tr> <td class="prazo1"><b><font color="FF0000">1x Sem juros</font></b></td> <td class="prazo2"><b><font color="FF0000">R$ '. number_format($totalValue/1 , 2 , "," , ".") .'</font></b></td> <td class="prazo2"><b><font color="FF0000">R$ '. number_format($totalValue/2*2 , 2 , "," , ".") .'</font></b></td> </tr>'; for($i = 0; $i < $splits; $i++){ if($i>$parcelaqtminimacc - 1){break;} $i % 2 == 0 ? $class = "res1" : $class = "res2"; if($i=='0'){$parcela = $valor - (($desconto/100)*$valor); } if($i+1=='2'){$taxa = 0.5200980;} if($i+1=='3'){$taxa = 0.3536320;} if($i+1=='4'){$taxa = 0.2705019;} if($i+1=='5'){$taxa = 0.2207079;} if($i+1=='6'){$taxa = 0.1875834;} if($i+1=='7'){$taxa = 0.1639854;} if($i+1=='8'){$taxa = 0.1463426;} if($i+1=='9'){$taxa = 0.1326709;} if($i+1=='10'){$taxa = 0.1217800;} if($i+1=='11'){$taxa = 0.1129122;} if($i+1=='12'){$taxa = 0.1055625;} if($i+1=='13'){$taxa = 0.0993815;} if($i+1=='14'){$taxa = 0.0941192;} if($i+1=='15'){$taxa = 0.0895927;} if($i+1=='16'){$taxa = 0.0856646;} if($i+1=='17'){$taxa = 0.0822300;} if($i+1=='18'){$taxa = 0.0792071;} if($i+1=='19'){$taxa = 0.0765316;} if($i+1=='20'){$taxa = 0.0741518;} if($i+1=='21'){$taxa = 0.0720261;} if($i+1=='22'){$taxa = 0.0701204;} if($i+1=='23'){$taxa = 0.0684064;} if($i+1=='24'){$taxa = 0.0668607;} if($i == $minSemJuroscc){ $table .= '<tr> <td class="prazo1">'. ($i+1) . 'x com juros*</td> <td class="prazo2">R$ '. number_format($totalValue*$taxa , 2 , "," , ".") . '</font></b></td> <td class="prazo2">R$ '. number_format($totalValue*$taxa*($i+1), 2 , "," , ".").'</td> </tr>'; }else{ if (($totalValue*$taxa) > $minvalor){ $valor = ( $totalValue / ($i+1) ); $table .= '<tr> <td class="prazo1"> '. ($i+1) . 'x com juros*</td> <td class="prazo2">R$ '. number_format($totalValue*$taxa , 2 , "," , ".") .'</td> <td class="prazo2">R$ '. number_format($totalValue*$taxa*($i+1) , 2 , "," , ".") .'</td> </tr>'; } } } $table .= "</table></div></div></td></tr>"; $table .= '<table width="' .$tablewidth. '" style="border: 0px dotted #ff0000;" cellpadding="0" cellspacing="0"><tr> <td class="res4" align="left">*Parcelado em 2 vezes ou mais, juros de 1.99% ao mês<br /><font color="#FF0000"><b> Parcelado em até 10X nos cartões Visa e Diners</b></font><br /><b> Parcelado em até 12X nos cartões Mastercard e HiperCard</b><br /><font color="#FF0000"><b> Parcelado em até 15X no cartão American Express</font></b><br /> Parcelado em até 24X no cartão Aura </tr> </td> </table> &lt;script type="text/javascript"> <!-- var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false}); //--> </script>'; return $table; } ?> Duvidas me retorne. Atenciosamente. Henrique Flausino
  10. Olá Wanderson Camargo. Verifiquei e o sistema de SMTP está funcionando corretamente. Mais alguma sugestão? Atenciosamente. Henrique Flausino
  11. Caros. Estou com um problema no sistema de formulário em php. Desenvolvi este código e estava funcionando corretamente mas de uma hora para outra para de funcionar sem mensagem de erro. Aparece a página que o form foi enviado mas não chega o e-mail, nem como spam. Isso vem ocorrendo com frequencia e quando mudo para outro domínio ele funciona normalmente. Detalhe, ele para de funcionar temporáriamente e volta sem dar nenhum erro e sem ser moficado. Os dois domínios são locaweb e não é diferença de programação nem nada. Será que alguém poderia me ajudar? Código: <? $Form_Arquivo = substr (strrchr ($HTTP_REFERER, "/"),1); if (!empty($Form_Arquivo)) { $Form_Dominio = str_replace($Form_Arquivo, "", $HTTP_REFERER); } else { $Form_Dominio = $HTTP_REFERER; } $Form_Envia_Html = strtoupper($HTTP_POST_VARS["Form_Envia_Html"]); // Envia HTML Mail? (sim/não) $Form_Cor_Do_Fundo = strtoupper($HTTP_POST_VARS["Form_Cor_Do_Fundo"]); // Cor do BackGround em Hexadecimal (ex. #0066ff) $Form_Cor_Da_Letra = strtoupper($HTTP_POST_VARS["Form_Cor_Da_Letra"]); // Cor da Fonte em Hexadecimal (ex. #0066ff) $Form_Tamanho_Da_Letra = $HTTP_POST_VARS["Form_Tamanho_Da_Letra"]; // Tamanho da Fonte (de 1 a 7) $Form_Url_Logo = $HTTP_POST_VARS["Form_Url_Logo"]; // Url do Logotipo $Form_Alinha_logo = strtoupper($HTTP_POST_VARS["Form_Alinha_logo"]); // Alinhamento do Logotipo (esquerda / centro / direita) $Form_Titulo = $HTTP_POST_VARS["Form_Titulo" ];// Título do Mail $Form_Alinha_titulo = strtoupper($HTTP_POST_VARS["Form_Alinha_titulo"]); // Alinhamento do Título do Mail (esquerda / centro / direita) $Form_Email_Destinatario = $HTTP_POST_VARS["Form_Email_Destinatario"]; // Email do Destinatário $Form_Email_Remetente = $HTTP_POST_VARS["Form_Email_Remetente"]; // Email do Remetente $Form_Assunto = $HTTP_POST_VARS["Form_Assunto"]; // Assunto do Email $Form_Pagina_Ok= $HTTP_POST_VARS["Form_Pagina_Ok"]; // Url de Agradecimentos $Form_Envia_Em_Branco = $HTTP_POST_VARS["Form_Envia_Em_Branco"]; // Envia ou não os campos em branco $Pos_Logo_Url = strpos($Form_Url_Logo, "tp:"); $Pos_Url_Ok = strpos($Form_Pagina_Ok, "tp:"); $Remet_Verif_1 = strpos($Form_Email_Remetente, "@"); // Veh se tem "@" em $Cf_Remetente $Remet_Verif_2 = strpos($Form_Email_Remetente, "."); // Veh se tem "." em $Cf_Remetente if (empty($Form_Envia_Em_Branco)) { $Form_Envia_Em_Branco = "SIM"; } if (empty($Form_Titulo) or empty($Form_Email_Destinatario) or empty($Form_Assunto) or empty($Form_Pagina_Ok)) { include ("form.hlp"); if ($REQUEST_METHOD != "POST") { } echo ("http://www.xxxxxxx.com.br/cgi"); die(); } if (empty($Form_Email_Remetente) or empty($Remet_Verif_1) or empty($Remet_Verif_2) or $Remet_Verif_1 == 0) { echo ("&lt;script language=\"JavaScript\">\n"); echo ("<!--\n"); echo ("alert (\"Por favor escreva seu endereço de email corretamente.\");\n"); echo ("history.back();\n"); echo ("//-->\n"); echo ("</script>\n"); die(); } if ($Form_Envia_Html == "SIM") { if (empty($Form_Cor_Do_Fundo)) { $Form_Cor_Do_Fundo = "#FFFFFF"; } if (empty($Form_Cor_Da_Letra)) { $Form_Cor_Da_Letra = "#000000"; } if (empty($Form_Tamanho_Da_Letra)) { $Form_Tamanho_Da_Letra = 2; } else if ($Form_Tamanho_Da_Letra > 7) { echo ("<b>Form_Tamanho_Da_Letra</b> tem tamanho máximo de <b>7</b>!"); die(); } if (empty($Form_Alinha_logo) or $Form_Alinha_logo == "CENTRO" or $Form_Alinha_logo == "CENTER") { $Form_Alinha_logo = "center"; } else if ($Form_Alinha_logo == "DIREITA" or $Form_Alinha_logo == "RIGHT") { $Form_Alinha_logo = "right"; } else if ($Form_Alinha_logo == "ESQUERDA" or $Form_Alinha_logo == "LEFT") { $Form_Alinha_logo = "left"; } if (empty($Form_Alinha_titulo) or $Form_Alinha_titulo == "CENTRO" or $Form_Alinha_titulo == "CENTER") { $Form_Alinha_titulo = "center"; } else if ($Form_Alinha_titulo == "DIREITA" or $Form_Alinha_titulo == "RIGHT") { $Form_Alinha_titulo = "right"; } else if ($Form_Alinha_titulo == "ESQUERDA" or $Form_Alinha_titulo == "LEFT") { $Form_Alinha_titulo = "left"; } else if ($Form_Alinha_titulo == "JUSTIFICADO" or $Form_Alinha_titulo == "JUSTIFY") { $Form_Alinha_titulo = "justify"; } $mensagem = $mensagem . "<html>\n" . "<body bgcolor=\"" . $Form_Cor_Do_Fundo . "\" text=\"" . $Form_Cor_Da_Letra . "\">\n"; if (!empty($Form_Url_Logo)) { if (empty($Pos_Logo_Url)) $Form_Url_Logo = $Form_Dominio . $Form_Url_Logo; $mensagem = $mensagem . "<div align=\"" . $Form_Alinha_logo . "\"><img src=\"" . $Form_Url_Logo . "\" border=\"0\"></div>\n"; } if (!empty($Form_Titulo)) { $mensagem = $mensagem . "<div align=\"" . $Form_Alinha_titulo . "\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"" . ($Form_Tamanho_Da_Letra + 1) . "\"><b>" . $Form_Titulo . "</b></font></div><hr>\n"; } $mensagem = $mensagem . "<table width=\"400\" border=\"0\" align=\"left\">\n"; } else { $mensagem = $mensagem . "<pre>"; $mensagem = $mensagem . $Form_Titulo . "\n\n"; } while (list ($campo, $valor) = each ($HTTP_POST_VARS)) { $chk_campo = ereg("^Form_Obrig_", $campo); if ($chk_campo) { if (empty($valor)) { $chk_campo = ereg_replace("Form_Obrig_","", $campo); echo ("&lt;script language=\"JavaScript\">\n"); echo ("<!--\n"); echo ("alert (\"Por favor preencha o campo $chk_campo corretamente.\");\n"); echo ("history.back();\n"); echo ("//-->\n"); echo ("</script>\n"); die(); } } if ( $campo != "Form_Envia_Html" and $campo != "Form_Cor_Do_Fundo" and $campo != "Form_Cor_Da_Letra" and $campo != "Form_Tamanho_Da_Letra" and $campo != "Form_Url_Logo" and $campo != "Form_Alinha_logo" and $campo != "Form_Titulo" and $campo != "Form_Alinha_titulo" and $campo != "Form_Email_Destinatario" and $campo != "Form_Email_Remetente" and $campo != "Form_Assunto" and $campo != "Form_Envia_Em_Branco" and $campo != "Form_Pagina_Ok") { $campo = strtr($campo, "_", " "); if (!($Form_Envia_Em_Branco == "não" AND empty($valor))) { if ($Form_Envia_Html == "SIM") { $mensagem = $mensagem . " <tr><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"" . $Form_Tamanho_Da_Letra . "\"><b>•$campo:</b></td><td>$valor</font></td></tr>\n"; } else { $mensagem = $mensagem . "•$campo: $valor\n"; } } } } if ($Form_Envia_Html == "SIM") { $mensagem = $mensagem . "</table>\n</html>\n"; } else { $mensagem = $mensagem . "</pre>"; } mail( "$Form_Email_Destinatario", "$Form_Assunto", "$mensagem", "From: $Form_Email_Remetente\nReply-To: $Form_Email_Remetente\nDomain-From: $HTTP_REFERER\nContent-Type: text/html; charset=iso-8859-1" ); header("Location: " . (($Pos_Url_Ok)?($Form_Pagina_Ok):($Form_Dominio . $Form_Pagina_Ok)) ); ?> Agradeço pela atenção. Henrique Flausino
  12. Olá ESerra. Não tenho preferencia por função. Preciso mesmo é ocultar/exibir. Tentei uma função do CS4 mas não funcionou, pois como pode ver os valores são dinamicos. Função utilizada> Spry Se me passar um js acredito que seja melhor. Atenciosamente. Henrique Flausino
  13. Boa tarde. Caros. Estou utilizando o sistema em php para mostrar informação sobre pagamento. Preciso fazer com que a forma de pagamento à prazo só apareça quando o cliente clicar em pagamento parcelado. Segue abaixo código. Arquivo product_info.php <?php require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query);?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html <?php echo HTML_PARAMS; ?>><head><meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"><title><?php echo TITLE; ?> - <?php echo $product_info['products_name']; ?></title><base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"><link rel="stylesheet" type="text/css" href="stylesheet.css"><script language="javascript"><!--function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150')}//--></script></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"><!-- header //--><?php require(DIR_WS_INCLUDES . 'header.php'); ?><!-- header_eof //--><!-- body //--><table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0"><tr> <td rowspan="2" class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0"><!-- left_navigation //--><?php require(DIR_WS_INCLUDES . 'column_left.php'); ?><!-- left_navigation_eof //--> </table></td><!-- body_text //--> <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?> <?php if ($product_check['total'] < 1) {?><?php echo tep_draw_top();?><?php echo tep_draw_title_top();?> <?php echo TEXT_PRODUCT_NOT_FOUND; ?> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw1_top();?> <?php echo tep_draw_infoBox2_top();?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr><td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td></tr> </table> <?php echo tep_draw_infoBox2_bottom();?><?php echo tep_draw1_bottom();?><?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = '<span class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</span>'; } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br> <span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; }?><?php echo tep_draw_top();?><?php echo tep_draw_title_top();?> <div class="left_part"><?php echo $products_name; ?></div><div class="right_part" style="text-align:right;"><?php echo $products_price; ?></div> <?php echo tep_draw_title_bottom();?> <?php echo tep_draw1_top();?> <?php /* echo tep_draw2_top(); */ ?><?php echo tep_pixel_trans();?><?php if (tep_not_null($product_info['products_image'])) {?><div style="clear:both;"></div><?php }?><?php echo tep_pixel_trans();?> <?php /* echo tep_draw2_bottom(); */ ?> <div class="prod_line_x"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></div> <?php echo tep_draw2_top();?><?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) {?><?php echo tep_pixel_trans();?><table border="0" cellspacing="4" cellpadding="2"> <tr> <td class="main" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; }?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php }?></table><?php }?><?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) {?><?php } else { ?><table border="0" cellspacing="4" cellpadding="2"> <tr> <td class="main" colspan="2"> </td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; }?> <?php }?></table><table border="0"> <tr> <td><div class="main" style="float:left;padding:1px 1px 1px 1px;margin:0px 20px 0px 0px; text-align:center; width:<?php echo (SMALL_IMAGE_WIDTH +2);?>px;"> <?php echo tep_draw_prod_pic_top();?> <script language="javascript"><!--document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>'; ?>');//--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>'; ?> </noscript> <?php echo tep_draw_prod_pic_bottom();?> <script language="javascript"><!--document.write('<?php echo '<a class="enlarge" href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');//--></script> <noscript> <?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </div></td> <td > <?php include_once("pag_digital.php");?> <? if ($new_price = tep_get_products_special_price($product_info['products_id'])) { ?> <?=splitCredit($new_price); } else { ?> <?=splitCredit($product_info['products_price']); }?> <?php } if (tep_not_null($product_info['products_url'])) {?></td> </tr></table> <table cellpadding="0" cellspacing="4" border="0"> <tr> <td height="37" class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> </table><?php echo tep_pixel_trans();?><?php }?> <?php echo tep_draw2_bottom();?> <?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {?><?php echo tep_pixel_trans();?> <table cellpadding="0" cellspacing="4" border="0"> <tr> <td class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> </table><?php } else {?><?php echo tep_pixel_trans();?><?php }?> <?php echo tep_pixel_trans();?> <?php /* echo tep_draw2_top(); */ ?><?php echo tep_pixel_trans();?><?php echo tep_draw_infoBox2_top(); ?><table width="100%" border="0" bgcolor="#FF0000"> <tr> <td class="descricao"><img src="images/infobox/arrow_right.gif" width="12" height="10"> Descrição do produto</td> </tr></table><table class="tbdescricao"><tr><td><div class="main"><?php echo stripslashes($product_info['products_description']); ?><br> <br> <?php echo $products_price?> </div></td></tr></table> <table width="100%" border="0"> <tr> <td class="main button_marg"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main button_marg" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td> </tr> </table> <?php echo tep_draw_infoBox2_bottom(); ?> <?php /* echo tep_draw2_bottom(); */ ?> <?php echo tep_draw1_bottom();?> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } }?> <?php echo tep_draw_bottom();?> </form></div></td><!-- body_text_eof //--> <td rowspan="2" class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0"><!-- right_navigation //--><?php require(DIR_WS_INCLUDES . 'column_right.php'); ?><!-- right_navigation_eof //--> </table></td> </tr><tr> <td colspan="2" class="<?php echo CONTENT_WIDTH_TD; ?>"> </td></tr></table><!-- body_eof //--><!-- footer //--><?php require(DIR_WS_INCLUDES . 'footer.php'); ?><!-- footer_eof //--></body></html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Arquivo pag_digital.php <?phpfunction splitCredit($totalValue){////////////////////////////////////////////////////////////////////////////////////////////////////////// ESTA PARTE PODE SER ALTERADA $minvalor = 1.00; // VALOR MINIMO DE CADA PARCELA$desconto = 0;//Valor da percentagem de Desconto atribuída ao produto$parcelaqtminimacc = '24'; ///QUANTIDADE MÁXIMA DE PARCELAS$taxaboleto = '0'; // TAXA DO BOLETO (zero se não cobrar esta taxa)$tablewidth = '0'; // tamanho da largura da tabela padrão 280$desconto = '0.06';/////////////////////////////////////////$splits = (int) ($totalValue/$minvalor);$valor = ( $totalValue / ($i+1) );$totaldesconto = $valor - (($desconto/100)*$valor);$minSemJuroscc = 1;$table= '<table width="400" class="tbdescricao" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" align="center"><span class="headtop">FORMAS DE PAGAMENTO</span></td> </tr> <tr height="5"> <td colspan="3"></td> </tr><tr height="5"> <td class="res1" bgcolor="#CCCCCC">Forma de Pagamento</td> <td class="res1" bgcolor="#999999">Valor<br />Parcelado</td> <td class="res1" bgcolor="#999999">Total<br />Parcelado</td> </tr><tr height="5"> <td></td> <td></td> <td></td> </tr> <tr> <td colspan="3" bgcolor="#FF0000" align="center" class="descricao">Pagamento à vista</td> </tr>'; $table .= '<tr height="5"> <td></td> <td></td> <td></td> </tr>';$table .= '<tr> <td class="res1" bgcolor="#FFC6C6">Depósito ou<br>Transferência Bancária</td> <td class="res1" bgcolor="#FF9999">R$ '. number_format($totalValue-$totalValue*$desconto+$taxa0 , 2 , "," , ".") .'</td> <td class="res1" bgcolor="#FF9999">R$ '. number_format($totalValue-$totalValue*$desconto+$taxa0*1 , 2 , "," , ".") .'</td> </tr> </div>'; $parcela = $valor - (($desconto/100)*$valor); $table .= '<tr height="1"> <td></td> <td></td> <td></td> </tr>'; //$table .= '<tr> // <td class="res2">Deposito HSBC</td> // <td class="res2">R$ '. number_format($totalValue+$taxa0 , 2 , "," , ".") .'</td> // <td class="res2"><b>R$ '. number_format($totalValue+$taxa0*1 , 2 , "," , ".") .'</></td> // </tr>'; //$parcela = $valor - (($desconto/100)*$valor); //$table .= '<tr> // <td class="res1">Deposito Nossa Caixa</td> // <td class="res1">R$ '. number_format($totalValue+$taxa0 , 2 , "," , ".") .'</td> // <td class="res1"><b>R$ '. number_format($totalValue+$taxa0*1 , 2 , "," , ".") .'</b></td> // </tr>'; $parcela = $valor - (($desconto/100)*$valor); $table .= '<tr> <td class="res2" bgcolor="#FFC6C6"><b>Boleto Bancário</b></td> <td class="res2" bgcolor="#FF9999" ><b>R$ '. number_format($totalValue+$taxa1+$taxaboleto , 2 , "," , ".") .'</b></td> <td class="res2" bgcolor="#FF9999"><b>R$ '. number_format($totalValue+$taxa1+$taxaboleto*1 , 2 , "," , ".") .'</b></td> </tr>'; $table .= '<tr height="5"> <td></td> <td></td> <td></td> </tr>'; $table .= '<tr height="5"> <td colspan="3" bgcolor="#FF0000" align="center" class="descricao">Pagamento parcelado</td> </tr>'; $table .= '<tr height="5"> <td></td> <td></td> <td></td> </tr>';########################################################################### ###//1 vez sem juros $table .= '<tr> <td class="prazo1"><b><font color="FF0000">1x Sem juros</font></b></td> <td class="prazo2"><b><font color="FF0000">R$ '. number_format($totalValue/1 , 2 , "," , ".") .'</font></b></td> <td class="prazo2"><b><font color="FF0000">R$ '. number_format($totalValue/2*2 , 2 , "," , ".") .'</font></b></td> </tr>';// fim de 1 vez sem jurosfor($i = 0; $i < $splits; $i++){if($i>$parcelaqtminimacc - 1){break;}$i % 2 == 0 ? $class = "res1" : $class = "res2";if($i=='0'){ $parcela = $valor - (($desconto/100)*$valor); }////////////////////////////ATUALIZADO POR BYTESDESIGN.COM//////////////if($i+1=='2'){$taxa = 0.5200980;}// MULTIPLICADOR DA 2ª PARCELAif($i+1=='3'){$taxa = 0.3536320;} // MULTIPLICADOR DA 3ª PARCELAif($i+1=='4'){$taxa = 0.2705019;} // MULTIPLICADOR DA 4ª PARCELAif($i+1=='5'){$taxa = 0.2207079;} // MULTIPLICADOR DA 5ª PARCELAif($i+1=='6'){$taxa = 0.1875834;} // MULTIPLICADOR DA 6ª PARCELAif($i+1=='7'){$taxa = 0.1639854;} // MULTIPLICADOR DA 7ª PARCELAif($i+1=='8'){$taxa = 0.1463426;} // MULTIPLICADOR DA 8ª PARCELAif($i+1=='9'){$taxa = 0.1326709;} // MULTIPLICADOR DA 9ª PARCELAif($i+1=='10'){$taxa = 0.1217800;} // MULTIPLICADOR DA 10ª PARCELAif($i+1=='11'){$taxa = 0.1129122;} // MULTIPLICADOR DA 10ª PARCELAif($i+1=='12'){$taxa = 0.1055625;} // MULTIPLICADOR DA 12ª PARCELAif($i+1=='13'){$taxa = 0.0993815;} // MULTIPLICADOR DA 13ª PARCELAif($i+1=='14'){$taxa = 0.0941192;} // MULTIPLICADOR DA 14ª PARCELAif($i+1=='15'){$taxa = 0.0895927;} // MULTIPLICADOR DA 15ª PARCELAif($i+1=='16'){$taxa = 0.0856646;} // MULTIPLICADOR DA 16ª PARCELAif($i+1=='17'){$taxa = 0.0822300;} // MULTIPLICADOR DA 17ª PARCELAif($i+1=='18'){$taxa = 0.0792071;} // MULTIPLICADOR DA 18ª PARCELAif($i+1=='19'){$taxa = 0.0765316;} // MULTIPLICADOR DA 19ª PARCELAif($i+1=='20'){$taxa = 0.0741518;} // MULTIPLICADOR DA 20ª PARCELAif($i+1=='21'){$taxa = 0.0720261;} // MULTIPLICADOR DA 21ª PARCELAif($i+1=='22'){$taxa = 0.0701204;} // MULTIPLICADOR DA 22ª PARCELAif($i+1=='23'){$taxa = 0.0684064;} // MULTIPLICADOR DA 23ª PARCELAif($i+1=='24'){$taxa = 0.0668607;} // MULTIPLICADOR DA 24ª PARCELA// jean *********// $minvalor = 1.00;// echo $totalValue*$taxa.'/';// jean ***********if($i == $minSemJuroscc){$table .= '<tr height="3"> <td></td> <td></td> <td></td> </tr>';$table .= '<tr><td class="prazo1">'. ($i+1) . 'x com juros*</td><td class="prazo2">R$ '. number_format($totalValue*$taxa , 2 , "," , ".") . '</font></b></td><td class="prazo2">R$ '. number_format($totalValue*$taxa*($i+1), 2 , "," , ".").'</td></tr>';}else{if (($totalValue*$taxa) > $minvalor){$valor = ( $totalValue / ($i+1) );$table .= '<tr height="3"> <td></td> <td></td> <td></td> </tr>';$table .= '<tr><td class="prazo1"> '. ($i+1) . 'x com juros*</td><td class="prazo2">R$ '. number_format($totalValue*$taxa , 2 , "," , ".") .'</td><td class="prazo2">R$ '. number_format($totalValue*$taxa*($i+1) , 2 , "," , ".") .'</td></tr>';}}}$table .= "</table>"; $table .= '<table width="' .$tablewidth. '" style="border: 0px dotted #ff0000;" cellpadding="0" cellspacing="0"><tr><td class="res4" align="left">*Parcelado em 2 vezes ou mais, juros de 1.99% ao mês<br /><font color="#FF0000"><b>Parcelado em até 10X nos cartões Visa e Diners</b></font><br /><b>Parcelado em até 12X nos cartões Mastercard e HiperCard</b><br /><font color="#FF0000"><b>Parcelado em até 15X no cartão American Express</font></b><br />Parcelado em até 24X no cartão Aura</tr></td></table>'; return $table;}?><style>.headtop{font-family:'Verdana';font-size:12px;font-weight:bold;text-align:center;color:#0000FF;}.head{font-family:'Verdana';font-size:10px;background-color:#F1F1F1;font-weight:bold;text-align:center;color:#333333;border:1px solid #ffffff;}.head2{font-family:'Verdana';font-size:10px;background-color:#c9c8b4;font-weight:bold;text-align:center;color:#333333;border:1px solid #ffffff;}.res1{font-family:'Verdana';font-size:10px;text-align:center;color:#000000;border:1px solid #ffffff;}.prazo1{background-color:#E1E1E1;font-family:'Verdana';font-size:10px;text-align:center;color:#000000;border:1px solid #ffffff;}.prazo2{background-color:#C5C5C5;font-family:'Verdana';font-size:10px;text-align:center;color:#000000;border:1px solid #ffffff;}.res2{font-family:'Verdana';font-size:10px;text-align:center;color:#000000;border:1px solid #ffffff;}.res4{font-family:'Verdana';font-size:9px;background-color:#ffffff;font-weight:bold;text-align:center;color:#666666;}</style> Agradeço desde já pela atenção. Henrique Flausino
  14. Olá MLeandroJr! Muito obrigado pela ajuda. Com esta alteração o código esta perfeito. Att. Henrique Flausino
  15. Olá MLeandroJr. Com a sua ajuda consgui entender melhor o código e fiz uma pequena alteração e já estou enviando no formato Html, porém quando ele era enviado em texto chegava com cada item em uma linha (quebra de linha), porém agora chega tudo em uma linha só. Será que você poderia me ajudar? Segue abaixo link para o form e para o arquivo php de envio. Form Sistema de envio Desde já agradeço pela ajuda. Att. Henrique Flausino
  16. Caros. Sou totalmente leigo em php e estou tantando alterar este form para que o mesmo seja enviado em html. Será que alguém poderia me dar uma ajuda? Sempre que altero o header da erro na linha dele. <? $MailToAddress = "henrique@smididesign.com.br"; $MailSubject = "Cadastro de atendimento de Clientes"; if (!$MailFromAddress) { $MailFromAddress = ""; } $Header = ""; $Footer = ""; ?> <html> <meta http-equiv="refresh" content="1;URL=http://www.smididesign.com.br/"> <body bgcolor="#FFFFFF"> <center> </center> <? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= "$key = $val\n"; } if ($Header) { $Message = $Header."\n\n".$Message; } if ($Footer) { $Message .= "\n\n".$Footer; } mail( "$MailToAddress", "$MailSubject", "$Message", "From: $MailFromAddress"); ?> <br><br> <table width="780" border="0" align="center"> <tr> <td valign="top"> <p> </p> <p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><span class="Estilo2"><strong><font color="#FF0000">Obrigado</font></strong></span> <font color="#FF0000"> </font><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><font color="#FF0000"> </font></font><font color="#FF0000"> </font><font face="Verdana, Arial, Helvetica, sans-serif" size="4"><font color="#FF0000"> <? echo $Todeschini_Cangaiba; ?> <? echo $Italinea_Cangaiba; ?> <? echo $Italinea_Cangaiba; ?> <br> </font></font> </font></p> <p align="center" class="Estilo3"> <font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#006666">Sua informação é muito importante para o nosso</font></p> <p align="center" class="Estilo3"> <font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#006666">controle e nos ajuda a identificar onde devemos investir mais</font></p> <p align="center" class="Estilo3"> <font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#006666">em mídia.</font></p> <p align="center" class="Estilo3"> <font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#006666">A <b> <font color="#FF0000">Smidi Design</font></b> agradece sua colaboração.</font></p> </td> </tr> </table> <p> </p> <p><font color="#FFFFFF"></font> </p> <br><br> </body> </html> Desde já agradeço pela atenção. Att. Henrique Flausino
  17. Obrigado MrMALJ, pode colocar como resolvido sim, porém gostaria de saber onde é que o "ju" aqui estava errando, pois abri o seu e esta da mesma forma de um outro que fiz em casa, porém neste meu quando seleciono a caixa idcadastro me aparece um erro assim. "Tipo não coincidente na expressão." Muito obrigado mesmo, vou continuar estudando este código, pois ele ajuda muito. Att. Henrique Flausino
  18. Olá MrMALJ. O formulário onde esta esta informação é o CADASTRO CHEQUES. Este fds não entrei na net, mas tive que ficar queimando os neuronios para tentar descobrir a falha, porém como não entendo muito desta parte não consegui encontrar. A relação será assim. Escolho o cliente e irá aparecer o código de todas as vendas feitas para o mesmo em IDCadastro. Grato pela ajuda. Att. Henrique Flausino
  19. Socorro... vou ficar louco com isso... já dei o 1° passo, porém não consigo andar de modo algum. Vamos lá, vou explicar novamente. Tenho 2 combos Cliente (Vem do cadastro do cliente) Venda (Vem diretamente do cadastro das vendas) Agora vem a melhor parte, preciso selecionar 1 cliente na combo 1 e na combo 2 deverá me mostrar apenas os códigos das vendas feitas para este cliente. Utilizando a função Requery consegui transportar o código para uma caixa de texto, pois na combo 1 esta me mostrando o cadastro da venda e não do cliente. Ex.: Cliente: Henrique Vendas: 2 Na combo 1 esta me mostrando 2 vezes o mesmo cliente, mesmo o valor vindo da tabela de cliente, o resultado é da tabela de vendas. Abaixo mando novamente o link para baixa o arquivo que fiz. Suplico uma ajuda para poder aprender a utilizar esta função corretamente e terminar este banco de dados. Banco de dados Agradeço desde já pela ajuda. Att. Henrique Flausino
  20. Olá MrMALJ Este é o problema, pois como informei tenho que aprender a montar este filtro, por este motivo disponibilizei o arquivo. Já olhei no site e nenhuma das opções me ajuda, pois esta explicando por cima e não tem muitos detalhes para pessoas leigas como eu. Agradeço se alguém puder me explicar como se conta tal função. Grato pela ajuda. Att. Henrique Flausino
  21. Pessoal. Preciso apreder como montar um filtro para combobox. Tenho algumas tabelas onde irei cadastrar informações de cliente, vendas e cheques. Precido que na tabela de cheques ao selecionar o cliente na combobox me mostre em outra combobox todos as vendas feitas para o mesmo. Não sei se fui claro, porém estou colocando o arquivo em access 2000 neste site para que possam baixar e ver o mesmo. Clique para baixar o banco zipado. Desde já agradeço pela ajuda. Att. Henrique Flausino
  22. Olá MrMALJ. O problema é que fiz um campo para cada cheque para identificar qual cheque não foi pago. Porém para facilitar criei um campo geral que seria para me identificar apenas a situação, débito com a loja ou não. Precisava criar um evento que ao selecionar o check box de um dos cheques alteraria a informação do campo geral para pendente. Lembrando que são vários cheques do cliente. Grato pela ajuda. Att. Henrique Flausino
  23. Olá Pessoal. Estou aqui novamente para pedir uma ajudinha. Meu banco de dados estava pronto, porém pediram para alterar ele novamente. Fiz um cadastro de clientes e vendas, onde quando você efetua a venda faz o cadastro dos cheques, porém tenho que ter um campo para a edição onde me mostre um checkbox que mude um combobox para a opção não, ou seja, o cheque não foi pago pelo cliente. Exemplo: Cliente fez a compra e um dos cheques dele voltou. Tenho que ir na edição e clicar no checkbox para mudar a opção do registro geral que irá aparecer como cliente com débito. Não sei se fui claro, mas espero que me entendam. Muito obrigado pela ajuda. Att. Henrique Flausino Obs: já utilizei a busca mais nenhuma opção encontrada resolveu meu problema.
  24. Muito obrigado MrMALJ. Resolveu o meu problema, não sabia que precisava colocar um nz para cada, pensei que poderia fazer direto. Segue código, caso alguém precise. Me.TOTAL.Value = Nz(Me.Entrada, 0) + Nz(Me.Valor1, 0) + Nz(Me.Valor2, 0) + Nz(Me.Valor3, 0) + Nz(Me.Valor4, 0) + Nz(Me.Valor5, 0) + Nz(Me.Valor6, 0) + Nz(Me.Valor7, 0) + Nz(Me.Valor8, 0) + Nz(Me.Valor9, 0) + Nz(Me.Valor10, 0) + Nz(Me.Valor11, 0) + Nz(Me.Valor12, 0) + Nz(Me.Valor13, 0) + Nz(Me.Valor14, 0) + Nz(Me.Valor15, 0) + Nz(Me.Valor16, 0) + Nz(Me.Valor17, 0) + Nz(Me.Valor18, 0) + Nz(Me.Valor19, 0) + Nz(Me.Valor20, 0) + Nz(Me.Valor21, 0) + Nz(Me.Valor22, 0) + Nz(Me.Valor23, 0) + Nz(Me.Valor24, 0) + Nz(Me.Valor25, 0) + Nz(Me.Valor26, 0) + Nz(Me.Valor27, 0) + Nz(Me.Valor28, 0) + Nz(Me.Valor29, 0) + Nz(Me.Valor30, 0) Como sempre o fórum me ajudando e o MrMALJ também, valeu pela força e pela paciencia :) . Valeu mesmo. Att. Henrique Flausino
  25. Muito obrigado MrMALJ. Agora já sei qual função devo procurar e assim que encontrar a solução vou postar aqui. Att. Henrique Flausino Olá MrMALJ Encontrei o código, porém continuo com o mesmo problema, ou até pior. Me.TOTAL.Value = Nz(Me.Entrada + Me.Valor1 + Me.Valor2 + Me.Valor3 + Me.Valor4 + Me.Valor5 + Me.Valor6 + Me.Valor7 + Me.Valor8 + Me.Valor9 + Me.Valor10 + Me.Valor11 + Me.Valor12 + Me.Valor13 + Me.Valor14 + Me.Valor15 + Me.Valor16 + Me.Valor17 + Me.Valor18 + Me.Valor19 + Me.Valor20 + Me.Valor21 + Me.Valor22 + Me.Valor23 + Me.Valor24 + Me.Valor25 + Me.Valor26 + Me.Valor27 + Me.Valor28 + Me.Valor29 + Me.Valor30, 0) Antes todos os campos tinham que ter 0 para aparecer o resultado, porém agora, o resultado aparece altomáticamente mas é sempre 0. Será que poderiam me dizer onde estou errando. Att. Henrique Flausino
×
×
  • Criar Novo...