
bigodines
Membros-
Total de itens
316 -
Registro em
-
Última visita
Tudo que bigodines postou
-
você leu os códigos?
-
tenta isso: <META http-equiv="Refresh" content="3"> <?php $str=exec("ping -c 1 -w 1 192.168.1.216",$a,$a1); print "<table>"; if(strlen($str)>1){ print"<tr><td bgcolor='#fff000'>vivo</td></tr>"; }else{ print"<tr><td bgcolor='#000000'>morto</td></tr>"; } print "</table> "; ?>
-
Não tem como mandar 'parte do programa' porque o programa só funciona inteiro... Outra coisa, alguém já tem experiência com esse tipo de transação? Qual a melhor forma de receber o pagamento?
-
Olá pessoal, gostaria da opinião de vocês para uma prática que adotarei. Estou desenvolvendo um módulo para um cliente americano. Ele me ofereceu uma boa quantia em dinheiro e eu achei que vale a pena. O módulo está quase pronto, mas não foi assinado nenhum contrato e creio que isso seja inviável devido à pressa com que o projeto precisa ser implementado. Como não terei garantias de pagamento, eu penso em implantar um 'furo' no meu programa para que, caso ele não honre o acordo, eu 'sequestre' a base de dados dele (drope e mande para um e-mail). Eu sei que isso não é recomendável mas foi o único jeito que eu pensei para ter garantia de pagamento. Alguém tem alguma idéia melhor?
-
TIMESTAMP não precisa passar valor, ele vai atualizar sozinho sempre que um ítem for inserido ou alterado com o tempo em que foi feita a operação.. acho que o erro é esse.. você tá tentando informar esse dado.
-
http://www.phpbrasil.com/articles/article.php/id/222 meus 2 centavos...
-
clareou tua mente um pouco?
-
tente isso. (foi trocado o nome do arquivo para .php e o fechamento da tag php é ?> não >? PS: Teu servidor suprota php?
-
acho q c tem q saber o protocolo que cada operadora tem pras mensagens...
-
É mais fácil você dizer o que você quer.
-
tah.. então a unica diferença é q os LÓGICOS vão comparar a variável inteira...
-
você tah sem permissao no arquivo cara. arruma isso q deve funcionar o resto
-
Formulário Com Carregamento Da 'cidade'
uma questão respondeu bigodines em Ajax, JavaScript, XML, DOM
cara, a lógica é essa: você vai fazer uma matriz bidimensional e cada estado vai ser uma linha e as cidades vao ser as colunas. Vou postar um exemplo garimpado da net para ilustrar. <script language="javascript"> function somethingselected(oList){ var curform = oList.form; // get the containing form clearCombobox(curform.list2); // clear the downstream list var newvalue = oList.name + "=" + oList.options[oList.selectedIndex].value; fillCombobox(curform.list2, newvalue); // fill the downstream list } </script> <script language="javascript"><!-- function comboItemSelected(oList1,oList2){ if (oList2!=null){ clearComboOrList(oList2); if (oList1.selectedIndex == -1){ oList2.options[oList2.options.length] = new Option('Please make a selection from the list', ''); } else { fillCombobox(oList2, oList1.name + '=' + oList1.options[oList1.selectedIndex].value); } } } function listboxItemSelected(oList1,oList2){ if (oList2!=null){ clearComboOrList(oList2); if (oList1.selectedIndex == -1){ oList2.options[oList2.options.length] = new Option('Please make a selection from the list', ''); } else { fillListbox(oList2, oList1.name + '=' + oList1.options[oList1.selectedIndex].value); } } } function clearComboOrList(oList){ for (var i = oList.options.length - 1; i >= 0; i--){ oList.options[i] = null; } oList.selectedIndex = -1; if (oList.onchange) oList.onchange(); } function fillCombobox(oList, vValue){ if (vValue != '') { if (assocArray[vValue]){ oList.options[0] = new Option('Please make a selection', ''); var arrX = assocArray[vValue]; for (var i = 0; i < arrX.length; i = i + 2){ if (arrX[i] != 'EOF') oList.options[oList.options.length] = new Option(arrX[i + 1], arrX[i]); } if (oList.options.length == 1){ oList.selectedIndex=0; if (oList.onchange) oList.onchange(); } } else { oList.options[0] = new Option('None found', ''); } } } function fillListbox(oList, vValue){ if (vValue != '') { if (assocArray[vValue]){ var arrX = assocArray[vValue]; for (var i = 0; i < arrX.length; i = i + 2){ if (arrX[i] != 'EOF') oList.options[oList.options.length] = new Option(arrX[i + 1], arrX[i]); } if (oList.options.length == 1){ oList.selectedIndex=0; if (oList.onchange) oList.onchange(); } } else { oList.options[0] = new Option('None found', ''); } } } //--></script> <body> <form name="lala" action=""> <select name='list1' size='1' style='width:200;' onchange='comboItemSelected(this,this.form.list2);'> <option>Please make a selection</option> <option value="1389">Algodata Infosystems</option> <option value="0877">Binnet & Hardley</option> <option value="1622">Five Lakes Publishing</option> <option value="9901">GGG&G</option> <option value="9999">Lucerne Publishing</option> <option value="0736">New Moon Books</option> <option value="1756">Ramona Publishers</option> <option value="9952">Scootney Books</option> </select> <select name='list2' size='1' style='width:360;'> <option>Please select something from the first list</option> <script language='javascript'> if (!assocArray) var assocArray = new Object(); assocArray["list1=0736"] = new Array( "PS7777","Emotional Security: A New Algorithm", "PS2091","Is Anger the Enemy?", "PS2106","Life Without Fear", "PS3333","Prolonged Data Deprivation: Four Case Studies", "BU2075","You Can Combat Computer Stress!", "EOF"); assocArray["list1=0877"] = new Array( "PS1372","Computer Phobic AND Non-Phobic Individuals: Behavior Variations", "TC4203","Fifty Years in Buckingham Palace Kitchens", "TC3218","Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean", "MC2222","Silicon Valley Gastronomic Treats", "TC7777","Sushi, Anyone?", "MC3021","The Gourmet Microwave", "MC3026","The Psychology of Computer Cooking", "EOF"); assocArray["list1=1389"] = new Array( "PC1035","But Is It User Friendly?", "BU1111","Cooking with Computers: Surreptitious Balance Sheets", "PC9999","Net Etiquette", "PC8888","Secrets of Silicon Valley", "BU7832","Straight Talk About Computers", "BU1032","The Busy Executive's Database Guide", "EOF"); </script> </select> </form> tah aí o bixo. Vai do seu talento alterar e tornar dinâmico (mas se precisar de ajuda é só falar porque já fiz isso hehhe) -
w3schools (inglês) bem fácil de entender...
-
essa história do OR e XOR (se PHP for como C) é comparação bit a bit Por exemplo: OR: 1 or 0 = 1 1 or 1 = 1 0 or 0 = 0 <= (o OR só retorna falso quando os dois forem falsos) XOR: 1 xor 1 = 0 <= 1 xor 0 = 1 0 xor 0 = 0 <= (o XOR retorna falso quando os dois valores são iguais) Nâo sei se esse é o método adotado em php pois não vejo utilidade para comparação bit a bit em uma linguagem de alto nivel. No manual diz q é para verificar se um bit de um inteiro está ligado.. mas deve haver métodos melhores para fazer isso. Por exemplo: se você comparar 5 OR 3 Vamos converter pra binário de 8 bits (exemlo) 00000101 = 5 00000011 = 3 ----------- 00000111 = 5 OR 3 = 7 hehe acho que confundi ainda mais =P Mas a idéia é essa... (existem mais comparadores bit a bit do que OR e XOR existe o AND, NOT, e os deslocadores de bit para a esquerda e para a direita).
-
não precisa <?echo $chave; ?> porque você já tá com a tag aberta. tenta só com {$chave}
-
cara... use para conectar: mysql_connect("localhost","usuario","senha"); mysql_select_db("base"); não usa mysql_db_query, usa mysql_query($query); $result = mysql_query($query); testa aí
-
cra.. tua linha 129 e 130 fazem a mesma coisa.
-
Acho que a consulta fica normal, o mysql se vira com os índices
-
sem você postar o código fica difícil
-
putz. tenta assim então: $query = "SELECT * FROM derock_imagens WHERE id=$artigo_imgindex_id"; $result = mysql_query($dbname, $query, $link); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) { $artigo_imgindex_arquivo = $row[arquivo]; } if ($artigo_imgindex_arquivo == '') { print (" "); } else { $imgindex_completo = $DOCUMENT_ROOT."/img/".$artigo_imgindex_arquivo; if (file_exists($imgindex_completo)) { print ("<IMG SRC=\"http://www.derock.com.br/img_mini.php?arquivo=img/"); print ("$artigo_imgindex_arquivo"); print ("&h=120&w=180\" BORDER=\"0\" ALIGN=\"RIGHT\"><BR><BR>"); } } else { print ("Não há fotos."); }
-
O erro n pode estar no sql?
-
eu sei. <script language="javascript"> function limpaCombo(oList){ for (var i = oList.options.length - 1; i >= 0; i--){ oList.options[i] = null; } oList.selectedIndex = -1; } </script> espero ter ajudado.
-
Cara.. um erro aqui: tá faltando aspas... faça assim: $query = mysql_query("SELECT id FROM clientes WHERE dominio='$dominio'"); Sempre lembrando do perigo do SQL Injection nesse código.. seria interessante validar essa variável antes de usá-la... Agora quando ao mysql_result(): como é só um campo... você pode usar mysql_result($var,0,0) vai retornar o primeiro id.