using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using ProjectWater; //Spoiler of my new rtm tool =D
namespace test_program
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string MyConString = @"server=SERVER IP OR NAME;userid=USERNAME ON SERVER;password=Password of user;database=The database";
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
MySqlDataReader Reader;
command.CommandText = "select * from users";
try
{
connection.Open();
}
catch (Exception ex)
{
MessageBox.Show("There has been an error connecting to the user database! Please try again later.");
}
command.CommandText = "SELECT * FROM users WHERE uname = @username AND password = @password";
//Retrieve row
command.Parameters.AddWithValue("@username", textBox1.Text);
command.Parameters.AddWithValue("@password", textBox2.Text);
Reader = command.ExecuteReader();
try
{
Reader.Read();
string uname = (string)Reader.GetValue(3);
string pword = (string)Reader.GetValue(4);
}
catch (Exception ex)
{
MessageBox.Show("Username or Password incorrect");
return;
}
UInt32 uid = (UInt32)Reader.GetValue(0);
string fname = (string)Reader.GetValue(1);
string lname = (string)Reader.GetValue(2);
string email = (string)Reader.GetValue(5);
string type = (string)Reader.GetValue(6);
string status = (string)Reader.GetValue(7);
string isregistered = (string)Reader.GetValue(
;
if (status == "active" && type == "admin" || type == "elite" || type == "staff")
{
MessageBox.Show("Logged in ", "Mw3 mod tool", MessageBoxButtons.OK, MessageBoxIcon.Information);
Form2 fm2 = new Form2();
fm2.Show();
}
else
{
if (status == "banned" || status == "deleted")
{
MessageBox.Show("Unable to log in reason: Account Is Banned");
}
if (type == "normal")
{
MessageBox.Show("Unable to log in reason: Account is not elite");
}
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("SITE IS PRIVATE FOR NOW
");
}
}
}
using (MySqlConnection connection = new MySqlConnection(MyConString))
{
try
{
using (MySqlCommand command = new MySqlCommand(command, connection))
{
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Connection Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
}
}
connection.Dispose();
using (MySqlCommand command = new MySqlCommand(command, connection))
{
DataTable dt = new DataTable();
reader = command.ExecuteReader();
dt.Load(reader);
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.