首页 生活日记 橘舍社区万物互联项目使用说明
橘舍社区万物互联项目使用说明
2023-05-13 15:21:00 none 暂无评论 5264字 338 人围观
抢先预览效果:

2023-05-13T07:04:11.png
2023-05-13T07:17:35.png

使用说明:

06701-24nads3arv3.png

     //跨区聊天室人数
            if(MyId != 0)
            {
               if(DK.ExecuteScalar("SELECT [id] FROM [wap_online] WHERE [id] = "+ MyId+" AND [yumin] = 'pcno.cn'") == null)
                {
                    DK.ExecuteNonQuery("INSERT INTO [wap_online] ([id],[yumin],[btype],[uidname]) VALUES ("+ MyId+",'pcno.cn','1','"+UserName(MyId)+"')");
                }
                else
                {
                    if (Request.RawUrl.IndexOf("/hl/bbs/ls/") !=0)//判断离开聊天室
                    {
               
                        if(Convert.ToInt32(DK.ExecuteScalar("SELECT [btype] FROM [wap_online] WHERE [id] = "+ MyId+" AND [yumin] = 'pcno.cn'")) ==2)
                        {
                            DK.ExecuteNonQuery("UPDATE [wap_online] SET [btype]=1,[uidname]='"+UserName(MyId)+"' WHERE [id] = "+ MyId+" AND [yumin] = 'pcno.cn'");
                        }
                    }
                }
            }
            DK.ExecuteNonQuery("UPDATE [wap_online] SET [btype]=1 WHERE [endtime]<'" + SvrTime.AddMinutes(-20) + "'");//更新在线
    //跨区聊天室人数结束
//万物互联
int ROCount = (int)DK.ExecuteScalar("SELECT COUNT([bbsid]) FROM [wap_online] WHERE [btype]=2 AND [bbsid]=1");
TextString += "<br/><div class=\"hengxian\">\r\n";
TextString += "<b><a href=\"/hl/bbs/ls/room.aspx?id=1" + NuoHa.String1 + "\">万物互联</a> 在线(" + ROCount + ")人</b><br/>\r\n";
TextString += "</div>\r\n";
int nh = 0;
SqlDataReader Rs1 = DK.ExecuteReader("SELECT TOP 3 [uid],[vid],[type],[intro],[content],[addtime],[uyumin],[vyumin],[uidname],[vidname] FROM [wap_bbs_room_chat] WHERE [bid]=1 ORDER BY [id] DESC");
        while (Rs1.Read())
        {
            int uid = Convert.ToInt32(Rs1[0]);
            int vid = Convert.ToInt32(Rs1[1]);
            string uidname = NuoHa.ConToStr(Rs1[8]);
            string vidname = NuoHa.ConToStr(Rs1[9]);
            string uyumin = NuoHa.ConToStr(Rs1[6]);
            string vyumin = NuoHa.ConToStr(Rs1[7]);
                string uym = uyumin;
                string vym = vyumin;
                if(DK.ExecuteScalar("SELECT [名称] FROM [wap_yumin] WHERE [域名] LIKE '%"+uym+"%'") != null)
                {
                    uym = DK.ExecuteScalar("SELECT [名称] FROM [wap_yumin] WHERE [域名] LIKE '%"+uym+"%'").ToString();
                }
                if(DK.ExecuteScalar("SELECT [名称] FROM [wap_yumin] WHERE [域名] LIKE '%"+vym+"%'") != null)
                {
                    vym = DK.ExecuteScalar("SELECT [名称] FROM [wap_yumin] WHERE [域名] LIKE '%"+vym+"%'").ToString();
                }
                  nh = nh + 1;
if (nh % 2 == 0)
                {
                }
                else
                {
                }
                if (uid == 0)
                {
TextString += "[室内广播]:" + NuoHa.TextDecode(Rs1[4].ToString()) + " (" + NuoHa.TimeEncode(Rs1[5]) + ")<br/>\r\n";
                }
                else
                {
                    if (vid == 0)
                    {
TextString += "<div class=\"xianzhi\">\r\n";//限制图片大小
TextString += ""+uym+"<a href=\"/hl/bbs/ls/talk_add.aspx?id=1&amp;vid=" + uid + "&amp;yumin="+uyumin+"" + NuoHa.String1 + "\">" + uidname + "</a>说:" + NuoHa.TextDecode(Rs1[4].ToString()) + " (" + NuoHa.TimeEncode(Rs1[5]) + ")<br/>\r\n";
TextString += "</div>\r\n";
                    }
                    else
                    {
                        if (Convert.ToInt32(Rs1[2]) == 0)
                        {//限制图片大小
TextString += "<div class=\"xianzhi\">\r\n";
TextString += ""+uym+"<a href=\"/hl/bbs/ls/talk_add.aspx?id=1&amp;vid=" + uid + "&amp;yumin="+uyumin+"" + NuoHa.String1 + "\">" + uidname + "</a>对"+vym+"<a href=\"/hl/bbs/ls/talk_add.aspx?id=1&amp;vid=" + vid + "&amp;yumin="+vyumin+"" + NuoHa.String1 + "\">" + vidname + "</a>说:" + NuoHa.TextDecode(Rs1[4].ToString()) + " (" + NuoHa.TimeEncode(Rs1[5]) + ")<br/>\r\n";
TextString += "</div>\r\n";
                        }
                        else
                        {
                            if (uid == NuoHa.MyId || vid == NuoHa.MyId)
                            {//限制图片大小
TextString += "<div class=\"xianzhi\">\r\n";
TextString += "[悄悄话]"+uym+"<a href=\"/hl/bbs/ls/talk_add.aspx?id=1&amp;vid=" + uid + "&amp;yumin="+uyumin+"" + NuoHa.String1 + "\">" + uidname + "</a>对"+vym+"<a href=\"/hl/bbs/sl/talk_add.aspx?id=1&amp;vid=" + vid + "&amp;yumin="+vyumin+"" + NuoHa.String1 + "\">" +vidname + "</a>说:" + NuoHa.TextDecode(Rs1[4].ToString()) + " (" + NuoHa.TimeEncode(Rs1[5]) + ")<br/>\r\n";
TextString += "</div>\r\n";//限制图片大小
                            }
                        }
                    }
                }
    }
//万物互联END

百度已收录

  • 上一篇: 陪你一起长大
  • 下一篇: 没有了
  • [楼主]:.2023-05-13 15:21:00
    [签名]:念念不忘,必有回响
    本文链接:https://ty.342600.xyz/392.html
    版权声明: 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可
    回帖列表:


    [帖子管理]
    删除本帖.编辑帖子.帖子列表

    关于 邻居 相册 动态 图库