Пример #1
0
 private static void SaveTopic(M01Topic topic)
 {
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Forum", topic.Forum);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Pdate", topic.Pdate);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Pid", topic.Pid);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Uid", topic.Uid);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Content", topic.Content);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Plevel", topic.Plevel);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Aid", topic.Aid);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Aowner", topic.Aowner);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Title", topic.Title);
 }
Пример #2
0
        private static void ProcessPost(string post, ref string levelOneUid, ref string levelOnePid, string forum, string title)
        {
            var uid     = WebTool.GetContent("userinfo.php?id=", "&", post);
            var content = WebTool.GetContent("<div class=\"single-post-content\">", "<div class=\"single-post-content-sig\">", post);
            var pid     = WebTool.GetContent("<div id=\"ct", "\"", post);
            var tmpar   = WebTool.GetContent("<div class=\"date\">", "</div>", post).Split('#');
            var pdate   = tmpar[0].Trim();
            var plevel  = tmpar[1].Trim();
            var aid     = string.Empty;
            var aowner  = string.Empty;

            if (plevel == "1")
            {
                levelOnePid = pid;
                levelOneUid = uid;
            }
            else
            {
                aid    = levelOnePid;   //article = self
                aowner = levelOneUid;   //article owner = self
                //add counter
                //need check if new***
                if (!ThriftTool.CheckExist(uid, "M01UserRelaction"))
                {
                    ThriftTool.CounterAdd(uid, "M01UserRelaction", levelOneUid, 1);
                }
            }
            var topic = new M01Topic
            {
                Forum   = forum,
                Pid     = pid,
                Uid     = uid,
                Content = content,
                Pdate   = pdate,
                Plevel  = plevel,
                Aid     = aid,
                Aowner  = aowner,
                Title   = title
            };

            SaveTopic(topic);

            //TempLog += "topic Pid=" + topic.Pid + new HtmlString("<BR>") ;
        }
Пример #3
0
 private static void SaveTopic(M01Topic topic)
 {
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Forum", topic.Forum);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Pdate", topic.Pdate);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Pid", topic.Pid);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Uid", topic.Uid);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Content", topic.Content);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Plevel", topic.Plevel);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Aid", topic.Aid);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Aowner", topic.Aowner);
     ThriftTool.AddColumn(topic.Pid, "M01Topic", "Title", topic.Title);
 }
Пример #4
0
        private static void ProcessPost(string post, ref string levelOneUid, ref string levelOnePid, string forum, string title)
        {
            var uid = WebTool.GetContent("userinfo.php?id=", "&", post);
            var content = WebTool.GetContent("<div class=\"single-post-content\">", "<div class=\"single-post-content-sig\">", post);
            var pid = WebTool.GetContent("<div id=\"ct", "\"", post);
            var tmpar = WebTool.GetContent("<div class=\"date\">", "</div>", post).Split('#');
            var pdate = tmpar[0].Trim();
            var plevel = tmpar[1].Trim();
            var aid = string.Empty;
            var aowner = string.Empty;
            if (plevel == "1")
            {
                levelOnePid=pid;   
                levelOneUid=uid;   
            }
            else
            {
                aid = levelOnePid;      //article = self
                aowner = levelOneUid;   //article owner = self
                //add counter
                //need check if new***
                if (!ThriftTool.CheckExist(uid, "M01UserRelaction"))
                ThriftTool.CounterAdd(uid, "M01UserRelaction",levelOneUid,1);
            }
            var topic = new M01Topic
                    {
                        Forum = forum,
                        Pid = pid,
                        Uid = uid,
                        Content = content,
                        Pdate = pdate,
                        Plevel = plevel,
                        Aid = aid,
                        Aowner = aowner,
                        Title = title
                    };
            SaveTopic(topic);

            //TempLog += "topic Pid=" + topic.Pid + new HtmlString("<BR>") ;
        }