Posts by Sr. André Baill • 6,946 points
384 posts
-
2
votes2
answers1302
viewsQ: Mask credit card numbering
I have the following numbering: 4716501731980995 I need to split it four ways. Part 2/3 should be replaced by ******** How could I do this?
phpasked Sr. André Baill 6,946 -
2
votes4
answers951
viewsQ: Foreach in PHP reverse process
I have the following foreach(): $i = 1; foreach($listagem as $valor){ echo $i; // O que vai me retornar: 1, 2, 3, 4, 5, ..., 100 $i++; } How do I do the reverse process? I would like to return: 100,…
phpasked Sr. André Baill 6,946 -
0
votes1
answer249
viewsQ: Search Data-id and Remove from Database
I got this foreach() <?php foreach($fotos_ingresso as $valor){ ?> <div id="fotos-listagem-imagem"> <a href="javascript:;" data-toggle="modal" data-target="#confirma-deletar-imagem"…
-
0
votes1
answer185
viewsQ: Setting of Div Parent CSS
I have the following HTML: <div id="fotos-listagem"> <div id="fotos-listagem-imagem"> <img src="http://localhost/proyectopen/assets/uploads/interno_fotos/ingresso/1348357833.jpg"…
cssasked Sr. André Baill 6,946 -
0
votes4
answers4554
viewsA: GROUP BY and ORDER BY Mysql
I’d make the next shape: SELECT id, id_cliente, mes, status, ano FROM programacao_clientes_mes WHERE id_cliente = 2 GROUP BY mes, ano ORDER BY ano DESC
-
2
votes1
answer15321
viewsQ: Select change jQuery
I have the following script: $("#tp_pagamento").change(function(){ var tp_pagamento = $(this).val(); $.ajax({ url: BASE_URL + "ajax/lista_integrador", type: "POST", data:…
jqueryasked Sr. André Baill 6,946 -
2
votes2
answers1092
viewsQ: HTML5 - End date less than start date
I own two camps: <input type="date" id="data_inicial" value="<?php echo date("Y-m-d"); ?>" disabled> <input type="date" id="data_final"> The first field, I have the initial date…
html5asked Sr. André Baill 6,946 -
2
votes1
answer294
viewsA: Helper-menu and active submenu (codeigniter)
I’d do it this way: <li class="<?php if($this->uri->segment(1)=='categoria') echo "active"; ?>"> <a href="<?php echo site_url('app/categoria'); ?>"><i class="fa…
-
2
votes1
answer795
viewsA: SELECT DINAMICO CODEIGNITER - AJAX
I’d do it this way: <select id="categoria" class="form-control" name="sel_id_categoria" > <?php foreach ($categoria as $categoria) { echo '<option…
-
0
votes1
answer197
viewsQ: Group PHP Array()
I have the following array() Array ( [0] => stdClass Object ( [usu_id] => 1 [mod_base] => 1 [mod_id] => 4 ) [1] => stdClass Object ( [usu_id] => 1 [mod_base] => 1 [mod_id] =>…
-
0
votes2
answers220
viewsQ: Return Jquery data within Input
I have the following HTML <select id="id_cliente"> <option value="1">CLIENTE 1</option> <option value="2">CLIENTE 2</option> <option value="3">CLIENTE…
-
0
votes1
answer44
viewsQ: Search for record in array()
$detalhes->pro_are_id = '["4","1","2","3","6"]'; // Dados foram gravados no banco atraés do json_encode() $valor->are_id = 2; if(!empty($detalhes) and isset($detalhes->pro_are_id)){ $are_id…
phpasked Sr. André Baill 6,946 -
0
votes2
answers68
viewsA: Search id returned from json_encode() inside mysql
I got the solution as follows: $area = 1; $this->db->like("pro_are_id", json_encode($area)); return $this->db->get('produto')->result(); Passing json_encode() by $area, returns me…
-
0
votes2
answers68
viewsQ: Search id returned from json_encode() inside mysql
I have the following content in the field pro_are_id : ["11","3"] this content I made with json_encode(), would like to make a query to the database and know if there is this id specifically or not,…
-
0
votes1
answer29
viewsQ: Incorrect count of $_FILE fields
In the following structure: <input type="file" id="imagem_01" name="imagem[]" /> <input type="file" id="imagem_02" name="imagem[]" /> <input type="file" id="imagem_03" name="imagem[]"…
phpasked Sr. André Baill 6,946 -
0
votes1
answer1411
viewsQ: Add dynamic fields in jQuery
I have the following HTML <form id="FrmLoja" method="post" action="#"> <input type="text" name="valor[]" id="valor" value="0" /> <input type="text" name="valor[]" id="valor" value="0"…
jqueryasked Sr. André Baill 6,946 -
0
votes0
answers29
viewsQ: Edit does not work on jQuery
I have the following function: // ações para modificar (clique) $(".editar").click(function(){ var id = $(this).data("id"); $.ajax ({ url: 'area/get_area/'+id, type: 'GET', success:…
jqueryasked Sr. André Baill 6,946 -
4
votes1
answer601
viewsQ: Mysql function to return text according to numeric index
I have a table called tb_usuarios with the columns id_usuario nome email telefone tipo_de_acesso I would like to create a function in Mysql, where when using echo $row['tipo_de_acesso'], already…
mysqlasked Sr. André Baill 6,946 -
1
votes1
answer3313
viewsQ: Remove accent in PHP (Ã)
I have the following function: function tirarAcentos($string){ return…
phpasked Sr. André Baill 6,946 -
0
votes2
answers130
viewsQ: Check if the date is within the PHP limit
How do I know if the date coming from $_POST['date'] is within 90 days? /* VERIFICACAO DE DATA */ $data_inicio = date("Y-m-d"); $data_post = $_POST['data_post']; $data_fim = date('Y-m-d',…
phpasked Sr. André Baill 6,946 -
0
votes2
answers858
viewsQ: Div bootstrap misaligned
I have the following DIV <section id="section-base"> <div class="container"> <h3>cases</h3> <div class="row"> <?php foreach($cases as $valor){ ?> <div…
-
-1
votes3
answers2169
viewsA: Control of séssions and authentication in PHP with Codeigniter
You can do: if(isset($this->session->userdata('usuario_logado'))){ echo "Logado."; }
-
1
votes1
answer62
viewsQ: Add item with different array
I have the following array() Array ( [nome_responsavel] => [telefone] => [email] => [dependentenome] => Array ( [0] => qqq [1] => qqq [2] => qqqq ) [dependentedata] => Array…
-
1
votes1
answer114
viewsQ: Close menu by clicking another
I have the following menu: <div id="menu"> <img style="position: relative;right:45px;bottom:39px" src="<?= base_url('assets/img/menu-topo.png') ?>" width="340px"/> <div…
jqueryasked Sr. André Baill 6,946 -
3
votes1
answer64
viewsQ: Pass an array of a form to PHP via AJAX
I have this form: jQuery (function($) { AddTableRow = function() { var newRow = $("<tr>"); var cols = ""; cols += '<td><input type="text" name="dados[][nome]" id="dados[][nome]"…
-
4
votes2
answers4963
viewsQ: Issue with accentuation in CSV file export
I read a CSV file as follows: $delimitador = ';'; $cerca = '"'; // Abrir arquivo para leitura $f = fopen($_FILES['uploadChange']['tmp_name'], 'r'); if ($f) { // Ler cabecalho do arquivo $cabecalho =…
phpasked Sr. André Baill 6,946 -
3
votes2
answers923
viewsQ: Pass jQuery variable inside Ajax
I have the following Form: <div class="row" id="importar"> <form id="convidados"> <input type="hidden" value="<?php echo $this->uri->segment(4); ?>" id="id_cliente"…
jqueryasked Sr. André Baill 6,946 -
2
votes1
answer2289
viewsQ: Add and remove jQuery inputs
I have the following form: <div class="col-md-12 form-group"> <div class="row" id="dep"> <div class="col-md-10"> <input type="text" class="form-control" placeholder="Nome do…
jqueryasked Sr. André Baill 6,946 -
6
votes1
answer3967
viewsQ: Difference between var_dump and print_r
I have a simple and objective question: Always in my research around, I notice that some programmers use var_dump() and others use print_r (like me). What’s the difference between print_r() and…
var-dumpasked Sr. André Baill 6,946 -
6
votes4
answers130
viewsQ: How to format this array?
I have the following array: $dados = array( '0' => array( 'id_assinante' => $id, 'nome' => 'Aluguel' ), '1' => array( 'id_assinante' => $id, 'nome' => 'Água' ), '2' => array(…
-
1
votes1
answer131
viewsQ: Mark checkbox with returns in DIV
In this form: <input type="checkbox" value="1" data-id=1" name="status_entrega" id="status_entrega"> <div id="retorno_1" style="display:none; float:left">Atualizado</div> <input…
jqueryasked Sr. André Baill 6,946 -
1
votes1
answer512
viewsQ: List data in separate columns
I have the following list from the database <ul class="list-marked"> <?php foreach($cidades_presentes as $valor){ ?> <li><a href="#"><?php echo $valor->categoria;…
-
3
votes1
answer1727
viewsQ: Session Codeigniter
I have this normal Septssion: foreach ($nofeatured_prods as $k) { $_SESSION['itens'][$k->id] = $k; } How do I assign equally, however, in codeigniter?
-
0
votes1
answer452
viewsA: PHP Limit letters in the result
If you are going to limit the characters, you can use the substr of PHP itself. As follows: <?php $result = selectAllAnuncios(1,18); foreach ($result as $k => $v): $link =…
phpanswered Sr. André Baill 6,946 -
1
votes1
answer944
viewsA: Iframe hiding content
Do it this way: <iframe src="http://suaurl.com.br" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden;…
-
2
votes1
answer288
viewsQ: Return array() in jQuery
I have the following HTML list <table class="table table-bordered"> <tbody> <tr> <th width="50" class="text-center">#</th> <th>Item do Pacote</th>…
jqueryasked Sr. André Baill 6,946 -
2
votes1
answer56
viewsQ: Modify Array() HTML form result
I have the following return of Array(): [item] => Array ( [data_vencimento] => Array ( [0] => 2016-12-05 [1] => 2016-12-07 [2] => 2016-12-22 ) [itens] => Array ( [0] => 150,00|1…
-
0
votes1
answer47
viewsQ: Mobile version bootstrap maladjusted
I have the following HTML structure <!-- Page Content--> <main class="page-content"> <!--- Lojas ---> <div id="lojas"> <div class="col-md-5 text-left lojas-coperfarma">…
-
2
votes2
answers476
viewsA: Codeigniter; Calendaring Class: highlight the current month in an annual calendar
I would do it this way: <?php class Calendar extends CI_Controller { public function this_year() { $data['title'] = 'Calendar: ' . date('Y'); $this->load->library('calendar'); $prefs =…
-
1
votes1
answer199
viewsQ: Formula for Calculation in jQuery with return
I have this listing... I need that, when filling the real value, I do: (real value) - (purchase value) = purchase-versus-real, and profit is (buy-versus-real) - (sale value), and fill in profit. But…
jqueryasked Sr. André Baill 6,946 -
0
votes1
answer54
viewsA: Login registration in php
Your PHP code should be changed ob_start(); include ('conect.php'); if(isset($_POST['nome']) and isset($_POST['senha'])){ $nome = isset($_POST['nome']) ? $_POST['nome'] : ''; $senha =…
-
0
votes0
answers533
viewsQ: Image upload using Angularjs
I have this Angularjs: app.controller("templateController", function ($scope, $http, $timeout) { $scope.save = function () { $scope.mensagePage = {class: 'warning', text: 'Processando...'}; var…
-
1
votes1
answer135
viewsQ: Accordion sem jQuery
I have the following accordion, but wanted when clicking on one, the other that is open, to close.. always keep only one active. How do I do? <!DOCTYPE html> <html> <head>…
javascriptasked Sr. André Baill 6,946 -
0
votes1
answer952
viewsA: Error - mysqli_num_rows
In my view, to display the count of the records: include '../include/connection.php'; $query = mysqli_query($link, "SELECT id FROM user ORDER BY id ASC") or print mysql_error(); $rows =…
-
0
votes2
answers580
viewsA: Login with two tables
You can then do the following procedure: Check in table A, if e-mail and password exists, if it returns true, check if they are correct, if it returns false, pass the next check in table B, or…
loginanswered Sr. André Baill 6,946 -
0
votes1
answer73
viewsQ: Comparison of PHP Array()
I have the following arrays: $arrTag = "Array ( [0] => stdClass Object ( [id] => 1 [id_pacote] => 7 [id_fornecedor] => [nome] => Salgados - 100 Un [valor_compra] => 100…
-
0
votes1
answer180
viewsQ: Set object in Angular JS
I have the following listing structure: <div style="position: fixed;z-index: 999;top:20%;margin:0 auto;left:25%;width:50%;padding:5%;background:#FFF;" ng-if="templateForm ==…
angularjsasked Sr. André Baill 6,946 -
2
votes1
answer835
viewsQ: Function being executed twice jQuery
I got the following jQuery: $("#salvar_festa").click(function() { var id_cliente = $("#id_cliente").val(); var id_pacote = $("#id_pacote").val(); var tipo_reserva = $("#tipo_reserva").val(); var…
jqueryasked Sr. André Baill 6,946 -
2
votes1
answer153
viewsQ: Search Array() in variable and database
I have the following fields in Array(): # Tratamento das variaveis para substituição da mensagem $campos = array( 0 => '#celular', 1 => '#ddd', 2 => '#cpf_cnpj', 3 =>…
-
2
votes2
answers76
viewsA: overlapping tabs on foreach
If you do it this way, it’ll work: <!-- Tab v2 --> <div class="tabs alternative"> <ul class="nav nav-tabs"> <li class="active"> <?php $x=0; foreach($programacao_mes as…