Server IP : 103.6.199.200 / Your IP : 18.224.31.90 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/tradepan/7softshop.com/wwwroot/ |
Upload File : |
<%@ WebHandler Language="C#" Class="Vax" %> using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.Data.OleDb; using System.Configuration; using System.Collections; //using System.Data.Objects; //using System.Data.Entity.Core.Objects; using System.Data.Entity; using System.Xml; using System.Xml.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Text; using System.IO; using System.Net; using HtmlTextFormat; using System.Diagnostics; using System.Threading; public class Vax : IHttpHandler { //#region Basic Measurement //private OleDbConnection Connection; //private OleDbDataAdapter Da; //private OleDbCommand Command; //private OleDbDataReader DataReader; //public string RedirectPage; //#endregion public string[] l_temp = new string[20]; ICEClass icObj = new ICEClass(); public void ProcessRequest(HttpContext context) { bool l_processed = false ; string l_ll = ""; string FilePath= ""; context.Response.AppendHeader("Cache-Control", "no-cache, must-revalidate, max-age=0"); context.Response.AppendHeader("Expires", "Thu, 01 Jan 1970 00:00:01 GMT"); context.Response.AppendHeader("Pragma", "no-cache"); string xml_text; StreamReader reader; using (reader = new StreamReader(context.Request.InputStream)) { xml_text = reader.ReadToEnd(); } //string l_PaymentID = "1122"; //string l_CCS = "01"; //string l_Return = ""; //string l_FromServer = ""; //string l_status = ""; //string json = xml_text; //string path = "C:/Webhtml/EUP/Member/GHL/"; // string l_ret = icObj.API_MMLogin("", "", json, l_Return, ref l_FromServer, ref l_status, path , l_PaymentID + l_CCS); //Response.Redirect("Member/GHL/" + l_PaymentID + l_CCS + ".html"); // return; int l_SS = 0; string l_IP = ""; int l_wbw_i = 0; string l_wbw = ""; try { l_IP = context.Request.UserHostAddress; //this.Request.ServerVariables["REMOTE_ADDR"]; // xml_text = @"{""command"":""MYR"",""transaction_id"":""4983"",""voucher"":""0"",""mt4"":""17788"",""amount"":0, ""sign"":""kXvdr5u7rzdeijUUgEHVJUe9Vk2fiIFCnRrBjUunRk2bcLG9ahDhVPIetuL9uzFn1llXAxNTk2fsnbUvsvaqmaNKc0cxjgk3dk3d"" } "; //if (false) // { l_wbw_i = xml_text.IndexOf('{'); if (l_wbw_i < 0) { string FilePath2 = "C:/Domains/tradepan/eup4u.com/wwwroot/APA/";// "~APA/"; icObj.WriteMyFile("cvv", FilePath2, icObj.ICDateTime(0).Substring(0, 11), icObj.ICDateTime(0)); string ret3 = @"[{""id"":""71"",""title"":""Cleveland Classic: Joshna Chinappa, Dipika Pallikal progress"",""category"":""poke"",""date"":""2017-09-28"",""image"":""http:\/\/mobileappdatabase.in\/smartnews\/app_dashboard\/uploads\/181300327_Dipika-Pallikal.jpg"",""description"":""p>\r\n""}]"; context.Response.Write(ret3); return; } l_wbw = xml_text.Substring(l_wbw_i); // } } catch (Exception ex) { return; } icObj.API_Trans_Log(xml_text); string[] l_json = l_wbw.Split(','); //int ll_i = 0; //string l_Field = ""; //string l_Data = ""; //string l_Source = ""; string l_Token = ""; string l_Tr = ""; string l_User = ""; string l_Pass = ""; string l_Amt = ""; string l_Command = ""; string l_OutTrade = ""; string l_version = "1.1"; string l_mt4 = ""; string l_currencyid = ""; string l_trcode = ""; string l_remark = ""; string l_bal = ""; string l_member_name = ""; string l_sponsor_id = ""; string l_ic_number = ""; string l_gender = ""; string l_email = ""; string l_phone = ""; string l_country = ""; string l_address = ""; string l_ac1 = ""; string l_ab1 = ""; string l_ac2 = ""; string l_ab2 = ""; string l_date_from = ""; string l_date_to = ""; string l_username = ""; string l_sign = ""; string l_bankcard =""; string amount = ""; string l_Sign = ""; string l_lang = ""; string l_voucher = ""; string l_rva = ""; string l_cash = ""; string l_qtr = ""; string l_shipping = ""; string l_postcode = ""; string l_city = ""; icObj.f_API_Json_Data(l_json , ref l_Command, ref l_Sign, ref l_Tr,ref l_User ,ref l_Pass ,ref l_Token ,ref l_Amt ,ref l_OutTrade ,ref l_version ,ref l_mt4 ,ref l_currencyid ,ref l_trcode ,ref l_remark ,ref l_bal ,ref l_member_name ,ref l_sponsor_id ,ref l_ic_number ,ref l_gender ,ref l_email ,ref l_phone ,ref l_country ,ref l_address ,ref l_ac1 ,ref l_ab1 ,ref l_ac2 ,ref l_ab2 ,ref l_date_from ,ref l_date_to ,ref l_username ,ref l_sign ,ref l_bankcard ,ref amount ,ref l_lang ,ref l_voucher ,ref l_rva ,ref l_cash ,ref l_qtr ,ref l_shipping ,ref l_postcode ,ref l_city ); string ret2 = ""; if (l_Tr == "") { if (l_Command == "Regr") ret2 = icObj.API_REGISTER(l_Command, l_sign, l_member_name, l_ic_number, l_gender, l_email, l_phone, l_country, l_city, l_postcode, l_address, l_username); if (l_Command == "GoIn") ret2 = icObj.API_QR_Fast(l_Command, l_username, l_sign, l_bankcard, l_remark, amount); if (l_Command == "CLV") ret2 = icObj.API_QR_Payment(l_Command, l_username, l_sign, l_lang, l_voucher, amount, l_rva, l_cash, l_country, l_sponsor_id, l_shipping, l_qtr); } else { if (l_Command == "QTY") ret2 = icObj.API_QR_QTY(l_Command, l_username, l_sign, l_lang, l_country, l_qtr); else ret2 = icObj.API_Trans(l_Command, l_username, l_sign, l_Tr, l_voucher, amount, l_mt4); } //string ret2 = @"[{""id"":""71"",""title"":""Cleveland Classic: Joshna Chinappa, Dipika Pallikal progress"",""category"":""poke"",""date"":""2017-09-28"",""image"":""http:\/\/mobileappdatabase.in\/smartnews\/app_dashboard\/uploads\/181300327_Dipika-Pallikal.jpg"",""description"":""p>\r\n""}]"; FilePath = "C:/Domains/tradepan/eup4u.com/wwwroot/APA/"; icObj.WriteMyFile("cvv", FilePath, icObj.ICDateTime(0).Substring(0, 11), ret2); context.Response.Write(ret2); } public bool IsReusable { get { return false; } } string API_QR_Payment2(string a_Inst, string l_UserId, string l_sign, string l_Lang, string l_Voucher, string l_Amt, string l_RVA, string l_Cash, string l_Country, string l_SponsorID, string l_Shipping, string l_Qtr) { string[] l_Para = new string[56]; string l_Str = ""; string FilePath = "";// Server.MapPath("APA/"); if (a_Inst == "CLV") { string l_Data2 = ""; string l_Data = ""; string l_Data3 = icObj.xxa_DecryptURL2(l_sign, "") + ";;;;;;;"; string ls_Invoice = ""; string l_Enc = ""; string a_QTY = l_Qtr; string a_Message = ""; if (l_Data3 != "") { icObj.f_QtyControl(l_Lang, 961, l_Qtr, ref a_QTY, ref a_Message); ls_Invoice = icObj.f_MakePayment(FilePath, l_Lang, "M", int.Parse(l_Voucher), l_UserId, l_Country, l_SponsorID, double.Parse(l_Amt), double.Parse(l_Cash), double.Parse(l_RVA), double.Parse(l_Shipping), l_Qtr, ""); if (ls_Invoice.Length < 8) l_Str = @"{""res_code"":404,""status_message"":""SUCCESS"",""sign"":""" + l_sign + @""",""data"":{""transaction_id"":" + ls_Invoice + @",""qty"":""" + a_QTY + @""",""message"":""" + a_Message + @"""}}"; else l_Str = @"{""res_code"":604,""status_message"":""Fail"",""sign"":""" + l_sign + @""",""data"":{""transaction_id"":" + ls_Invoice + @"}}"; //l_Data = icObj.SQL_GetData(0, "Select MemberID, [password], icnum, truename, phonecode, emails, eCoinA, eCoinI from wbw_Member where [nickname] = '" + l_Data3.Split(';')[0] + "' and pass_2 = '" + l_Data3.Split(';')[1] + "' ", 8, l_Para); //if (l_Data == null || l_Data == "") // l_Str = @"{""res_code"":602,""status_message"":""Fail""}"; //else //{ // l_Enc = icObj.xxa_EncryptURL2(l_Para[0] + ";" + l_Para[1] + ";" + icObj.ICDateTime(0) + ";", ""); // l_Data2 = @"""member_name"":""" + l_Para[3] + @""",""ic_number"":""" + l_Para[2] + @""",""phone"":""" + l_Para[4] + @""",""email"":""" + l_Para[5] + @""""; // l_Str = @"{""res_code"":404,""status_message"":""SUCCESS"",""sign"":""" + l_Enc + @""",""data"":{" + l_Data2 + @"}}"; //} } else l_Str = @"{""res_code"":601,""status_message"":""Fail""}"; } else { l_Str = @"{""res_code"":609,""status_message"":""Invalid Command""}"; } return l_Str; } string API_fx_Fast(string a_Inst, string l_UserId, string l_sign, string l_BankCard, string l_Amt) { string l_Str = ""; string l_Info = @",""data"":{"; string l_Info2 = @"{""status_code"":200,""status_message"":""SUCCESS"","; if (a_Inst == "UpdateBalance" || a_Inst == "GetBalance") { l_Str = icObj.fxc_command(a_Inst, l_UserId, l_sign, l_BankCard, l_Amt); } return l_Str; } string API_fc_Fast(string a_Inst, string l_UserId, string l_Password, string l_Token, string l_Amt, string l_Tr, string l_Out_Trade, string l_mt4, string l_currencyid, string l_trcode, string l_remark, string l_bal, string l_ac1, string l_ab1, string l_ac2, string l_ab2, string l_member_name, string l_sponsor_id, string l_ic_number, string l_gender, string l_email, string l_phone, string l_country, string l_address, string l_date_from , string l_date_to) { string l_Str = ""; string l_Info = @",""data"":{"; if (a_Inst == "MHistory") l_Str = fc_command_MH(a_Inst, l_Token, l_date_from , l_date_to ); else { if (a_Inst == "SetLogin") { l_Str = API_W_fc_Member(a_Inst, l_UserId, l_Password, l_member_name, l_sponsor_id, l_ic_number, l_gender, l_email, l_phone, l_country, l_address, l_ac1 , l_ac2 ); } else { if (a_Inst == "MCash" || a_Inst == "MLogin" || a_Inst == "SLogin" || a_Inst == "MT4") l_Str = API_W_fc_command_L(a_Inst, l_UserId, l_Password); else { if (a_Inst == "SetMT4") l_Str = API_W_fc_command_MT4(a_Inst, l_UserId, l_Password, l_ac1, l_ab1, l_ac2, l_ab2); else { if (a_Inst == "MTrans" || a_Inst == "BookA" || a_Inst == "BookB" || a_Inst == "RTrans") l_Str = icObj.API_MT4(a_Inst, l_UserId, l_Password, l_Token, l_Amt, l_Tr, l_Out_Trade, l_mt4, l_currencyid, l_trcode, l_remark, l_bal); else l_Str = icObj.API_fc_Fast(a_Inst, l_UserId, l_Password, l_Token, l_Amt, l_Tr, l_Out_Trade); } } } } return l_Str; } string API_W_fc_command_MT4(string a_Inst, string a_User, string a_Pass, string l_ac1 , string l_ab1 , string l_ac2, string l_ab2 ) { string l_Str = ""; string l_Info = @",""data"":{"; int l_GoodM = 0; if (a_Inst == "SetMT4") { l_Info = l_Info + fn_SetMT4(a_User, a_Pass, l_ac1, l_ab1 , l_ac2, l_ab2 ); if (l_Info.Length < 20) { l_Str = "{" + icObj.API_fc_Error(100) + "}"; } else l_Str = "{" + icObj.API_fc_Error(203) + l_Info + "}"; } return l_Str; } string f_assign_New( string l_Loginid, string l_Password, string l_Store, string l_AB, string a_SponsorID, string a_PlacementID, string a_FullName, string a_ICNum, string a_Gender, string a_EMail, string a_Phone, string a_Country, string a_City, string a_Address, string l_Position, string a_Code, string a_NickName, string a_Msn, string a_Fax, string a_Bank, string a_Swift, string a_Acc, string a_ac1, string a_ac2) { string l_Msg = ""; string l_Return = ""; string l_SQLw; long l_Token = 0; string l_SQL = ""; string l_DirectStr = ""; string[] l_para = new string[80]; //New Member Password Setting string ls_Token = "M" + icObj.GetLogID("M"); string l_IC = "885566677" + a_ICNum.Trim(); l_IC = l_IC.Substring(l_IC.Length - 6, 6); string ls_Country = icObj.fs_Country(a_Country); l_para[0] = ""; l_para[1] = a_Code.Trim(); l_para[2] = a_Gender; l_para[3] = l_Password; l_para[4] = a_FullName; l_para[5] = l_Password; l_para[6] = ""; //Answer; l_para[7] = a_Phone; l_para[8] = a_EMail; l_para[9] = a_City; l_para[10] = a_Address; l_para[11] = ""; // txtPostCode.Text.Trim(); l_para[12] = icObj.ICDateTime(0); l_para[32] = ls_Country; l_para[15] = l_AB; l_para[17] = a_NickName.Trim(); l_para[18] = a_Msn.Trim(); l_para[19] = a_Fax.Trim(); l_para[20] = a_Bank.Trim(); //txtBank.Text.Trim(); l_para[21] = a_Acc.Trim(); l_para[22] = a_ICNum; l_para[25] = ls_Token.Trim().Substring(1); string[] l_para2 = new string[11]; string l_Direct = ""; int l_BV = 0; l_DirectStr = a_SponsorID.Trim(); l_BV = icObj.fs_Pack_BV(l_Position); l_para[23] = l_BV.ToString(); l_para[24] = l_Position; l_Token = icObj.CheckLogID(ls_Token.Substring(0, 1), long.Parse(ls_Token.Substring(1))); if (l_Token == 0) { string ls_MMID = icObj.SQL_GetData(0, "Select InPlanC from wbw_Member where [NickName] = '" + a_NickName.Trim() + "' ", 1, icObj.l_temp); if (ls_MMID == null || ls_MMID == "") { } else { l_Msg = "This User ID been used on " + ls_MMID; return l_Msg; }; int G_Int_MemberID = 0; string l_PV = ""; string l_Code = ""; string l_DirectID = a_PlacementID; string l_Str = ""; // icObj.cf_Member("8", "***", a_SponsorID.Trim(), l_para, ref G_Int_MemberID, ref l_PV, ref l_Code, true, "", ref l_DirectID, l_AB); if ((l_Code == null || l_Code == "") && l_Str == "") { l_Msg = "System Fail to register the New Member."; return l_Msg; } else { icObj.f_AddMT4(G_Int_MemberID, a_NickName, a_ac1, ""); // icObj.f_AddMT4(G_Int_MemberID, a_NickName , a_ac1 , "A"); // icObj.f_AddMT4(G_Int_MemberID, a_NickName, a_ac2, "B"); l_Msg = l_Str; return l_Msg; } } return l_Msg; } string API_W_fc_Member(string a_Inst, string a_User, string a_Pass, string l_member_name, string l_sponsor_id, string l_ic_number, string l_gender, string l_email, string l_phone, string l_country, string l_address, string l_ac1, string l_ac2) { string l_Str = ""; string l_Info = @",""data"":{"; int l_GoodM = 0; //l_Info = l_Info + fn_SetMT4(a_User, a_Pass, l_ac1, l_ab1, l_ac2, l_ab2); l_Info = f_assign_New(a_User, a_Pass, "EDI", "C", l_sponsor_id, l_sponsor_id, l_member_name, l_ic_number, l_gender, l_email, l_phone, l_country, "", l_address, "0", "ASSIGN", a_User, "", "", "", "", "", l_ac1, l_ac2 ); if (l_Info.Length < 5) { l_Str = "{" + icObj.API_fc_Error(100) + "}"; } else l_Str = "{" + icObj.API_fc_Error(203) + "{ \"fail\" : \"" + l_Info + "\"}}"; return l_Str; } string API_W_fc_command_L(string a_Inst, string a_User, string a_Pass) { string l_LoginType = "M"; string l_Str = ""; string l_Info = @",""data"":{"; int l_GoodM = 0; if (a_Inst == "SLogin") l_LoginType = "S"; if (a_Inst == "MT4") l_LoginType = "4"; if (a_Inst == "MCash" || a_Inst == "MLogin" || a_Inst == "SLogin" || a_Inst == "MT4") { l_Info = l_Info + icObj.fxcn_UserLogin(a_User, a_Pass, l_LoginType); if (l_Info.Length < 20) l_Str = "{" + icObj.API_fc_Error(200) + "}"; else l_Str = "{" + icObj.API_fc_Error(100) + l_Info + "}"; } return l_Str; } string fn_SetMT4(string a_User, string a_Password, string a_ac1, string a_ab1, string a_ac2, string a_ab2) { string l_Backup = ""; string l_LoginCode = ""; string l_Last = ""; string l_Lasti = ""; string l_WBW = ""; string l_Bal = ""; string l_Error = ""; string l_Secure = "0;0;XXX;0;NM;IMYM;;;;;"; string l_YourRef = ""; string l_Token = ""; string l_CC = ""; string l_Cty = ""; long l_Lastid = 0; string[] l_Para = new string[40]; string l_ret = ""; string l_str = ""; DataSet ds; string tbName = "GPay"; int ll = 0; int ll2 = 0; try { if ( a_ac1 != "" ) l_Error = icObj.SQL_GetData(0, "Select NickName from wbw_Member, wbw_MT4 where wbw_MT4.MemberID = wbw_Member.MemberID and wbw_MT4.MT4 = '" + a_ac1 + "'", 1, icObj.l_temp); if ( l_Error != null && l_Error != "" ) { a_ab1 = ""; l_ret = "\"a_ac_used\":\"" + l_Error + "\""; } if (a_ac2 != "") l_Error = icObj.SQL_GetData(0, "Select NickName from wbw_Member, wbw_MT4 where wbw_MT4.MemberID = wbw_Member.MemberID and wbw_MT4.MT4 = '" + a_ac2 + "'", 1, icObj.l_temp); if (l_Error != null && l_Error != "") { a_ab2 = ""; if (l_ret == "") l_ret = "\"b_ac_used\":\"" + l_Error + "\"}"; else l_ret = l_ret + ", \"b_ac_used\":\"" + l_Error + "\"}"; } else { if ( l_ret != "" ) l_ret = l_ret + "}"; } } catch { l_ret = "\"a_ac_used\":\"ERROR\", \"b_ac_used\":\"ERROR\"}"; }; if (l_ret == "") { l_Last = icObj.SQL_GetData(0, "Select MT4_ID from wbw_MT4 Order by MT4_ID desc ", 1, icObj.l_temp ); if (l_Last == null || l_Last == "" ) l_Last = "100"; l_LoginCode = icObj.SQL_GetData(0, "Select AA.MemberID, AA.truename, AB.answers from wbw_Member AA, tb_Member AB where AA.MemberID = AB.MemberID and ( AA.[Name] = '" + a_User + "' or AA.nickname = '" + a_User + "') ", 3, l_Para ); //l_ret = @"""token"":""" + l_Para[2] + @""",""full_name"":""" + l_Para[1] + l_ret + @""" }"; if ( a_ab1 != "") { icObj.SQL_Exec(0, "Insert into wbw_MT4(MT4_ID, MemberID, MT4, [Status] ) Values ( " + l_Last + " + 1, " + l_LoginCode + ", '" + a_ac1 + "', '" + a_ab1 + "') "); if ( a_ab2 != "") icObj.SQL_Exec(0, "Insert into wbw_MT4(MT4_ID, MemberID, MT4, [Status] ) Values ( " + l_Last + " + 2, " + l_LoginCode + ", '" + a_ac2 + "', '" + a_ab2 + "') "); l_Error = "100"; } else { if (a_ab2 != "" ) { icObj.SQL_Exec(0, "Insert into wbw_MT4(MT4_ID, MemberID, MT4, [Status] ) Values ( " + l_Last + " + 1, " + l_LoginCode + ", '" + a_ac2 + "', '" + a_ab2 + "') "); l_Error = "100"; } } } else { l_Error = "200"; } if (l_Error != "100") l_Error = l_ret; return l_Error; } string fc_command_MH(string a_Inst, string a_Token, string a_Date_From , string a_Date_To) { string l_Str = ""; string l_Pin = ""; string l_Info = @",""data"":["; int l_GoodM = 0; string[] l_Para = new string[60]; string l_TokenNew = ""; string l_LoginID = ""; string l_SQL; DataSet ds; int ll = 0; int ll_Max = 0; string l_CC = ""; double l_Amt = 0; if (a_Inst == "MHistory") { l_SQL = "SELECT Answers , len(answers), Moneyin, moneyout , trdate, refno, takenote , ewalletid, bal from tb_member AA, wbw_eCoinP AB where ( AB.Memberin = AA.Memberid or AB.Memberout = AA.Memberid ) and answers is not null and len(answers) > 8 and (answers = '" + a_Token + "' or ( '" + a_Token + "' = '0' and (EDI1 = 0 or EDI1 is null ) ) ) Order By eWalletid asc "; ds = icObj.ReturnDs(l_SQL, "Admin"); if (ds.Tables["Admin"].Rows.Count > 0) { ll_Max = ds.Tables["Admin"].Rows.Count; if (ll_Max > 20) ll_Max = 20; for (ll = 0; ll < ll_Max; ll++) { if (ll == 0) l_Info = l_Info + @"{""token"":" + ds.Tables["Admin"].Rows[ll][0].ToString() + @","; else l_Info = l_Info + @",{""token"":" + ds.Tables["Admin"].Rows[ll][0].ToString() + @","; if (double.Parse(ds.Tables["Admin"].Rows[ll][3].ToString()) > 0) l_Amt = double.Parse(ds.Tables["Admin"].Rows[ll][3].ToString()) * -1; else l_Amt = double.Parse(ds.Tables["Admin"].Rows[ll][2].ToString()); l_Info = l_Info + @"""mt4"":"""","; l_Info = l_Info + @"""amount"":" + l_Amt + @","; l_Info = l_Info + @"""currency_id"":6,"; l_Info = l_Info + @"""tr_date"":""" + ds.Tables["Admin"].Rows[ll][4].ToString() + @""","; l_Info = l_Info + @"""tr_code"":""" + ds.Tables["Admin"].Rows[ll][5].ToString() + @""","; l_Info = l_Info + @"""remark"":""" + ds.Tables["Admin"].Rows[ll][6].ToString() + @""","; l_Info = l_Info + @"""out_trade_no"":""" + ds.Tables["Admin"].Rows[ll][7].ToString() + @""","; l_Info = l_Info + @"""balance"":" + ds.Tables["Admin"].Rows[ll][8].ToString() + @"}"; } } } if (l_Info.Length < 10) l_Str = "{" + icObj.API_fc_Error(300) + "}"; else { l_Info = l_Info + "]"; l_Str = "{" + icObj.API_fc_Error(100) + l_Info + "}"; } return l_Str; } }