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 CIndex : IlgharCMS.Lib.AdminPageBase
{
public CIndex()
: base("index.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 int t903IDRecordCount
                        {
                            get
                            {
                                int instanceID;
instanceID = InstanceID;
                                using (IlgharCMS.SystemModule.ILanguage bll = (IlgharCMS.SystemModule.ILanguage)Manager.CreateObject("Language", instanceID, PageLang, false))
                                {
                                    string condition = null;


                                    return bll.GetRecordCount(condition);
                                }
                            }
                        }
                        
                            protected int t903IDCounter = 0;
                            protected object t903IDRecord = null;
                            private DataTable t903IDData;
                            protected DataTable t903ID
                            {
                                get
                                {
                                    if (t903IDData != null)
                                        return t903IDData;

                                    t903IDData = t903ID_;
                                    return t903IDData;
                                }
                            }
                        
                                private DataTable t903ID_
                                {
                                    get
                                    {
                                        string condition = null;


                                        string sort = null;

                                        int instanceID;
instanceID = InstanceID;

                                        using (IlgharCMS.SystemModule.ILanguage bll = (IlgharCMS.SystemModule.ILanguage)Manager.CreateObject("Language", instanceID, PageLang, false))
                                        {
                                            t903IDData = bll.List(-1, -1, condition, sort);
                                        }

                                        return t903IDData;
                                    }
                                }
                            
                            protected string t903
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t903");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    replacementPair["{#Ab#}"] = IlgharCMS.SystemModule.Alias.Language.Ab;replacementPair["{#Name#}"] = IlgharCMS.SystemModule.Alias.Language.Name;
                                    StringBuilder all = Manager.Build(node, t903ID_, replacementPair, ref t903IDRecord, ref t903IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          
                            protected int t1360IDCounter = 0;
                            protected object t1360IDRecord = null;
                        
                            private DataTable t1360ID;
                            private DataTable t1360ID_
                            {
                                get
                                {
                                    

                                    

                                    int instanceID;
instanceID = InstanceID;

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

                                    return t1360ID;
                                }
                            }
                        
                            protected string t1360
                            {
                                get
                                {
                                    XmlNode node = _xmlTemplate.SelectSingleNode("//t1360");
                                    Dictionary<string, object> replacementPair = new Dictionary<string, object>();
                                    
                                        replacementPair["{#t1528#}"] = new CustomBuildTree(
                                                                        delegate(TreeNode record, int index)
                                                                        {string t1528 = String.Empty;
if (((t1360IDRecord as TreeNode).ChildNodes.Count>0))
{t1528 = _xmlTemplate.SelectSingleNode("/" + "/t1528/If").InnerText;string t1570 = String.Empty;
if (String.Equals((t1360IDRecord as TreeNode).Row[IlgharCMS.SystemModule.Alias.Template.Menu.PathInTemplate],""))
{t1570 = _xmlTemplate.SelectSingleNode("/" + "/t1570/If").InnerText;}
else
{t1570 = _xmlTemplate.SelectSingleNode("/" + "/t1570/Else").InnerText;}
t1528 = t1528.Replace("{#t1570#}",t1570);
}
else
{t1528 = _xmlTemplate.SelectSingleNode("/" + "/t1528/Else").InnerText;string t1863 = String.Empty;
if (String.Equals((t1360IDRecord as TreeNode).Row[IlgharCMS.SystemModule.Alias.Template.Menu.PathInTemplate],""))
{t1863 = _xmlTemplate.SelectSingleNode("/" + "/t1863/If").InnerText;}
else
{t1863 = _xmlTemplate.SelectSingleNode("/" + "/t1863/Else").InnerText;}
t1528 = t1528.Replace("{#t1863#}",t1863);
}

                                                                            return t1528;
                                                                        }
                                                                        );
                                                replacementPair["{#ChildRecords#}"] = null;replacementPair["{#URL#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.URL;replacementPair["{#Target#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.Target;replacementPair["{#Name#}"] = IlgharCMS.SystemModule.Alias.Template.Menu.Name;replacementPair["{#[\"InstanceID\"]#}"] = "InstanceID";
                                    StringBuilder all = Manager.BuildTree(node, t1360ID_, replacementPair, IlgharCMS.SystemModule.Alias.Template.Menu.ParentID, IlgharCMS.SystemModule.Alias.Template.Menu.ID, ref t1360IDRecord, ref t1360IDCounter);
                                    
                                    
                                    
                                    return all.ToString();
                                }
                            }
                          }
