123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using CB.Framework;
- using CB.Data;
- using CB.Entity;
- using CB.Common;
- namespace CB.Web.Kjh.zjgz
- {
- public partial class article : WebPage
- {
- /// <summary>
- /// 彩种菜单列表
- /// </summary>
- protected string MenuHtml = "";
- /// <summary>
- /// 高频菜单
- /// </summary>
- protected string lotHtml = "";
- /// <summary>
- /// 地方彩菜单
- /// </summary>
- protected string hoverHtml = "";
- /// <summary>
- /// 数字彩菜单
- /// </summary>
- protected string SzHtml = "";
- /// <summary>
- /// 规则内容
- /// </summary>
- protected string ContentHtml = "";
- /// <summary>
- /// 玩法规则/和中奖规则切换
- /// </summary>
- protected string SwitchHtml = "";
- /// <summary>
- /// 页面标题切换
- /// </summary>
- protected string PageTitle = "";
- protected string LotteryName = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- InitData();
- }
- protected override void InitData()
- {
- string szclass = "", szl = "lotTitle hover";
- string gpclass = "", gpl = "lotTitle";
- string dfclass = "", dfl = "lotTitle";
- IList<TopicClassInfo> types = Caches.GetTopicClassList(211);
- if (types == null || types.Count < 1) return;
- foreach (var list in types)//type .OrderByDescending(p=>p.Name.Reverse().ToString())
- {
- //IList<TopicClassInfo> lists = Caches.GetTopicClassList(type.Cid);
- //foreach (var list in lists)
- //{
- string style = "style='display:none'", ZjgzHtml = "", WfgzHtml = "";
- string lclass = "";
- if (list.Cid == GetTopicTypeId()) { style = ""; lclass = "class='brline'"; PageTitle = list.Name + "玩法规则"; }
- switch (list.Cid)
- {
- case 225:
- SzHtml += "<li><a href='/" + GetUrlPrifix(list.Cid) + "-zjgz/' " + lclass + " onclick='switchL(" + list.Cid + ",this);'>" + list.Name + "</a></li>";
- if (lclass != "")
- {
- szclass = "active";
- szl = "lotTitle hover";
- }
- break;
- case 221:
- case 230:
- case 236:
- case 238:
- case 240:
- case 243:
- case 249:
- case 254:
- case 258:
- case 259:
- case 262:
- hoverHtml += "<li ><a href='/" + GetUrlPrifix(list.Cid) + "-zjgz/' " + lclass + " onclick='switchL(" + list.Cid + ",this);'>" + list.Name + "</a></li>";
- if (lclass != "")
- {
- dfclass = "active";
- dfl = "lotTitle hover";
- }
- break;
- case 217:
- case 219:
- case 220:
- case 234:
- case 235:
- case 239:
- case 241:
- case 242:
- case 244:
- case 245:
- case 246:
- case 247:
- case 248:
- case 250:
- case 251:
- case 252:
- case 253:
- case 255:
- case 256:
- case 257:
- case 260:
- case 261:
- case 263:
- case 264:
- case 265:
- lotHtml += "<li ><a href='/" + GetUrlPrifix(list.Cid) + "-zjgz/' " + lclass + " onclick='switchL(" + list.Cid + ",this);'>" + list.Name + "</a></li>";
- if (lclass != "")
- {
- gpclass = "active";
- gpl = "lotTitle hover";
- }
- break;
- default:
- if (list.Cid < 229)
- {
- SzHtml += "<li><a href='/" + GetUrlPrifix(list.Cid) + "-zjgz/' " + lclass + " onclick='switchL(" + list.Cid + ",this);'>" + list.Name + "</a></li>";
- if (lclass != "")
- {
- szclass = "active";
- }
- }
- break;
- }
- var items = Caches.GetHelpList(list.Cid);
- if (items == null || items.Count < 1) continue;
- foreach (var item in items)
- {
- if (item.Title.IndexOf("玩法规则", StringComparison.Ordinal) > -1)
- { WfgzHtml = "<div class='info' id='wfgz_" + list.Cid + "'>" + item.Context + "</div>"; }
- else if (item.Title.IndexOf("中奖规则", StringComparison.Ordinal) > -1)
- { ZjgzHtml = "<div class='info' style='display:none' id='zjgz_" + list.Cid + "'>" + item.Context + "</div>"; }
- }
- SwitchHtml += "<div name ='rulel' id='rule_" + list.Cid + "'" + style + ">"
- + "<li><a href='javascript:void(0);' class='bbline' onclick=\"switchRule(" + list.Cid + ",'wfgz')\">玩法规则</a></li>"
- + "<li><a href='javascript:void(0);' onclick='switchRule(" + list.Cid + ",\"zjgz\")'>中奖规则</a></li></div>";
- ContentHtml += "<div name='divl' id='content_" + list.Cid + "'" + style + ">" + WfgzHtml + ZjgzHtml + "</div>";
- //}
- }
- MenuHtml += "<li><span class=\"" + szl + "\">全国彩</span><ul class=\"" + szclass + "\">" + SzHtml + "</ul></li>";
- MenuHtml += "<li><span class=\"" + dfl + "\">地方彩</span><ul class=\"" + dfclass + "\">" + hoverHtml + "</ul></li>";
- MenuHtml += "<li><span class=\"" + gpl + "\">高频彩</span><ul class=\"" + gpclass + "\">" + lotHtml + "</ul></li>";
- base.InitData();
- }
- /// <summary>
- /// 将彩种转换成对应的id
- /// </summary>
- /// <returns></returns>
- private int GetTopicTypeId()
- {
- string lottery = WRequest.GetQueryString("lottery");
- int topicTypeId = 213;
- switch (lottery)
- {
- case "ssq": topicTypeId = 214; LotteryName = "双色球"; break;
- case "p5": topicTypeId = 215; LotteryName = "排列五"; break;
- case "p3": topicTypeId = 223; LotteryName = "排列三"; break;
- case "qxc": topicTypeId = 216; LotteryName = "七星彩"; break;
- case "ssc": topicTypeId = 217; LotteryName = "时时彩"; break;
- case "qlc": topicTypeId = 218; LotteryName = "七乐彩"; break;
- case "qyh": topicTypeId = 219; LotteryName = "群英会"; break;
- case "ssl": topicTypeId = 220; LotteryName = "时时乐"; break;
- case "hc1": topicTypeId = 221; LotteryName = "好彩1"; break;
- case "dlt": topicTypeId = 224; LotteryName = "大乐透"; break;
- case "3d":
- case "sd": topicTypeId = 213; LotteryName = "福彩3D"; break;
- case "df6j1": topicTypeId = 230; LotteryName = "东方6+1"; break;
- case "hlj11x5": topicTypeId = 234 ; LotteryName = "黑龙江11选5"; break;
- case "tjklsf": topicTypeId = 235; LotteryName = "天津快乐十分"; break;
- case "hd15x5": topicTypeId = 236; LotteryName = "华东15选5"; break;
- case "zj6j1": topicTypeId = 238; LotteryName = "浙江6+1"; break;
- case "js11x5": topicTypeId = 239; LotteryName = "江苏11选5"; break;
- case "js7ws": topicTypeId = 240; LotteryName = "江苏7位数"; break;
- case "sxklsf": topicTypeId = 241; LotteryName = "山西快乐十分"; break;
- case "heb11x5": topicTypeId =242; LotteryName = "河北11选5"; break;
- case "hb30x5": topicTypeId = 243; LotteryName = "湖北30选5"; break;
- case "gxklsf": topicTypeId = 244; LotteryName = "广西快乐十分"; break;
- case "gd11x5": topicTypeId = 245; LotteryName = "广东11选5"; break;
- case "zj11x5": topicTypeId = 246; LotteryName = "浙江11选5"; break;
- case "gdklsf": topicTypeId = 247; LotteryName = "广东快乐十分"; break;
- case "yn11x5": topicTypeId = 248; LotteryName = "云南11选5"; break;
- case "hn22x5": topicTypeId = 249; LotteryName = "河南22选5"; break;
- case "zjklc": topicTypeId = 250; LotteryName = "浙江快乐彩"; break;
- case "jl11x5": topicTypeId = 251; LotteryName = "吉林11选5"; break;
- case "jx11x5": topicTypeId = 252; LotteryName = "江西11选5"; break;
- case "ln11x5": topicTypeId = 253; LotteryName = "辽宁11选5"; break;
- case "xj35x7": topicTypeId = 254; LotteryName = "新疆35选7"; break;
- case "sd11x5": topicTypeId = 255; LotteryName = "山东11选5"; break;
- case "jsk3": topicTypeId = 256; LotteryName = "江苏快3"; break;
- case "lnkl12": topicTypeId = 257; LotteryName = "辽宁快乐12"; break;
- case "fj36x7": topicTypeId = 258; LotteryName = "福建36选7"; break;
- case "ny36x7": topicTypeId = 259; LotteryName = "南粤36选7"; break;
- case "sckl12": topicTypeId = 260; LotteryName = "四川快乐12"; break;
- case "hbk3": topicTypeId = 261; LotteryName = "河北快3"; break;
- case "fj31x7": topicTypeId = 262; LotteryName = "福建31选7"; break;
- case "ahk3": topicTypeId = 263; LotteryName = "安徽快3"; break;
- case "jlk3": topicTypeId = 264; LotteryName = "吉林快3"; break;
- case "nmgk3": topicTypeId = 265; LotteryName = "内蒙古快3"; break;
- case "sdqyh": topicTypeId = 219; LotteryName = "山东群英会"; break;
- }
- return topicTypeId;
- }
- /// <summary>
- /// id转换对应的页面地址配置
- /// </summary>
- /// <returns></returns>
- private string GetUrlPrifix(int topicTypeId)
- {
- string prifix = "";
- switch (topicTypeId)
- {
- case 214: prifix = "ssq"; break;
- case 215: prifix = "p5"; break;
- case 223: prifix = "p3"; break;
- case 216: prifix = "qxc"; break;
- case 217: prifix = "ssc"; break;
- case 218: prifix = "qlc"; break;
- case 219: prifix = "sdqyh"; break;//
- case 220: prifix = "ssl"; break;
- case 221: prifix = "hc1"; break;
- case 224: prifix = "dlt"; break;
- case 213: prifix = "3d"; break;
- case 230: prifix = "df6j1"; break;
- case 234: prifix = "hlj11x5"; break;
- case 235: prifix = "tjklsf"; break;
- case 236: prifix = "hd15x5"; break;
- case 238: prifix = "zj6j1"; break;
- case 239: prifix = "js11x5"; break;
- case 240: prifix = "js7ws"; break;
- case 241: prifix = "sxklsf"; break;
- case 242: prifix = "heb11x5"; break;
- case 243: prifix = "hb30x5"; break;
- case 244: prifix = "gxklsf"; break;
- case 245: prifix = "gd11x5"; break;
- case 246: prifix = "zj11x5"; break;
- case 247: prifix = "gdklsf"; break;
- case 248: prifix = "yn11x5"; break;
- case 249: prifix = "hn22x5"; break;
- case 250: prifix = "zjklc"; break;
- case 251: prifix = "jl11x5"; break;
- case 252: prifix = "jx11x5"; break;
- case 253: prifix = "ln11x5"; break;
- case 254: prifix = "xj35x7"; break;
- case 255: prifix = "sd11x5"; break;
- case 256: prifix = "jsk3"; break;
- case 257: prifix = "lnkl12"; break;
- case 258: prifix = "fj36x7"; break;
- case 259: prifix = "ny36x7"; break;
- case 260: prifix = "sckl12"; break;
- case 261: prifix = "hbk3"; break;
- case 262: prifix = "fj31x7"; break;
- case 263: prifix = "ahk3"; break;
- case 264: prifix = "jlk3"; break;
- case 265: prifix = "nmgk3"; break;
- // case 219: prifix = "sdqyh"; break;
- }
- return prifix;
- }
- }
- }
|