
omicron
Membros-
Total de itens
67 -
Registro em
-
Última visita
Tudo que omicron postou
-
cara, num rolo não....
-
e ae galera, to com um pequeno problema, tenho uma tabela com 2000px de largura e quando tento imprimir no IE ele corta quase metade da página, mesmo eu configurando a página como paisagem ele corta quase metade da tabela, se alguém souber o que eu posso fazer fala ae, se é que isso tem solução né...
-
e ae galera, alguém aí sabe se é possível acessar pastas na rede interna por meio de um link, tipo, algo parecido com <a href="\\maquina\pasta">Pasta</a>, se alguém puder me ajudar ae, vlw.........
-
galera, alguém aí conhece algum script de upload que suporte o envio de arquivos na faixa de 30 mb? eu já peguei uns dez scripts tanto de asp como php mas todos eles só suportaram arquivos com no máximo 1 mb e preciso que suporte os arquivos grandes, já alterei o Server.scriptTimeout pra 10000000000000000000000000 e nada......esse é o link: http://www.mag.eti.br/upload/upload.asp, mas de qualquer forma aí vão os scripts: upload.asp <html> <head> <title>Upload de fichier</title> <script language="JavaScript"> <!-- function validar() { var ext = new Array() ext[0] = ".zip"; extensao = document.frmInserir.File1.value; posicao = extensao.indexOf("."); tamanho = extensao.length; extensao = extensao.substring(posicao, tamanho); valida = 0; for (var i = 0; i < ext.length; ++i){ if (ext[i] == extensao){ valida = 1; } } if ((document.frmInserir.File1.value != "") && (valida == 0 )){ alert("A extensão do Arquivo não é valida. Só serão aceitos Arquivos Compactados (.ZIP)"); document.frmInserir.File1.focus(); history.back(); } else { frmInserir.submit() } } //--> </script> </head> <body leftmargin="3" topmargin="3" alink="#004824" link="#004824" vlink="#004824"> <table border=0 cellpadding=0 cellspacing=0 width="79%"> <tr> <td height="21" align="left" valign="top"><b><img src="img/topo_upload.gif" width="450" height="33"></b></td> </tr> </table> <font color="#1E0E4E" size="1" style="font-width:1px"face="Verdana, Arial, Helvetica, sans-serif">Informe no campo abaixo o caminho e o nome do arquivo. Só poderão ser enviados arquivos compactados (.ZIP).</font> <form method="post" ENCTYPE="multipart/form-data" name="frmInserir" id="frmInserir" onSubmit="validar();"> <p align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#1E0E4E" size="2">Arquivo</font></strong><font color="#1E0E4E" size="2"> :</font></font> <input type="file" name="File1"><br><br> <input type="submit" name="Action" value="Upload"> </form> <p align="right"><a href="javascript:history.back()"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" style="font-size:11px">Voltar</font></a></p> </body></HTML> <!---#INCLUDE FILE="upload.inc" ---> <% 'Sauvegarde le fichier 'File1' sur le serveur dans le même répertoire que ce script 'Modifier le FilePath pour le claquer ailleurs If Request.ServerVariables("REQUEST_METHOD") = "POST" Then 'Request method must be "POST" For get the fields Set Fields = GetUpload() FilePath = Server.MapPath("..\upload\") & "\" & Fields("File1").FileName Fields("File1").Value.SaveAs FilePath Set mail = Server.CreateObject("Persits.MailSender") Server.ScriptTimeout = "10000000000000000000000000" Mail.Host = "smtp.hostlocation.com.br" Mail.From = "FTP - MAG" Mail.FromName = "FTP - MAG - Upload" Mail.Subject = "Arquivo enviado para o FTP" Mail.AddAddress "suportemag@mag.eti.br" Mail.AddAddress "edgar@mag.eti.br" Mail.Body = "Este arquivo foi enviado para o FTP: http://www.mag.eti.br/upload/" + Fields("File1").FileName ' Mail.Send' Response.Write("Arquivo enviado com Sucesso.") End If %> upload.inc<script RUNAT=SERVER LANGUAGE=VBSCRIPT> Const IncludeType = 2 'Vous pouvez utiliser ce composant d'upload pourr : ' 1. Uploader de petits fichiers sur le serveur (sauvegarde via les FileSystem object) ' 2. Uploader des fichiers binaires/texte de n'importe quelle taille sur une base de données serveur (RS("BinField") = Upload("FormField").Value) 'restriction de la taille de l'upload Dim UploadSizeLimit '********************************** Méthode GetUpload ********************************** 'Cette fonction lit les champs de formulaires en entrée binaire et les renvoie en tant qu'objet du dictionnaire. Function GetUpload() Dim Result Set Result = Nothing If Request.ServerVariables("REQUEST_METHOD") = "POST" Then 'la méthode REQUEST doit être POST Dim CT, PosB, Boundary, Length, PosE CT = Request.ServerVariables("HTTP_Content_Type") ' lit le header If LCase(Left(CT, 19)) = "multipart/form-data" Then 'qui doit être de type "multipart/form-data" PosB = InStr(LCase(CT), "boundary=") 'Finds boundary If PosB > 0 Then Boundary = Mid(CT, PosB + 9) 'Separetes boundary '****** Erreur sur IE5.01 - doublement des entêtes http PosB = InStr(LCase(CT), "boundary=") If PosB > 0 then 'Patch pour l'erreur IE PosB = InStr(Boundary, ",") If PosB > 0 Then Boundary = Left(Boundary, PosB - 1) end if '****** Erreur sur IE5.01 - doublement des entêtes http Length = CLng(Request.ServerVariables("HTTP_Content_Length")) If "" & UploadSizeLimit <> "" Then UploadSizeLimit = CLng(UploadSizeLimit) If Length > UploadSizeLimit Then Request.BinaryRead (Length) Err.Raise 2, "GetUpload", "Upload size " & FormatNumber(Length, 0) & "B exceeds limit of " & FormatNumber(UploadSizeLimit, 0) & "B" Exit Function End If End If If Length > 0 And Boundary <> "" Then Boundary = "--" & Boundary Dim Head, Binary LINHA 48 -> Binary = Request.BinaryRead(Length) 'lit les données à partir du poste client Set Result = SeparateFields(Binary, Boundary) Binary = Empty 'Mise à jour des variables Else Err.Raise 10, "GetUpload", "longueur nulle ." End If Else Err.Raise 11, "GetUpload", "Pas de fichier joint." End If Else Err.Raise 1, "GetUpload", "Mauvaise méthode de request." End If Set GetUpload = Result End Function '********************************** SeparateFields ********************************** Function SeparateFields(Binary, Boundary) Dim PosOpenBoundary, PosCloseBoundary, PosEndOfHeader, isLastBoundary Dim Fields Boundary = StringToBinary(Boundary) PosOpenBoundary = InStrB(Binary, Boundary) PosCloseBoundary = InStrB(PosOpenBoundary + LenB(Boundary), Binary, Boundary, 0) Set Fields = CreateObject("Scripting.Dictionary") Do While (PosOpenBoundary > 0 And PosCloseBoundary > 0 And Not isLastBoundary) 'Entête et fichier source Dim HeaderContent, FieldContent, bFieldContent 'entêtes Dim Content_Disposition, FormFieldName, SourceFileName, Content_Type 'variable Dim Field, TwoCharsAfterEndBoundary 'Fin de l'entête PosEndOfHeader = InStrB(PosOpenBoundary + Len(Boundary), Binary, StringToBinary(vbCrLf + vbCrLf)) 'Séparation des champs de l'entêter HeaderContent = MidB(Binary, PosOpenBoundary + LenB(Boundary) + 2, PosEndOfHeader - PosOpenBoundary - LenB(Boundary) - 2) 'séparation du contenu bFieldContent = MidB(Binary, (PosEndOfHeader + 4), PosCloseBoundary - (PosEndOfHeader + 4) - 2) 'séparation des champs d'entête de l'entêter GetHeadFields BinaryToString(HeaderContent), Content_Disposition, FormFieldName, SourceFileName, Content_Type 'Creation d'un champs et attribution des paramètres Set Field = CreateUploadField()'See the JS function bellow Set FieldContent = CreateBinaryData(bFieldContent,LenB(bFieldContent)) ' FieldContent.ByteArray = bFieldContent ' FieldContent.Length = LenB(bFieldContent) Field.Name = FormFieldName Field.ContentDisposition = Content_Disposition Field.FilePath = SourceFileName Field.FileName = GetFileName(SourceFileName) Field.ContentType = Content_Type Field.Length = FieldContent.Length Set Field.Value = FieldContent ' response.write "<br>:" & FormFieldName Fields.Add FormFieldName, Field 'Dernière borne ? TwoCharsAfterEndBoundary = BinaryToString(MidB(Binary, PosCloseBoundary + LenB(Boundary), 2)) isLastBoundary = TwoCharsAfterEndBoundary = "--" If Not isLastBoundary Then 'Putain!!! Pas la dernière... on avance jusqu'au champ suivant. PosOpenBoundary = PosCloseBoundary PosCloseBoundary = InStrB(PosOpenBoundary + LenB(Boundary), Binary, Boundary) End If Loop Set SeparateFields = Fields End Function '********************************** Utilities ********************************** 'Separation des champs d'entête de l'entête uploadé Function GetHeadFields(ByVal Head, Content_Disposition, Name, FileName, Content_Type) Content_Disposition = LTrim(SeparateField(Head, "content-disposition:", ";")) Name = (SeparateField(Head, "name=", ";")) 'ltrim If Left(Name, 1) = """" Then Name = Mid(Name, 2, Len(Name) - 2) FileName = (SeparateField(Head, "filename=", ";")) 'ltrim If Left(FileName, 1) = """" Then FileName = Mid(FileName, 2, Len(FileName) - 2) Content_Type = LTrim(SeparateField(Head, "content-type:", ";")) End Function 'Separation du champ entre sStart et sEnd Function SeparateField(From, ByVal sStart, ByVal sEnd) Dim PosB, PosE, sFrom sFrom = LCase(From) PosB = InStr(sFrom, sStart) If PosB > 0 Then PosB = PosB + Len(sStart) PosE = InStr(PosB, sFrom, sEnd) If PosE = 0 Then PosE = InStr(PosB, sFrom, vbCrLf) If PosE = 0 Then PosE = Len(sFrom) + 1 SeparateField = Mid(From, PosB, PosE - PosB) Else SeparateField = Empty End If End Function 'Separation du nom de fichier du chemin Function GetFileName(FullPath) Dim Pos, PosF PosF = 0 For Pos = Len(FullPath) To 1 Step -1 Select Case Mid(FullPath, Pos, 1) Case "/", "\": PosF = Pos + 1: Pos = 0 End Select Next If PosF = 0 Then PosF = 1 GetFileName = Mid(FullPath, PosF) End Function Function BinaryToStringSimple(Binary) Dim I, S For I = 1 To LenB(Binary) S = S & Chr(AscB(MidB(Binary, I, 1))) Next BinaryToStringSimple = S End Function Function BinaryToString(Binary) ' BinaryToString = RSBinaryToString(Binary) ' Exit Function dim cl1, cl2, cl3, pl1, pl2, pl3 Dim L', nullchar cl1 = 1 cl2 = 1 cl3 = 1 L = LenB(Binary) Do While cl1<=L pl3 = pl3 & Chr(AscB(MidB(Binary,cl1,1))) cl1 = cl1 + 1 cl3 = cl3 + 1 if cl3>300 then pl2 = pl2 & pl3 pl3 = "" cl3 = 1 cl2 = cl2 + 1 if cl2>200 then pl1 = pl1 & pl2 pl2 = "" cl2 = 1 End If End If Loop BinaryToString = pl1 & pl2 & pl3 End Function Function RSBinaryToString(xBinary) Dim Binary if vartype(xBinary)=8 then Binary = MultiByteToBinary(xBinary) else Binary = xBinary Dim RS, LBinary Const adLongVarChar = 201 Set RS = CreateObject("ADODB.Recordset") LBinary = LenB(Binary) if LBinary>0 then RS.Fields.Append "mBinary", adLongVarChar, LBinary RS.Open RS.AddNew RS("mBinary").AppendChunk Binary RS.Update RSBinaryToString = RS("mBinary") Else RSBinaryToString = "" End If End Function Function MultiByteToBinary(MultiByte) Dim RS, LMultiByte, Binary Const adLongVarBinary = 205 Set RS = CreateObject("ADODB.Recordset") LMultiByte = LenB(MultiByte) if LMultiByte>0 then RS.Fields.Append "mBinary", adLongVarBinary, LMultiByte RS.Open RS.AddNew RS("mBinary").AppendChunk MultiByte & ChrB(0) RS.Update Binary = RS("mBinary").GetChunk(LMultiByte) End If MultiByteToBinary = Binary End Function Function StringToBinary(String) Dim I, B For I=1 to len(String) B = B & ChrB(Asc(Mid(String,I,1))) Next StringToBinary = B End Function Function vbsSaveAs(FileName, ByteArray) Dim FS, TextStream Set FS = CreateObject("Scripting.FileSystemObject") Set TextStream = FS.CreateTextFile(FileName) TextStream.Write BinaryToString(ByteArray) ' BinaryToString is in upload.inc. TextStream.Close End Function </SCRIPT> <script RUNAT=SERVER LANGUAGE=JSCRIPT> function CreateUploadField(){ return new uf_Init() } function uf_Init(){ this.Name = null this.ContentDisposition = null this.FileName = null this.FilePath = null this.ContentType = null this.Value = null this.Length = null } function CreateBinaryData(Binary, mLength){ return new bin_Init(Binary, mLength) } function bin_Init(Binary, mLength){ this.ByteArray = Binary this.Length = mLength this.String = BinaryToString(Binary) this.SaveAs = jsSaveAs } //function jsBinaryToString(){ // return BinaryToString(this.ByteArray) //}; function jsSaveAs(FileName){ return vbsSaveAs(FileName, this.ByteArray) } //Simulate ByteArray class by JS/VBS - end </SCRIPT> bom, e o erro apresentado foi: se alguém puder me ajudar serei grato pois estou precisando urgente.....
-
até a parte do alert eu sei o problema é como barrar o upload, oou seja, o alerta aparece porém só aparece e o upload é executado normalmente....
-
e ae galera, eu tenho um script de upload em ASP e gostaria que ao clicar no input file (Botão Procurar...) só procurasse por arquivos .ZIP, preciso que se o arquivo não for .ZIP impessa o upload....
-
não é script em java, isso ocorre sempre que se divide a página em frames, o código do site é esse: <html> <head> <title>JMS-AC.COM.BR - JMS Assessoria e Consultoria</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <frameset cols="100%" frameborder="NO" border="0" framespacing="0"> <frame src="index2.htm" name="leftFrame" scrolling="auto" noresize> </frameset> <noframes><body> </body></noframes> </html>
-
consegui já galera no iMasters, e pra quem tb tem essa dúvida o código é esse: <html> <head> <title>Adiciona Tag</title> <script language="JavaScript"> function adicionatag(x) { document.form1.campo1.value += x; } </script> </head> <body> <form name="form1"> <input type="button" onClick="javascript:adicionatag('<strong> </strong>');" value="<strong>"><br><br> <textarea name="campo1"></textarea> </form> </body> </html>
-
num é isso não cara, o esquema é parecido com o fórum, qd você clica no botão B ele insere , é isso que eu quero, adicionar <strong> </strong> na minha textarea....acessa o link que eu passei pra você entender melhor....
-
e ae galera, eu queria saber como posso adicionar um texto numa textarea, eu fiz um só que ao invés de adicionar ele substitui o value pelo que eu quero que adicione....vocês vão entender melhor vendo aqui: http://www.mag.eti.br/Edgar/teste.htm, é isso que eu quero porém ao invés de substituir adicione "<strong></strong>" na textarea.....falou.....
-
ae cara o problema é que o seu windows 98 tem de fazer logon no Windows NT, faz o seguinte: vai no Painel de Controle, em Rede e abre "Clientes para redes Microsoft", vai abrir uma janela e você marca a opção "Efetuar logon no domínio do Windows NT" aí na caixa de texto embaixo você digita o nome do seu domínio e dá ok que o computador estará em sua rede e acessará normalmente a rede.....
-
aecara, dá uma olhada nas propriedades do TCP/IP da placa da sua rede interna e ve se o endereço DNS tá certo......[]
-
ae cara, qual o teu windows??
-
ae cara, eu achei desses dois modelos, seleciona o seu..... HP Officejet 4215 All-in-One: http://h10025.www1.hp.com/ewfrf/wc/softwareList?dlc=pt&tool=softwareCategory&lc=pt&query=officejet%204200&product=351106&cc=br&os=20 HP Officejet 4255 All-in-One http://h10025.www1.hp.com/ewfrf/wc/softwareList?dlc=pt&tool=softwareCategory&lc=pt&product=351125&query=officejet%204200&cc=br&os=20 qualquer coisa fala ae.......[]
-
você precisará usar um programa de proxy sim, e é exatamente por isso que a sua internet ficou lenta......instala esse programa aqui: http://geocities.yahoo.com.br/edgareler/kerio.zip[que é o WinRoute] a instalação e configuração dele são muito simples, depois disso sua internet estará funcionando pros dois pcs....flws....[]
-
Função Randômica Vb Script
pergunta respondeu ao omicron de omicron em Outras Linguagens de Programação
po cara, "random", alguma função que retorne valores numéricos aleatórios..... -
alguém aí conhece alguma função randômica no VB Script??
-
bom, o diraol disse tudo, seja mais direto e claro em suas perguntas....
-
ae cara, eu acho que esse tipo de coisa não é permitida aqui no fórum...cuidado....[]
-
qual é a mensagem???
-
ae Milhouse instala esse programa no computador que distribuirá o velox para a rede: http://geocities.yahoo.com.br/edgareler/kerio.zip [é o WinRoute] a configuração dele é muito simples, é só você escolher a placa de rede correspondente e pronto....flws..... []
-
o administrador tem que habilitar esse usuário pra acessar o nero....
-
e ae galera, seguinte: eu to fazendo o site daqui da empresa em frames e quando eu coloco a minha maq. em 800x600 ele fica normal porém qd eu coloco em 1024x768 ele sai do lugar, daí eu vou no dw, altero a parada e fica normal em 1024 e, qd volto pra 800x600 sai do lugar dnovo....o site é esse: http://www.mag.eti.br/mag_novo/ alguém sb o que fazer???
-
bom, pra ser sincero eu não conheço tal programa mas dá pra fazer uma lista das suas músicas pelo winamp, abre todas elas e salva a lista....dá pra se abrir essa lista com o bloco de notas [ela fica com o formato *.m3u]...flws...[]
-
opa! ó só: dá uma olhada nas opções da internet [Ferramentas -> Opções de Internet] em avançadas, vê se a opção "Usar HTTP 1.1" está marcada....pode ser isto....