コード例 #1
0
        public HttpResponseMessage GetSiteStats()
        {
            HomeModel homemodel = new HomeModel();

            homemodel.LaunchDate = DateTime.Parse("01/05/2020").ToShortDateString();             //DateTime.Today.AddDays(-95).ToShortDateString();
            TimeSpan dt = DateTime.Now - DateTime.Parse(homemodel.LaunchDate);

            if (dt.Days > 0)
            {
                homemodel.RunningDays = dt.Days.ToString();
            }
            else
            {
                homemodel.RunningDays = "0";
            }

            int[] StatusIds          = { (int)Status.Completed };
            int[] TranscationTypeIds = { (int)TransactionType.Purchase };
            var   totalfundinglist   = _transactionService.GetAllTransactions(0, 0, null, null, StatusIds, TranscationTypeIds, 0, int.MaxValue).OrderByDescending(x => x.TransactionDate).Take(10);

            homemodel.TotalSiteDeposit = _transactionService.GetAllTransactions(0, 0, null, null, StatusIds, TranscationTypeIds, 0, int.MaxValue).Select(x => x.Amount).Sum().ToString();
            int[] WithTranscationTypeIds = { (int)TransactionType.Withdrawal };
            var   totalWithdrawallist    = _transactionService.GetAllTransactions(0, 0, null, null, StatusIds, WithTranscationTypeIds, 0, int.MaxValue).OrderByDescending(x => x.TransactionDate).Take(10);

            homemodel.TotalSiteWithdrawal = _transactionService.GetAllTransactions(0, 0, null, null, StatusIds, WithTranscationTypeIds, 0, int.MaxValue).Select(x => x.Amount).Sum().ToString();
            homemodel.TotalCustomer       = _customerService.GetAllCustomers(0, 0, int.MaxValue).Count().ToString();
            var yestarday = DateTime.Now.AddHours(-24);

            homemodel.OnlineVistors = _customerService.GetAllCustomers(0, 0, int.MaxValue).Where(x => x.CreatedOnUtc > yestarday).Count().ToString();
            var withdrawals = totalWithdrawallist.OrderByDescending(x => x.TransactionDate).ToList();

            foreach (var d in withdrawals)
            {
                WithdrawalList w = new WithdrawalList();
                w.Email             = d.Customer.Email;
                w.AmountRaw         = d.Amount.ToString() + _workContext.WorkingCurrency.CurrencyCode;
                w.TransDate         = d.TransactionDate.ToShortDateString();
                w.PaymentMethodIcon = d.ProcessorId + ".svg";
                homemodel.Last10Withdrawal.Add(w);
            }

            var deposits = totalfundinglist.OrderByDescending(x => x.TransactionDate).ToList();

            foreach (var d in deposits)
            {
                DepositList w = new DepositList();
                w.Email             = d.Customer.Email;
                w.AmountRaw         = d.Amount.ToString() + _workContext.WorkingCurrency.CurrencyCode;
                w.TransDate         = d.TransactionDate.ToShortDateString();
                w.PaymentMethodIcon = d.ProcessorId + ".svg";
                homemodel.Last10Deposit.Add(w);
            }
            homemodel.plans = _planService.GetAllPackage().ToList();

            return(Request.CreateResponse(HttpStatusCode.OK, new { code = 0, Message = "success", data = homemodel }));
        }
コード例 #2
0
        public ActionResult Index()
        {
            ////var task = new ScheduleTask
            ////{
            ////	CronExpression = "0 */24 * * *",
            ////	Type = "SmartStore.Services.Boards.CheckBlockChainTransactionStatus, SmartStore.Services",//typeof("SmartStore.Services.Hyip.SendROITask,SmartStore.Services").AssemblyQualifiedNameWithoutVersion(),
            ////	Enabled = false,
            ////	StopOnError = false,
            ////	IsHidden = false
            ////};

            ////task.Name = string.Concat("Check Blockchain Transaction Status", " Task");
            ////_scheduleTaskService.InsertTask(task);
            if (Request["r"] != null)
            {
                System.Web.HttpCookie cookie = new System.Web.HttpCookie("3x1btcreferral", Request["r"].ToSafe());
                HttpContext.Response.Cookies.Remove("3x1btcreferral");
                HttpContext.Response.SetCookie(cookie);
            }
            var       reff         = Request.Cookies["3x1btcreferral"];
            var       customer     = _services.WorkContext.CurrentCustomer;
            var       isAdmin      = customer.IsAdmin();
            var       isRegistered = isAdmin || customer.IsRegistered();
            HomeModel homemodel    = new HomeModel();

            homemodel.LaunchDate = DateTime.Parse("04/15/2020").ToShortDateString();             //DateTime.Today.AddDays(-95).ToShortDateString();
            TimeSpan dt = DateTime.Now - DateTime.Parse(homemodel.LaunchDate);

            if (dt.Days > 0)
            {
                homemodel.RunningDays = dt.Days.ToString();
            }
            else
            {
                homemodel.RunningDays = "0";
            }
            var customers = _customerService.GetOnlineCustomers(DateTime.UtcNow.AddMinutes(-_customerSettings.Value.OnlineCustomerMinutes),
                                                                null, 0, _adminAreaSettings.GridPageSize);

            homemodel.OnlineVistors = customers.TotalCount.ToString();
            int[] StatusIds          = { (int)Status.Completed };
            int[] TranscationTypeIds = { (int)TransactionType.Purchase };
            var   totalfundinglist   = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, TranscationTypeIds, 0, int.MaxValue).OrderByDescending(x => x.TransactionDate).Take(10);

            homemodel.TotalSiteDeposit = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, TranscationTypeIds, 0, int.MaxValue).Select(x => x.Amount).Sum().ToString();
            int[] WithTranscationTypeIds = { (int)TransactionType.Withdrawal };
            var   totalWithdrawallist    = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, WithTranscationTypeIds, 0, int.MaxValue).OrderByDescending(x => x.TransactionDate).Take(10);

            homemodel.TotalSiteWithdrawal = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, WithTranscationTypeIds, 0, int.MaxValue).Select(x => x.Amount).Sum().ToString();

            var withdrawals = totalWithdrawallist.OrderByDescending(x => x.TransactionDate).ToList();

            foreach (var d in withdrawals)
            {
                WithdrawalList w = new WithdrawalList();
                w.Email             = "GM-" + d.Customer.Id;
                w.AmountRaw         = d.Amount.ToString() + _workContext.WorkingCurrency.CurrencyCode;
                w.TransDate         = d.TransactionDate.ToShortDateString();
                w.PaymentMethodIcon = d.ProcessorId + ".svg";
                homemodel.Last10Withdrawal.Add(w);
            }

            var deposits = totalfundinglist.OrderByDescending(x => x.TransactionDate).ToList();

            foreach (var d in deposits)
            {
                DepositList w = new DepositList();
                w.Email             = "GM-" + d.Customer.Id;
                w.AmountRaw         = d.Amount.ToString() + _workContext.WorkingCurrency.CurrencyCode;
                w.TransDate         = d.TransactionDate.ToShortDateString();
                w.PaymentMethodIcon = d.ProcessorId + ".svg";
                homemodel.Last10Deposit.Add(w);
            }
            homemodel.plans  = _planService.GetAllPackage().ToList();
            ViewBag.SiteName = "3x1 BTC";
            return(View(homemodel));
        }
コード例 #3
0
        public ActionResult Index()
        {
            //string domainName = HttpContext.Request.Url.GetLeftPart(UriPartial.Authority);
            //if(domainName == "http://bahtbucket.net"|| domainName == "https://bahtbucket.net"
            //	|| domainName == "https://www.bahtbucket.net"
            //	|| domainName == "http://www.bahtbucket.net" || domainName == "http://localhost:53161" || domainName == "http://localhost" || domainName == "http://localhost:81")
            //{

            //}
            //else
            //{
            //	return Content("Invalid License, call us on +91-9737443888");
            //}
            //var task = new ScheduleTask
            //{
            //	CronExpression = "0 */24 * * *",
            //	Type = "SmartStore.Services.Hyip.CheckWithdrawalStatusTask, SmartStore.Services",//typeof("SmartStore.Services.Hyip.SendROITask,SmartStore.Services").AssemblyQualifiedNameWithoutVersion(),
            //	Enabled = false,
            //	StopOnError = false,
            //	IsHidden = false
            //};

            //task.Name = string.Concat("Check Withdrawal Status", " Task");
            //_scheduleTaskService.InsertTask(task);
            if (Request["r"] != null)
            {
                HttpCookie cookie = new HttpCookie("mthreferral", Request["r"].ToSafe());
                HttpContext.Response.Cookies.Remove("mthreferral");
                HttpContext.Response.SetCookie(cookie);
            }
            var reff = Request.Cookies["mthreferral"];
            //var customers = _customerService.GetOnlineCustomers(DateTime.UtcNow.AddMinutes(-_customerSettings.Value.OnlineCustomerMinutes),
            //	null, 0, _adminAreaSettings.GridPageSize);

            var       customers = _customerService.GetAllCustomers(null, null, null, null, null, null, null, 0, 0, null, null, null, false, null, 0, int.MaxValue, false);
            HomeModel homemodel = new HomeModel();

            homemodel.LaunchDate = DateTime.Parse("08/01/2019").ToShortDateString();             //DateTime.Today.AddDays(-95).ToShortDateString();
            TimeSpan dt = DateTime.Now - DateTime.Parse(homemodel.LaunchDate);

            homemodel.RunningDays   = dt.Days.ToString();
            homemodel.OnlineVistors = customers.Count().ToString();
            homemodel.TotalCustomer = customers.Where(x => x.Email != null).Count().ToString();
            int[] StatusIds          = { (int)Status.Completed };
            int[] TranscationTypeIds = { (int)TransactionType.Purchase };
            var   totalfundinglist   = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, TranscationTypeIds, 0, int.MaxValue).OrderByDescending(x => x.TransactionDate).Take(10);

            homemodel.TotalSiteDeposit = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, TranscationTypeIds, 0, int.MaxValue).Select(x => x.Amount).Sum().ToString();
            int[] WithTranscationTypeIds = { (int)TransactionType.Withdrawal };
            var   totalWithdrawallist    = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, WithTranscationTypeIds, 0, int.MaxValue).OrderByDescending(x => x.TransactionDate).Take(10);

            homemodel.TotalSiteWithdrawal = _transcationService.GetAllTransactions(0, 0, null, null, StatusIds, WithTranscationTypeIds, 0, int.MaxValue).Select(x => x.Amount).Sum().ToString();

            var withdrawals = totalWithdrawallist.OrderByDescending(x => x.TransactionDate).ToList();

            foreach (var d in withdrawals)
            {
                WithdrawalList w = new WithdrawalList();
                w.Email             = "AP-" + d.Customer.Id;
                w.AmountRaw         = d.Amount.ToString() + _workContext.WorkingCurrency.CurrencyCode;
                w.TransDate         = d.TransactionDate.ToShortDateString();
                w.PaymentMethodIcon = d.ProcessorId + ".svg";
                homemodel.Last10Withdrawal.Add(w);
            }

            var deposits = totalfundinglist.OrderByDescending(x => x.TransactionDate).ToList();

            foreach (var d in deposits)
            {
                DepositList w = new DepositList();
                w.Email             = "AP-" + d.Customer.Id;
                w.AmountRaw         = d.Amount.ToString() + _workContext.WorkingCurrency.CurrencyCode;
                w.TransDate         = d.TransactionDate.ToShortDateString();
                w.PaymentMethodIcon = d.ProcessorId + ".svg";
                homemodel.Last10Deposit.Add(w);
            }
            homemodel.plans  = _planService.GetAllPackage().ToList();
            ViewBag.SiteName = "AlienProfit";
            return(View(homemodel));
        }