namespace  { using †; using MySql.Data.MySqlClient; using System; using System.Data; using System.IO; using System.Text; internal class ˆ { private MySqlConnection ; private MySqlDataAdapter  = new MySqlDataAdapter(); private MySqlCommand  = new MySqlCommand(); public bool ; public static string  = string.Concat(new object[] { "Server=", „., ";Uid=", „., ";Pwd=", „., ";Database=", „., ";Port=", „., ";Pooling=false" }); private bool  = false; public static void (string Message) { try { FileStream stream = new FileStream("DB.err", FileMode.Append, FileAccess.Write); byte[] bytes = Encoding.ASCII.GetBytes(Message + "\r\n"); stream.Write(bytes, 0, bytes.Length); } catch { Message = "FAILED TO SAVE ERROR TO FILE: " + Message; } Console.ForegroundColor = ConsoleColor.DarkMagenta; Console.Write("[DATABASE ERROR] => "); Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine(Message); Console.ForegroundColor = ConsoleColor.Gray; } public DataTable (string Query) { DataTable dataTable = new DataTable(); if (this.) { try { this..CommandText = Query; this..Fill(dataTable); } catch (Exception exception) { (exception.Message + "\n(^^" + Query + "^^)"); } if (this.) { this.Close(); } return dataTable; } Ž.("Database connection not active"); return dataTable; } public DataTable (string Query, object Quiet) { DataTable dataTable = new DataTable(); if (this.) { try { this..CommandText = Query; this..Fill(dataTable); } catch { } if (this.) { this.Close(); } return dataTable; } Ž.("Database connection not active"); return dataTable; } public DataSet (string Query) { DataSet dataSet = new DataSet(); if (this.) { try { this..CommandText = Query; this..Fill(dataSet); } catch (Exception exception) { (exception.Message + "\n(^^" + Query + "^^)"); } if (this.) { this.Close(); } return dataSet; } Ž.("Database connection not active"); return dataSet; } public int (string Query) { int num = 0; if (this.) { try { this..CommandText = Query; num = int.Parse(this..ExecuteScalar().ToString()); } catch { } if (this.) { this.Close(); } return num; } return num; } public void (string Parameter, object Value) { this..Parameters.AddWithValue("@" + Parameter, Value); } public void (MySqlParameter Parameter) { this..Parameters.Add(Parameter); } public void () { this..Parameters.Clear(); } public string (string Query) { try { return Query.Replace(@"\", @"\").Replace("'", @"\'"); } catch { return ""; } } public void ‰(string Query) { if (this.) { try { this..CommandText = Query; this..ExecuteNonQuery(); } catch (Exception exception) { (exception.Message + "\n(^^" + Query + "^^)"); } if (this.) { this.Close(); } } else { Ž.("Database connection not active"); } } public DataRow Š(string Query) { DataRow row = new DataTable().NewRow(); if (this.) { try { DataSet dataSet = new DataSet(); this..CommandText = Query; this..Fill(dataSet); row = dataSet.Tables[0].Rows[0]; } catch { } if (this.) { this.Close(); } return row; } Ž.("Database connection not active"); return row; } public DataColumn ‹(string Query) { DataColumn column = new DataTable().Columns.Add(); if (this.) { try { DataSet dataSet = new DataSet(); this..CommandText = Query; this..Fill(dataSet); column = dataSet.Tables[0].Columns[0]; } catch { } if (this.) { this.Close(); } return column; } Ž.("Database connection not active"); return column; } public string Œ(string Query) { string str = ""; if (this.) { try { this..CommandText = Query; str = this..ExecuteScalar().ToString(); } catch { } if (this.) { this.Close(); } return str; } Ž.("Database connection not active"); return ""; } public bool Ž(string Query) { bool hasRows = false; if (this.) { try { this..CommandText = Query; MySqlDataReader reader = this..ExecuteReader(); hasRows = reader.HasRows; reader.Close(); } catch (Exception exception) { (exception.Message + "\n(^^" + Query + "^^)"); } if (this.) { this.Close(); } return hasRows; } Ž.("Database connection not active"); return hasRows; } public ˆ(bool openNow, bool closeAfterFirstQuery, int ID) { if (openNow) { this.Open(); } this. = closeAfterFirstQuery; } public void Close() { if (this.) { this..Close(); this. = null; this. = null; this. = null; this. = false; this. = false; } } public void Open() { try { this. = new MySqlConnection(); this..Open(); this..Connection = this.; this..SelectCommand = this.; this. = true; } catch (MySqlException exception) { (exception.Message); } } public bool Ready { get { return this.; } } } }