using System;
using System.Data;
using System.Xml;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Web;
using IlgharCMS;
using IlgharCMS.SystemModule;
public partial class CLeft : IlgharCMS.Lib.AdminPageBase
{
public CLeft()
: base("left.dwt.aspx")
{}
protected XmlDocument _xmlTemplate;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
_xmlTemplate = XmlData.GetXmlDocument();
if (!String.IsNullOrEmpty(Request.QueryString["GetPageCount"]))
                            {
                                Response.Write(1);
                                Response.End();
                            }
                        
}

                            protected Dictionary<string, object> Instance
                            {
                                get
                                {
                                    object id = null;
                                    id = Convert.ToInt32(Request.QueryString["InstanceID"]);
                                    if (_InstanceID != null && _InstanceID == id)
                                        return _Instance;

                                    int instanceID;
instanceID = InstanceID;

                                    using (IlgharCMS.SystemModule.IInstance bll = (IlgharCMS.SystemModule.IInstance)Manager.CreateObject("Instance", instanceID, ContentLang, false))
                                    {
                                        _InstanceID = id;
                                        _Instance = bll.Get(id);
                                    }

                                    return _Instance;
                                }
                            }
                            private Dictionary<string, object> _Instance;
                            private object _InstanceID;
                            
                            protected int t952IDCounter = 0;
                            protected object t952IDRecord = null;
                        
                            private DataTable t952ID;
                            private DataTable t952ID_
                            {
                                get
                                {
                                    

                                    

                                    int instanceID;
instanceID = InstanceID;

                                    using (IlgharCMS.SystemModule.Template.IMenu bll = (IlgharCMS.SystemModule.Template.IMenu)Manager.CreateObject("Template.Menu", instanceID, PageLang, false))
                                    {
                                        t952ID = bll.AuthorizedList(Convert.ToString(Channel[IlgharCMS.SystemModule.Alias.Channel.TemplatePath]),Convert.ToInt32(Request.QueryString["InstanceID"]));
                                    }

                                    return t952ID;
                                }
                            }
                        
                            protected string t952
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t952");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    replacementPair["{#Control#}"] = null;replacementPair["{#ChildRecords#}"] = null;
                                        replacementPair[@"{#ImagePath#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {
                                                                            object t1244 = ImagePath;
                                                                            if (t1244 != null)
                                                                                return t1244.ToString();
                                                                            else
                                                                                return String.Empty;
                                                                        }
                                                                        );
                                                replacementPair["{#InnerID#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.InnerID;replacementPair["{#ParentInnerID#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.InnerID;replacementPair["{#URL#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.URL;replacementPair["{#Name#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.Name;
                                    StringBuilder all = Manager.BuildTree(node, t952ID_, replacementPair, IlgharCMS.SystemModule.Alias.Template.Menu.ParentID, IlgharCMS.SystemModule.Alias.Template.Menu.ID, ref t952IDRecord, ref t952IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          }
