[搜片神器]使用C#实现DHT磁力搜索的BT种子后端管理程序+数据库设计(开源)

谢谢园子朋友的支持,已经找到个VPS进行测试,国外的服务器:http://www.sosobta.com   大家可以给提点意见...

先直接上程序界面,了解整体工作流程是什么样子的,求服务器进行挂机测试,需要固定IP,空间大概需要10G左右(主要是BT种子占用空间过大),最好有SQLSERVER来做为存储数据库,目前采用的是ACCESS数据库做为测试,怕后期数据过百万,对网站进行查询操作很慢。

如果程序运行的时间够长,基本上网络上的种子都会过来,相当于搜片神器了.

开源地址:https://github.com/h31h31/H31DHTMgr

程序下载:H31DHT下载

也提供ASP网站的访问模式:

 

正在运行中的状态:

本次主要介绍对DHT磁力搜索的HASH文件进行处理操作流程。

后台处理程序主要采用C#里面读取文件类来进行读取,目前文件格式分为两种,一种是从http://torrage.com/sync下载回来的文件进行处理,

另外一种是采用C++程序对DHT网络中的HASH文件进行搜索存储的自定义文件,

里面有HASH值和时间IP等信息,可以通过这些IP值分析出对方电脑上有哪些BT文件,当然这里面的HASH值对应的文件对应的可是当前活跃在网络上的文件,与上面网站上下载的固定的文件值有区别,

有了这些IP值,个人也可以做些行为分析方面的工作,比如哪些城市的IP在下载些什么类型的文件。

 

下面介绍下数据库方面的设计工作:

1.初步考虑到SQLSERVER对自己电脑工作速度会有影响,没有安装SQLSERVER数据库,采用ACCESS来进行处理操作;

2.ACCESS数据库每个表的大小最好控制不要超过4G,所以设计每表不超过100百万条数据;

3.对BT种子文件进行解析后,提取里面的文件名字,按照文件类型存储到不同的表中,主要分为6大类,电影,音乐,图片,书箱,程序,其它类,

4.由于BT种子里面语言对应的不一样,有中文,英文,日文,韩国等语言,对于搜索界面如果全部存储到一块,没有什么问题,但会影响查询速度,因为中国人一般喜欢用中文查询,如果想查日文,对选项进行选择一下,这样会对所有的表查询都会有很大提高,因为每个表的文件都基本上针对几种语言;

5.对于BT种子里面的文件列表直接采用100百万一个表,如果超过了,直接存储第二块表,因为主表里面有存储自己的文件列表在哪个表的关键字段;

6.另外对数据库信息也比较严谨一些,由于种子文件里面有很多广告信息,比如视频种子里面经常有网站URL,TXT,MHT等信息链接,程序经过初步判断直接不存储到文件表数据库中,占用数据库空间,影响查询速度,另外查询出来显示列表也不好看.

7.对于一个种子里面经常有>200多个的种子文件也没有进行存储,一个种子有很多文件也比较浪费空间,再说这种种子保存下来基本上都没什么意义,直接PASS;

8.对于文件名里面有网站信息的也采取的过滤措施,对查询有很好帮助.

数据库表设计列表:

存储DHT文件名字的表:

存储种子文件列表:

 

--------------------------下面先介绍一下DHT的工作原理--------------------------------

DHT网络本质上是一个用于查询的网络,其用于查询一个资源有哪些计算机正在下载。每个资源都有一个20字节长度的ID用于标示,称为infohash。当一个程序作为DHT节点加入这个网络时,就会有其他节点来向你查询,当你做出回应后,对方就会记录下你。对方还会询问其他节点,当对方开始下载这个infohash对应的资源时,他就会告诉所有曾经询问过的节点,包括你。这个时候就可以确定,这个infohash对应的资源在这个网络中是有效的。

关于这个网络的工作原理,参看Kevin写的:P2P中DHT网络爬虫以及写了个磁力搜索的网页

获取到infohash后能做什么?关键点在于,我们现在使用的磁力链接(magnet url),是和infohash对应起来的。也就是拿到infohash,就等于拿到一个磁力链接。但是这个爬虫还需要建立资源的信息,这些信息来源于种子文件。种子文件其实也是对应到一个资源,种子文件包含资源名、描述、文件列表、文件大小等信息。获取到infohash时,其实也获取到了对应的计算机地址,我们可以在这些计算机上下载到对应的种子文件。

在获取到infohash后,从一些提供映射磁力链到种子文件服务的网站上直接下载了对应的种子。

http://torrage.com
https://zoink.it
http://bt.box.n0808.com

-------------------------我们后台处理程序就从上面进行种子的下载工作---------------------------

下面重点介绍下我们程序的模块设计:

1.H31SQL类主要方面进行ACCESS和SQLSERVER数据库操作进行初步封装的一个类;

2.H31Debug主要是日志输出类

3.H31Down主要是下载BT种子文件进行的类;

4.TorrentFile类是用来解析BT种子文件类,由于目前可能有的BT种子格式对不上,有些文件解析不上;

5. MainForm主程序界面。

------------------------------------

下面介绍程序处理数据的主要流程:

 1.读取本地文件,采用正则表达式对数据进行提取

        /// <summary>
        /// 正则表达式取出内容 2013-07-16
        /// </summary>
        private int GetHashLineContent(string hashline, ref HASHITEM item1)
        {
            if (hashline.Length < 50)
            {
                if (hashline.Length == 40)
                {
                    item1.hashKey = hashline.Trim();
                    item1.recvTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                    item1.recvIp = "127.0.0.1";
                    item1.recvPort = 8080;
                    return 1;
                }
                else
                {
                    int a = 0;
                }
            }
            else
            {
                string pattern = @"ash\[(.*)\] Time\#(.*)\# ip\:(.*)\:(.*)\.";
                Match usermatch = Regex.Match(hashline, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count == 0)
                {
                    pattern = @"ash\[(.*)\] Time\#(.*)\# ip\:(.*)\:(.*)\.(.*)\#";
                    usermatch = Regex.Match(hashline, pattern, RegexOptions.IgnoreCase);
                }

                if (usermatch.Groups.Count >= 4 && recvthreadison)
                {
                    item1.hashKey = usermatch.Groups[1].Value.ToString();
                    item1.recvTime = Convert.ToDateTime(usermatch.Groups[2].Value.ToString());
                    item1.recvIp = usermatch.Groups[3].Value.ToString();
                    item1.recvPort = Convert.ToInt32(usermatch.Groups[4].Value.ToString());
                    return 1;
                }
            }
            return 0;

        }

  2.从网站下载BT种子文件来进行处理

        private int DownLoadFileToSaveFile(string strURL, string fileName,int timeout1)
        {
            Int32 ticktime1 = System.Environment.TickCount;
            try
            {
                Int32 ticktime2 = 0;
                byte[] buffer = new byte[4096];

                WebRequest wr = WebRequest.Create(strURL);
                wr.ContentType = "application/x-bittorrent";
                wr.Timeout = timeout1;
                WebResponse response = wr.GetResponse();
                int readsize = 0;
                {
                    bool gzip = response.Headers["Content-Encoding"] == "gzip";
                    Stream responseStream = gzip ? new GZipStream(response.GetResponseStream(), CompressionMode.Decompress) : response.GetResponseStream();

                    using (MemoryStream memoryStream = new MemoryStream())
                    {
                        responseStream.ReadTimeout = timeout1*2;
                        int count = 0;
                        do
                        {
                            count = responseStream.Read(buffer, 0, buffer.Length);
                            memoryStream.Write(buffer, 0, count);
                            readsize += count;
                            Thread.Sleep(1);
                        } while (count != 0);
                        ticktime2 = System.Environment.TickCount;

                        byte[] result = memoryStream.ToArray();
                        Thread.Sleep(10);
                        using (BinaryWriter writer = new BinaryWriter(new FileStream(fileName, FileMode.Create)))
                        {
                            writer.Write(result);
                        }
                    }
                    Int32 ticktime3 = System.Environment.TickCount;
                    //H31Debug.PrintLn("下载成功" + strURL + ":" + readsize.ToString() + ":" + (ticktime2 - ticktime1).ToString() + "-" + (ticktime3 - ticktime2).ToString());
                }
                return 1;
            }
            catch (Exception e)
            {
                Int32 ticktime3 = System.Environment.TickCount;
                //H31Debug.PrintLn("下载失败" + strURL + ":" +  (ticktime3 - ticktime1).ToString());
                return -2;
            }
        }

3.通过BT文件解析类来读取文件名和列表

4.通过正确正则表达式过滤掉WWW. BBS. 等网站信息,因为这样会影响搜索结果.

        /// <summary>
        /// 去掉标题中的网址信息
        /// </summary>
        private string GetOneGoodString(string title)
        {
            //去掉标题中的网址信息
            string res = title;
            try
            {
                //string pattern = @"\[(.*)([\w-]+://?|(www|bbs)[.])([^\]]*)\]";
                string pattern = @"(\[|\@|\【|\s|\(|\{)(.*)([\w-]+://?|(www|bbs)[.])([^(\]|\@|\】|\)|\})]*)(\]|\@|\】|\)|\})";
                Match usermatch = Regex.Match(title, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count > 1)
                {
                    res = res.Replace(usermatch.Groups[0].Value.ToString(), " ");
                    res = res.Trim();
                }
                pattern = @"(\[|\@|\【|\s|\(|\{)(.*)\.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|cc|me|cm)([^(\]|\@|\】|\)|\}|\s)]*)(\]|\@|\】|\)|\}|\s)";
                //pattern = @"(\[|\@|\【)(.*)([\w-]+://?|(www|bbs)[.])([^(\]|\@|\】)]*)(\]|\@|\】)";
                usermatch = Regex.Match(res, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count > 1)
                {
                    res = res.Replace(usermatch.Groups[0].Value.ToString(), " ");
                    res = res.Trim();
                }
                pattern = @"(www|bbs)(.*)(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|cc|me|cm)";
                usermatch = Regex.Match(res, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count > 1)
                {
                    res = res.Replace(usermatch.Groups[0].Value.ToString(), " ");
                    res = res.Trim();
                }
                if (res.Length <= 5 && res.Length<title.Length)
                {
                    int a = 0;
                    res = title;
                }

            }
            catch (System.Exception ex)
            {
                H31Debug.PrintLn(ex.Message);
                res = title;
            }
            return res;
        }

5.判断文件名是中英文,日文等信息存储到不同的表中;

        //判断是否是中文,如果是日文等,则存储到另外一个表中
        private int ISChineseAndEnglist(string title)
        {
            try
            {
                string pattern = @"[\uac00-\ud7ff]+";//判断韩语   
                Match usermatch = Regex.Match(title, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count >= 1 && usermatch.Groups[0].Value.Length >= 1)
                    return 0;

                pattern = @"[\u0800-\u4e00]+";//判断日语   
                usermatch = Regex.Match(title, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count >= 1 && usermatch.Groups[0].Value.Length >= 1)
                    return 0;

                pattern = @"[\u4e00-\u9fa5]+";//判断汉字
                usermatch = Regex.Match(title, pattern, RegexOptions.IgnoreCase);
                if (usermatch.Groups.Count >= 1 && usermatch.Groups[0].Value.Length >= 1)
                    return 1;

                //判断英文,数字
                byte[] byte_len = System.Text.Encoding.Default.GetBytes(title);
                if (byte_len.Length == title.Length)
                    return 1;

            }
            catch (System.Exception ex)
            {
                H31Debug.PrintLn(ex.Message);
            }
            return 0;
        }

开源地址:https://github.com/h31h31/H31DHTMgr

 程序下载:H31DHT下载

下一文章准备对DHT的研究进行文章介绍.如果大家推荐度比较高,我下一步过两天就开源C++写的H31DHT数据抓取数据的程序,程序都是采用VS2005编写.

 

第一次运行H31DHTMgr程序可能没有数据,可以先从从 http://torrage.com/sync 下载一个TXT文件回来进行处理 ;

第一次运行H31DHT数据抓取程序可能很久才有几要数据回来,DHT网络好像对固定IP的比较喜欢,返回信息比较多,所以ADSL的抓取速度也不会很快.

 

由于DHT获取的种子内容带AV内容的多很多,所以不提供ASP网站查询的代码工作,如果提供境外服务器测试,可以提供ASP网站查询代码.

希望有兴趣的朋友一起把这个后台管理程序修改得更加完美一些.

由于第一次开源作品,希望大家推荐.  

 

转载于:https://www.cnblogs.com/miao31/p/3210218.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312"%> <%@ page import="java.io.*"%> <%@ page import="jxl.Workbook"%> <%@ page import="jxl.write.*"%> <%@ page import="javax.servlet.http.HttpServletRequest"%> <%@ page import="java.text.SimpleDateFormat"%> <%@ page import="java.util.Date"%> <%!static String getStringGBK(HttpServletRequest request, String name) throws Exception { String result = new String(request.getParameter(name).getBytes("iso-8859-1"), "gbk"); return result; }%> <%!static String getStringGBK(String str) throws Exception { String result = new String(str.getBytes("iso-8859-1"), "gbk"); return result; }%> <% String msg = "调查报告已经提交成功。"; try { String txrq = getStringGBK(request, "txrq"); // 填写日期 String yycode = getStringGBK(request, "yycode"); // 医院组织机构代码 String yyname = getStringGBK(request, "yyname"); // 医院全称: String cldate_year = getStringGBK(request, "cldate_year"); // 成立日期: String cldate_month = getStringGBK(request, "cldate_month"); // 成立日期: String yydj = getStringGBK(request, "yydj"); // 医院级别: String yyxz = getStringGBK(request, "yyxz"); // 医院性质: String yyfl = getStringGBK(request, "yyfl"); // 医院分类: String yydz_sheng = getStringGBK(request, "yydz_sheng"); // 医院地址: String yydz_si = getStringGBK(request, "yydz_si"); // 医院地址: String yydz_quxian = getStringGBK(request, "yydz_quxian"); // 医院地址: String yydz_jie = getStringGBK(request, "yydz_jie"); // 医院地址: String yydz_hao = getStringGBK(request, "yydz_hao"); // 医院地址: String yzbm = getStringGBK(request, "yzbm"); // 邮 编 String zzxm = getStringGBK(request, "zzxm"); // 现任主任(或者联系人)姓名 String lxdh = getStringGBK(request, "lxdh"); // 联系电话 String sjhm = getStringGBK(request, "sjhm"); // 手机号码 String email = getStringGBK(request, "email"); // 手机号码 String clrq_year = getStringGBK(request, "clrq_year"); // 内分泌科(内科内分泌专业组)成立日期 String clrq_mon = getStringGBK(request, "clrq_mon"); // 内分泌科(内科内分泌专业组)成立日期 String szqk = getStringGBK(request, "szqk"); // 内分泌科室的设置情况 String nfmrs = getStringGBK(request, "nfmrs"); // 内分泌专业医生人数 String nfmcs = getStringGBK(request, "nfmcs"); // 内分泌科床位数 String rmzl = getStringGBK(request, "rmzl"); // 日门诊量 String nmzl = getStringGBK(request, "nmzl"); // 年门诊量 String nszrl = getStringGBK(request, "nszrl"); // 年收治病人量 String[] ysxx_names = request.getParameterValues("ysxx_name"); // 姓名 String[] ysxx_sexs = request.getParameterValues("ysxx_sex"); // 性别 String[] ysxx_nls = request.getParameterValues("ysxx_nl"); //年龄 String[] ysxx_zcs = request.getParameterValues("ysxx_zc"); //职称 String[] ysxx_xls = request.getParameterValues("ysxx_xl"); //学历 String[] ysxx_xws = request.getParameterValues("ysxx_xw"); //学位 String[] ysxx_byyxs = request.getParameterValues("ysxx_byyx"); //毕业院校 String[] ysxx_csnxs = request.getParameterValues("ysxx_csnx"); //从事专业年限 String[] ysxx_sjhms = request.getParameterValues("ysxx_sjhm"); //手机号码 String[] ysxx_emails = request.getParameterValues("ysxx_email"); //电子邮箱 String smzksy = getStringGBK(request, "smzksy"); //是否具有内分泌专科实验室 String[] tzwts = request.getParameterValues("tzwt"); // 目前内分泌科(专业组)发展所面临的挑战与问题 String[] bzzcs = request.getParameterValues("bzzc"); // 希望得到内分泌代谢医师分会提供哪些方面的帮助和支持 String cwhy = getStringGBK(request, "cwhy"); //是否愿意加入本分会成为会员: String[] gzjys = request.getParameterValues("gzjy"); // 您和您的单位对本分未来工作的建议 String path = request.getRealPath("/"); int rowInsertAmount = 0; int rowNoQuestion4 = 32; int rowNoQuestion6 = 39; int rowNoQuestion7 = 42; int rowNoQuestion9 = 51; //Excel获得文件 Workbook wb = Workbook.getWorkbook(new File(path + "excel\\template.xls")); Date now = new Date(); String dateString = new SimpleDateFormat("yyyyMMddHHmmss").format(now); //打开一个文件的副本,并且指定数据写回到原文件 WritableWorkbook book = Workbook.createWorkbook(new File(path + "excel\\调查报告_" + dateString + ".xls"), wb); //WritableFont font1 = new WritableFont(WritableFont.TIMES, 16, //WritableFont.BOLD); //或设置字体格式为excel支持的格式 WritableFont font3=new WritableFont(WritableFont.createFont("楷体_GB2312"),12,WritableFont.NO_BOLD ); //WritableCellFormat format1 = new WritableCellFormat(font1); WritableCellFormat format1 = new WritableCellFormat(); WritableCellFormat format2 = new WritableCellFormat(); format2.setBorder(jxl.format.Border.TOP,jxl.format.BorderLineStyle.THIN); format2.setBorder(jxl.format.Border.LEFT,jxl.format.BorderLineStyle.THIN); format2.setBorder(jxl.format.Border.RIGHT,jxl.format.BorderLineStyle.THIN); format2.setBorder(jxl.format.Border.BOTTOM,jxl.format.BorderLineStyle.THIN); //把水平对齐方式指定为居中 //format1.setAlignment(jxl.format.Alignment.CENTRE); //把垂直对齐方式指定为居中 //format1.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE); //设置自动换行 //format1.setWrap(true); //添加一个工作表 WritableSheet sheet = book.getSheet(0); sheet.addCell(new Label(2, 6, txrq, format1)); // sheet.addCell(new Label(11, 6, yycode, format1)); // sheet.addCell(new Label(2, 7, yyname, format1)); // sheet.addCell(new Label(10, 7, cldate_year, format1)); // sheet.addCell(new Label(13, 7, cldate_month, format1)); // sheet.addCell(new Label(2, 8, yydj, format1)); // sheet.addCell(new Label(7, 8, yyxz, format1)); // sheet.addCell(new Label(2, 9, yyfl, format1)); // sheet.addCell(new Label(2, 10, yydz_sheng, format1)); // sheet.addCell(new Label(7, 10, yydz_si, format1)); // sheet.addCell(new Label(11, 10, yydz_quxian, format1)); // sheet.addCell(new Label(2, 11, yydz_jie, format1)); // sheet.addCell(new Label(6, 11, yydz_hao, format1)); // sheet.addCell(new Label(2, 12, yzbm, format1)); // sheet.addCell(new Label(5, 14, zzxm, format1)); // sheet.addCell(new Label(12, 14, lxdh, format1)); // sheet.addCell(new Label(2, 15, sjhm, format1)); // sheet.addCell(new Label(12, 15, email, format1)); // sheet.addCell(new Label(7, 19, clrq_year, format1)); // sheet.addCell(new Label(11, 19, clrq_mon, format1)); // if (!"其他".equals(szqk)) { sheet.addCell(new Label(1, 22, szqk, format1)); // } else { String szqk_qtnr = new String(request.getParameter( "szqk_qtnr").getBytes("iso-8859-1"), "gbk"); // 内分泌科室的设置情况 其它 sheet.addCell(new Label(1, 22, szqk + ":" + szqk_qtnr, format1)); // } sheet.addCell(new Label(4, 25, nfmrs, format1)); // sheet.addCell(new Label(11, 25, nfmcs, format1)); // sheet.addCell(new Label(2, 26, rmzl, format1)); // sheet.addCell(new Label(6, 26, nmzl, format1)); // sheet.addCell(new Label(12, 26, nszrl, format1)); // //4. 医生信息登记 int index0 = 1; for (int i = 0; i < ysxx_names.length; i++) { if("".equals(getStringGBK(ysxx_names[i]))){ continue; } if (index0 > 1) { // 插入一行 sheet.insertRow(rowNoQuestion4); rowNoQuestion4++; rowInsertAmount++; } sheet.addCell(new Label(1, 30 + rowInsertAmount, getStringGBK(ysxx_names[i]) , format2)); // sheet.addCell(new Label(2, 30 + rowInsertAmount, getStringGBK(ysxx_sexs[i]) , format2)); // sheet.addCell(new Label(3, 30 + rowInsertAmount, getStringGBK(ysxx_nls[i]) , format2)); // sheet.addCell(new Label(4, 30 + rowInsertAmount, getStringGBK(ysxx_zcs[i]) , format2)); // sheet.addCell(new Label(6, 30 + rowInsertAmount, getStringGBK(ysxx_xls[i]) , format2)); // sheet.addCell(new Label(8, 30 + rowInsertAmount, getStringGBK(ysxx_xws[i]) , format2)); // sheet.addCell(new Label(9, 30 + rowInsertAmount, getStringGBK(ysxx_byyxs[i]) , format2)); // sheet.addCell(new Label(11, 30 + rowInsertAmount, getStringGBK(ysxx_csnxs[i]) , format2)); // sheet.addCell(new Label(13, 30 + rowInsertAmount, getStringGBK(ysxx_sjhms[i]) , format2)); // sheet.addCell(new Label(15, 30 + rowInsertAmount, getStringGBK(ysxx_emails[i]) , format2)); // index0++; } //5.是否具有内分泌专科实验室: sheet.addCell(new Label(5, 32 + rowInsertAmount, smzksy, format1)); // if("是".equals(smzksy)) { String smzksy_gzrs = getStringGBK(request, "smzksy_gzrs"); //实验室工作人员人数 String smzksy_sbjz = getStringGBK(request, "smzksy_sbjz"); //实验室设备价值 String smzksy_rbbl = getStringGBK(request, "smzksy_rbbl"); //实验室日处理标本量 String smzksy_ysl = getStringGBK(request, "smzksy_ysl"); //实验室月收入 sheet.addCell(new Label(4, 33 + rowInsertAmount, smzksy_gzrs, format1)); // sheet.addCell(new Label(11, 33 + rowInsertAmount, smzksy_sbjz, format1)); // sheet.addCell(new Label(4, 34 + rowInsertAmount, smzksy_rbbl, format1)); // sheet.addCell(new Label(11, 34 + rowInsertAmount, smzksy_ysl, format1)); // } //6.目前内分泌科(专业组)发展所面临的挑战与问题 int index1 = 1; rowNoQuestion6 = rowNoQuestion6 + rowInsertAmount; for (int i = 0; i < tzwts.length; i++) { if("".equals(getStringGBK(tzwts[i]))){ continue; } if (index1 > 1) { // 插入一行 sheet.insertRow(rowNoQuestion6); rowNoQuestion6++; rowInsertAmount++; } sheet.addCell(new Label(1, 37 + rowInsertAmount, index1++ + ". " + getStringGBK(tzwts[i]) , format1)); // } //7.希望得到内分泌代谢医师分会提供哪些方面的帮助和支持(可多选) rowNoQuestion7 = rowNoQuestion7 + rowInsertAmount; for (int i = 0; i < bzzcs.length; i++) { if (i > 0) { // 插入一行 sheet.insertRow(rowNoQuestion7); rowNoQuestion7++; rowInsertAmount++; } if(!"其他(请填写):".equals(getStringGBK(bzzcs[i]))){ sheet.addCell(new Label(1, 40 + rowInsertAmount, getStringGBK(bzzcs[i]) , format1)); // } else { String bzzc_qt = getStringGBK(request, "bzzc_qt"); //其他(请填写) sheet.addCell(new Label(1, 40 + rowInsertAmount, getStringGBK(bzzcs[i]) + bzzc_qt, format1)); // } } // 8.是否愿意加入本分会成为会员: sheet.addCell(new Label(6, 42 + rowInsertAmount, cwhy, format1)); // if("是".equals(cwhy)) { String cwhy_hf = getStringGBK(request, "cwhy_hf"); //您认为会员每年会费多少合适 String cwhy_hybl = getStringGBK(request, "cwhy_hybl"); //分会评选年度优秀内分泌代谢科医师,您认为占会员的比例多少合适 sheet.addCell(new Label(1, 44 + rowInsertAmount, cwhy_hf, format1)); // sheet.addCell(new Label(1, 46 + rowInsertAmount, cwhy_hybl, format1)); // } //9.您和您的单位对本分未来工作的建议 int index2 = 1; rowNoQuestion9 = rowNoQuestion9 + rowInsertAmount; for (int i = 0; i < gzjys.length; i++) { if("".equals(getStringGBK(gzjys[i]))){ continue; } if (index2 > 1) { // 插入一行 sheet.insertRow(rowNoQuestion9); rowNoQuestion9++; rowInsertAmount++; } sheet.addCell(new Label(1, 49 + rowInsertAmount, index2++ + ". " + getStringGBK(gzjys[i]) , format1)); // } book.write(); book.close(); } catch (Exception e) { System.out.println(e); e.printStackTrace(); msg = "调查报告提交失败,请重新提交或者联系管理员。"; } %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>中国医师协会内分泌代谢医师科分会调查问卷</title> </head> <body style="background-color:#E0ECF9"> <table border="0" align="center"> <tr> <td width="180" align="left"><img src="img/CEA-logo.png" style=""/></td> <td width="550"><div align="left" style="font-size:25px"><strong>中国医师协会内分泌代谢医师科分会</strong></div></td> </tr> <tr> <td height="30"></td> </tr> <tr> <td colspan="2"> <div align="center"><strong><%= msg %></strong></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr> <td colspan="2"> <div align="center"> <input type="button" onclick="javascript:window.close();" value="关 闭"/> </div> </td> </tr> </table> </body> </html>

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值