cyberalexxx
Membros-
Total de itens
2.500 -
Registro em
-
Última visita
Tudo que cyberalexxx postou
-
Eu sempre posiciono no registro 0, e não esqueça do order by campo DESC Select * from tabela order by campo desc LIMIT 0, 3
-
Para edição de um unico arquivo, recomendo SoundForge, para retirar ruidos voce ira encontras bons plugins tanto DirectX quanto VST Para edição de audio Multipista dai eu recomendo o Sonar ou o Cubase Pra video seria legal você migrar para o Adobe Premiere ou FinalCut
-
Uma solução seria colocar o caminho do banco em uma variavel application no global.asa, ai no include ao invés do caminho voce coloca application("caminho")
-
Quando voce fala que da erro, é erro no script (se for poste o erro e alinha) ou as mensagens de erros programadas na index (qual mensagem esta aparecendo)??
-
Poste o seu código e o erro que esta dando, ai podemos ajudar!
-
Voce já tinha criado um tópico para isso!!! http://scriptbrasil.com.br/forum/index.php?showtopic=82976 voce viu o código que eu postei pra fazer a conta que você quer: Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Open arquivo largura = Jpeg.OriginalWidth if largura <> 145 then if largura > 145 then indice = largura/145 Jpeg.Width = 145 Jpeg.Height = Jpeg.OriginalHeight / indice else indice = 145/largura Jpeg.Width = 145 Jpeg.Height = Jpeg.OriginalHeight * indice end if Jpeg.Save arquivo end if Jpeg.close
-
To Querendo Renomear O Arquivo De De Foto No Upload
pergunta respondeu ao fernando2dias de cyberalexxx em ASP
tenta salvar assim: File.SaveAs Path & "\" & nome & "." & file.filetype -
To Querendo Renomear O Arquivo De De Foto No Upload
pergunta respondeu ao fernando2dias de cyberalexxx em ASP
mude a linha: File.SaveAs Path & "\" & File.Filename para: File.SaveAs Path & "\" & nome -
Seria selecionar todos os registros que tenham a maior data, usando apenas uma instrução sql??? testa assim (é só um chute): Select * from tabela where data=max(data) Se não der certo faz um Select para pegar o maior valor e depois outro para resgatar os registros.
-
Exemplos de conexão para diversos BDs http://www.connectionstrings.com/
-
Eu Poderia até colocar um exemplo, mais para voce entender melhor vou sugerir os seguintes tutoriais: Conexão: http://www.aspbrasil.com.br/conteudo/detal...Secao=TUTORIAIS Inserir valores no banco: http://www.aspbrasil.com.br/conteudo/detal...Secao=tutoriais
-
Primeiro passo: Verificar no servidor se existe suporte para algum componente de upload, sabendo isso fica mais facil.
-
No MySQL voce não conseguirá fazer paginação usando as propriedades do recordset, voce tera que fazer na unha usando a propriedade LIMIT quando for fazer o SELECT no banco. não tenho nenhum exemplo meu agora comigo, mais vai um ai retirado da WEB (todos os direitos ao devido autor) <% '# Written by snowboardr on www.pscode.com '# If you like this code, please comment on planet source code! '# And vote if its worthy enough? '# Who doesn't want those awesome .net charts? '# Installing MySQL :: tutorial available at PSC: '# http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=7739&lngWId=4 '# Dim sDatabaseConnection sDatabaseConnection = "DRIVER={MySQL ODBC 3.51 Driver};"_ & "SERVER=localhost;"_ & "DATABASE=test;"_ & "UID=root;PWD=; OPTION=35;" %> <html> <head> <title>Paging</title> <style type="text/css"> <!-- .sgrey { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #999999; text-decoration: none; } .elinks { color: #003399; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; } --> </style> </head> <body> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1"> <tr bgcolor="#EEEEEE"> <td colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="left"><font color="#333333" size="2" face="Verdana, Arial, Helvetica, sans-serif" class="bluet"><strong>New Projects</strong></font></div> <div align="center"></div></td> </tr> </table> <div align="center"></div> <div align="left"></div> <div align="center"> </div></td> </tr> <tr bgcolor="#CCCCCC" class="greyt"> <td colspan="4"><img width="0" height="0"></td> </tr> <tr bgcolor="#EEEEEE" class="greyt"> <td colspan="4"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif">Project Subject </font> <div align="center"></div></td> </tr> <% & #39;############################################################################ ########## '# COUNT RECORDS FIRST & #39;############################################################################ ########## Dim sQueryStatus Dim intRecordsPerPage Dim intPages Dim sLimitPart 'LIMIT 0,1 -----> LIMIT {START_NUMBER,RECORDS_PERPAGE} Dim sStartQuery Dim sMaxStart Dim sProjectPrev Dim sProjectNext intRecordsPerPage = 10 'How many records to show per page Dim sqlProjectCount Dim connCount, rsCount Dim sProjectCount sqlProjectCount = "SELECT COUNT(pid) FROM projects" 'Response.Write(sqlProjectCount) Set connCount = Server.Createobject("ADODB.Connection") Set rsCount = Server.CreateObject("ADODB.Recordset") connCount.open sDatabaseConnection Set rsCount = connCount.Execute(sqlProjectCount) If rsCount.eof then sProjectCount = 0 Else sProjectCount = rsCount.Fields(0) 'number of records End If connCount.close set connCount=nothing set rsCount=nothing 'Response.Write(sProjectCount) & #39;############################################################################ ########## '# SIMPLE PAGING & #39;############################################################################ ########## sStartQuery = Request.QueryString("start") 'Get total pages If intRecordsPerPage < sProjectCount then intPages = sProjectCount / intRecordsPerPage End If 'here we modify the number if it has a decimal, a better solution maybe would be to use formatnumber Dim instrIntPages instrIntPages = Instr(intPages,".") 'If after the decimal there is a 0 then we need to add a page If instrIntPages > 0 then intPages = Left(intPages,instrIntPages) + 1 End If 'Lets create the limit for the sql 'LIMIT 0,1 -----> LIMIT {START_NUMBER,RECORDS_PERPAGE} If sStartQuery <> "" AND isNumeric(sStartQuery) then sLimitPart = "LIMIT " & sStartQuery & "," & intRecordsPerPage Else sLimitPart = "LIMIT " & "0," & intRecordsPerPage End If 'Lets figure out what the max start number is sMaxStart = (intPages*intRecordsPerPage)-intRecordsPerPage If sStartQuery <> "" AND isNumeric(sStartQuery) then sStartQuery = CINT(sStartQuery) Else sStartQuery = 0 End If 'Now lets create our previous / next buttons and disable them if they are not needed. If sMaxStart < 0 then sMaxStart = 0 If sStartQuery = "" or sStartQuery = "0" then 'PREVIOUS DISABLED sProjectPrev = "<a span class='sgrey'>Previous</span>" ElseIf sStartQuery > 0 then 'PREVIOUS ENABLED sProjectPrev = "<a class='elinks' href='?start=" & sStartQuery - intRecordsPerPage & "'>Previous</span>" End If 'Next If sMaxStart = sStartQuery then 'NEXT DISABLED sProjectNext = "<a span class='sgrey'>Next</span>" ElseIf sStartQuery < sMaxStart then 'NEXT ENABLED sProjectNext= "<a class='elinks' href='?start=" & sStartQuery + intRecordsPerPage & "'>Next</span>" End If 'Now its time to select our projects Dim connP, rsP Dim sqlProjects Dim sPid Dim sSubject sqlProjects = "SELECT "_ & "pid,"_ & "psubject "_ & " FROM projects ORDER by pid ASC " & sLimitPart 'Response.Write(sqlProjects) Set connP = Server.Createobject("ADODB.Connection") Set rsP = Server.CreateObject("ADODB.Recordset") connP.open sDatabaseConnection Set rsP = connP.Execute(sqlProjects) If NOT rsP.eof then Do while not rsP.eof sPid = rsP("pid") sSubject = rsP("psubject") %> <tr> <td colspan="4" bgcolor="#FFFFFF"><font color="#003366" size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=sSubject%></font></td> </tr> <% rsP.movenext loop %> <tr> <td colspan="4" bgcolor="#FFFFFF" class="sgrey"><div align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#EEEEEE"> <td width="29%" height="23"> <div align="left" class="greyt">Total: <%=sProjectCount%></div></td> <td width="71%"><div align="center"> <% Dim queryPageOn queryPageOn = Request.QueryString("page") If NOT isNumeric(queryPageOn) AND NOT sStartQuery = "0" then queryPageOn = "1" End If queryPageOn = CINT(queryPageOn) Response.Write(sProjectPrev & " ") '# Create Page Numbers & Links Dim iPages, iPagesTemp For iPages=1 to intPages iPagesTemp = iPages-1 If NOT queryPageOn=iPages then Response.write "<a href='?start=" & iPagesTemp*intRecordsPerPage & "&page="& iPages & "' class='elinks'>" & iPages & "</a> " Else Response.write "<span class='greyt'>[</span><a href='?start=" & iPagesTemp*intRecordsPerPage & "&page="& iPages & "' class='elinks'>" & iPages & "</a><span class='greyt'>]</span> " End If Next Response.Write(" "&sProjectNext) %> </div></td> </tr> </table> </div></td> </tr> <%Else%> <tr> <td bgcolor="#FFFFFF" class="sred"> <font color="#FF0000" face="Verdana, Arial, Helvetica, sans-serif">No projects under this category at this time. </font></td> <td width="22%" bgcolor="#FFFFFF"><div align="center"></div></td> <td bgcolor="#FFFFFF"> </td> </tr> <%End IF connP.close set connP=nothing set rsP=nothing & #39;############################################################################ ############# %> </table> </body> </html>
-
vamos fazer uma nova função: function formatadata(data) formatadata = right("0" & day(data),2) & "/" & right("0" & month(data),2) & "/" & year(data) end function 'usando a função, se tratando de um banco de dados response.write formatadata(rs("data"))
-
Um exemplo meu: <% Set FSO = Server.CreateObject("Scripting.FileSystemObject") if request("botao") = "gravar" then novotexto = request("texto") Set novoarquivo = FSO.OpenTextFile("c:\teste\texto.txt",2) novoarquivo.Write(novotexto) novoarquivo.close end if Set arquivo = FSO.OpenTextFile("c:\teste\texto.txt",1) Response.Write "Conteudo do arquivo<BR>" textorecuperado = arquivo.Readall Response.Write "<Form action='" & request.servervariables("script_name") & "'>" Response.Write "<textarea lines=10 rows='20' cols='60' name='texto'>" & textorecuperado & "</textarea><br>" Response.Write "<input type=submit name='botao' value='gravar'>" Response.Write "</form>" arquivo.close Set FSO = nothing %>
-
Da uma olhada nesse tutorial sobre paginação, é bem simples: http://www.aspbrasil.com.br/conteudo/detal...Secao=tutoriais
-
Tenta assim: Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Open arquivo largura = Jpeg.OriginalWidth if largura <> 145 then if largura > 145 then indice = largura/145 Jpeg.Width = 145 Jpeg.Height = Jpeg.OriginalHeight / indice else indice = 145/largura Jpeg.Width = 145 Jpeg.Height = Jpeg.OriginalHeight * indice end if Jpeg.Save arquivo end if Jpeg.close
-
aqui tem um exemplo que retirei de um sistema meu, onde eu fixei a largura em 80, só que estou usando ASPJPEG: caminho = ".\produtos" Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Open trim(server.mappath(caminho)) & "\" & mid(trim(nome_foto),2,100) largura = Jpeg.OriginalWidth if largura > 80 then indice = largura/80 Jpeg.Width = Jpeg.OriginalWidth / indice Jpeg.Height = Jpeg.OriginalHeight / indice end if Jpeg.Save trim(server.mappath(caminho)) & "\mini_" & mid(trim(nome_foto),2,100) Jpeg.close
-
Realmente ainda se usa bastante frame, eu particularmente tenho usado bastante CSS-P (CSS Positioning) de uma pesquisada que é bem interessante.
-
Na verdade chega sim, mais vai para a pasta de lixo eletronico, solução: quando identificar o remetente colocar um nome além do email, ex: SeuOjetodeEmail.from = "seu@email.com.br <Seu Nome>"
-
Da pra fazer usando o componente ASPJPEG: http://www.aspjpeg.com/
-
para apagar é com FSO como a andrei_sp postou, agora para realizar essa rotinha quando a pagina for finalizada, você tera que incluir a rotina no Session_OnEnd()
-
Como a mesma pagina edita e grava as alterações eu coloquei uma verificação para saber e o botão gravar foi clicado, caso ele tenha sido clicado as alterações no arquivo são gravadas, caso contrario é apenas aberto o arquivo para edição.
-
A função Date() retorna a data do servidor e não da maquina do usuário.
-
no seu Select voce especifica que não pode ter sorteado no campo que você criou. ComandoSQL = "SELECT top "&peso&" * FROM produtos where nomedocampo<>'sorteado'"