321 lines
16 KiB
VB.net
321 lines
16 KiB
VB.net
Imports System.IO
|
|
Imports System.Net
|
|
Imports System.Net.Mail
|
|
Imports System.Security.Cryptography
|
|
Imports System.Text
|
|
|
|
Public Class signalezplaylist
|
|
Dim nom As String = ""
|
|
Dim catégorie As String = ""
|
|
Dim maillecteur As String = ""
|
|
Private Sub signalezplaylist_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Dim lines1a() As String = File.ReadAllLines(théme)
|
|
|
|
If lines1a(0) = 2 Then
|
|
Me.BackColor = Color.FromArgb(64, 64, 64)
|
|
Label1.BackColor = Color.FromArgb(64, 64, 64)
|
|
TextBox1.BackColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.BackColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.OnHoverBaseColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.OnHoverBorderColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.OnHoverLineColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.OnPressedColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.LineColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.BaseColor = Color.FromArgb(64, 64, 64)
|
|
GunaAdvenceButton1.ForeColor = Color.White
|
|
GunaAdvenceButton1.OnHoverForeColor = Color.White
|
|
Label1.ForeColor = Color.White
|
|
TextBox1.ForeColor = Color.White
|
|
ElseIf lines1a(0) = 3 Then
|
|
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
Label1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
TextBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.OnHoverBaseColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.OnHoverBorderColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.OnHoverLineColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.OnPressedColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.LineColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.BaseColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
GunaAdvenceButton1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaAdvenceButton1.OnHoverForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
TextBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
End If
|
|
|
|
|
|
|
|
TextBox1.Clear()
|
|
If payliststorelit = 1 Then
|
|
Me.Text = "Signalez: " & playliststore.ListBox1.SelectedItem
|
|
GunaAdvenceButton1.Text = "Signalez: " & playliststore.ListBox1.SelectedItem
|
|
nom = playliststore.ListBox1.SelectedItem
|
|
catégorie = "autre"
|
|
ElseIf payliststorelit = 2 Then
|
|
Me.Text = "signalez: " & playliststore.ListBox2.SelectedItem
|
|
GunaAdvenceButton1.Text = "Signalez: " & playliststore.ListBox2.SelectedItem
|
|
nom = playliststore.ListBox2.SelectedItem
|
|
catégorie = "classique"
|
|
ElseIf payliststorelit = 3 Then
|
|
Me.Text = "signalez: " & playliststore.ListBox3.SelectedItem
|
|
GunaAdvenceButton1.Text = "Signalez: " & playliststore.ListBox3.SelectedItem
|
|
nom = playliststore.ListBox3.SelectedItem
|
|
catégorie = "jazz"
|
|
ElseIf payliststorelit = 4 Then
|
|
Me.Text = "signalez: " & playliststore.ListBox4.SelectedItem
|
|
GunaAdvenceButton1.Text = "Signalez: " & playliststore.ListBox4.SelectedItem
|
|
nom = playliststore.ListBox4.SelectedItem
|
|
catégorie = "rap"
|
|
ElseIf payliststorelit = 5 Then
|
|
Me.Text = "signalez: " & playliststore.ListBox5.SelectedItem
|
|
GunaAdvenceButton1.Text = "Signalez: " & playliststore.ListBox5.SelectedItem
|
|
nom = playliststore.ListBox5.SelectedItem
|
|
catégorie = "youtube"
|
|
ElseIf payliststorelit = 6 Then
|
|
Me.Text = "signalez: " & playliststore.ListBox6.SelectedItem
|
|
GunaAdvenceButton1.Text = "Signalez: " & playliststore.ListBox6.SelectedItem
|
|
nom = playliststore.ListBox6.SelectedItem
|
|
catégorie = "libre de droit"
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaAdvenceButton1_Click(sender As Object, e As EventArgs) Handles GunaAdvenceButton1.Click
|
|
If TextBox1.Text = "" Then
|
|
MsgBox("Merci d'expliquer le signalement", MsgBoxStyle.Exclamation)
|
|
Else
|
|
Try
|
|
If My.Computer.Network.Ping("www.google.com") = True Then
|
|
mal1()
|
|
Else
|
|
MsgBox("Vous n’êtes actuellement pas connecté à Internet", MsgBoxStyle.Critical)
|
|
End If
|
|
Catch ex As Exception
|
|
MsgBox("Vous n’êtes actuellement pas connecté à Internet", MsgBoxStyle.Critical)
|
|
End Try
|
|
End If
|
|
End Sub
|
|
Sub mail()
|
|
Try
|
|
Dim maj As New WebClient
|
|
Dim vri As String = maj.DownloadString("http://lecteur2.lecteur-media.fr/lecteur/passmail.txt")
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
Dim mail = "contact@lecteur-media.fr"
|
|
Dim message = "La playlist: " & nom & vbNewLine & "catégorie: " & catégorie & vbNewLine & "signaler par un utilisateur" & vbNewLine & vbNewLine & "explication du signalement: " & vbNewLine & vbNewLine & TextBox1.Text
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add(mail)
|
|
MyMailMessage.Subject = ("playlist signalé")
|
|
MyMailMessage.Body = (message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", vri)
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
nom = ""
|
|
catégorie = ""
|
|
payliststorelit = 0
|
|
MsgBox("Le signalement a été transmis au staff", MsgBoxStyle.Information)
|
|
Close()
|
|
Catch ex As Exception
|
|
Timer1.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
Timer1.Stop()
|
|
Try
|
|
Dim maj As New WebClient
|
|
Dim vri As String = maj.DownloadString("http://lecteur2.lecteur-media.fr/lecteur/passmail.txt")
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
Dim mail = "contact@lecteur-media.fr"
|
|
Dim message = "La playlist: " & nom & vbNewLine & "catégorie: " & catégorie & vbNewLine & "signaler par un utilisateur" & vbNewLine & vbNewLine & "explication du signalement: " & vbNewLine & vbNewLine & TextBox1.Text
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add(mail)
|
|
MyMailMessage.Subject = ("playlist signalé")
|
|
MyMailMessage.Body = (message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", vri)
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
nom = ""
|
|
catégorie = ""
|
|
payliststorelit = 0
|
|
MsgBox("Le signalement a été transmis au staff", MsgBoxStyle.Information)
|
|
Close()
|
|
Catch ex As Exception
|
|
Timer1.Start()
|
|
End Try
|
|
End Sub
|
|
Sub mal1()
|
|
Dim lines1() As String = File.ReadAllLines(comtpeco2)
|
|
If lines1(0) = 0 Then
|
|
mail()
|
|
Else
|
|
mail2
|
|
End If
|
|
End Sub
|
|
Sub mail2()
|
|
Try
|
|
Dim lines1() As String = File.ReadAllLines(compteco)
|
|
Dim maj As New WebClient
|
|
Dim vri As String = maj.DownloadString("http://lecteur2.lecteur-media.fr/lecteur/passmail.txt")
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
Dim mail = "contact@lecteur-media.fr"
|
|
Dim message = "La playlist: " & nom & vbNewLine & "catégorie: " & catégorie & vbNewLine & "signaler par: " & lines1(0) & vbNewLine & vbNewLine & "explication du signalement: " & vbNewLine & vbNewLine & TextBox1.Text
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add(mail)
|
|
MyMailMessage.Subject = ("playlist signalé")
|
|
MyMailMessage.Body = (message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", vri)
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
mail3()
|
|
Catch ex As Exception
|
|
Timer2.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
|
|
Timer2.Stop()
|
|
Try
|
|
Dim lines1() As String = File.ReadAllLines(compteco)
|
|
Dim maj As New WebClient
|
|
Dim vri As String = maj.DownloadString("http://lecteur2.lecteur-media.fr/lecteur/passmail.txt")
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
Dim mail = "contact@lecteur-media.fr"
|
|
Dim message = "La playlist: " & nom & vbNewLine & "catégorie: " & catégorie & vbNewLine & "signaler par: " & lines1(0) & vbNewLine & vbNewLine & "explication du signalement: " & vbNewLine & vbNewLine & TextBox1.Text
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add(mail)
|
|
MyMailMessage.Subject = ("playlist signalé")
|
|
MyMailMessage.Body = (message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", vri)
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
mail3()
|
|
Catch ex As Exception
|
|
Timer2.Start()
|
|
End Try
|
|
End Sub
|
|
Sub mail3()
|
|
Try
|
|
Dim lines1() As String = File.ReadAllLines(compteco)
|
|
My.Computer.Network.DownloadFile(ipsite & "utilisateur/" & lines1(0) & "/mail.txt", cozip & "mail.txt")
|
|
mail4()
|
|
Catch ex As Exception
|
|
Timer3.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
|
|
Timer3.Stop()
|
|
Try
|
|
Dim lines1() As String = File.ReadAllLines(comtpeco2)
|
|
My.Computer.Network.DownloadFile(ipsite & "utilisateur/" & lines1(0) & "/mail.txt", cozip & "mail.txt")
|
|
mail4()
|
|
Catch ex As Exception
|
|
Timer3.Start()
|
|
End Try
|
|
End Sub
|
|
Sub mail4()
|
|
Dim lines1() As String = File.ReadAllLines(cozip & "/mail.txt")
|
|
Dim Resultatbytes() As Byte = Convert.FromBase64String(lines1(0))
|
|
Dim keyBytes() As Byte = Encoding.UTF8.GetBytes("Jj@msms7")
|
|
Dim Crypto As New DESCryptoServiceProvider()
|
|
Crypto.Key = keyBytes
|
|
Crypto.IV = keyBytes
|
|
Dim Icrypto As ICryptoTransform = Crypto.CreateDecryptor()
|
|
Dim donné() As Byte = Icrypto.TransformFinalBlock(Resultatbytes, 0, Resultatbytes.Length)
|
|
Dim maildecrypt = Encoding.UTF8.GetString(donné)
|
|
maillecteur = maildecrypt.ToString
|
|
Try
|
|
Dim maj As New WebClient
|
|
Dim vri As String = maj.DownloadString("http://lecteur2.lecteur-media.fr/lecteur/passmail.txt")
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
Dim mail = maildecrypt.ToString
|
|
Dim message = "Votre signalement sur La playlist: " & nom & vbNewLine & "catégorie: " & catégorie & vbNewLine & vbNewLine & "A bien été transmis au staff" & vbNewLine & vbNewLine & vbNewLine & "Merci de ne pas répondre ceci est un message automatique 👍👍👍"
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add(mail)
|
|
MyMailMessage.Subject = ("playlist signalé")
|
|
MyMailMessage.Body = (message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", vri)
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
nom = ""
|
|
catégorie = ""
|
|
payliststorelit = 0
|
|
For Each fichier As String In IO.Directory.GetFiles(cozip)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(cozip & info.Name)
|
|
Next
|
|
MsgBox("Le signalement a été transmis au staff", MsgBoxStyle.Information)
|
|
Close()
|
|
Catch ex As Exception
|
|
Timer4.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles Timer4.Tick
|
|
Timer4.Stop()
|
|
Dim lines1() As String = File.ReadAllLines(cozip & "/mail.txt")
|
|
Dim Resultatbytes() As Byte = Convert.FromBase64String(lines1(0))
|
|
Dim keyBytes() As Byte = Encoding.UTF8.GetBytes("Jj@msms7")
|
|
Dim Crypto As New DESCryptoServiceProvider()
|
|
Crypto.Key = keyBytes
|
|
Crypto.IV = keyBytes
|
|
Dim Icrypto As ICryptoTransform = Crypto.CreateDecryptor()
|
|
Dim donné() As Byte = Icrypto.TransformFinalBlock(Resultatbytes, 0, Resultatbytes.Length)
|
|
Dim maildecrypt = Encoding.UTF8.GetString(donné)
|
|
maillecteur = maildecrypt.ToString
|
|
Try
|
|
Dim maj As New WebClient
|
|
Dim vri As String = maj.DownloadString("http://lecteur2.lecteur-media.fr/lecteur/passmail.txt")
|
|
Dim MyMailMessage As New MailMessage()
|
|
Dim SMTPServer As New SmtpClient("mail48.lwspanel.com")
|
|
Dim mail = maildecrypt.ToString
|
|
Dim message = "Votre signalement sur La playlist: " & nom & vbNewLine & "catégorie: " & catégorie & vbNewLine & vbNewLine & "A été transmis au staff" & vbNewLine & vbNewLine & vbNewLine & "Merci de ne pas répondre ceci est un message automatique 👍👍👍"
|
|
|
|
MyMailMessage.From = New MailAddress("noreply@lecteur-media.fr")
|
|
MyMailMessage.To.Add(mail)
|
|
MyMailMessage.Subject = ("playlist signalé")
|
|
MyMailMessage.Body = (message)
|
|
|
|
SMTPServer.Port = ("587") 'Port
|
|
SMTPServer.Credentials = New System.Net.NetworkCredential("noreply@lecteur-media.fr", vri)
|
|
SMTPServer.EnableSsl = True
|
|
|
|
SMTPServer.Send(MyMailMessage) 'Envoi
|
|
nom = ""
|
|
catégorie = ""
|
|
payliststorelit = 0
|
|
For Each fichier As String In IO.Directory.GetFiles(cozip)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(cozip & info.Name)
|
|
Next
|
|
MsgBox("Le signalement a été transmis au staff", MsgBoxStyle.Information)
|
|
Close()
|
|
Catch ex As Exception
|
|
Timer4.Start()
|
|
End Try
|
|
End Sub
|
|
End Class |