article.aspx.cs 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using CB.Common;
  8. using CB.Data;
  9. using CB.Entity;
  10. using CB.Framework;
  11. namespace CB.Wap.kjh.rules
  12. {
  13. public partial class article : WebPage
  14. {
  15. /// <summary>
  16. /// 彩种菜单列表
  17. /// </summary>
  18. protected string MenuHtml = "";
  19. /// <summary>
  20. /// 规则内容
  21. /// </summary>
  22. protected string ContentHtml = "";
  23. /// <summary>
  24. /// 玩法规则/和中奖规则切换
  25. /// </summary>
  26. protected string SwitchHtml = "";
  27. /// <summary>
  28. /// 页面标题切换
  29. /// </summary>
  30. protected string PageTitle = "";
  31. protected string LotteryName = "";
  32. protected void Page_Load(object sender, EventArgs e)
  33. {
  34. InitData();
  35. }
  36. protected override void InitData()
  37. {
  38. IList<TopicClassInfo> lists = Caches.GetTopicClassList(211);
  39. if (lists == null || lists.Count < 1) return;
  40. foreach (var list in lists)
  41. {
  42. string style = "style='display:none'", ZjgzHtml = "", WfgzHtml = "";
  43. string lclass = "";
  44. if (list.Cid == GetTopicTypeId()) { style = ""; lclass = "class='brline'"; PageTitle = list.Name + "玩法规则"; }
  45. MenuHtml += "<li name='lMenu' ><a href='/kjh/" + GetUrlPrifix(list.Cid) + "-zjgz/' " + lclass + " onclick='switchL(" + list.Cid + ",this);'>" + list.Name + "</a></li>";
  46. //MenuHtml += "<a href='/kjh/" + GetUrlPrifix(list.Cid) + "-zjgz/' " + lclass + " onclick='switchL(" + list.Cid + ",this);'>" + list.Name + "</a>";
  47. var items = Caches.GetHelpList(list.Cid);
  48. if (items == null || items.Count < 1) continue;
  49. foreach (var item in items)
  50. {
  51. if (item.Title.IndexOf("玩法规则", StringComparison.Ordinal) > -1)
  52. { WfgzHtml = "<div class='info' id='wfgz_" + list.Cid + "'>" + item.Context + "</div>"; }
  53. else if (item.Title.IndexOf("中奖规则", StringComparison.Ordinal) > -1)
  54. { ZjgzHtml = "<div class='info' style='display:none' id='zjgz_" + list.Cid + "'>" + item.Context + "</div>"; }
  55. }
  56. SwitchHtml += "<div name ='rulel' id='rule_" + list.Cid + "'" + style + ">"
  57. + "<li><a href='javascript:void(0);' class='bbline' onclick=\"switchRule(" + list.Cid + ",'wfgz')\">玩法规则</a></li>"
  58. + "<li><a href='javascript:void(0);' onclick='switchRule(" + list.Cid + ",\"zjgz\")'>中奖规则</a></li></div>";
  59. ContentHtml += "<div name='divl' id='content_" + list.Cid + "'" + style + ">" + WfgzHtml + ZjgzHtml + "</div>";
  60. }
  61. //this.header1.ColumnName = LotteryName + "玩法规则";
  62. base.InitData();
  63. }
  64. /// <summary>
  65. /// 将彩种转换成对应的id
  66. /// </summary>
  67. /// <returns></returns>
  68. private int GetTopicTypeId()
  69. {
  70. string lottery = WRequest.GetQueryString("lottery");
  71. int topicTypeId = 213;
  72. switch (lottery)
  73. {
  74. case "ssq": topicTypeId = 214; LotteryName = "双色球"; break;
  75. case "p5": topicTypeId = 215; LotteryName = "排列五"; break;
  76. case "p3": topicTypeId = 223; LotteryName = "排列三"; break;
  77. case "qxc": topicTypeId = 216; LotteryName = "七星彩"; break;
  78. case "ssc": topicTypeId = 217; LotteryName = "时时彩"; break;
  79. case "qlc": topicTypeId = 218; LotteryName = "七乐彩"; break;
  80. case "qyh": topicTypeId = 219; LotteryName = "群英会"; break;
  81. case "ssl": topicTypeId = 220; LotteryName = "时时乐"; break;
  82. case "hc1": topicTypeId = 221; LotteryName = "好彩1"; break;
  83. case "dlt": topicTypeId = 224; LotteryName = "大乐透"; break;
  84. case "3d":
  85. case "sd": topicTypeId = 213; LotteryName = "福彩3D"; break;
  86. case "df6j1": topicTypeId = 230; LotteryName = "东方6+1"; break;
  87. case "hlj11x5": topicTypeId = 234; LotteryName = "黑龙江11选5"; break;
  88. case "tjklsf": topicTypeId = 235; LotteryName = "天津快乐十分"; break;
  89. case "hd15x5": topicTypeId = 236; LotteryName = "华东15选5"; break;
  90. case "zj6j1": topicTypeId = 238; LotteryName = "浙江6+1"; break;
  91. case "js11x5": topicTypeId = 239; LotteryName = "江苏11选5"; break;
  92. case "js7ws": topicTypeId = 240; LotteryName = "江苏7位数"; break;
  93. case "sxklsf": topicTypeId = 241; LotteryName = "山西快乐十分"; break;
  94. case "heb11x5": topicTypeId = 242; LotteryName = "河北11选5"; break;
  95. //case "hb22x5": topicTypeId = 243; LotteryName = "湖北22选5"; break;
  96. case "hb30x5": topicTypeId = 243; LotteryName = "湖北30选5"; break;
  97. case "gxklsf": topicTypeId = 244; LotteryName = "广西快乐十分"; break;
  98. case "gd11x5": topicTypeId = 245; LotteryName = "广东11选5"; break;
  99. case "zj11x5": topicTypeId = 246; LotteryName = "浙江11选5"; break;
  100. case "gdklsf": topicTypeId = 247; LotteryName = "广东快乐十分"; break;
  101. case "yn11x5": topicTypeId = 248; LotteryName = "云南11选5"; break;
  102. case "hn22x5": topicTypeId = 249; LotteryName = "河南22选5"; break;
  103. case "zjklc": topicTypeId = 250; LotteryName = "浙江快乐彩"; break;
  104. case "jl11x5": topicTypeId = 251; LotteryName = "吉林11选5"; break;
  105. case "jx11x5": topicTypeId = 252; LotteryName = "江西11选5"; break;
  106. case "ln11x5": topicTypeId = 253; LotteryName = "辽宁11选5"; break;
  107. case "xj35x7": topicTypeId = 254; LotteryName = "新疆35选7"; break;
  108. case "sd11x5": topicTypeId = 255; LotteryName = "山东11选5"; break;
  109. case "jsk3": topicTypeId = 256; LotteryName = "江苏快3"; break;
  110. case "lnkl12": topicTypeId = 257; LotteryName = "辽宁快乐12"; break;
  111. case "fj36x7": topicTypeId = 258; LotteryName = "福建36选7"; break;
  112. case "ny36x7": topicTypeId = 259; LotteryName = "南粤36选7"; break;
  113. case "sckl12": topicTypeId = 260; LotteryName = "四川快乐12"; break;
  114. case "hbk3": topicTypeId = 261; LotteryName = "河北快3"; break;
  115. case "fj31x7": topicTypeId = 262; LotteryName = "福建31选7"; break;
  116. case "ahk3": topicTypeId = 263; LotteryName = "安徽快3"; break;
  117. case "jlk3": topicTypeId = 264; LotteryName = "吉林快3"; break;
  118. case "nmgk3": topicTypeId = 265; LotteryName = "内蒙古快3"; break;
  119. case "sdqyh": topicTypeId = 219; LotteryName = "山东群英会"; break;
  120. }
  121. return topicTypeId;
  122. }
  123. /// <summary>
  124. /// id转换对应的页面地址配置
  125. /// </summary>
  126. /// <returns></returns>
  127. private string GetUrlPrifix(int topicTypeId)
  128. {
  129. string prifix = "";
  130. switch (topicTypeId)
  131. {
  132. case 214: prifix = "ssq"; break;
  133. case 215: prifix = "p5"; break;
  134. case 223: prifix = "p3"; break;
  135. case 216: prifix = "qxc"; break;
  136. case 217: prifix = "ssc"; break;
  137. case 218: prifix = "qlc"; break;
  138. case 219: prifix = "sdqyh"; break;//
  139. case 220: prifix = "ssl"; break;
  140. case 221: prifix = "hc1"; break;
  141. case 224: prifix = "dlt"; break;
  142. case 213: prifix = "3d"; break;
  143. case 230: prifix = "df6j1"; break;
  144. case 234: prifix = "hlj11x5"; break;
  145. case 235: prifix = "tjklsf"; break;
  146. case 236: prifix = "hd15x5"; break;
  147. case 238: prifix = "zj6j1"; break;
  148. case 239: prifix = "js11x5"; break;
  149. case 240: prifix = "js7ws"; break;
  150. case 241: prifix = "sxklsf"; break;
  151. case 242: prifix = "heb11x5"; break;
  152. case 243: prifix = "hb30x5"; break;
  153. case 244: prifix = "gxklsf"; break;
  154. case 245: prifix = "gd11x5"; break;
  155. case 246: prifix = "zj11x5"; break;
  156. case 247: prifix = "gdklsf"; break;
  157. case 248: prifix = "yn11x5"; break;
  158. case 249: prifix = "hn22x5"; break;
  159. case 250: prifix = "zjklc"; break;
  160. case 251: prifix = "jl11x5"; break;
  161. case 252: prifix = "jx11x5"; break;
  162. case 253: prifix = "ln11x5"; break;
  163. case 254: prifix = "xj35x7"; break;
  164. case 255: prifix = "sd11x5"; break;
  165. case 256: prifix = "jsk3"; break;
  166. case 257: prifix = "lnkl12"; break;
  167. case 258: prifix = "fj36x7"; break;
  168. case 259: prifix = "ny36x7"; break;
  169. case 260: prifix = "sckl12"; break;
  170. case 261: prifix = "hbk3"; break;
  171. case 262: prifix = "fj31x7"; break;
  172. case 263: prifix = "ahk3"; break;
  173. case 264: prifix = "jlk3"; break;
  174. case 265: prifix = "nmgk3"; break;
  175. // case 219: prifix = "sdqyh"; break;
  176. }
  177. return prifix;
  178. }
  179. }
  180. }