public void Main()
        {
            var builder = new StringBuilder();

            try
            {
                var form                = HttpContext.Current.Request.Form;
                var siteId              = TranslateUtils.ToInt(form["siteId"]);
                var parentId            = TranslateUtils.ToInt(form["parentId"]);
                var target              = form["target"];
                var isShowTreeLine      = TranslateUtils.ToBool(form["isShowTreeLine"]);
                var isShowContentNum    = TranslateUtils.ToBool(form["isShowContentNum"]);
                var currentFormatString = form["currentFormatString"];
                var topChannelId        = TranslateUtils.ToInt(form["topChannelId"]);
                var topParentsCount     = TranslateUtils.ToInt(form["topParentsCount"]);
                var currentChannelId    = TranslateUtils.ToInt(form["currentChannelId"]);

                var siteInfo      = SiteManager.GetSiteInfo(siteId);
                var channelIdList = ChannelManager.GetChannelIdList(ChannelManager.GetChannelInfo(siteId, parentId == 0 ? siteId : parentId), EScopeType.Children, string.Empty, string.Empty, string.Empty);

                foreach (var channelId in channelIdList)
                {
                    var nodeInfo = ChannelManager.GetChannelInfo(siteId, channelId);

                    builder.Append(StlTree.GetChannelRowHtml(siteInfo, nodeInfo, target, isShowTreeLine, isShowContentNum, TranslateUtils.DecryptStringBySecretKey(currentFormatString), topChannelId, topParentsCount, currentChannelId, false));
                }
            }
            catch
            {
                // ignored
            }

            HttpContext.Current.Response.Write(builder);
            HttpContext.Current.Response.End();
        }
        public void Main()
        {
            var builder = new StringBuilder();

            try
            {
                var form = HttpContext.Current.Request.Form;
                var publishmentSystemId = TranslateUtils.ToInt(form["publishmentSystemID"]);
                var parentId            = TranslateUtils.ToInt(form["parentID"]);
                var target              = form["target"];
                var isShowTreeLine      = TranslateUtils.ToBool(form["isShowTreeLine"]);
                var isShowContentNum    = TranslateUtils.ToBool(form["isShowContentNum"]);
                var currentFormatString = form["currentFormatString"];
                var topNodeId           = TranslateUtils.ToInt(form["topNodeID"]);
                var topParentsCount     = TranslateUtils.ToInt(form["topParentsCount"]);
                var currentNodeId       = TranslateUtils.ToInt(form["currentNodeID"]);

                var publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId);
                var nodeIdList            = DataProvider.NodeDao.GetNodeIdListByParentId(publishmentSystemId, parentId);

                foreach (int nodeId in nodeIdList)
                {
                    var nodeInfo = NodeManager.GetNodeInfo(publishmentSystemId, nodeId);

                    builder.Append(StlTree.GetChannelRowHtml(publishmentSystemInfo, nodeInfo, target, isShowTreeLine, isShowContentNum, TranslateUtils.DecryptStringBySecretKey(currentFormatString), topNodeId, topParentsCount, currentNodeId));
                }
            }
            catch
            {
                // ignored
            }

            HttpContext.Current.Response.Write(builder);
            HttpContext.Current.Response.End();
        }