Ir para conteúdo
Fórum Script Brasil

Vinicius_Rodrigues

Membros
  • Total de itens

    10
  • Registro em

  • Última visita

Tudo que Vinicius_Rodrigues postou

  1. obrigadoo!! eu sabia que usaria substring, mas não sabia muito bem como utiliza-la. obrigado! ____________________________ Edit: Bom, o negocio piorou ... tenho logs no formato "mail.google.com:443" ao qual não tem http:// no começo , e ele esta cortando o log inteiro. tem alguma forma , combinação que deixe ele "mail.google.com" e conserve também as urls com o formato " http:// " ?? pode ficar também assim , Ex: 2 log ( http://facebook.com/joao/123x31.html e mail.google.com:443 ) . uma query que deixasse http://facebook.com e mail.google.com ou facebook.com e mail.google.com to ralando aqui e esta difícil.. por favor me iluminem, não precisa dar pronto, apenas idéias, valeu!!
  2. Olá, estou com um probleminha...acredito que possam me ajudar aqui. seguinte: tenho uma tabela, com alguns logs, e estou fazendo uma consulta nele, porem, em um dos campos ( character varying ) que fica a url, exemplo ( http://facebook.com/joao/123x31.html).... e na consulta (query de preferecia ) eu preciso que fique apenas (http://facebook.com). já pesquesei um monte, mas não encontro nessas condições , utilizando query. É APENAS CONSULTA, não quero modificar na tabela.. valeu.
  3. Muito obrigado, vou usar esse php que voce me passou xD agradeço.
  4. Olá, novamente venho aqui para tentar acabar com uma duvida que eu já não tenho mais solução. bom, eu tenho uma pagina em que preciso colocar 2 caixas para data, e um botão a frente que quando clica, aparece um mini calendario. até ai tudo bem, mas quando eu clico, aparece metade do calendario , faltando os dias; só aparece o menuzinho e os dias da semana , mas faltam os dias. <!-- BEGIN body --> <link rel="stylesheet" type="text/css" href="./expressoAdmin1_2/templates/default/accesslogproxy.css"> <p> <div align="center"> <table border="0" width="100%"> <tr> <td align="left" width="25%"> <input type="button" value="{lang_back}" onClick="document.location.href='{back_url}'"> &lt;script type="text/javascript"> // construindo o calendário function popdate(obj,div,tam,ddd) { if (ddd) { day = "" mmonth = "" ano = "" c = 1 char = "" for (s=0;s<parseInt(ddd.length);s++) { char = ddd.substr(s,1) if (char == "/") { c++; s++; char = ddd.substr(s,1); } if (c==1) day += char if (c==2) mmonth += char if (c==3) ano += char } ddd = mmonth + "/" + day + "/" + ano } if(!ddd) {today = new Date()} else {today = new Date(ddd)} date_Form = eval (obj) if (date_Form.value == "") { date_Form = new Date()} else {date_Form = new Date(date_Form.value)} ano = today.getFullYear(); mmonth = today.getMonth (); day = today.toString ().substr (8,2) umonth = new Array ("Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro") days_Feb = (!(ano % 4) ? 29 : 28) days = new Array (31, days_Feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) if ((mmonth < 0) || (mmonth > 11)) alert(mmonth) if ((mmonth - 1) == -1) {month_prior = 11; year_prior = ano - 1} else {month_prior = mmonth - 1; year_prior = ano} if ((mmonth + 1) == 12) {month_next = 0; year_next = ano + 1} else {month_next = mmonth + 1; year_next = ano} txt = "<table bgcolor='#efefff' style='border:solid #330099; border-width:1' cellspacing='4' cellpadding='1' border='3' width='"+tam+"' height='"+tam+"'>" txt += "<tr bgcolor=#330099'><td colspan='7' align='center'><table border='0' cellpadding='0' width='100%' bgcolor='#FFFFFF'><tr>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+((mmonth+1).toString() +"/01/"+(ano-1).toString())+"') class='Cabecalho_Calendario' title='Ano Anterior'><<</a></td>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+( "01/" + (month_prior+1).toString() + "/" + year_prior.toString())+"') class='Cabecalho_Calendario' title='Mês Anterior'><</a></td>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+( "01/" + (month_next+1).toString() + "/" + year_next.toString())+"') class='Cabecalho_Calendario' title='Próximo Mês'>></a></td>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+((mmonth+1).toString() +"/01/"+(ano+1).toString())+"') class='Cabecalho_Calendario' title='Próximo Ano'>>></a></td>" txt += "<td width=20% align=right><a href=java script:force_close('"+div+"') class='Cabecalho_Calendario' title='Fechar Calendário'><b>X</b></a></td></tr></table></td></tr>" txt += "<tr><td colspan='7' align='right' bgcolor='#ccccff' class='mes'><a href=java script:pop_year('"+obj+"','"+div+"','"+tam+"','" + (mmonth+1) + "') class='mes'>" + ano.toString() + "</a>" txt += " <a href=java script:pop_month('"+obj+"','"+div+"','"+tam+"','" + ano + "') class='mes'>" + umonth[mmonth] + "</a> <div id='popd' style='position:absolute'></div></td></tr>" txt += "<tr bgcolor='#330099'><td width='100%' height='1%' class='dia' align=center><b>Dom</b></td><td width='14%' height='1%' class='dia' align=center><b>Seg</b></td><td width='14%' height='1%' class='dia' align=center><b>Ter</b></td><td width='14%' height='1%' class='dia' align=center><b>Qua</b></td><td width='14%' height='1%' class='dia' align=center><b>Qui</b></td><td width='14%' height='1%' class='dia' align=center><b>Sex<b></td><td width='14%' height='1%' class='dia' align=center><b>Sab</b></td></tr>" today1 = new Date((mmonth+1).toString() +"/01/"+ano.toString()); diainicio = today1.getDay () + 1; week = d = 1 start = false; for (n=1;n<= 42;n++) { if (week == 1) txt += "<tr bgcolor='#330099' align=center position:absolute>" if (week==diainicio) {start = true} if (d > days[mmonth]) {start=false} if (start) { dat = new Date((mmonth+1).toString() + "/" + d + "/" + ano.toString()) day_dat = dat.toString().substr(0,10) day_today = date_Form.toString().substr(0,10) year_dat = dat.getFullYear () year_today = date_Form.getFullYear () colorcell = ((day_dat == day_today) && (year_dat == year_today) ? " bgcolor='#FFCC00' " : "" ) txt += "<td"+colorcell+" align=center><a href=java script:block('"+ d + "/" + (mmonth+1).toString() + "/" + ano.toString() +"','"+ obj +"','" + div +"') class='data'>"+ d.toString() + "</a></td>" d ++ } else { txt += "<td class='data' align=center> </td>" } week ++ if (week == 8) { week = 1; txt += "</tr>"} } txt += "</table>" div2 = eval (div) div2.innerHTML = txt } // função para exibir a janela com os meses function pop_month(obj, div, tam, ano) { txt = "<table bgcolor='#CCCCFF' border='5' width=auto>" for (n = 0; n < 12; n++) { txt += "<tr><td align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+("01/" + (n+1).toString() + "/" + ano.toString())+"')>" + umonth[n] +"</a></td></tr>" } txt += "</table>" popd.innerHTML = txt } // função para exibir a janela com os anos function pop_year(obj, div, tam, umonth) { txt = "<table bgcolor='#CCCCFF' border='5' width=auto>" l = 1 for (n=1991; n<2012; n++) { if (l == 1) txt += "<tr>" txt += "<td align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+(umonth.toString () +"/01/" + n) +"')>" + n + "</a></td>" l++ if (l == 4) {txt += "</tr>"; l = 1 } } txt += "</tr></table>" popd.innerHTML = txt } // função para fechar o calendário function force_close(div) { div2 = eval (div); div2.innerHTML = ''} // função para fechar o calendário e setar a data no campo de data associado function block(data, obj, div) { force_close (div) obj2 = eval(obj) obj2.value = data } </script> <!-- o css abaixo é apenas para dar uma aparência melhor para o calendário. você pode mudá-lo a sua maneira insira o código abaixo entre as tags <HEAD> </HEAD> de sua página --> <style> .dia {font-family: helvetica, arial; font-size: 8pt; color: #FFFFFF} .data {font-family: helvetica, arial; font-size: 2pt; color=#330099} .mes {font-family: helvetica, arial; font-size: 8pt} .Cabecalho_Calendario {font-family: helvetica, arial; font-size: 10pt; color: #000000; text-decoration:none; font-weight:bold} </style> <!-- insira o código abaixo dentro das tags <BODY> </BODY> de sua página --> <form name='form1'> <!-- data 1 --> Data Inicial: <input NAME="data1" SIZE="10" MAXLENGTH="10" value=""> <input TYPE="button" NAME="btnData1" VALUE="..." Onclick="java script:popdate('document.form1.data1','pop1','150',document.form1.data1.value)"> <span id="pop1" style="position:absolute"></span> <br><br> <!-- data 2 --> Data Final: <input NAME="data2" SIZE="10" MAXLENGTH="10" value=""> <input TYPE="button" NAME="btnData2" VALUE="..." Onclick="java script:popdate('document.form1.data2','pop2','150',document.form1.data2.value)"> <!-- na span abaixo aparece o segundo calendario --> <span id="pop2" style="position:absolute" ></span> </form> </td> </tr> </table> </div> <div align="center"> <table width="100%"> <tr bgcolor="{th_bg}" align="center"> <td width="20%">{lang_loginid}</td> <td width="20%">{lang_ip_address}</td> <td width="30%">{lang_login}</td> <td width="30%">{lang_logout}</td> </tr> {rows} <!-- END body --> <!-- BEGIN row --> <tr> <td style="border-bottom:1px solid black">{row_loginid}</td> <td style="border-bottom:1px solid black">{row_ip}</td> <td style="border-bottom:1px solid black">{row_li}</td> <td style="border-bottom:1px solid black">{row_lo}</td> </tr> <!-- END row --> <!-- BEGIN row_empty --> <tr> <td colspan="7" align="center"><font color="red"><b>{message}</b></font></td> </tr> <!-- END row_empty --> <tr> <td> <input type="button" value="{lang_back}" onClick="document.location.href='{back_url}'"> </td> </tr> esse é o codigo da pagina com o calendario, e abaixo o codigo do calendario que eu arrumei em um site. <!-- insira o seguinte código de javascript em sua página. --> &lt;script language='Javascript'> // construindo o calendário function popdate(obj,div,tam,ddd) { if (ddd) { day = "" mmonth = "" ano = "" c = 1 char = "" for (s=0;s<parseInt(ddd.length);s++) { char = ddd.substr(s,1) if (char == "/") { c++; s++; char = ddd.substr(s,1); } if (c==1) day += char if (c==2) mmonth += char if (c==3) ano += char } ddd = mmonth + "/" + day + "/" + ano } if(!ddd) {today = new Date()} else {today = new Date(ddd)} date_Form = eval (obj) if (date_Form.value == "") { date_Form = new Date()} else {date_Form = new Date(date_Form.value)} ano = today.getFullYear(); mmonth = today.getMonth (); day = today.toString ().substr (8,2) umonth = new Array ("Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro") days_Feb = (!(ano % 4) ? 29 : 28) days = new Array (31, days_Feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) if ((mmonth < 0) || (mmonth > 11)) alert(mmonth) if ((mmonth - 1) == -1) {month_prior = 11; year_prior = ano - 1} else {month_prior = mmonth - 1; year_prior = ano} if ((mmonth + 1) == 12) {month_next = 0; year_next = ano + 1} else {month_next = mmonth + 1; year_next = ano} txt = "<table bgcolor='#efefff' style='border:solid #330099; border-width:2' cellspacing='0' cellpadding='3' border='0' width='"+tam+"' height='"+tam*1.1 +"'>" txt += "<tr bgcolor='#FFFFFF'><td colspan='7' align='center'><table border='0' cellpadding='0' width='100%' bgcolor='#FFFFFF'><tr>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+((mmonth+1).toString() +"/01/"+(ano-1).toString())+"') class='Cabecalho_Calendario' title='Ano Anterior'><<</a></td>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+( "01/" + (month_prior+1).toString() + "/" + year_prior.toString())+"') class='Cabecalho_Calendario' title='Mês Anterior'><</a></td>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+( "01/" + (month_next+1).toString() + "/" + year_next.toString())+"') class='Cabecalho_Calendario' title='Próximo Mês'>></a></td>" txt += "<td width=20% align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+((mmonth+1).toString() +"/01/"+(ano+1).toString())+"') class='Cabecalho_Calendario' title='Próximo Ano'>>></a></td>" txt += "<td width=20% align=right><a href=java script:force_close('"+div+"') class='Cabecalho_Calendario' title='Fechar Calendário'><b>X</b></a></td></tr></table></td></tr>" txt += "<tr><td colspan='7' align='right' bgcolor='#ccccff' class='mes'><a href=java script:pop_year('"+obj+"','"+div+"','"+tam+"','" + (mmonth+1) + "') class='mes'>" + ano.toString() + "</a>" txt += " <a href=java script:pop_month('"+obj+"','"+div+"','"+tam+"','" + ano + "') class='mes'>" + umonth[mmonth] + "</a> <div id='popd' style='position:absolute'></div></td></tr>" txt += "<tr bgcolor='#330099'><td width='14%' class='dia' align=center><b>Dom</b></td><td width='14%' class='dia' align=center><b>Seg</b></td><td width='14%' class='dia' align=center><b>Ter</b></td><td width='14%' class='dia' align=center><b>Qua</b></td><td width='14%' class='dia' align=center><b>Qui</b></td><td width='14%' class='dia' align=center><b>Sex<b></td><td width='14%' class='dia' align=center><b>Sab</b></td></tr>" today1 = new Date((mmonth+1).toString() +"/01/"+ano.toString()); diainicio = today1.getDay () + 1; week = d = 1 start = false; for (n=1;n<= 42;n++) { if (week == 1) txt += "<tr bgcolor='#efefff' align=center>" if (week==diainicio) {start = true} if (d > days[mmonth]) {start=false} if (start) { dat = new Date((mmonth+1).toString() + "/" + d + "/" + ano.toString()) day_dat = dat.toString().substr(0,10) day_today = date_Form.toString().substr(0,10) year_dat = dat.getFullYear () year_today = date_Form.getFullYear () colorcell = ((day_dat == day_today) && (year_dat == year_today) ? " bgcolor='#FFCC00' " : "" ) txt += "<td"+colorcell+" align=center><a href=java script:block('"+ d + "/" + (mmonth+1).toString() + "/" + ano.toString() +"','"+ obj +"','" + div +"') class='data'>"+ d.toString() + "</a></td>" d ++ } else { txt += "<td class='data' align=center> </td>" } week ++ if (week == 8) { week = 1; txt += "</tr>"} } txt += "</table>" div2 = eval (div) div2.innerHTML = txt } // função para exibir a janela com os meses function pop_month(obj, div, tam, ano) { txt = "<table bgcolor='#CCCCFF' border='0' width=80>" for (n = 0; n < 12; n++) { txt += "<tr><td align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+("01/" + (n+1).toString() + "/" + ano.toString())+"')>" + umonth[n] +"</a></td></tr>" } txt += "</table>" popd.innerHTML = txt } // função para exibir a janela com os anos function pop_year(obj, div, tam, umonth) { txt = "<table bgcolor='#CCCCFF' border='0' width=160>" l = 1 for (n=1991; n<2012; n++) { if (l == 1) txt += "<tr>" txt += "<td align=center><a href=java script:popdate('"+obj+"','"+div+"','"+tam+"','"+(umonth.toString () +"/01/" + n) +"')>" + n + "</a></td>" l++ if (l == 4) {txt += "</tr>"; l = 1 } } txt += "</tr></table>" popd.innerHTML = txt } // função para fechar o calendário function force_close(div) { div2 = eval (div); div2.innerHTML = ''} // função para fechar o calendário e setar a data no campo de data associado function block(data, obj, div) { force_close (div) obj2 = eval(obj) obj2.value = data } </script> <!-- o css abaixo é apenas para dar uma aparência melhor para o calendário. você pode mudá-lo a sua maneira insira o código abaixo entre as tags <HEAD> </HEAD> de sua página --> <style> .dia {font-family: helvetica, arial; font-size: 8pt; color: #FFFFFF} .data {font-family: helvetica, arial; font-size: 8pt; text-decoration:none; color:#191970} .mes {font-family: helvetica, arial; font-size: 8pt} .Cabecalho_Calendario {font-family: helvetica, arial; font-size: 10pt; color: #000000; text-decoration:none; font-weight:bold} </style> <!-- insira o código abaixo dentro das tags <BODY> </BODY> de sua página --> <form name='form1'> <!-- data 1 --> <input NAME="data1" SIZE="10" MAXLENGTH="10" value=""> <input TYPE="button" NAME="btnData1" VALUE="..." Onclick="java script:popdate('document.form1.data1','pop1','150',document.form1.data1.value)"> <!-- na span abaixo aparece o primeiro calendario. você pode colocar a span abaixo no lugar onde quiser em sua pagina inclusive dentro de uma table para facilitar o posicionamento. Mas lembre-se que quanto mais perto a span estiver do campo de data a ela associada mais fácil será para o usuario associar. --> <span id="pop1" style="position:absolute"></span> <br><br> <!-- data 2 --> <input NAME="data2" SIZE="10" MAXLENGTH="10" value=""> <input TYPE="button" NAME="btnData2" VALUE="..." Onclick="java script:popdate('document.form1.data2','pop2','150',document.form1.data2.value)"> <!-- na span abaixo aparece o segundo calendario --> <span id="pop2" style="position:absolute"></span> <!-- caso queira inserir outros campos de data em sua página certifique-se de substituir corretamente os nomes dos objetos em javascript. EX: o objeto input text será o data3 - ou como você quiser o objeto button será o btnData3 - ou como você quiser nas chamadas das funçoes no evento onClick os nomes deverão referenciar seus respectivos objetos. --> </form> Obrigado desde já.
  5. <?php if (isset($todos)) { <table> ... </table> } <? Creio que voce tem que usar {} no if, não sei se esta certo mas tenta ai :D
  6. Tenta mecher no width:100%; deixando width:auto; Aqui funcionou bem no meu site xD
  7. Precisa ver se seu CSS esta certinho e o caminho das imagens de fundo estão corretos. Hummm, valeu cara, consigui ajustar tudo aqui. Forum ta de parabéns ae, continuem assim xD
  8. A imagem de fundo esta definida na classe toolbar, e ela só aparece no google chrome, e se eu estico colacando width="100%" da na mesma ainda :X veja o codigo da div como esta agora: <div class="toolbar" id="toolbar" style="visibility:hidden"> <table border="0" height="45px" width="100%" cellpadding=0 cellspacing=0><tr> <td width="200" class="logo_expresso"><br></td> <td width="250" align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0">{app_icons}</table> <td width="200" class="logo_expresso2"><div align="right"><br> </div></td> </table> EDIT: AEEEEE CONSIGUI>>> arrumei as larguras todas ficou assim: <div class="toolbar" id="toolbar" style="visibility:hidden"> <table border="0" height="45px" width="100%" cellpadding=0 cellspacing=0><tr> <td width="200" class="logo_expresso"><br></td> <td width="auto" align="center"><table width="auto" border="0" cellpadding="0" cellspacing="0">{app_icons}</table> <td width="200" class="logo_expresso2"><div align="right"><br> </div></td> </table> Ps: porque o fundo ainda fica branco no Explorer e no chrome fica certinho??? (só falta isso @_@ )
  9. Sim, vou postar o link com os 2 arquivos, e a imagem da parte do site http://www.4shared.com/file/OmnvoQRD/NavBar.html
  10. Oii, sou novo no forum e preciso de uma ajudinha, estou desenvolvendo um site e não consigo ajustar uma imagem corretamente. Funcona assim: [iMAGEM1][imagem2][iMAGEM3] era pra ficar assim, a imagem 2 tem 1px de largura e ela se extende até a imagem 3, porem quando eu coloco a imagem 3, aparece apenas a metade dela, meio cortada, agora se eu faço assim: [iMAGEM1][imagem2][iMAGEM1] colocando novamente a imagem 1, a imagem 1 aparece por inteiro. Por favor me ajudem , to quebrando a cabeça aqui. Agradeço desde já. Em CSS: o 1 é a IMAGEM1 e o 2 a IMAGEM3, o 3 a IMAGEM3 .logo_expresso { background: url( ../../../../phpgwapi/templates/pml/images/logo_londrina.png ) no-repeat 0 0px; } .logo_expresso2 { background: url( ../../../../phpgwapi/templates/pml/images/logo_londrina_sombra.jpg ) repeat 0 0px; .toolbar { background: url( ../../../../phpgwapi/templates/pml/images/fundo_topo_londrina.png )repeat 0 0px; } EM PHP <div class="toolbar" id="toolbar" style="visibility:hidden"> <table border="0" height="45px" width="100%" cellpadding=3 cellspacing=0><tr> <td class="logo_expresso">&nbsp;<br></td> <td align="center"> <table width="auto" border="0" cellpadding="0" cellspacing="0">{app_icons}</table> <td class="logo_expresso2">&nbsp;<br></td> </td><td style="padding-left:0px;padding-right:25px" align="right"nowrap> </td></tr></table>
×
×
  • Criar Novo...