Current Directory:
\\10.5.0.10\iis\Sites\goprint2.com\www\
Contents:
Directories:
App_Code
App_Data
App_GlobalResources
App_LocalResources
App_WebReferences
articles
aspnet_client
Bin
common
designer
dillners
images
img
includes
kwikkopy
order_centre
printthree
RadControls
update
WebServices
Files:
about_us.aspx | Download
about_us.aspx.vb | Download
contact_us.aspx | Download
contact_us.aspx.vb | Download
create_user.aspx | Download
create_user.aspx.vb | Download
Default.aspx | Download
Default.aspx.vb | Download
discount.aspx | Download
discount.aspx.vb | Download
domain_activation.aspx | Download
domain_activation.aspx.vb | Download
downloadPD.aspx | Download
downloadPD.aspx.vb | Download
download_error.aspx | Download
download_error.aspx.vb | Download
email_policy.aspx | Download
email_policy.aspx.vb | Download
error_page.aspx | Download
error_page.aspx.vb | Download
faq.aspx | Download
faq.aspx.vb | Download
favicon.ico | Download
FileNotFound.htm | Download
generate_print_driver_step1.aspx | Download
generate_print_driver_step1.aspx.vb | Download
generate_print_driver_step2.aspx | Download
generate_print_driver_step2.aspx.vb | Download
generate_print_driver_step3.aspx | Download
generate_print_driver_step3.aspx.vb | Download
Global.asax | Download
header.fla | Download
header.swf | Download
home.aspx | Download
home.aspx.vb | Download
jsincluding.js | Download
login.aspx | Download
login.aspx.vb | Download
marcelito.txt | Download
packages.aspx | Download
packages.aspx.vb | Download
password_recovery.aspx | Download
password_recovery.aspx.vb | Download
PrintIt.master | Download
PrintIt.master.vb | Download
PrintIt.sitemap | Download
PrintItEs.sitemap | Download
PrintItFr.sitemap | Download
PrintIt_CreateUser.master | Download
PrintIt_CreateUser.master.vb | Download
PrintIt_OutSide.master | Download
PrintIt_OutSide.master.vb | Download
privacy_policy.aspx | Download
privacy_policy.aspx.vb | Download
proba.aspx | Download
proba.aspx.vb | Download
robots.txt | Download
sample.txt | Download
show_sess_par.aspx | Download
show_sess_par.aspx.vb | Download
site_map.aspx | Download
site_map.aspx.vb | Download
site_map.xml | Download
sRacadUploader.jar | Download
sRacadUploader_last.jar | Download
terms_and_conditions.aspx | Download
terms_and_conditions.aspx.vb | Download
terms_of_service.aspx | Download
terms_of_service.aspx.vb | Download
test.txt | Download
testimonials.aspx | Download
testimonials.aspx.vb | Download
TextDraw.html | Download
udraw-designer-widescreen-ui.zip | Download
web.config | Download
websites-for-printers.aspx | Download
websites-for-printers.aspx.vb | Download
File Preview:
Imports Microsoft.VisualBasic
Imports System.Net.Mail
Imports System.Net
Public Class CommonFunctions
Public ReadOnly Property MetaTag(ByVal url As String) As String
Get
Return "<meta http-equiv=""Refresh"" content=""2;URL=" & url & """ />"
End Get
End Property
Public Function SendEmail(ByVal fromAddress As String, ByVal toAddress As String, ByVal subject As String, ByVal body As String)
Dim dMessage As New MailMessage
Dim dSmtpClient As New SmtpClient
'Dim dSmtpHost As String = "69.46.105.56"
Dim dSmtpHost As String = "cliff.netsafemail.com"
Dim dSmtpPort As Integer = 25
Try
dMessage.From = New MailAddress(fromAddress)
dMessage.ReplyTo = New MailAddress(fromAddress)
dMessage.To.Add(New MailAddress(toAddress))
dMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
dMessage.Priority = MailPriority.Normal
dMessage.Subject = subject
dMessage.BodyEncoding = System.Text.Encoding.ASCII
dMessage.IsBodyHtml = True
dMessage.Body = body
dSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network
dSmtpClient.Credentials = New Net.NetworkCredential("aspnet", "!!epowersdc!!")
dSmtpClient.Host = dSmtpHost
dSmtpClient.Port = dSmtpPort
'dSmtpClient.EnableSsl = True
dSmtpClient.Send(dMessage)
Catch ex As Exception
Return False
End Try
Return True
End Function
Public Function FTPConnection()
Try
Return True
Catch ex As Exception
Return False
End Try
End Function
Public Function GetDocumentName(ByVal documentPath As String, ByVal includeFileExtension As Boolean, ByVal separator As String) As String
Dim documentPathArray() As String = documentPath.Split(separator)
If (includeFileExtension) Then
Return documentPathArray(documentPathArray.Length - 1)
Else
Dim documentNameArray() As String = documentPathArray(documentPathArray.Length - 1).Split(".")
Dim documentName As String = ""
Dim i As Integer
For i = 0 To documentNameArray.Length - 1
If documentName = "" Then
documentName = documentNameArray(i)
Else
documentName = documentName & "." & documentNameArray(i)
End If
i = i + 1
Next
Return documentName
End If
End Function
Public Function GetDocumentNameAlt(ByVal documentPath As String, ByVal includeFileExtension As Boolean) As String
Dim documentPathArray() As String = documentPath.Split("\\")
If (includeFileExtension) Then
Return documentPathArray(documentPathArray.Length - 1)
Else
Dim documentNameArray() As String = documentPathArray(documentPathArray.Length - 1).Split(".")
Dim documentName As String = ""
Dim i As Integer
For i = 0 To documentNameArray.Length - 1
If documentName = "" Then
documentName = documentNameArray(i)
Else
documentName = documentName & "." & documentNameArray(i)
End If
i = i + 1
Next
Return documentName
End If
End Function
Public Function TestFTP(ByVal _host As String, ByVal _port As String, ByVal _path As String, ByVal _userName As String, ByVal _password As String, ByVal _remoteFile As String, ByVal _localFile As String) As Boolean
Try
' Declare all properties.
Dim host As String = _host
Dim port As String = _port
Dim path As String = _path
Dim username As String = _userName
Dim password As String = _password
Dim remoteFile As String = _remoteFile
Dim ftp As FTPclient
Dim localFile As String = _localFile
If (Not System.IO.File.Exists(localFile)) Then
Try
Dim _streamWriter As System.IO.StreamWriter
_streamWriter = System.IO.File.CreateText(localFile)
_streamWriter.WriteLine("test")
_streamWriter.Close()
Catch ex As Exception
Throw New Exception("[100] " & localFile & " Local System Error, Please Contact Support!")
End Try
End If
' Create new FTPClient object. ( Connection. )
Try
ftp = New FTPclient(host & ":" & port, username, password)
Catch ex As Exception
Throw New Exception("[101] " & ex.Message)
End Try
' Attempt to upload test file.
Try
If (Not ftp.Upload(localFile, path & "/" & remoteFile)) Then
Throw New Exception("[104] Unable to connect and upload test document.")
End If
Catch ex As Exception
Throw New Exception("[102] " & ex.Message)
End Try
' Attempt to delete test file.
Try
If (Not ftp.FtpDelete(path & "/" & remoteFile)) Then
Throw New Exception("[105] Unable to connect and upload test document.")
End If
Catch ex As Exception
Throw New Exception("[103] " & ex.Message)
End Try
Catch ex As Exception
Throw New Exception("[150] " & ex.Message)
End Try
Return True
End Function
Private ALPHABET As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_#." ' .,!@#$%^&*(){}[]?:;
Private MIXED_ALPHABET As String = "rw6S8R730CmtYaEb#UuzknxqcPO.H4FKivVlA2L_9IGW1MoBhy-ZQXJdjTDgNpfse5" ' .}(]#,&;#]{?:*$^)%@
Public Function Enciper(ByVal simpleMessage As String, ByVal key As String) As String
Dim result As String = ""
If (simpleMessage Is DBNull.Value Or simpleMessage = "") And (key Is DBNull.Value Or key = "") Then
'TODO error message
Else
Dim keyLenght As Integer = key.Length()
Dim i As Integer
For i = 0 To simpleMessage.Length - 1
Dim k As Integer = ALPHABET.IndexOf(simpleMessage.Substring(i, 1))
If k > -1 Then
Dim keyShift As Integer = ALPHABET.IndexOf(key.Substring(i Mod keyLenght, 1))
Dim ShiftedMixedAlphabet As String = MIXED_ALPHABET.Substring(keyShift) & MIXED_ALPHABET.Substring(0, keyShift)
result = result & ShiftedMixedAlphabet.Substring(k, 1)
Else
result = result & simpleMessage.Substring(i, 1)
End If
Next
End If
Return result
End Function
Public Function Decipher(ByVal encodedMessage As String, ByVal key As String) As String
Dim result As String = ""
If (encodedMessage Is DBNull.Value Or encodedMessage = "") And (key Is DBNull.Value Or key = "") Then
'TODO error message
Else
Dim keyLenght As Integer = key.Length()
Dim i As Integer
For i = 0 To encodedMessage.Length - 1
Dim keyShift As Integer = ALPHABET.IndexOf(key.Substring(i Mod keyLenght, 1))
Dim ShiftedMixedAlphabet As String = MIXED_ALPHABET.Substring(keyShift) & MIXED_ALPHABET.Substring(0, keyShift)
Dim k As Integer = ShiftedMixedAlphabet.IndexOf(encodedMessage.Substring(i, 1))
If k > -1 Then
result = result & ALPHABET.Substring(k, 1)
Else
result = result & encodedMessage.Substring(i, 1)
End If
Next
End If
Return result
End Function
End Class