Ir para conteúdo
Fórum Script Brasil

Pesquisar na Comunidade

Mostrando resultados para as tags ''separar''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • Programação & Desenvolvimento
    • ASP
    • PHP
    • .NET
    • Java
    • C, C++
    • Delphi, Kylix
    • Lógica de Programação
    • Mobile
    • Visual Basic
    • Outras Linguagens de Programação
  • WEB
    • HTML, XHTML, CSS
    • Ajax, JavaScript, XML, DOM
    • Editores
  • Arte & Design
    • Corel Draw
    • Fireworks
    • Flash & ActionScript
    • Photoshop
    • Outros Programas de Arte e Design
  • Sistemas Operacionais
    • Microsoft Windows
    • GNU/Linux
    • Outros Sistemas Operacionais
  • Softwares, Hardwares e Redes
    • Microsoft Office
    • Softwares Livres
    • Outros Softwares
    • Hardware
    • Redes
  • Banco de Dados
    • Access
    • MySQL
    • PostgreSQL
    • SQL Server
    • Demais Bancos
  • Segurança e Malwares
    • Segurança
    • Remoção De Malwares
  • Empregos
    • Vagas Efetivas
    • Vagas para Estágios
    • Oportunidades para Freelances
  • Negócios & Oportunidades
    • Classificados & Serviços
    • Eventos
  • Geral
    • Avaliações de Trabalhos
    • Links
    • Outros Assuntos
    • Entretenimento
  • Script Brasil
    • Novidades e Anúncios Script Brasil
    • Mercado Livre / Mercado Sócios
    • Sugestões e Críticas
    • Apresentações

Encontrar resultados em...

Encontrar resultados que...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Encontrado 7 registros

  1. Olá, estou com um problema, não sei organizar o json_decode no php, atualmente me encontro com esse code: <?php $cep = $_POST['cep']; // create curl resource $ch = curl_init(); // set url curl_setopt($ch, CURLOPT_URL, "http://apps.widenet.com.br/busca-cep/api/cep/$cep.json"); // $output contains the output json $output = curl_exec($ch); // close curl resource to free up system resources curl_close($ch); // {"name":"Baron","gender":"male","probability":0.88,"count":26} json_decode($output, true); ?> Que é uma pesquisa CEP, porem quando busco fica assim: https://i.imgur.com/7zzEYCz.png Queria uma coisa mais organizada sabe, tipo: code-> 49160-000 state->Sergipe [***] alguém pode me ajudar?
  2. Bom dia, Tenho um sistema que estou testando de um PDV e nele tenho um script para impressão de fichas, mas acontece que nele atualmente só consigo imprimir as fichas uma a uma, por exemplo: faço a venda de 3 cervejas e 2 refrigerantes, se eu fechar o pedido com todos os itens juntos, na ficha sera impresso todos os itens e não uma ficha separada de cada item vendido como eu gostaria. Alguém pode me ajudar? segue o código a baixo: <?php include "QRCodeGenerator.class.php"; function product_name($name) { return character_limiter($name, (isset($Settings->char_per_line) ? ($Settings->char_per_line-8) : 35)); } if ($modal) { echo '<div class="modal-dialog no-modal-header"><div class="modal-content"><div class="modal-body"><button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-2x">&times;</i></button>'; } else { ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title><?= $page_title . " " . lang("no") . " " . $inv->id; ?></title> <base href="<?= base_url() ?>"/> <meta http-equiv="cache-control" content="max-age=0"/> <meta http-equiv="cache-control" content="no-cache"/> <meta http-equiv="expires" content="0"/> <meta http-equiv="pragma" content="no-cache"/> <link rel="shortcut icon" href="<?= $assets ?>images/icon.png"/> <link href="<?= $assets ?>bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <style type="text/css" media="all"> body { color: #000; } #wrapper { max-width: 300px; margin: 0 auto; padding-top: 5px; } .btn { border-radius: 0; margin-bottom: 0px; } .table { border-radius: 3px; } .table th { background: #f5f5f5; } .table th, .table td { vertical-align: middle !important; } h3 { margin: 5px 0; } @media print { .no-print { display: none; } #wrapper { max-width: 500px; width: 100%; min-width: 10px; margin: 0 auto; } } </style> </head> <body> <?php } ?> <div id="wrapper"> <div id="receiptData"> <div class="no-print"> <?php if ($message) { ?> <div class="alert alert-success"> <button data-dismiss="alert" class="close" type="button">×</button> <?= is_array($message) ? print_r($message, true) : $message; ?> </div> <?php } ?> </div> <div id="receipt-data"> <div class="text-center"> <?= $Settings->header; ?> <p> <?= lang("date").': '.$this->tec->hrld($inv->date); ?> </p> <div style="clear:both;"></div> <table class="table table-striped table-condensed"> <thead> <tr> </tr> </thead> <?php $ex1 = new QRCodeGenerator('http://www.nfe.fazenda.gov.br/portal/consulta.aspx?tipoConsulta=completa&tipoConteudo=XbSeqxE8pl8=MobLanche_PDVPARATODOS.COM.BR'); echo "<img src=".$ex1->generate().">"; $tax_summary = array(); foreach ($rows as $row) { echo '<tr><td class="text-center">' .($row->product_name) . '</td>'; } ?> </div> </div> <div style="clear:both;"></div> </div> <?php if ($modal) { echo '</div></div></div></div>'; } else { ?> <div id="buttons" style="padding-top:5px; text-transform:uppercase;" class="no-print"> <hr> <?php if ($message) { ?> <div class="alert alert-success"> <button data-dismiss="alert" class="close" type="button">×</button> <?= is_array($message) ? print_r($message, true) : $message; ?> </div> <?php } ?> <?php if ($Settings->java_applet) { ?> <span class="col-xs-12"><a class="btn btn-block btn-primary" onClick="printReceipt()"><?= lang("print"); ?></a></span> <span class="col-xs-12"><a class="btn btn-block btn-info" type="button" onClick="openCashDrawer()"><?= lang('open_cash_drawer'); ?></a></span> <div style="clear:both;"></div> <?php } else { ?> <span class="pull-right col-xs-12"> <a href="javascript:window.print()" id="web_print" class="btn btn-block btn-primary" onClick="window.print();return false;"><?= lang("web_print"); ?></a> </span> <?php } ?> <span class="pull-left col-xs-12"><a class="btn btn-block btn-success" href="#" id="email"><?= lang("email"); ?></a></span> <span class="col-xs-12"> <a class="btn btn-block btn-warning" href="<?= site_url('pos'); ?>"><?= lang("back_to_pos"); ?></a> </span> <?php if (!$Settings->java_applet) { ?> <div style="clear:both;"></div> <div class="col-xs-12" style="background:#F5F5F5; padding:30px;"> <font size="-2"> <p style="font-weight:BOLD;">PROIBIDO VENDA DE BEBIDAS A MENORES DE 18 ANOS </p> <p style="text-transform: capitalize;"> NEW CONCEPT 2018 - TODOS OS DIREITOS RESERVADOS </p> <font> <?php } ?> <div style="clear:both;"></div> </div> </div> <canvas id="hidden_screenshot" style="display:none;"> </canvas> <div class="canvas_con" style="display:none;"></div> <script src="<?= $assets ?>plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script> <?php if ($Settings->java_applet) { function drawLine($Settings) { $size = $Settings->char_per_line; $new = ''; for ($i = 1; $i < $size; $i++) { $new .= '-'; } $new .= ' '; return $new; } function printLine($str, $Settings, $sep = ":", $space = NULL) { $size = $space ? $space : $Settings->char_per_line; $lenght = strlen($str); list($first, $second) = explode(":", $str, 2); $new = $first . ($sep == ":" ? $sep : ''); for ($i = 1; $i < ($size - $lenght); $i++) { $new .= ' '; } $new .= ($sep != ":" ? $sep : '') . $second; return $new; } function printText($text, $Settings) { $size = $Settings->char_per_line; $new = wordwrap($text, $size, "\\n"); return $new; } function taxLine($name, $code, $qty, $amt, $tax) { return printLine(printLine(printLine(printLine($name . ':' . $code, '', 18) . ':' . $qty, '', 25) . ':' . $amt, '', 35) . ':' . $tax, ' '); } ?> <script type="text/javascript" src="<?= $assets ?>plugins/qz/js/deployJava.js"></script> <script type="text/javascript" src="<?= $assets ?>plugins/qz/qz-functions.js"></script> <script type="text/javascript"> deployQZ('themes/<?=$Settings->theme?>/assets/plugins/qz/qz-print.jar', '<?= $assets ?>plugins/qz/qz-print_jnlp.jnlp'); usePrinter("<?= $Settings->receipt_printer; ?>"); <?php /*$image = $this->tec->save_barcode($inv->reference_no);*/ ?> function printReceipt() { //var barcode = 'data:image/png;base64,<?php /*echo $image;*/ ?>'; receipt = ""; receipt += chr(27) + chr(69) + "\r" + chr(27) + "\x61" + "\x31\r"; receipt += "<?= printText(strip_tags(preg_replace('/\s+/',' ', $Settings->header)), $Settings); ?>" + "\n"; receipt += " \x1B\x45\x0A\r "; receipt += "<?=drawLine($Settings);?>\r\n"; //receipt += "<?php // if($Settings->invoice_view == 1) { echo lang('tax_invoice'); } ?>\r\n"; //receipt += "<?php // if($Settings->invoice_view == 1) { echo drawLine(); } ?>\r\n"; receipt += "\x1B\x61\x30"; receipt += "<?= printLine(lang("sale_no") . ": " . $inv->id, $Settings) ?>" + "\n"; receipt += "<?= printLine(lang("sales_person") . ": " . $created_by->first_name." ".$created_by->last_name, $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("customer") . ": " . $inv->customer_name, $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("date") . ": " . $this->tec->hrld($inv->date), $Settings); ?>" + "\n\n"; receipt += "<?php $r = 1; foreach ($rows as $row): ?>"; receipt += "<?= "#" . $r ." "; ?>"; receipt += "<?= product_name(addslashes($row->product_name)); ?>" + "\n"; receipt += "<?= printLine($this->tec->formatNumber($row->quantity)."x".$this->tec->formatMoney($row->net_unit_price+($row->item_tax/$row->quantity)) . ": ". $this->tec->formatMoney($row->subtotal), $Settings, ' ') . ""; ?>" + "\n"; receipt += "<?php $r++; endforeach; ?>"; receipt += "\x1B\x61\x31"; receipt += "<?=drawLine($Settings);?>\r\n"; receipt += "\x1B\x61\x30"; receipt += "<?= printLine(lang("total") . ": " . $this->tec->formatMoney($inv->total+$inv->product_tax), $Settings); ?>" + "\n"; <?php if ($inv->order_tax != 0) { ?> receipt += "<?= printLine(lang("tax") . ": " . $this->tec->formatMoney($inv->order_tax), $Settings); ?>" + "\n"; <?php } ?> <?php if ($inv->total_discount != 0) { ?> receipt += "<?= printLine(lang("discount") . ": " . $this->tec->formatMoney($inv->total_discount), $Settings); ?>" + "\n"; <?php } ?> <?php if($Settings->rounding) { ?> receipt += "<?= printLine(lang("rounding") . ": " . $rounding, $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("grand_total") . ": " . $this->tec->formatMoney($inv->grand_total + $rounding), $Settings); ?>" + "\n"; <?php } else { ?> receipt += "<?= printLine(lang("grand_total") . ": " . $this->tec->formatMoney($inv->grand_total), $Settings); ?>" + "\n"; <?php } ?> <?php if($inv->paid < $inv->grand_total) { ?> receipt += "<?= printLine(lang("paid_amount") . ": " . $this->tec->formatMoney($inv->paid), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("due_amount") . ": " . $this->tec->formatMoney($inv->grand_total-$inv->paid), $Settings); ?>" + "\n\n"; <?php } ?> <?php if($payments) { foreach($payments as $payment) { if ($payment->paid_by == 'cash' && $payment->pos_paid) { ?> receipt += "<?= printLine(lang("paid_by") . ": " . lang($payment->paid_by), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("amount") . ": " . $this->tec->formatMoney($payment->pos_paid), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("change") . ": " . ($payment->pos_balance > 0 ? $this->tec->formatMoney($payment->pos_balance) : 0), $Settings); ?>" + "\n"; <?php } if (($payment->paid_by == 'CC' || $payment->paid_by == 'ppp' || $payment->paid_by == 'stripe') && $payment->cc_no) { ?> receipt += "<?= printLine(lang("paid_by") . ": " . lang($payment->paid_by), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("amount") . ": " . $this->tec->formatMoney($payment->pos_paid), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("card_no") . ": xxxx xxxx xxxx " . substr($payment->cc_no, -4), $Settings); ?>" + "\n"; <?php } if ($payment->paid_by == 'gift_card') { ?> receipt += "<?= printLine(lang("paid_by") . ": " . lang($payment->paid_by), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("amount") . ": " . $this->tec->formatMoney($payment->pos_paid), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("card_no") . ": " . $payment->gc_no, $Settings); ?>" + "\n"; <?php } if ($payment->paid_by == 'Cheque' && $payment->cheque_no) { ?> receipt += "<?= printLine(lang("paid_by") . ": " . lang($payment->paid_by), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("amount") . ": " . $this->tec->formatMoney($payment->pos_paid), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("cheque_no") . ": " . $payment->cheque_no, $Settings); ?>" + "\n"; <?php if ($payment->paid_by == 'other' && $payment->amount) { ?> receipt += "<?= printLine(lang("paid_by") . ": " . lang($payment->paid_by), $Settings); ?>" + "\n"; receipt += "<?= printLine(lang("amount") . ": " . $this->tec->formatMoney($payment->amount), $Settings); ?>" + "\n"; receipt += "<?= printText(lang("payment_note") . ": " . $payment->note, $Settings); ?>" + "\n"; <?php } } } } /* if($Settings->invoice_view == 1) { if(!empty($tax_summary)) { ?> receipt += "\n" + "<?= lang('tax_summary'); ?>" + "\n"; receipt += "<?= taxLine(lang('name'),lang('code'),lang('qty'),lang('tax_excl'),lang('tax_amt')); ?>" + "\n"; receipt += "<?php foreach ($tax_summary as $summary): ?>"; receipt += "<?= taxLine($summary['name'],$summary['code'],$this->tec->formatNumber($summary['items']),$this->tec->formatMoney($summary['amt']),$this->tec->formatMoney($summary['tax'])); ?>" + "\n"; receipt += "<?php endforeach; ?>"; receipt += "<?= printLine(lang("total_tax_amount") . ":" . $this->tec->formatMoney($inv->product_tax)); ?>" + "\n"; <?php } } */ ?> receipt += "\x1B\x61\x31"; <?php if ($inv->note) { ?> receipt += "<?= printText(strip_tags(preg_replace('/\s+/',' ', $this->tec->decode_html($inv->note))), $Settings); ?>" + "\n"; <?php } ?> receipt += "<?= printText(strip_tags(preg_replace('/\s+/',' ', $Settings->footer)), $Settings); ?>" + "\n"; receipt += "\x1B\x61\x30"; <?php if(isset($Settings->cash_drawer_cose)) { ?> print(receipt, '', '<?=$Settings->cash_drawer_cose;?>'); <?php } else { ?> print(receipt, '', ''); <?php } ?> } </script> <?php } ?> <script type="text/javascript"> $(document).ready(function () { $('#email').click(function () { var email = prompt("<?= lang("email_address"); ?>", "<?= $customer->email; ?>"); if (email != null) { $.ajax({ type: "post", url: "<?= site_url('pos/email_receipt') ?>", data: {<?= $this->security->get_csrf_token_name(); ?>: "<?= $this->security->get_csrf_hash(); ?>", email: email, id: <?= $inv->id; ?>}, dataType: "json", success: function (data) { alert(data.msg); }, error: function () { alert('<?= lang('ajax_request_failed'); ?>'); return false; } }); } return false; }); }); <?php if (!$Settings->java_applet && !$noprint) { ?> $(window).load(function () { window.print(); }); <?php } ?> </script> </body> </html> <?php } ?>
  3. Como separar por virgulas numeros em um vetor de caractere em C?
  4. Boa noite! Minha primeira pergunta no fórum, vamos lá: Preciso de uma ajuda para resolver este exercício, pois tento de tudo quanto é código e não imagino como resolve-lo: "Considerando listas de valores inteiros, implemente uma função que receba como parâmetro uma lista encadeada e um valor inteiro n e divida a lista em duas, de tal forma que a segunda lista comece no primeiro nó logo após a primeira ocorrência de n na lista original. Essa função deve obedecer ao protótipo: Lista*separa(Lista * l,int n); A função deve retornar um ponteiro para a segunda subdivisão da lista original, enquanto l deve continuar apontando para o primeiro elemento da primeira subdivisão da lista." Pfr me ajudem... pfr alguém...
  5. Separar dígitos contido numa frase ou matriz de string é a finalidade deste programa, na realidade criei este exemplo para ajudar iniciantes em c, já que é muito difícil, encontrar um código como este na internet, então abra sua IDE agora mesmo copie e cole e compile. Veja abaixo uma imagem do programa em execução: Veja abaixo o link do código do programa: http://codigosfontes-ccplus-plus.blogspot.com.br/2015/11/separar-digitos-contido-numa-frase-ou.html
  6. phzz

    Salvar e Somar final

    Boa Noite, estou criando um programa de controle financeiro e estou com duvida em 2 coisas: não estou com o programa aqui então fiz uma demonstração de como seria no paint kkk 1- Eu tenho 4 gastos que gostaria de separa-los em (casa, escritório, contas e obra) gostaria de saber como faço para salva-los cada 1 separadamente (como mostrado na imagem 1) além disso gostaria de continuar adicionando os gastos no mesmo arquivo. (ou pelo menos que eles ficassem separados por categoria - casa, escritório, contas e obra) 2- Ao final das opções: casa, escritório, contas e obra, gostaria que os gastos fossem mostrados, somados e que surgisse um total a baixo. (como na imagem 2) Links: Imagem 1: http://i.imgur.com/biQabL1.png?1 Imagem 2: http://i.imgur.com/P34QlB2.png?1 Ficou um pouco confuso, mas se alguém puder me ajudar... Grato.
  7. Boa madruga galera, eu sou novo em php, eu gostaria de saber se é possivel separar emails por listas carregando uma lista de emails ilimitados sem ; um abaixo do outro, e separar dominio por dominio exemplo hotmail, do gmail do uol do yahoo, que cada email separado vai pra uma caixa de texto diferente e assim por diante, quem souber me responder fico grato, valeu...
×
×
  • Criar Novo...