Exemple #1
0
 public string MakeUserGroupTaskEmailLink2(EkTask taskObj)
 {
     string returnValue;
     if (IsLoggedInUsersEmailValid())
     {
         returnValue = "<a href=\"#\"" + "onclick=\"LoadEmailChildPage(\'groupid=" + taskObj.AssignToUserGroupID + MakeNotes_Email("Task", taskObj.TaskTitle) + "\')\"" + " title=\'" + gtMessEmail.GetMessage("alt send email to") + " \"" + taskObj.AssignedToUserGroup.Replace("\'", "`") + "\"" + "\'>" + taskObj.AssignedToUserGroup + "&nbsp;" + MakeEmailGraphic() + "</a>";
     }
     else
     {
         returnValue = taskObj.AssignedToUserGroup;
     }
     return returnValue;
 }
Exemple #2
0
    // ---------------------------------------------------------------------------
    // Builds a hyperlink to launch the email window, user-email-target is task target:
    public string MakeUserTaskEmailLink(EkTask taskObj, bool blnShowFullName)
    {
        string returnValue;
        UserAPI objUserAPI = new UserAPI();
        UserData objUserData = new UserData();
        string strUserFullName;

        objUserData = objUserAPI.GetActiveUserById(taskObj.AssignedToUserID, false);
        strUserFullName = objUserData.FirstName + " " + objUserData.LastName;

        if (blnShowFullName == false)
        {
            if (IsLoggedInUsersEmailValid())
            {
                returnValue = "<a href=\"#\"" + "onclick=\"LoadEmailChildPage(\'userid=" + taskObj.AssignedToUserID + MakeNotes_Email("Task", (string)taskObj.TaskTitle) + "\')\"" + " title=\'" + gtMessEmail.GetMessage("alt send email to") + " \"" + strUserFullName.Replace("\'", "`") + "\"" + "\'>" + taskObj.AssignedToUser + "&nbsp;" + MakeEmailGraphic() + "</a>";
            }
            else
            {
                returnValue = taskObj.AssignedToUser;
            }
        }
        else
        {
            if (IsLoggedInUsersEmailValid())
            {
                returnValue = "<a href=\"#\"" + "onclick=\"LoadEmailChildPage(\'userid=" + taskObj.AssignedToUserID + MakeNotes_Email("Task", (string)taskObj.TaskTitle) + "\')\"" + " title=\'" + gtMessEmail.GetMessage("alt send email to") + " \"" + strUserFullName.Replace("\'", "`") + "\"" + "\'>" + strUserFullName + " (" + taskObj.AssignedToUser + ")" + "&nbsp;" + MakeEmailGraphic() + "</a>";
            }
            else
            {
                returnValue = strUserFullName + " (" + taskObj.AssignedToUser + ")";
            }
        }
        return returnValue;
    }
Exemple #3
0
    private void ViewTasks()
    {
        string actiontype = "both";
        string callBackPage = ""; //unknown
        System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "TITLE";
        colBound.HeaderText = m_refMsg.GetMessage("generic Title");
        TaskDataGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "ID";
        colBound.HeaderText = m_refMsg.GetMessage("generic ID");
        TaskDataGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "STATE";
        colBound.HeaderText = m_refMsg.GetMessage("lbl state");
        TaskDataGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "PRIORITY";
        colBound.HeaderText = m_refMsg.GetMessage("lbl priority");
        TaskDataGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "DUEDATE";
        colBound.HeaderText = m_refMsg.GetMessage("lbl Due Date");
        TaskDataGrid.Columns.Add(colBound);

        if ((actiontype == "by") || (actiontype == "all") || (actiontype == "both"))
        {
            colBound = new System.Web.UI.WebControls.BoundColumn();
            colBound.DataField = "ASSIGNEDTO";
            colBound.HeaderText = m_refMsg.GetMessage("lbl Assigned to");
            TaskDataGrid.Columns.Add(colBound);
        }
        if ((actiontype == "to") || (actiontype == "all") || (actiontype == "both"))
        {
            colBound = new System.Web.UI.WebControls.BoundColumn();
            colBound.DataField = "ASSIGNEDBY";
            colBound.HeaderText = m_refMsg.GetMessage("lbl Assigned By");
            TaskDataGrid.Columns.Add(colBound);
        }

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "COMMENT";
        colBound.HeaderText = m_refMsg.GetMessage("lbl Last Added comments");
        TaskDataGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "DATECREATED";
        colBound.HeaderText = m_refMsg.GetMessage("lbl Create Date");
        TaskDataGrid.Columns.Add(colBound);

        TaskDataGrid.BorderColor = System.Drawing.Color.White;

        DataTable dt = new DataTable();
        DataRow dr;

        dt.Columns.Add(new DataColumn("TITLE", typeof(string)));
        dt.Columns.Add(new DataColumn("ID", typeof(string)));
        dt.Columns.Add(new DataColumn("STATE", typeof(string)));
        dt.Columns.Add(new DataColumn("PRIORITY", typeof(string)));
        dt.Columns.Add(new DataColumn("DUEDATE", typeof(string)));
        dt.Columns.Add(new DataColumn("ASSIGNEDTO", typeof(string)));
        dt.Columns.Add(new DataColumn("ASSIGNEDBY", typeof(string)));
        dt.Columns.Add(new DataColumn("COMMENT", typeof(string)));
        dt.Columns.Add(new DataColumn("DATECREATED", typeof(string)));

        if (TaskExists == true)
        {
            int TaskItemType = 1;
            m_refTask = m_refContentApi.EkTaskRef;

            Ektron.Cms.PageRequestData null_EktronCmsPageRequestData = null;
            cTasks = m_refTask.GetTasks(m_intId, -1, -1, TaskItemType, Request.QueryString["orderby"], ContentLanguage, ref null_EktronCmsPageRequestData, "");
        }

        int i = 0;
        EkTask cTask;

        if (cTasks != null)
        {
            EmailHelper m_refMail = new EmailHelper();
            while (i < cTasks.Count)
            {
                i++;
                cTask = cTasks.get_Item(i);
                if (!(cTask.TaskTypeID == (long)Ektron.Cms.Common.EkEnumeration.TaskType.BlogPostComment))
                {
                    Array.Resize(ref arrTaskTypeID, i - 1 + 1);
                    arrTaskTypeID[i - 1] = (string)("shown_task_" + i + "_" + (cTask.TaskTypeID <= 0 ? "NotS" : (cTask.TaskTypeID.ToString())));

                    dr = dt.NewRow();

                    dr["TITLE"] = "<a href=\"tasks.aspx?action=ViewTask&tid=" + cTask.TaskID + "&folderid=" + cTask.FolderId  +  "&contentid=" + cTask.ContentID +  "&fromViewContent=1&ty=both&LangType=" + cTask.ContentLanguage + callBackPage + "\">" + cTask.TaskTitle + "</a>";
                    dr["TITLE"] += "	<script language=\"JavaScript\">" + "\r\n";
                    dr["TITLE"] += "					AddShownTaskID(\'" + arrTaskTypeID[i - 1] + "\');" + "\r\n";
                    dr["TITLE"] += "				</script>	" + "\r\n";

                    dr["ID"] = cTask.TaskID;
                    int iState = System.Convert.ToInt32(cTask.State);
                    switch (iState)
                    {
                        case 1:
                            dr["STATE"] = "Not Started";
                            break;
                        case 2:
                            dr["STATE"] = "Active";
                            break;
                        case 3:
                            dr["STATE"] = "Awaiting Data";
                            break;
                        case 4:
                            dr["STATE"] = "On Hold";
                            break;
                        case 5:
                            dr["STATE"] = "Pending";
                            break;
                        case 6:
                            dr["STATE"] = "ReOpened";
                            break;
                        case 7:
                            dr["STATE"] = "Completed";
                            break;
                        case 8:
                            dr["STATE"] = "Archived";
                            break;
                        case 9:
                            dr["STATE"] = "Deleted";
                            break;
                    }
                    int iPrio = System.Convert.ToInt32(cTask.Priority);
                    switch (iPrio)
                    {
                        case 1:
                            dr["PRIORITY"] = "Low";
                            break;
                        case 2:
                            dr["PRIORITY"] = "Normal";
                            break;
                        case 3:
                            dr["PRIORITY"] = "High";
                            break;
                    }

                    if (cTask.DueDate != "")
                    {
                        if (System.Convert.ToDateTime(cTask.DueDate) < DateTime.Today) //Verify:Udai 11/22/04 Replaced Now.ToOADate - 1 with DateTime.Today
                        {
                            dr["DUEDATE"] = cTask.DueDate; //Response.Write("<td class=""important"">" & AppUI.GetInternationalDateOnly(cTask.DueDate) & "</td>")
                        }
                        else
                        {
                            dr["DUEDATE"] = cTask.DueDate; //Response.Write("<td>" & AppUI.GetInternationalDateOnly(cTask.DueDate) & "</td>")
                        }
                    }
                    else
                    {
                        dr["DUEDATE"] = "[Not Specified]";
                    }
                    EkTask tempcTask = cTask;
                    if ((actiontype == "by") || (actiontype == "all") || (actiontype == "both"))
                    {
                        if (cTask.AssignToUserGroupID == 0)
                        {
                            dr["ASSIGNEDTO"] = "All Authors of (" + cTask.ContentID.ToString() + ")";
                        }
                        else if (cTask.AssignedToUser != "")
                        {
                            dr["ASSIGNEDTO"] = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/user.png\" align=\"absbottom\">" + m_refMail.MakeUserTaskEmailLink(tempcTask, false);
                        }
                        else if (cTask.AssignedToUserGroup != "")
                        {
                            dr["ASSIGNEDTO"] = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/users.png\" align=\"absbottom\">";
                            if (cTask.AssignToUserGroupID != -1)
                            {
                                dr[5] += m_refMail.MakeUserGroupTaskEmailLink(tempcTask);
                            }
                            else
                            {
                                dr[5] += cTask.AssignedToUserGroup;
                            }
                        }
                    }
                    if ((actiontype == "to") || (actiontype == "all") || (actiontype == "both"))
                    {
                        dr["ASSIGNEDBY"] = m_refMail.MakeByUserTaskEmailLink(tempcTask, false);

                    }

                    if (cTask.LastComment == "")
                    {
                        dr["COMMENT"] = "[Not Specified]";
                    }
                    else
                    {
                        dr["COMMENT"] = "<div class=\"comment-block\">" + cTask.LastComment + "</div>";
                    }
                    dr["DATECREATED"] = cTask.DateCreated; //GetInternationalDateOnly

                    dt.Rows.Add(dr);
                }
            }
        }
        DataView dv = new DataView(dt);
        TaskDataGrid.DataSource = dv;
        TaskDataGrid.DataBind();
    }
Exemple #4
0
 private string GetAssignedToUserFullName(EkTask task)
 {
     string retval = string.Empty;
     retval = GetUserFullName(task.AssignedToUserID);
     return retval;
 }
Exemple #5
0
 private string GetAssignedByUserFullName(EkTask task)
 {
     string retval = string.Empty;
     retval = GetUserFullName(Convert.ToInt64(task.AssignedByUserID));
     return retval;
 }
Exemple #6
0
    public bool ViewContentByCategory()
    {
        _CurrentUserId = _ContentApi.UserId;
        _AppImgPath = _ContentApi.AppImgPath;
        _AppPath = _ContentApi.AppPath;
        _SitePath = _ContentApi.SitePath;
        _EnableMultilingual = _ContentApi.EnableMultilingual;

        url_action.Text = _PageAction;
        url_id.Text = _Id.ToString();

        if (_FolderData == null)
        {
            _FolderData = _ContentApi.GetFolderById(_Id);
        }
        if (_FolderData == null)
        {
            Response.Redirect((string)("reterror.aspx?info=" + _MessageHelper.GetMessage("com: folder does not exist")), true);
            return false;
        }
        else
        {
            if (_FolderData.XmlConfiguration != null)
            {
                _HasXmlConfig = true;
            }
            _PermissionData = _ContentApi.LoadPermissions(_Id, "folder", 0);
            _FolderType = _FolderData.FolderType;
        }

        //Setting JS Variable for global use through workarea.aspx page.
        pasteFolderType.Text = Convert.ToString(_FolderData.FolderType);
        pasteFolderId.Text = Convert.ToString(_FolderData.Id);
        pasteParentId.Text = Convert.ToString(_FolderData.ParentId);

        if (!string.IsNullOrEmpty(Request.QueryString["IsArchivedEvent"]))
        {
            _IsArchivedEvent = Convert.ToBoolean(Request.QueryString["IsArchivedEvent"]);
            is_archived.Text = Convert.ToString(_IsArchivedEvent);
        }

        _AssetInfoData = _ContentApi.GetAssetSupertypes();
        if ((Ektron.Cms.Common.EkConstants.CMSContentType_Content == Convert.ToInt32(_ContentTypeSelected)) || (Ektron.Cms.Common.EkConstants.CMSContentType_Archive_Content == Convert.ToInt32(_ContentTypeSelected)) || (Ektron.Cms.Common.EkConstants.CMSContentType_XmlConfig == Convert.ToInt32(_ContentTypeSelected)))
        {
            _ContentType = int.Parse(_ContentTypeSelected);
        }
        else if (Ektron.Cms.Common.EkConstants.CMSContentType_Forms == Convert.ToInt32(_ContentTypeSelected) || Ektron.Cms.Common.EkConstants.CMSContentType_Archive_Forms == Convert.ToInt32(_ContentTypeSelected))
        {
            _ContentType = int.Parse(_ContentTypeSelected);
        }
        else if (_ManagedAsset_Min <= Convert.ToInt32(_ContentTypeSelected) && Convert.ToInt32(_ContentTypeSelected) <= _ManagedAsset_Max)
        {
            if (DoesAssetSupertypeExist(_AssetInfoData, int.Parse(_ContentTypeSelected)))
            {
                _ContentType = int.Parse(_ContentTypeSelected);
            }
        }
        else if (Convert.ToInt32(_ContentTypeSelected) == _CMSContentType_AllTypes)
        {
            _ContentType = Ektron.Cms.Common.EkConstants.CMSContentType_NonLibraryForms;
        }
        else if (_IsArchivedEvent == true && (Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_ManagedFiles || Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_OfficeDoc || Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_MultiMedia || Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_Images))
        {
            _ContentType = int.Parse(_ContentTypeSelected);
        }

        _ContentTypeSelected = _ContentType.ToString();

        _PageData = new Microsoft.VisualBasic.Collection();
        _PageData.Add(_Id, "FolderID", null, null);
        if (_FolderData.FolderType == 1) //blog
        {
            _PageData.Add("BlogPost", "OrderBy", null, null);
        }
        else
        {
            _PageData.Add(_OrderBy, "OrderBy", null, null);
        }
        if (Request.QueryString["orderbydirection"] == "desc")
            direction = "desc";
        else
            direction = "asc";
        _OrderByDirection = direction;
        _PageData.Add(_OrderByDirection, "OrderByDirection", null, null);
        _PageData.Add(_ContentLanguage, "m_intContentLanguage", null, null);
        switch ((Ektron.Cms.Common.EkEnumeration.FolderType)_FolderData.FolderType)
        {
            case Ektron.Cms.Common.EkEnumeration.FolderType.Blog:
                _ContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content;
                _PageData.Add(_ContentType, "ContentType", null, null);
                break;
            case Ektron.Cms.Common.EkEnumeration.FolderType.DiscussionForum:
                _ContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content;
                _PageData.Add(_ContentType, "ContentType", null, null);
                break;
            default:
                if (_ContentType > 0)
                {
                    _PageData.Add(_ContentType, "ContentType", null, null);
                }
                break;
        }

        if (_ContentType == 1 && _ContentSubTypeSelected != Ektron.Cms.Common.EkEnumeration.CMSContentSubtype.AllTypes)
        {
            _PageData.Add(_ContentSubTypeSelected, "ContentSubType", null, null);
        }

        if ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType) == Ektron.Cms.Common.EkEnumeration.FolderType.Calendar)
        {
            calendardisplay.Visible = true;
            pnlThreadedDiscussions.Visible = false;
            if ((Request.QueryString["showAddEventForm"] != null) && Request.QueryString["showAddEventForm"] == "true")
            {
                if (ViewState["AddEventFormDisplay"] == null || System.Convert.ToBoolean(ViewState["AddEventFormDisplay"]) == false) //only show once
                {
                    ViewState.Add("AddEventFormDisplay", true);
                    DateTime startDT = DateTime.Now.Date.AddHours(8);
                    if (Request.QueryString["startDT"] != null)
                    {
                        startDT = DateTime.ParseExact(Request.QueryString["startDT"], "yyyyMMddHHmm", new System.Globalization.CultureInfo(1033));
                    }
                    calendardisplay.ShowInsertForm(startDT);
                }
            }
            if (Request.QueryString["editEvent"] != null)
            {
                if (ViewState["editEvent"] == null || System.Convert.ToBoolean(ViewState["editEvent"]) == false) //only show once
                {
                    ViewState.Add("editEvent", true);
                    calendardisplay.ShowEditForm(Request.QueryString["editEvent"]);
                }
            }

            ScriptManager.RegisterClientScriptBlock(Page, typeof(UserControl), "CalendarCleanup", "try{ window.EditorCleanup(); }catch(ex){}", true);
        }
        _PagingPageSize = _ContentApi.RequestInformationRef.PagingSize;
        if ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType) == Ektron.Cms.Common.EkEnumeration.FolderType.Blog)
        {
            _BlogData = _ContentApi.BlogObject(_FolderData);
        }

        //if it's a calendar then we do it on prerender
        if ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType) != Ektron.Cms.Common.EkEnumeration.FolderType.Calendar)
        {
            if (_PageAction == "viewarchivecontentbycategory")
            {
                _EkContentCol = _EkContent.GetAllViewArchiveContentInfov5_0(_PageData, _PagingCurrentPageNumber, _PagingPageSize, ref _PagingTotalPagesNumber);
                _NextActionType = "ViewContentByCategory";
            }
            else if (_PageAction == "viewcontentbycategory")
            {
                _EkContentCol = _EkContent.GetAllViewableChildContentInfoV5_0(_PageData, _PagingCurrentPageNumber, _PagingPageSize, ref _PagingTotalPagesNumber);
                _NextActionType = "ViewArchiveContentByCategory";
            }
            //paging goes here

            int i;
            for (i = 0; i <= _EkContentCol.Count - 1; i++)
            {
                if (_EkContentCol.get_Item(i).ContentStatus == "A")
                {
                    _TakeAction = true;
                    _CheckedInOrApproved = true;
                    break;
                }
                else
                {
                    if (_EkContentCol.get_Item(i).ContentStatus == "I")
                    {
                        _CheckedInOrApproved = true;
                    }
                }
            }
        }
        else
        {
            if (_PageAction == "viewarchivecontentbycategory")
            {
                _NextActionType = "ViewContentByCategory";
            }
            else if (_PageAction == "viewcontentbycategory")
            {
                _NextActionType = "ViewArchiveContentByCategory";
            }
        }

        switch ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType))
        {
            case Ektron.Cms.Common.EkEnumeration.FolderType.Catalog:
                if (_PageAction == "viewarchivecontentbycategory")
                {
                    _NextActionType = "ViewContentByCategory";
                }
                else if (_PageAction == "viewcontentbycategory")
                {
                    _NextActionType = "ViewArchiveContentByCategory";
                }

                Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>");

                CatalogEntry CatalogManager = new CatalogEntry(_ContentApi.RequestInformationRef);
                System.Collections.Generic.List<EntryData> entryList = new System.Collections.Generic.List<EntryData>();
                Ektron.Cms.Common.Criteria<EntryProperty> entryCriteria = new Ektron.Cms.Common.Criteria<EntryProperty>();

                entryCriteria.AddFilter(EntryProperty.CatalogId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, _Id);
                entryCriteria.PagingInfo.CurrentPage = Convert.ToInt32(_PagingCurrentPageNumber.ToString());
                entryCriteria.PagingInfo.RecordsPerPage = _ContentApi.RequestInformationRef.PagingSize;

                if (_ContentApi.RequestInformationRef.ContentLanguage > 0)
                {
                    entryCriteria.AddFilter(EntryProperty.LanguageId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, _ContentApi.RequestInformationRef.ContentLanguage);
                }

                switch (this._ContentTypeQuerystringParam)
                {
                    case "0":
                        long[] IdList = new long[3];
                        IdList[0] = Convert.ToInt64(Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Product);
                        IdList[1] = Convert.ToInt64(Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct);
                        entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.In, IdList);
                        break;
                    case "2":
                        entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Kit);
                        break;
                    case "3":
                        entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Bundle);
                        break;
                    case "4":
                        entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, Ektron.Cms.Common.EkEnumeration.CatalogEntryType.SubscriptionProduct);
                        break;
                }

                if (_PageAction == "viewarchivecontentbycategory")
                {
                    entryCriteria.AddFilter(EntryProperty.IsArchived, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, true);
                }
                else
                {
                    entryCriteria.AddFilter(EntryProperty.IsArchived, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, false);
                }
                if (Request.QueryString["orderbydirection"] == "desc")
                    direction = "desc";
                else
                    direction = "asc";
                if(direction == "desc")
                    entryCriteria.OrderByDirection = (EkEnumeration.OrderByDirection)OrderByDirection.Descending;
                else
                entryCriteria.OrderByDirection = (EkEnumeration.OrderByDirection)OrderByDirection.Ascending;

                switch (_OrderBy.ToLower())
                {
                    case "language":
                        entryCriteria.OrderByField = EntryProperty.LanguageId;
                        break;
                    case "id":
                        entryCriteria.OrderByField = EntryProperty.Id;
                        break;
                    case "status":
                        entryCriteria.OrderByField = EntryProperty.ContentStatus;
                        break;
                    case "entrytype":
                        entryCriteria.OrderByField = EntryProperty.EntryType;
                        break;
                    case "sale":
                        entryCriteria.OrderByField = EntryProperty.SalePrice;
                        break;
                    case "list":
                        entryCriteria.OrderByField = EntryProperty.ListPrice;
                        break;
                    default: //"title"
                        entryCriteria.OrderByField = EntryProperty.Title;
                        break;
                }

                entryList = CatalogManager.GetList(entryCriteria);

                for (int j = 0; j <= entryList.Count - 1; j++)
                {
                    if (entryList[j].Status == "A")
                    {
                        _TakeAction = true;
                        _CheckedInOrApproved = true;
                        break;
                    }
                    else
                    {
                        if (entryList[j].Status == "I")
                        {
                            _CheckedInOrApproved = true;
                        }
                    }
                }

                _PagingTotalPagesNumber = System.Convert.ToInt32(entryCriteria.PagingInfo.TotalPages);

                //paging goes here

                ViewCatalogToolBar(entryList.Count);
                Populate_ViewCatalogGrid(_EkContentCol, entryList);
                _ContentType = int.Parse(_ContentTypeSelected);
                break;
            case Ektron.Cms.Common.EkEnumeration.FolderType.Blog:
                _IsMyBlog = System.Convert.ToBoolean((_BlogData.Id == _ContentApi.GetUserBlog(_ContentApi.UserId)) ? true : false);
                Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>");
                if (!string.IsNullOrEmpty(Request.QueryString["ContType"]) && (Request.QueryString["ContType"] == Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments.ToString()))
                {
                    _ContentType = System.Convert.ToInt32(Request.QueryString["ContType"]);
                    _Task = _ContentApi.EkTaskRef;
                    if (!string.IsNullOrEmpty(Request.QueryString["contentid"]))
                    {
                        _PostID = Convert.ToInt64(Request.QueryString["contentid"]);
                        _ContentData = _ContentApi.GetContentById(_PostID, 0);

                        Ektron.Cms.PageRequestData null_EktronCmsPageRequestData = null;
                        _Comments = _Task.GetTasks(_PostID, -1, -1, Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.CMSTaskItemType.BlogCommentItem), "postcomment", 0, ref null_EktronCmsPageRequestData, "");
                    }
                    else
                    {

                        Ektron.Cms.PageRequestData null_EktronCmsPageRequestData2 = null;
                        _Comments = _Task.GetTasks(-1, -1, -1, Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.CMSTaskItemType.BlogCommentItem), "", 0, ref null_EktronCmsPageRequestData2, "");
                    }
                    ViewBlogContentByCategoryToolBar();
                    Populate_ViewBlogCommentsByCategoryGrid(_Comments);
                }
                else
                {
                    Hashtable BlogPostCommentTally = new Hashtable();
                    BlogPostCommentTally = _EkContent.TallyCommentsForBlogPosts(_Id);
                    ViewBlogContentByCategoryToolBar();
                    Populate_ViewBlogPostsByCategoryGrid(_EkContentCol, BlogPostCommentTally);
                }
                break;
            case Ektron.Cms.Common.EkEnumeration.FolderType.Media:
                Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>");
                ViewContentByCategoryToolBar();
                Populate_ViewMediaGrid(_EkContentCol);
                break;
            case Ektron.Cms.Common.EkEnumeration.FolderType.DiscussionBoard:
                Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>");
                ViewDiscussionBoardToolBar();
                Populate_ViewDiscussionBoardGrid();
                break;
            case Ektron.Cms.Common.EkEnumeration.FolderType.DiscussionForum:
                Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>");
                bool bCanModerate = false;
                int itotalpages = 1;
                int icurrentpage = 1;
                if (!string.IsNullOrEmpty(Request.QueryString["ContType"]) && (Request.QueryString["ContType"] == Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments.ToString()))
                {
                    _ContentType = System.Convert.ToInt32(Request.QueryString["ContType"]);
                    if (this._ContentApi.UserId > 0 && ((!(_PermissionData == null) && _PermissionData.CanAddToImageLib == true) || _PermissionData.IsAdmin))
                    {
                        bCanModerate = true;
                    }
                    _DiscussionBoard = _ContentApi.GetTopic(_ContentId, true);
                    if (_DiscussionBoard == null)
                    {
                        throw new Exception("You may not have permission to view this object or it has been deleted.");
                    }
                    _BoardID = _DiscussionBoard.Id;
                    _ContentData = (ContentData)(_DiscussionBoard.Forums[0].Topics[0]);
                    _PermissionData = _ContentApi.LoadPermissions(_ContentId, "content", ContentAPI.PermissionResultType.All);
                    ViewRepliesToolBar();
                    _Task = _ContentApi.EkTaskRef;
                    if (!string.IsNullOrEmpty(Request.QueryString["contentid"]))
                    {
                        _PostID = Convert.ToInt64(Request.QueryString["contentid"]);
                        _Comments = _Task.GetTopicReplies(_PostID, _DiscussionBoard.Id, ref icurrentpage, 0, 0, ref itotalpages, bCanModerate);
                    }
                    else
                    {

                        Ektron.Cms.PageRequestData null_EktronCmsPageRequestData3 = null;
                        _Comments = _Task.GetTasks(-1, -1, -1, Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.CMSTaskItemType.TopicReplyItem), "", 0, ref null_EktronCmsPageRequestData3, "");
                    }
                    Populate_ViewTopicRepliesGrid(_Comments);
                }
                else
                {
                    ArrayList ForumPostCommentTally = new ArrayList();
                    DiscussionBoard thisboard;
                    bool bModerator = false;
                    if (_PermissionData.IsAdmin == true || _PermissionData.CanAddToImageLib == true)
                    {
                        bModerator = true;
                    }
                    thisboard = _EkContent.GetForumbyID(_Id.ToString(), bModerator, _PagingCurrentPageNumber, ref this._PagingTotalPagesNumber, "", this._ContentApi.RequestInformationRef.PagingSize);

                    //paging here

                    ForumPostCommentTally = _EkContent.GetRepliesForTopics(_Id);
                    ViewDiscussionForumToolBar();
                    Populate_ViewForumPostsByCategoryGrid(thisboard.Forums[0].Topics, ForumPostCommentTally);
                }
                break;
            case Ektron.Cms.Common.EkEnumeration.FolderType.Calendar:
                ViewCalendarToolBar();
                break;
            default:
                ViewContentByCategoryToolBar();
                Populate_ViewContentByCategoryGrid(_EkContentCol);
                break;
        }

        Util_SetJs();
        return true;
    }
Exemple #7
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        bool bAddingNew = false;
        string tempStr;
        string referrerStr;
        try
        {
            //INITIALIZE THE VARIABLES
            if (Request.Browser.Type.IndexOf("IE") != -1)
            {
                IsBrowserIE = true;
            }
            jsIsMac.Text = "false";
            if (Request.Browser.Platform.IndexOf("Win") == -1)
            {
                IsMac = true;
            }
            // Ensure that this is not a browser refresh (Mac-Safari bug causes
            // the editor to load after publishing, if the browser is refreshing):
            if (IsMac && !IsBrowserIE)
            {
                referrerStr = Request.Url.LocalPath;
                if (referrerStr != null)
                {
                    tempStr = referrerStr.Substring(referrerStr.LastIndexOf("/"));
                    if (tempStr == "/workarea.aspx")
                    {
                        tempStr = referrerStr.Replace(tempStr, "/dashboard.aspx");
                        Response.Redirect(tempStr, false);
                        return;
                    }
                }
            }

            if (m_SelectedEditControl != "ContentDesigner")
            {
                m_ctlContentPane.Controls.Remove(m_ctlContentDesigner);
                m_ctlSummaryStandard.Controls.Remove(m_ctlSummaryDesigner);
                m_ctlSummaryRedirect.Controls.Remove(m_ctlFormResponseRedirect);
                m_ctlSummaryTransfer.Controls.Remove(m_ctlFormResponseTransfer);
            }

            Response.Expires = -1;
            Response.AddHeader("Pragma", "no-cache");
            Response.AddHeader("cache-control", "no-store");

            //THE NEXT THREE LINES MUST BE REMOVED BEFORE THE RELEASE
            if (Request.ServerVariables["Query_String"] == "")
            {
                return;
            }

            if (IsMac)
            {
                jsIsMac.Text = "true";
            }

            // Note: To fix a problem with the Ephox Editors on the
            // Mac-running-Safari (assumed if "IsMac and not IsBrowserIE")
            // we need to use different styles for the DIV-tags holding
            // the editors, etc., otherwise they frequently draw themselves
            // when they should remain hidden. These values cause problems
            // with the PC/Win/IE combination, (the summary editor fails to
            // provide a client area for the user to view/edit) so they cannot
            // cannot be used everywhere, hence our use of alternate style classes:
            // Pass class names to javascript:
            jsSelectedDivStyleClass.Text = m_sSelectedDivStyleClass;
            jsUnSelectedDivStyleClass.Text = m_sUnSelectedDivStyleClass;

            m_refContApi = new ContentAPI();
            m_refSiteApi = new SiteAPI();
            m_refContent = m_refContApi.EkContentRef;
            m_refSite = m_refContApi.EkSiteRef;
            m_refTask = m_refContApi.EkTaskRef;

            CurrentUserID = m_refContApi.UserId;
            AppImgPath = m_refContApi.AppImgPath;
            SitePath = m_refContApi.SitePath;
            Appname = m_refContApi.AppName;
            AppeWebPath = m_refContApi.ApplicationPath + m_refContApi.AppeWebPath;
            AppPath = m_refContApi.AppPath;
            EnableMultilingual = m_refContApi.EnableMultilingual;
            StyleSheetJS.Text = m_refStyle.GetClientScript();
            EnhancedMetadataScript.Text = CustomFields.GetEnhancedMetadataScript();
            EnhancedMetadataArea.Text = CustomFields.GetEnhancedMetadataArea();
            lbl_GenericTitleLabel.Text = m_refMsg.GetMessage("generic title label");

            if (!(Request.QueryString["id"] == null))
            {
                m_intItemId = Convert.ToInt64(Request.QueryString["id"]);
                m_intTaxFolderId = m_intItemId;
            }
            if (!(Request.QueryString["LangType"] == null))
            {
                if (Request.QueryString["LangType"] != "")
                {
                    m_intContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                    m_refContApi.SetCookieValue("LastValidLanguageID", m_intContentLanguage.ToString());
                }
                else
                {
                    if (m_refContApi.GetCookieValue("LastValidLanguageID") != "")
                    {
                        m_intContentLanguage = Convert.ToInt32(m_refContApi.GetCookieValue("LastValidLanguageID"));
                    }
                }
            }
            else
            {
                if (m_refContApi.GetCookieValue("LastValidLanguageID") != "")
                {
                    m_intContentLanguage = Convert.ToInt32(m_refContApi.GetCookieValue("LastValidLanguageID"));
                }
            }
            if (m_intContentLanguage == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED || m_intContentLanguage == Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES)
            {
                m_intContentLanguage = m_refContApi.DefaultContentLanguage;
            }
            if (m_intContentLanguage == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED)
            {
                m_refContApi.ContentLanguage = Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES;
            }
            else
            {
                m_refContApi.ContentLanguage = m_intContentLanguage;
            }
            if (!String.IsNullOrEmpty(Request.QueryString["folder_id"]))
            {
                m_intFolderId = Convert.ToInt64(Request.QueryString["folder_id"]);
            }

            if (Request.QueryString["form_type"] != null)
            {
                bNewPoll = System.Convert.ToBoolean("poll" == Convert.ToString(Request.QueryString["form_type"]).Trim().ToLower());
            }
            if (Request.QueryString["new"] != null)
            {
                bAddingNew = System.Convert.ToBoolean("true" == Convert.ToString(Request.QueryString["new"]).Trim().ToLower());
            }
            if (Request.QueryString["poll"] != null)
            {
                bReNewPoll = System.Convert.ToBoolean("renew" == Convert.ToString(Request.QueryString["poll"]).Trim().ToLower());
            }
            if (Request.Form["editaction"] != null)
            {
                m_strPageAction = Convert.ToString(Request.Form["editaction"]).ToLower().Trim();
            }
            if (Request.QueryString["translate"] != null)
            {
                translate.Value = "true";
            }
            if (Request.QueryString["type"] != null)
            {
                m_strType = Convert.ToString(Request.QueryString["type"]).ToLower().Trim();
            }
            else if (Request.Form["eType"] != null)
            {
                m_strType = Convert.ToString(Request.Form["eType"]).ToLower().Trim();
            }
            if (!String.IsNullOrEmpty(Request.QueryString["ctlupdateid"]))
            {
                commparams = (string)("&ctlupdateid=" + Request.QueryString["ctlupdateid"] + "&ctlmarkup=" + Request.QueryString["ctlmarkup"] + "&cltid=" + Request.QueryString["cltid"] + "&ctltype=" + Request.QueryString["ctltype"]);
                updateFieldId = Request.QueryString["ctlupdateid"];
                Page.ClientScript.RegisterHiddenField("ctlupdateid", updateFieldId);
            }
            if (!String.IsNullOrEmpty(Request.QueryString["cacheidentifier"]))
            {
                Page.ClientScript.RegisterHiddenField("cacheidentifier", Request.QueryString["cacheidentifier"]);
            }
            else
            {
                if ((Request.QueryString["mycollection"] != null) && (Request.QueryString["addto"] != null) && (Request.QueryString["type"] != null))
                {
                    if (Request.QueryString["type"] == "add" && Request.QueryString["addto"] == "menu")
                    {
                        Page.ClientScript.RegisterHiddenField("cacheidentifier", "menu_" + Request.QueryString["mycollection"] + m_intContentLanguage + "_mnu");
                    }
                }
            }

            //destination.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
            //PostURL.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
            //NextUsing.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "content.aspx";

            if (Request.Cookies[DMSCookieName] != null && !string.IsNullOrEmpty(Request.Cookies[DMSCookieName].Value))
            {

                if (Request.Cookies[DMSCookieName].Value == "2010")
                {
                    Ektron.Cms.Controls.ExplorerDragDrop edd = new Ektron.Cms.Controls.ExplorerDragDrop();
                    edd.ContentLanguage = this.m_intContentLanguage;
                    if (!string.IsNullOrEmpty(Request.QueryString["folderid"]))
                    {
                        destination.Value = edd.GetFolderPath(Int64.Parse(Request.QueryString["folderid"])).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), "");
                        putopts.Value = "false";
                    }
                    //btnMUpload.OnClientClick = "return MultipleDocumentUpload(0);";
                    //lbtn_toggleVersion.Attributes.Add("onclick", string.Format(_messageHelper.GetMessage("js office version toggle confirm format"), _messageHelper.GetMessage("li text office 2010 name")));
                }
                else
                {
                    destination.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
                    PostURL.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
                    NextUsing.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "content.aspx";
                    putopts.Value = "true";
                    //btnMUpload.OnClientClick = "return MultipleDocumentUpload(1);";
                    //lbtn_toggleVersion.Attributes.Add("onclick", string.Format(_messageHelper.GetMessage("js office version toggle confirm format"), _messageHelper.GetMessage("li text other office ver name")));

                }
                //tabMultipleDMS.Controls.Add(linebreak);
            }

            if (!String.IsNullOrEmpty(Request.QueryString["ctlmarkup"]))
            {
                Page.ClientScript.RegisterHiddenField("ctlmarkup", Request.QueryString["ctlmarkup"]);
            }
            if (!String.IsNullOrEmpty(Request.QueryString["ctltype"]))
            {
                Page.ClientScript.RegisterHiddenField("ctltype", Request.QueryString["ctltype"]);
            }
            if (!String.IsNullOrEmpty(Request.QueryString["cltid"]))
            {
                Page.ClientScript.RegisterHiddenField("cltid", Request.QueryString["cltid"]);
            }

            if (m_strType == "update")
            {
                m_refContentId = m_intItemId;
            }
            else
            {
                if (!String.IsNullOrEmpty(Request.QueryString["content_id"]))
                {
                    m_refContentId = Convert.ToInt64(Request.QueryString["content_id"]);
                }
            }

            if (Request.QueryString["xid"] != null)
            {
                m_intXmlConfigId = Convert.ToInt64(Request.QueryString["xid"]);
            }
            else if (Request.Form["SelectedXid"] != null)
            {
                m_intXmlConfigId = Convert.ToInt64(Request.Form["SelectedXid"]);
            }
            else
            {
                if (Request.QueryString["type"] == "add")
                {
                    if (Request.QueryString["AllowHTML"] != "1")
                    {
                        m_intXmlConfigId = Utilities.GetDefaultXmlConfig(Convert.ToInt64(Request.QueryString["id"]));
                        if (m_intXmlConfigId == 0)
                        {
                            m_intXmlConfigId = -1;
                        }
                    }
                }
            }
            if (!String.IsNullOrEmpty(Request.QueryString["mycollection"]))
            {
                strMyCollection = Request.QueryString["mycollection"];
            }
            else if (!String.IsNullOrEmpty(Request.Form["mycollection"]))
            {
                strMyCollection = Request.Form["mycollection"];
            }
            if (!String.IsNullOrEmpty(Request.QueryString["addto"]))
            {
                strAddToCollectionType = Request.QueryString["addto"];
            }
            else if (!String.IsNullOrEmpty(Request.Form["addto"]))
            {
                strAddToCollectionType = Request.Form["addto"];
            }
            if (Request.QueryString["close"] == "false")
            {
                m_bClose = false;
            }
            if (Request.QueryString["back_folder_id"] != null)
            {
                back_folder_id = Convert.ToInt64(Request.QueryString["back_folder_id"]);
                m_intTaxFolderId = back_folder_id;
            }
            if (Request.QueryString["back_id"] != null)
            {
                back_id = Convert.ToInt64(Request.QueryString["back_id"]);
            }
            if (Request.QueryString["back_file"] != null)
            {
                back_file = Request.QueryString["back_file"];
            }
            if (Request.QueryString["back_action"] != null)
            {
                back_action = Request.QueryString["back_action"];
                if (back_action.ToLower() == "viewcontentbycategory" || back_action.ToLower() == "viewarchivecontentbycategory")
                {
                    back_folder_id = back_id;
                }
            }
            if (Request.QueryString["control"] != null)
            {
                controlName = Request.QueryString["control"];
            }
            if (Request.QueryString["buttonid"] != null)
            {
                buttonId.Value = Request.QueryString["buttonid"];
            }
            if (Request.QueryString["back_form_id"] != null)
            {
                back_form_id = Convert.ToInt64(Request.QueryString["back_form_id"]);
            }
            if (Request.QueryString["back_LangType"] != null)
            {
                back_LangType = Convert.ToInt32(Request.QueryString["back_LangType"]);
            }
            else
            {
                back_LangType = System.Convert.ToInt32(Ektron.Cms.CommonApi.GetEcmCookie()["DefaultLanguage"]);
            }
            if (Request.QueryString["back_callerpage"] != null)
            {
                back_callerpage = (string)("&back_callerpage=" + Request.QueryString["back_callerpage"]);
            }
            if (Request.QueryString["back_page"] != null)
            {
                back_callerpage = back_callerpage + "&back_page=" + Request.QueryString["back_page"];
            }
            if (Request.QueryString["back_origurl"] != null)
            {
                back_origurl = (string)("&back_origurl=" + EkFunctions.UrlEncode(Request.QueryString["back_origurl"]));
            }
            if (!String.IsNullOrEmpty(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]))
            {
                if (Ektron.Cms.Common.EkFunctions.IsNumeric(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]))
                {
                    g_ContentTypeSelected = System.Convert.ToInt32(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]);
                    m_refContApi.SetCookieValue(Ektron.Cms.Common.EkConstants.ContentTypeUrlParam, g_ContentTypeSelected.ToString());
                }
            }
            else if (Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam] != "")
            {
                if (Ektron.Cms.Common.EkFunctions.IsNumeric(Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]))
                {
                    g_ContentTypeSelected = System.Convert.ToInt32(Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]);
                }
            }
            if (Ektron.Cms.Common.EkConstants.CMSContentType_AllTypes == g_ContentTypeSelected)
            {
                if (Request.QueryString["multi"] != null)
                {
                    if ("" == Request.QueryString["multi"])
                    {
                        lContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content; //set content type to "content" as default value
                    }
                    else
                    {
                        lContentType = Convert.ToInt32(Request.QueryString["multi"]);
                        if (lContentType == 9876)
                        {
                            lContentType = 103;
                        }
                    }
                }
                else
                {
                    lContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content;
                }
            }
            else
            {
                lContentType = g_ContentTypeSelected;
                if (lContentType == 9876)
                {
                    lContentType = 103;
                }
            }

            language_data = m_refSiteApi.GetLanguageById(m_intContentLanguage);
            if (this.m_strType.ToLower() == "add" && (!String.IsNullOrEmpty(Request.QueryString["SelTaxonomyId"])))
            {
                TaxonomySelectId = Convert.ToInt64(Request.QueryString["SelTaxonomyId"]);
            }
            SettingsData settings_data;
            settings_data = m_refSiteApi.GetSiteVariables(m_refSiteApi.UserId);

            int UserLocale;
            UserLocale = m_refSiteApi.RequestInformationRef.UserCulture;
            AppLocaleString = GetLocaleFileString(UserLocale.ToString());
            jsMaxLengthMsg.Text = m_refMsg.GetMessage("js err encoded title exceeds max length");
            jsContentLanguage.Text = Convert.ToString((short)m_intContentLanguage);
            jsId.Text = Convert.ToString(m_intItemId);
            jsDefaultContentLanguage.Text = Convert.ToString(m_refContApi.DefaultContentLanguage);
            jsType.Text = Convert.ToString((short)m_intContentType);
            phAlias.Visible = false;
            Page.Title = m_refContApi.AppName + " " + m_refMsg.GetMessage("edit content page title") + " \"" + Ektron.Cms.CommonApi.GetEcmCookie()["username"] + "\"";
            string editaction = "";
            if (Request.Form["editaction"] != null)
            {
                editaction = Request.Form["editaction"];
            }
            if ("workoffline" == editaction || "cancel" == editaction || ("" == Convert.ToString(m_intItemId) && "" == editaction))
            {
                if (m_strType == "update")
                {
                    ret = m_refContent.UndoCheckOutv2_0(Convert.ToInt64(Request.Form["content_id"]));
                    blnUndoCheckOut_complete = true;
                }
                if (!m_bClose)
                {
                    ClosePanel.Text = "<script language=javascript>" + "\r\n" + "ResizeFrame(1); // Show the navigation-tree frame." + "\r\n" + "</script>";
                    Response.Redirect(GetBackPage(Convert.ToInt64(Request.Form["content_id"])), false);
                }
                else
                {
                    Response.Redirect("close.aspx", false);
                }
            }
            else if ((m_strPageAction == "save") || (m_strPageAction == "checkin") || (m_strPageAction == "publish") || (m_strPageAction == "summary_save") || (m_strPageAction == "meta_save"))
            {
                Process_FormSubmit();
                if (m_bClose && m_strPageAction != "save")
                {
                    if (updateFieldId != "")
                    {
                        string strQuery = "";
                        if (TaxonomySelectId > 0)
                        {
                            strQuery = (string)("&__taxonomyid=" + TaxonomySelectId);
                        }
                        else if (TaxonomyOverrideId > 0)
                        {
                            strQuery = (string)("&__taxonomyid=" + TaxonomyOverrideId);
                        }
                        Response.Redirect((string)("close.aspx?toggle=true" + strQuery), false);
                    }
                }
            }
            else
            {
                Display_EditControls();

                if (!(Page.IsPostBack) && bAddingNew)
                {
                    if (Request.QueryString["form_type"] != null)
                    {
                        newformwizard ucNewFormWizard;
                        ucNewFormWizard = (newformwizard)(LoadControl("controls/forms/newformwizard.ascx"));
                        ucNewFormWizard.ID = "ProgressSteps";
                        phNewFormWizard.Controls.Add(ucNewFormWizard);
                        if (bNewPoll)
                        {
                            PollHtmlScript();
                        }
                    }
                }
            }

            PermissionData cPerms;
            cPerms = m_refContApi.LoadPermissions(m_intContentFolder, "folder", 0);
            m_ctlContentDesigner.FolderId = m_intContentFolder;
            if (2 == m_intContentType)
            {
                m_ctlContentDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.Designer;
            }
            else if (editorPackage.Length > 0)
            {
                m_ctlContentDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.DataEntry;
            }
            else
            {
                m_ctlContentDesigner.ToolsFile = m_refContApi.ApplicationPath + "ContentDesigner/configurations/StandardEdit.aspx?wiki=1";
            }
            m_ctlContentDesigner.SetPermissions(cPerms);
            m_ctlContentDesigner.AllowFonts = true;
            m_ctlSummaryDesigner.FolderId = m_intContentFolder;
            if (2 == m_intContentType)
            {
                m_ctlSummaryDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.XsltDesigner;
            }
            else if (m_bIsBlog)
            {
                m_ctlSummaryDesigner.ToolsFile = m_refContApi.ApplicationPath + "ContentDesigner/configurations/InterfaceBlog.aspx?WMV=1";
            }
            else
            {
                m_ctlSummaryDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.Standard;
            }
            m_ctlSummaryDesigner.SetPermissions(cPerms);
            m_ctlSummaryDesigner.AllowFonts = true;
            m_ctlFormResponseRedirect.FolderId = m_intContentFolder;
            m_ctlFormResponseRedirect.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.NoToolbars;
            m_ctlFormResponseRedirect.SetPermissions(cPerms);
            m_ctlFormResponseRedirect.AllowFonts = true;
            m_ctlFormResponseTransfer.FolderId = m_intContentFolder;
            m_ctlFormResponseTransfer.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.NoToolbars;
            m_ctlFormResponseTransfer.SetPermissions(cPerms);
            m_ctlFormResponseTransfer.AllowFonts = true;
            m_ctlContentValidator.Text = m_refMsg.GetMessage("content size exceeded");
            m_ctlSummaryValidator.Text = m_refMsg.GetMessage("content size exceeded");
            g_ContentTypeSelected = Ektron.Cms.Common.EkConstants.CMSContentType_AllTypes;
            m_refContApi.SetCookieValue(Ektron.Cms.Common.EkConstants.ContentTypeUrlParam, g_ContentTypeSelected.ToString());
        }
        catch (Exception ex)
        {
            Utilities.ShowError(ex.Message);
        }
    }