コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            permissions();;

            List <Media>   _all                   = _media.get_all(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _twitter               = _media.get_twitter(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _instagram             = _media.get_instagram(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _unapproved            = _media.get_unapproved(Convert.ToInt32(Session["event_id"].ToString()));
            List <Dropbox> _dropbox_total         = _dropbox.select_list(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _unapproved_unreviewed = _media.unapproved_unreviewed(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _approved_unreviewed   = _media.approved_unreviewed(Convert.ToInt32(Session["event_id"].ToString()));

            facebook_media   = _dropbox_total.Count.ToString("0.#");
            total_media      = _all.Count.ToString("0.#");
            all_media        = total_media;
            instagram_media  = _instagram.Count.ToString("0.#");
            twitter_media    = _twitter.Count.ToString("0.#");
            unapproved_media = _unapproved.Count.ToString("0.#");
            approved_media   = (_all.Count - _unapproved.Count).ToString("0.#");

            unreviewed_approvedm  = _approved_unreviewed.Count.ToString("0.#");
            unreviewed_unapproved = _unapproved_unreviewed.Count.ToString("0.#");

            render_stats(10);
        }
コード例 #2
0
        private void get_totals()
        {
            List <Media>   _all           = _media.get_all(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _twitter       = _media.get_twitter(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _instagram     = _media.get_instagram(Convert.ToInt32(Session["event_id"].ToString()));
            List <Media>   _unapproved    = _media.get_unapproved(Convert.ToInt32(Session["event_id"].ToString()));
            List <Dropbox> _dropbox_total = _dropbox.select_list(Convert.ToInt32(Session["event_id"].ToString()));

            facebook_media   = _dropbox_total.Count.ToString("0.#");
            total_media      = _all.Count.ToString("0.#");
            all_media        = total_media;
            instagram_media  = _instagram.Count.ToString("0.#");
            twitter_media    = _twitter.Count.ToString("0.#");
            unapproved_media = _unapproved.Count.ToString("0.#");
        }
コード例 #3
0
ファイル: media.aspx.cs プロジェクト: fntechgit/fnpixsolution
        protected void Page_Load(object sender, EventArgs e)
        {
            permissions();

            get_totals();

            if (Page.RouteData.Values["unapproved"] != null)
            {
                string status = Page.RouteData.Values["unapproved"].ToString();

                if (status == "unapproved")
                {
                    render_media(_media.get_unapproved(Convert.ToInt32(Session["event_id"].ToString())));
                }
                else
                {
                    render_media(_media.get_all(Convert.ToInt32(Session["event_id"].ToString()), true));
                }
            }
            else
            {
                render_media(_media.get_all(Convert.ToInt32(Session["event_id"].ToString())));
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user_id"] == null)
            {
                Response.Redirect("/login");
            }
            else
            {
                user_picture = "/uploads/" + Session["user_pic"].ToString();
                user_name    = Session["user_name"].ToString();
                company_name = Session["company_name"].ToString();
                user_email   = Session["user_email"].ToString();

                if (!Page.IsPostBack)
                {
                    List <Event> myevents = _permissions.select_permitted_events(Convert.ToInt32(Session["user_id"].ToString()));

                    if (myevents.Count > 0)
                    {
                        ddl_event.DataSource     = myevents;
                        ddl_event.DataValueField = "id";
                        ddl_event.DataTextField  = "title";
                        ddl_event.DataBind();
                        ddl_event.SelectedIndex = 0;

                        if (Session["event_id"] != null)
                        {
                            ddl_event.SelectedValue = Session["event_id"].ToString();
                        }
                        else
                        {
                            Session["event_id"] = myevents[0].id.ToString();
                        }
                    }
                    else
                    {
                        Response.Redirect("/login/no-events-allowed");
                    }
                }
            }

            List <Media> _unapproved = _media.get_unapproved(Convert.ToInt32(Session["event_id"].ToString()));

            unapproved_count = _unapproved.Count.ToString("0.#");
        }