Jump to content

Darkness Soul

Members
  • Posts

    133
  • Joined

  • Last visited

    Never

Everything posted by Darkness Soul

  1. Hi there, Guys, I'm with a huge problem. I made a form with dinamic input. You can add fields (from 100px to 500px heigth) and then use it. It's a touch (without keyboard/mouse) system. If I add a field and it get 80% of screen heigth, then I add other huge field, the user will only see that 20% left of screen. I want to scroll it up and show it all in the screen. Well, I never used scrolling with JS, so, I'm lost here.... may you guys help me? Thanks in advance.
  2. Strange... I used the same broswer to open that, the print in both: Server 1: */* Server 2: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* This with the same script in the same browser. :S
  3. Hi, I'm not sure if this is the right area to place this question, but this is more html then php. I'm writing a script that check if the headers http_accept have application/xhtml+xml in it. If it have, check if it's Q is greater or equal to text/html Q. Well, the php script work's fine, at least in theory. I need to test it but, my server http_accept returns only */*. I tryed other webserver and it returned some image and documents then */*. Neither text/html or application/xhtml+xml. You guys know what shall I do? This */* mean that server accept text/html, but also accept application/xhtml+xml? Thanks in advance. D.Soul
  4. Interesting. Thanks, both. I got the idea, now just need to use and evolve. :'D D.S.
  5. Hi guys... I don't have a clue of how to search for "::" topics. I tryed the :: with few keywords, without sucess. I'm used to "->", and I just step in this "::", so.. what the heck is that? Is is an alternative to "->"? If not, what is it used for? Thanks in advance.
  6. I assuming you copy-paste your code to the forum, right? You misstyped the function name, take a look: onchange="ChangeDropdowns(this.value);" function ChangDropdowns(value){ Chang and Change, missing an "E". That's might solve your problem.
  7. Yo eve, I try to find out at web but I found both nothing and too complex code. I want to make it simple! May you help me? The problem is: I have a <td> with many <div id="n"> (n = 0, 1, ...) and those dive have up and down arrows to change they position in the list. Thats it. A dirty looks should be like: td - div 0 -v - div 1 ^v - div 2 ^- When the user click the up (^) or down (v) arrow, they switch position. A dirty looks after using should be like: td - div 2 -v - div 0 ^v - div 1 ^- The result, I want to put inside a hidden input, to easy write at database. So, do you guys know a howto or have patience to tell me how to do this? Thanks.
  8. when I use a string like str_condicao, the replace ignore regex.. the string is somelike " int_id = 1 " damn, after many reviews, I go check the trim function, its a prototype.. I've commented the prototype and past it as a function.. the error gone.. i will use it as function.. have no much time to accomplish this.. so, I will back to this after, for now, consider it solved.. sorry for busy :-( thanks anyway dSoul
  9. Woops, I forgot that detail. the ifrm_campo.value = ifrm_campo.value.replace ( str_condicao , '' ) ; one.
  10. Yo, I'm developing a filter using checkbox to active the options. When I check an option, its send a string to an input text and submit the form; when I uncheck, its replace for nothing and submit the form. The problem is: the first time I try to uncheck, the replace is not working. Like the exemple: > string = "" I check a, send a string; > string = "a" I uncheck a, replace fail; > string = "a" I check a, send another string; > string = "aa" I uncheck a, replace the second string; > string = "a" This "string builder" genereta a SQL script to put in a where case and when submited, filter the data. There is a prototype "trim()", its work perfectly. The function below: function filtraSelecionado ( objeto , tabela , campo , alvo , tipo ) { var ifrm_selecao = document.frm_Filtragem ; var ifrm_formulario = ifrm_selecao.formFiltro ; var ifrm_campo = ifrm_formulario[ alvo ] ; var str_condicao = "" ; var str_expressao_regular = "" ; if ( tipo == 'numero' ) { str_condicao = " "+ campo +" = "+ objeto.value +" " ; } else { str_condicao = " "+ campo +" LIKE '%"+ objeto.value +"%' " ; } while ( str_condicao.match ( ' ' ) != null ) { str_condicao = str_condicao.replace ( ' ' , ' ' ) ; } str_condicao = str_condicao.trim () ; ifrm_campo.value = ifrm_campo.value.replace ( str_condicao , '' ) ; ifrm_campo.value = ifrm_campo.value.trim () ; if ( ifrm_campo.value.length > 0 ) { str_condicao = " OR " + str_condicao ; } if ( objeto.checked != false ) { ifrm_campo.value = ifrm_campo.value + str_condicao ; } while ( ifrm_campo.value.match ( ' ' ) != null ) { ifrm_campo.value = ifrm_campo.value.replace ( ' ' , ' ' ) ; } ifrm_campo.value = ifrm_campo.value.trim () ; ifrm_campo.value = ifrm_campo.value.replace ( /OR OR/ , 'OR' ) ; ifrm_campo.value = ifrm_campo.value.replace ( /OROR/ , 'OR' ) ; ifrm_campo.value = ifrm_campo.value.replace ( /OR$/ , '' ) ; ifrm_campo.value = ifrm_campo.value.replace ( /^OR/ , '' ) ; ifrm_campo.value = ifrm_campo.value.trim () ; ifrm_formulario.submit () ; } Thanks for the help. dSoul
  11. Our server is accent-sensitive, so, we need a lot of replaces.. ( SELECT tbE.id, "E" AS filtro, tbE.nomefantasia AS nomefantasia, tbE.endereco AS endereco, tbE.numero AS numero, tbE.complemento AS complemento, tbBar.bairro AS bairro, tbE.cep AS cep, tbCid.cidade AS cidade, tbUF.sigla AS sigla, tbE.telefone AS telefone, tbE.telefone2 AS telefone2, tbE.tel0800 AS tel0800, tbE.email AS email, tbE.site AS site, tbE.logotipo AS logotipo , IF(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LCASE(palavrachave_vip),"-"," "),";"," "),"í","I"),"ä","A"),"ë","E"),"ü","U"),"é","E"),"á","A"),"ú","U"),"ã","A"),"õ","O"),"ê","E"),"ô","O"),"ç","C") LIKE "%a%" AND palavrachave_vip != "", "V", IF(tbE.cliente = "S", "S", "N")) AS vip FROM tbEmpresas AS tbE INNER JOIN tbEstados AS tbUF ON tbUF.id = tbE.idestado INNER JOIN tbCidades AS tbCid ON tbCid.id = tbE.idcidade INNER JOIN tbBairros AS tbBar ON tbBar.id = tbE.idbairro INNER JOIN tbCategoria AS tbCat ON tbCat.id = tbE.idcategoria INNER JOIN tbSubCategoria AS tbSub ON tbSub.id = tbE.idsubcategoria WHERE REPLACE(LCASE(tbE.nomefantasia),"-"," ") LIKE "%%" AND( REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LCASE(palavrachave),"-"," "),";"," "),"í","I"),"ä","A"),"ë","E"),"ü","U"),"é","E"),"á","A"),"ú","U"),"ã","A"),"õ","O"),"ê","E"),"ô","O"),"ç","C") LIKE "%a%" OR REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LCASE(palavrachave_vip),"-"," "),";"," "),"í","I"),"ä","A"),"ë","E"),"ü","U"),"é","E"),"á","A"),"ú","U"),"ã","A"),"õ","O"),"ê","E"),"ô","O"),"ç","C") LIKE "%a%" OR REPLACE(UCASE(tbBar.bairro),"-"," ") LIKE "%A%" OR REPLACE(UCASE(tbE.cep),"-"," ") LIKE "%A%" OR REPLACE(UCASE(tbE.endereco),"-"," ") LIKE "%A%" OR REPLACE(UCASE(tbE.nomefantasia),"-"," ") LIKE "%A%" ) AND REPLACE(UCASE(tbE.endereco),"-"," ") LIKE "%%" AND( REPLACE(tbE.telefone,"-","") LIKE "%%" OR REPLACE(tbE.telefone2,"-","") LIKE "%%" OR REPLACE(tbE.tel0800,"-","") LIKE "%%" ) AND( REPLACE(UCASE(tbCat.descricao),"-"," ") LIKE "%%" OR UCASE(tbSub.descricao) LIKE "%%" OR REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LCASE(palavrachave),"-"," "),";"," "),"í","I"),"ä","A"),"ë","E"),"ü","U"),"é","E"),"á","A"),"ú","U"),"ã","A"),"õ","O"),"ê","E"),"ô","O"),"ç","C") LIKE "%%" ) AND tbE.id > 0 AND tbE.idcidade = 1 AND(tbE.datacadastro != "0000-00-00 00:00:00" OR tbE.datacadastro != "00000000000000") AND(tbE.cliente = "S" OR tbE.cliente = "N") AND tbE.ativo = "S" ) UNION ( SELECT tbTel.id, "T" AS filtro, tbTel.str_nome AS nome_fantasia, "" AS endereco, "" AS numero, "" AS complemento, "" AS bairro, "" AS cep, "" AS cidade, "" AS sigla, tbTel.str_telefone AS telefone, "" AS telefone2, "" AS tel0800, "" AS email, "" AS site, "" AS logotipo, "N" AS vip FROM tbCidades_Telefones AS tbTel WHERE(tbTel.str_nome LIKE "%%" AND tbTel.str_nome LIKE "%A%" AND tbTel.str_nome LIKE "%%" ) AND tbTel.flag_ativo = "A" AND tbTel.str_telefone LIKE "%%" AND tbTel.id_cidade = 1 ) ;
  12. Yo, Guys, I never saw it before... I've an application what is using MySQL, and the search engine use an Union command. The project has about one year old, and now I move the database to a new host, but, before, there are all collations equal LATIN1, now they are UTF8. Ok, I convert all the strings, setup all the tables and the database to use UTF8 as default. No problems yet. So, I try to search something with "a" in the name... Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'UNION' "Ok" I had think, "its just some field/table I had missed to convert...". After several minutes looking to the database, nothing was wrong. I try to print the SQL, it's look perfect; So I try to copy-past it inside the "SQL execute" field into phpMyAdmin. It's works wonderful... "hmmmm, what now?" So I try to convert the php file to UTF8 (it was ANSI) (desperation); try to use $sql = utf8_convert ( $string ); and now, I don't know 'what to do'. I think someone else may know what is wrong, or had the same problem. So, may I be helped? Thank you, guys... dSoul
  13. Hi guys, I've looking for "uml" and "modeling" at articles and tutorials, but don't found anything. At the forum, I found two topics: Test Cases vs UML: http://www.phpfreaks.com/forums/index.php/topic,150395.0.html Anyone care to reflect?: http://www.phpfreaks.com/forums/index.php/topic,149945.0.html After read both, don't find what I've lookin for.. well, we few words, I'm starting (or trying) to use UML. I've read a lot of theory, but don't find examples or guides at really. At google, found one or other "howto", but, with respect, unusable. Well, by myself, I'm trying to draw some actors and some class diagram, but, I don't know what to do next... or, how to use uml at really... I feel like trying to draw my system at MsPaint. So, someone know where do I found articles, tutorials or guides to learn it? Really, I'm tired of construct projects form nowhere.. and listening our team say "may the force be with you". I really want to learn it. About that "test cases", I've never hear it before.. if someone have have something about, I'll be thankfull. Thanks, D.Soul
  14. str_to_date may help a lot, order by field too, but that database isn't mine, and the data storage there is a mess.. i found dates like jan/2005, fev/02, agos/2002, 05/2001.. it have no standard.. =S thankx for the help
  15. Yo, :) I need a logic help.. I have a varchar(*) field with date like JAN/2007, and I need to order this by the month (jan, feb, ...) I try to use if, unhappy.. How I do it? Thank you.. D.Soul
  16. Sure, Just give me some time, I need to write it and now I'm full of work.. I'll send you a PM after, but send me one to the case I forget it.. ;) D.Soul
  17. Wow, :D This may also useful to me! D.Soul
  18. I see! Thank you for the knowledge. :) D.Soul
  19. Thank you, this are very useful! I used just one time a long ago this form array and get missed it.. :) I'm happy plus now! D.Soul
  20. Yo, Is possible to mount variable name with the code? My case: I have a form with the input fields named by a prefixe and the line id, and, recover it with import_request_variables() function. Exemple: [code]form.php (...) -- ordened by the sql input name="detail241" value="" input name="detail23" value="" (...) action.php (...) import_request_variables ( "p" , "var_" ) ; print $var_detail241 ; (...)[/code] This $var_detail241, I haven't a way to know its number, but I need its value, all I have is a for with all Id posted and the name $var_detail, so, how do I, if its possible, to make an $var_detail+$id to make my numered variable? Thank you. D.Soul
  21. I think you will need to use arrays, never did this before, but maybe.. create an array, like $row, into this array, you will record the data, like a table.. $row[0][] = $id, $row[1][] = foo, .. got it? Now you print your table.. tr, foreach $row[0] as $x, td $x /td, loop, /tr tr, foreach $row[1] as $x, td $x /td, loop, /tr So, you got your table! Test it, and tell me the result? :) D.Soul
  22. I think you wanna something like: [code]    // start where condition with void     $where = '' ;     // verify if cat is set     if ( $_REQUEST['cat'] != '' )     {         // set where condition         $where = ' where cat = "'. $_REQUEST['cat'] .'" ' ;     }     // mount the sql string     $sql = ' SELECT artist FROM db1 '. $where ;     // execute the query     $result = mysql_query ( $sql , $db )[/code] D.Soul
  23. maybe its is really the webserver.. someones have locks like that. I have one where the lock don't allow me to send >200 per day.. :( that is really sad.. with the sleep, the timeout will show easyer (i think), so, if it works that way, your process is broking.. do you test the same script at another webserver? try it, without the sleep.. D.Soul
  24. I know just one answer to it. Using a aux.php page, like ajax or iframe. When you change, the onchange="" active a js function, this one will call the page with the php code to execute at iframe/ajax. :) D.Soul
  25. Did you try to use ` instead of ' ? Or you aways can use \". Like: "SELECT * FROM pharmacy WHERE ExpLeft=`$ExpLef` ORDER BY id ASC LIMIT $start, $display" "SELECT * FROM pharmacy WHERE ExpLeft=\"$ExpLef\" ORDER BY id ASC LIMIT $start, $display" Sometimes, when the mysql get a error, if some of columns doesn't existe, it will not generate a waring.. Take a note, use a $var to your sql, and use the mysql_query full.. like: [code]$sql = "SELECT * FROM pharmacy WHERE ExpLeft=\"$ExpLef\" ORDER BY id ASC LIMIT $start, $display" ; $query = mysql_query ( $sql , $conn ) or die ( $sql .'<br>'. mysql_error() )[/code] Try it, will show you the string its trying to execute and the mysql real error. :) D.Soul
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.