<?xml version="1.0" encoding="GB2312"?>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="api.cs" Inherits="ASdht.Web.api.api" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Maticsoft.Web" %>

<script runat="server">
    protected override void  OnLoad(EventArgs e)
    {
        Response.Charset = "gb2312";
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "text/xml";
        Response.HeaderEncoding = System.Text.Encoding.GetEncoding("GB2312");
    }
</script>


<urlset>

<%
    teamtable = GetTeams();
    for (int i = 0; i < teamtable.Rows.Count; i++)
  {
      DataRow dr = teamtable.Rows[i];
       %>
<url>
<loc><%=(WWWprefix + "team.aspx?id=" + dr["teamid"])%></loc>
<data>
<display>
<website><%=ASSystemArr["abbreviation"]%></website>
<identifier><%=dr["teamid"]%></identifier> 
<siteurl><%=WWWprefix%></siteurl>
<city><%=(dr["cityname"].ToString() == String.Empty ? allcity : dr["cityname"].ToString())%></city>
<title><%=("<![CDATA[" + dr["productname"].ToString() + "]]>")%></title>
<image><%=(dr["image"].ToString() == String.Empty ? WWWprefix : WWWprefix + dr["image"].ToString().Substring(1))%></image>
<class><%=dr["groupname"]%></class>
<tag><%=dr["groupname"]%></tag>
<startTime><%=Convert.ToDateTime(dr["Begin_time"]).ToString("yyyy-MM-dd HH:mm:ss")%></startTime>
<endTime><%=Convert.ToDateTime(dr["End_time"]).ToString("yyyy-MM-dd HH:mm:ss")%></endTime>
<value><%=dr["Market_price"]%></value>
<price><%=dr["Team_price"]%></price>
<discount><%=Utils.WebSiteHelper.GetDiscount(Convert.ToDecimal(dr["Market_price"]), Convert.ToDecimal(dr["Team_price"])).Replace("ел", "")%></discount>
<bought><%=dr["now_number"]%></bought>
<maxQuota>99999999</maxQuota>
<minQuota><%=dr["Min_number"]%></minQuota>
<post></post>
<soldOut></soldOut>
<merchantEndTime><%=Convert.ToDateTime(dr["End_time"]).ToString("yyyy-MM-dd HH:mm:ss")%></merchantEndTime>
<tip></tip>
<detail><%=("<![CDATA[" + dr["Summary"].ToString() + "]]>")%></detail>
</display>
<shops>
 <shop>
 	<name><%=("<![CDATA[" + dr["title"].ToString() + "]]>")%></name>
    <tel><%=dr["phone"].ToString()%></tel>
    <addr><%=("<![CDATA[" + dr["address"].ToString() + "]]>")%></addr>
    <longitude></longitude>
    <latitude></latitude>
 </shop>
</shops>
</data>
</url><%} %>
</urlset>