using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class index_2_weather : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// if (WMcache.GetCache("cache_index_2_weather") != null) WMprompt.DWnohr(WMcache.GetCache("cache_index_2_weather").ToString());
// else
// {
string url = ZK.config("weather", "index_2");
string code = WMremote.GetWebCode(url, "");
code = WMregex.GetClip(code, "<table width=\"780\" borderColorDark=\"#ffffff\" borderColorLight=\"#008000\" border=\"1\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\">", "</table>", false, "");
code = WMregex.GetClip(code, "<td align=\"center\">天气</td>", "</table>", false, "");
string str1 = ""; string str2 = ""; string str3 = "";
string str4 = ""; string str5 = ""; string str6 = "";
string str7 = ""; string str8 = ""; string str9 = "";
string[] arr1 = WMarray.SplitArr(code, "</tr>");
for (int i = 0; i < arr1.Length; i++)
{
if (arr1[i].Contains("</td>"))
{
string[] arr2 = WMarray.SplitArr(arr1[i], "</td>");
for (int j = 0; j < arr2.Length; j++)
{
if (arr2[j].Contains("<td>"))
{
if (i == 0 && j == 1) { str1 = arr2[j]; }
if (i == 0 && j == 2) { str4 = arr2[j]; }
if (i == 0 && j == 3) { str7 = arr2[j]; }
if (i == 1 && j == 1) { str2 = arr2[j]; }
if (i == 1 && j == 2) { str5 = arr2[j]; }
if (i == 1 && j == 3) { str8 = arr2[j]; }
if (i == 2 && j == 1) { str3 = arr2[j]; }
if (i == 2 && j == 2) { str6 = arr2[j]; }
if (i == 2 && j == 3) { str9 = arr2[j]; }
}
}
}
}
//string strTemp = "今天:" + str1 + " " + str2 + " " + str3 + " 明天:" + str4 + " " + str5 + " " + str6 + " 后天:" + str7 + " " + str8 + " " + str9 + " ";
string strTemp = str1 + " " + str2 + " " + str3;
strTemp = "今日:" + WMreplace.NoHtml(strTemp.Replace("\r\n", "").Replace("\r", "").Replace("\n", ""));
strTemp = "document.write(\"" + strTemp + "\");";
WMcache.SetCache("cache_index_2_weather", strTemp, 0, TimeSpan.FromMinutes(60));
WMprompt.DWnohr(strTemp);
// }
}
}