private void MorePage() { int cityid = int.Parse(Utils.GetRequest("cityid", "get", 2, @"^[0-9]\d*$", "ID错误")); int ptype = int.Parse(Utils.GetRequest("ptype", "get", 2, @"^[0-9]\d*$", "类型错误")); string city = Utils.GetRequest("city", "get", 2, @"^[^\^]{1,}$", "城市错误"); Master.Title = "" + city + "天气指数"; string weather = new BCW.Service.GetWeather3gcn().GetWeather3gcnXML2(cityid, ptype, city); builder.Append(Out.Tab("<div>", "")); builder.Append(weather); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("weather.aspx") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("weather.aspx?city=" + city + "") + "\">天气首页</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ReloadPage(string city) { Master.Title = "天气预报"; string weather = new BCW.Service.GetWeather3gcn().GetWeather3gcnXML(city); builder.Append(Out.Tab("<div>", "")); builder.Append("<img src=\"/Files/sys/weather/logo.png\" alt=\"load\"/>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<b>" + city + "天气预报</b>"); builder.Append("<a href=\"" + Utils.getUrl("weather.aspx?act=city&backurl=" + Utils.getPage(0) + "") + "\">[切换]</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append(weather); builder.Append(Out.Tab("</div>", "")); string strText = "请输入城市名称:/,,,"; string strName = "city,act,backurl"; string strType = "stext,hidden,hidden"; string strValu = "广州'ok'" + Utils.getPage(0) + ""; string strEmpt = "false,false,false"; string strIdea = ""; string strOthe = "查询,weather.aspx,post,3,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("提示:您可以查询后,定制天气主页"); builder.Append("<br />本站目前支持400多个国内外主要城市的五天内天气预报"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("weather.aspx") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("weather.aspx?act=okcity&city=" + Server.UrlEncode(city) + "&backurl=" + Utils.getPage(0) + "") + "\">设为默认</a>"); builder.Append(Out.Tab("</div>", "")); }