Пример #1
0
        //[CanBeReflected(ThreatLevel = ThreatLevel.Full)]
        public AbuseReport GetAbuseReport(int Number, string Password)
        {
            /*object remoteValue = DoRemote(Number, Password);
             * if (remoteValue != null || m_doRemoteOnly)
             *  return (AbuseReport)remoteValue;*/

            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector>();

            return((conn != null) ? conn.GetAbuseReport(Number, Password) : null);
        }
Пример #2
0
        public AbuseReport GetAbuseReport(int Number, string Password)
        {
            IAbuseReportsConnector conn = Aurora.DataManager.DataManager.RequestPlugin <IAbuseReportsConnector>();

            if (conn != null)
            {
                return(conn.GetAbuseReport(Number, Password));
            }
            else
            {
                return(null);
            }
        }
        public AbuseReport GetAbuseReport(int Number, string Password)
        {
            object remoteValue = DoRemote(Number, Password);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((AbuseReport)remoteValue);
            }

            IAbuseReportsConnector conn = DataManager.RequestPlugin <IAbuseReportsConnector>();

            return((conn != null) ? conn.GetAbuseReport(Number, Password) : null);
        }
        /// <summary>
        ///     Cannot be reflected on purpose, so it can only be used locally.
        ///     Gets the abuse report associated with the number without authentication.
        /// </summary>
        /// <param name="Number"></param>
        /// <returns></returns>
        public AbuseReport GetAbuseReport(int Number)
        {
            IAbuseReportsConnector conn = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector>();

            return((conn != null) ? conn.GetAbuseReport(Number) : null);
        }
Пример #5
0
        public Dictionary <string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                                OSHttpResponse httpResponse, Dictionary <string, object> requestParameters,
                                                ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary <string, object> ();

            IAbuseReportsConnector abuseModule       = Framework.Utilities.DataManager.RequestPlugin <IAbuseReportsConnector> ();
            IUserAccountService    accountService    = webInterface.Registry.RequestModuleInterface <IUserAccountService> ();
            IWebHttpTextureService webTextureService = webInterface.Registry.RequestModuleInterface <IWebHttpTextureService> ();

            string noDetails   = translator.GetTranslatedString("NoDetailsText");
            string infoMessage = "";

            AbuseReport rpt;
            var         snapshotURL = "../images/icons/no_screenshot.jpg";

            // the card number can come in a number of ways
            int cardID = httpRequest.Query.ContainsKey("cardid")
                ? int.Parse(httpRequest.Query ["cardid"].ToString())
                : int.Parse(requestParameters ["cardid"].ToString());


            rpt = abuseModule.GetAbuseReport(cardID);
            if (rpt == null)
            {
                vars.Add("NoDetailsText", noDetails);
                return(vars);
            }

            // we have the report
            noDetails = "";
            if (rpt.ScreenshotID != UUID.Zero)
            {
                snapshotURL = webTextureService.GetTextureURL(rpt.ScreenshotID);
            }

            // updating?
            if (requestParameters.ContainsKey("SubmitUpdates"))
            {
                {
                    string newNote = requestParameters ["AbuseNoteText"].ToString();
                    if (newNote != "")
                    {
                        rpt.Notes = newNote;
                    }

                    rpt.Checked    = (requestParameters ["Checked"].ToString().ToLower() == "yes");
                    rpt.Active     = (requestParameters ["Active"].ToString().ToLower() == "yes");
                    rpt.AssignedTo = requestParameters ["AssignedTo"].ToString();

                    abuseModule.UpdateAbuseReport(rpt);

                    infoMessage = translator.GetTranslatedString("ChangesSavedSuccessfully");
                }
            }

            // get admin users
            var adminUsers     = accountService.GetUserAccounts(null, Constants.USER_GOD_CUSTOMER_SERVICE, 0);
            var adminUsersList = new List <Dictionary <string, object> > ();

            if (adminUsers.Count > 0)
            {
                foreach (var user in adminUsers)
                {
                    if (!Utilities.IsSystemUser(user.PrincipalID))
                    {
                        adminUsersList.Add(new Dictionary <string, object> {
                            { "Value", user.Name }
                        });
                    }
                }
                adminUsersList.Add(new Dictionary <string, object> {
                    { "Value", "No One" }
                });
            }
            vars.Add("AdminUsersList", adminUsersList);

            // details
            vars.Add("CardNumber", rpt.Number);
            //vars.Add("Date"), Culture.LocaleDate (transaction.TransferDate.ToLocalTime(), "MMM dd, hh:mm:ss tt");
            vars.Add("Details", rpt.AbuseDetails);
            vars.Add("AbuseLocation", rpt.AbuseLocation);
            vars.Add("Summary", rpt.AbuseSummary);
            vars.Add("AbuserName", rpt.AbuserName);
            vars.Add("IsActive", rpt.Active);
            vars.Add("IsNotActive", !rpt.Active);

            vars.Add("AssignedTo", rpt.AssignedTo);
            vars.Add("Category", rpt.Category);

            vars.Add("IsChecked", rpt.Checked);
            vars.Add("IsNotChecked", !rpt.Checked);

            vars.Add("Notes", rpt.Notes);
            vars.Add("ObjectName", rpt.ObjectName);
            vars.Add("ObjectPosition", rpt.ObjectPosition);
            vars.Add("ObjectUUID", rpt.ObjectUUID);
            vars.Add("RegionName", rpt.RegionName);
            vars.Add("ReporterName", rpt.ReporterName);
            vars.Add("ScreenshotURL", snapshotURL);

            vars.Add("NoDetailsText", noDetails);
            vars.Add("InfoMessage", infoMessage);

            // labels
            vars.Add("AbuseReportText", translator.GetTranslatedString("AbuseReportText"));

            vars.Add("DateText", translator.GetTranslatedString("DateText"));
            vars.Add("CategoryText", translator.GetTranslatedString("CategoryText"));
            vars.Add("SummaryText", translator.GetTranslatedString("SummaryText"));
            vars.Add("AbuserNameText", translator.GetTranslatedString("AbuserNameText"));
            vars.Add("AbuseReporterNameText", translator.GetTranslatedString("AbuseReporterNameText"));
            vars.Add("RegionNameText", translator.GetTranslatedString("RegionNameText"));
            vars.Add("ObjectNameText", translator.GetTranslatedString("ObjectNameText"));
            vars.Add("LocationText", translator.GetTranslatedString("LocationText"));
            vars.Add("UUIDText", translator.GetTranslatedString("UUIDText"));
            vars.Add("DetailsText", translator.GetTranslatedString("DetailsText"));
            vars.Add("NotesText", translator.GetTranslatedString("NotesText"));
            vars.Add("AddNotesText", translator.GetTranslatedString("AddNotesText"));
            vars.Add("ActiveText", translator.GetTranslatedString("ActiveText"));
            vars.Add("CheckedText", translator.GetTranslatedString("CheckedText"));
            vars.Add("AssignedToText", translator.GetTranslatedString("AssignedToText"));
            vars.Add("Submit", translator.GetTranslatedString("SaveUpdates"));
            vars.Add("Yes", translator.GetTranslatedString("Yes"));
            vars.Add("No", translator.GetTranslatedString("No"));

            return(vars);
        }
Пример #6
0
 private void Form1_Load(object sender, EventArgs e)
 {
     SetGUI(AbuseReportsConnector.GetAbuseReport(formNumber, Password));
 }