Posts by Hugo Borges • 5,294 points
332 posts
-
1
votes1
answer269
viewsQ: how to get the Session time in php
someone knows how to get the time remaining for section to expire? I’m raising her like this: session_start(); Wanted to display to the user the time he has remaining…
phpasked Hugo Borges 5,294 -
3
votes2
answers509
viewsQ: Force Session not to exceed 30 minutes
Galera I have a login system in PHP. I saved the login and the password of the user in a session. This is how I start it: // Inicia a sessão session_start(); My question and how to make this session…
phpasked Hugo Borges 5,294 -
5
votes3
answers4603
viewsQ: Check that the value is integer
Galera use the following code in php to check that the number is integer: $qtd_bo = "1.20"; if (!preg_match('/^[1-9][0-9]*$/', $qtd_bo)) { echo "Não é inteiro"; } It returns to me that the number…
phpasked Hugo Borges 5,294 -
2
votes3
answers496
viewsQ: php function to invert data
Galera set up a simple function to reverse the date, check this out: function inverteData($data) { if(count(explode("/",$data)) > 1){ return implode("-",array_reverse(explode("/",$data))); } else…
phpasked Hugo Borges 5,294 -
1
votes1
answer393
viewsQ: problems with Tooltip in jQuery and css
Galera montei um sisteminha de Tooltip bem simples usando jQuery e css. They’re introducing the standard Tooltip when you mouse over it. This only happens in old IE, Safari and Chrome. Look at the…
-
2
votes2
answers125
viewsQ: formatting a string with str_pad
Guys with the help of the stack people here, I set up a function where I do the processing of a string. I’ll post the code and explain the problem. Function: function mb_str_pad($input, $pad_length,…
phpasked Hugo Borges 5,294 -
1
votes2
answers317
viewsQ: Problems with jQuery printing function
Guys I put together a code in jQuery to make some changes to my layout by hiding some div and printing the page. It works very well, but I’m having the following problem. When I have image on my…
-
8
votes2
answers427
viewsQ: Problems with str_pad function and accentuation
Guys I’m using the function str_pad to take a string and fill it with 10 characters 0. It is working perfectly, see the example: echo str_pad("dda", 10, "0", STR_PAD_LEFT); She writes 0000000dda.…
phpasked Hugo Borges 5,294 -
0
votes1
answer270
viewsQ: Problem with select UNION ALL mysql
Galera mounted the following select in MYSQL: SELECT id_produto, SUM(qtd) as qtd FROM ( SELECT id, id_produto, qtd FROM produtos_pedidos WHERE id_pedido = '1' UNION ALL SELECT id, id_produto, qtd…
mysqlasked Hugo Borges 5,294 -
4
votes5
answers498
viewsQ: Capture Enter in IE using jQuery
Guys I have the following code in jQuery: $(document).keypress(function(e) { if(e.which === 13) $('.button_ok').click(); }); When I click the enter key, it causes the user to have clicked the class…
-
0
votes2
answers246
viewsQ: pause page and resume after user confirmation
Guys I have the following structure in php: <?php // Verifica se cancela o cadastro if ((!empty($action)) and ($action == "cancelar")) { ?> <script> confirm ('Tem certeza que quer…
-
1
votes1
answer1130
viewsQ: Alert system with jQuery
Guys I’m trying to build a custom Alert system with jQuery. It is working perfectly, but I always have to forget the div in HTML. Is there any way for jQuery himself to do this? If it is possible to…
-
2
votes1
answer1432
viewsQ: How to return a javascript function to an HTML?
Guys took the following function in Javascript (jQuery): function CustomAlert() { this.show = function (nome) { }; } var Alert = new CustomAlert(); $(document).ready(function () { Alert.show('meu…
-
0
votes1
answer453
viewsQ: with capturing the width of the printing screen with jQuery
I have the following code: HTML <table style="width: 100%"> <tr> <th> teste </th> </tr> </table> JQUERY // Imprime a página window.print(); // Redireciona página…
-
0
votes2
answers266
viewsA: Problem when redirecting page, after printing using jQuery
I got a better solution. // Imprime a página window.print(); (function () { var beforePrint = function () { // Remove o loading $(".se-pre-con").hide(); // Remove Menu topo $(".header").hide();…
-
1
votes2
answers266
viewsQ: Problem when redirecting page, after printing using jQuery
Guys I’m giving a window.print(); to print my page, soon after it I send the window.location to redirect the page, the problem and the page and redirect before the print command. I need to make the…
-
4
votes2
answers499
viewsQ: Div appears in her after 2 seconds with jQuery
Guys I’m mounting the loading system using Jquery. And they consist of a div that covers the entire tala in the browser and that when all elements of the page are loaded, Jquery hides the div. The…
-
2
votes1
answer1178
viewsQ: Text alignment with css
I am mounting a div with a loading, the problem and I can not align the text below the image and in the center. The image is aligned as I want, in the center of the page. Can someone help me?…
-
2
votes0
answers23
viewsQ: Locking a directory to everyone but the local server
Guys I use the Jquery Autocomplete plugin, and inside my server folder, I have a folder called Search, with several php files. I wanted to know how to block this folder, so that only my server has…
htaccessasked Hugo Borges 5,294 -
5
votes2
answers418
viewsQ: How to reverse FILTER_SANITIZE_SPECIAL_CHARS
Guys I took a variable and converted her using the FILTER_SANITIZE_SPECIAL_CHARS. Example: filter_var ("hug' o", FILTER_SANITIZE_SPECIAL_CHARS); The result: hugD' o How do I reverse this?…
phpasked Hugo Borges 5,294 -
0
votes1
answer197
viewsQ: Tab system in jQuery with page Reload
Good guys, I put together a very simple flap system, with the help of Stack’s people. Well it works 100%, but there are some cases I need to get the page updated when bouncing in the tab1. I tried…
jqueryasked Hugo Borges 5,294 -
2
votes3
answers8116
viewsQ: How to join 2 tables in a select?
Guys I have the following tables in my BD Mysql: produtos_pedido with the following fields id,id_request,id_product,Qtd produtos_troca with the following fields id,id_request,id_product,Qtd Well I…
mysqlasked Hugo Borges 5,294 -
2
votes1
answer337
viewsQ: checks if the input value has changed with jQuery
I need to identify if the value of a input changed with jQuery. I’m trying to do so: $('input[name=cliente]').on('keyup', function(e) { // Aqui vou por minhas funções } But it’s not working. Dude…
jqueryasked Hugo Borges 5,294 -
3
votes1
answer49
viewsQ: error with arlert function that I created
Galera set up a very simple function of Alert in php. It works however this presenting a problem. Whenever I call him that: Alert("Pedido finalizado"); It works, but when I put an n to have a break…
-
5
votes5
answers7434
viewsQ: removing part of a string with php
I have a variable with the following link: https://www.youtube.com/embed/z1n34sRv1-A I need to remove everything that comes before the embed, or need the following id: z1n34sRv1-A How can I do this…
phpasked Hugo Borges 5,294 -
1
votes2
answers560
viewsQ: datepicker does not work in dynamic form with Js
Guys, I built a dynamic form using JS. Inside this form I have several input with the class data, where I call datepicker. But they don’t work, someone can help me with this? Follow the example…
-
4
votes1
answer442
viewsQ: effect on input using jQuery
Guys I’m making a input with an effect similar to that of Android. Good here in this example I put a input and a select. The input is working perfectly, when he is with the Focus he turns blue.…
-
3
votes1
answer122
viewsQ: Effect on jQuery does not work with datepicker
Galera mounted an input with an effect, which occurs when entering a value in the input, the problem and that the same effect does not work using the Picker data in the input. That is when you put a…
-
1
votes1
answer1574
viewsQ: Flap system with jQuery
Guys I set up a flap system using jQuery. Follow it below. $('ul.tabs li').click(function(){ var tab_id = $(this).attr('data-tab'); $('ul.tabs li').removeClass('current');…
-
3
votes2
answers534
viewsQ: CSS tab system stops working when changing quantity
I’m trying to use a system of tabs in pure CSS. It seemed very nice, but when I add new tabs or remove some it stops working, someone knows to tell me why? Only with 3 tabs works well: .tabs…
-
0
votes1
answer28
viewsQ: alignment between div
Guys I rode a container and a flap system using css, but I’m having trouble putting the flaps inside the container. My problem is that the container does not follow the size of the tabs, someone…
-
0
votes1
answer173
viewsQ: Doubt about cached files
Guys I’m putting together a system in php, and I’m creating the material design that will be used in the system. I created 2 files, 1º Materia.js and 2º Material.css. Good in these files I will put…
-
-1
votes2
answers1694
viewsQ: Place an icone with css in a div
Guys I’m putting together a css with a Tooltip, it is working well. However I want to put a little arrow in the balloon of Tooltip, and it’s not working. I tried creating the following class…
cssasked Hugo Borges 5,294 -
1
votes1
answer86
viewsQ: putting html in title, using query
Guys I have a tooltip plugin that works with jQuery, it is very simple and practical. The problem is I’m trying to put an html inside it. And it returns me the html code instead of the result. Does…
-
1
votes0
answers628
viewsQ: Format value to R$ on Chart JS chart
Well some time ago, a user here at STACK helped me solve a problem with currency formatting on the Chart JS chart. But I found a new problem. With the help of Sergio we were able to put the traffic…
-
4
votes2
answers844
viewsQ: Omit seconds in Mysql time field
Guys I have a field on my table of type time, where I save my time. Problem is he’s saving it like this: 10:30:01, how do I save him only the hour and minutes. That is without the seconds? The field…
mysqlasked Hugo Borges 5,294 -
3
votes1
answer85
viewsQ: Multiple Function in one file
I have a project in php and within that project I have a folder called Funções. Inside this folder I have several function files. I have a file called Logado.php, where I authenticate the user and…
-
2
votes1
answer32
viewsQ: date conversion with php
People Today I use a very simple way to convert dates from BD (American standard) to PT-BR. The way I use it is like this: $data_BD = "2016-07-27"; // Cria nome das variaveis $ano =…
phpasked Hugo Borges 5,294 -
0
votes1
answer91
viewsQ: block image link to other websites
Guys I have the following folder at the root of my site: Arquivos/Fotos/goto1.jpg If I type in the browser the link co my site (www.meusite.com.br/Files/Photos/goto1.jpg) the photo opens, and…
-
0
votes3
answers708
viewsQ: How to check the return of a function
Galera set up a function that executes the class phpmailer and send an email. However I do not know how to check her return and know if the email was sent. Good follows the function: function…
-
0
votes1
answer408
viewsQ: mounting an array with php for p phpmailer
Guys I’m trying to set up an array with the list of e-mail addresses, so that phpmailer send them. However I’m having problems. No error is displayed, php simply does not send the emails. I’m…
-
0
votes1
answer66
viewsQ: email sending error with phpmailer
Guys I’m trying to send an email to several people inside an array called $destinatario. For this I created a function called envia_email. But I’m having the following mistake: Fatal error: Call to…
-
0
votes1
answer162
viewsQ: Send e-mail to 1 contact array, with phpmailer
Guys I use php Mailer to send email, and very simple, use the following line: // Destinatório e cópia oculta $email->AddBCC('[email protected]', 'hugo'); But I wanted to know how to send an…
-
0
votes0
answers20
viewsQ: Pluing jQuery TE 1.4.0 caught with too much text
Guys I’m using the plugin, jQuery TE 1.4.0 , http://jqueryte.com/. For being very simple and easy. He attends me 100%. However I am having a problem, when I put a very large text that I copy from…
-
1
votes1
answer924
viewsQ: Calculation problems with jquery.maskMoney
Guys I have a javascript that makes the perfect calculation between 3 inputs. Being them. 1- COST, RECEIVES THE COST OF A PRODUCT 2- SALE, receives p selling price, and automatically calculates…
-
2
votes2
answers19261
viewsQ: calculating days between php dates
Guys I’m trying to check the difference in days, based on 2 dates. Well my code is like this: $data_inicio = new DateTime("2016-07-10"); $data_fim = new DateTime("2016-07-13"); // Resgata diferença…
phpasked Hugo Borges 5,294 -
0
votes1
answer3418
viewsQ: Delete folder and contents with php
Good guys want to delete a folder from my site with php, and want to delete all files and sub-folders. I’m using the following command: unlink("Arquivos/$token"); Is that correct? It erases all…
phpasked Hugo Borges 5,294 -
2
votes1
answer5856
viewsQ: maskMoney without having to select input
Guys I’m using maskMoney but it only format value if I click the input, have you change it? That is to format it as soon as the page is loaded? $(function() { $("input").maskMoney({ allowNegative:…
-
1
votes1
answer377
viewsQ: Mount table with div
I have the following table in HTML <table style="width: 100%"> <tr> <td style="width: 50px"> <img src="https://s32.postimg.org/x1llms2ph/caixa_padrao.png"> </td>…
-
0
votes1
answer1104
viewsQ: hide <option> with javascript
Good guys I have 3 select in my code, being them tipo, outros and margem. When I mark the option MARGENS in the select tipo the select margem appears on the screen. So far everything ok. But I need…