<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {
       
        if (Request.Form["type"] != null && Request.Form["docid"] != null)
        {
            Response.ContentType = "text/html";
            Response.Write(GetValue(int.Parse(Request.Form["type"].ToString()), int.Parse(Request.Form["docid"].ToString())));
            Response.Flush();
            Response.Close();
        }
        if (Request.Form["stype"] != null&&Request.Form["id"]!=null)
        {
            Response.ContentType = "text/html";
            Response.Write(Select(int.Parse(Request.Form["stype"].ToString()),int.Parse(Request.Form["id"].ToString())));
            Response.Flush();
            Response.Close();
        }
        
    }
    string Select(int stype,int id)
    {
        Fm.Bussiness.public_select ps = new Fm.Bussiness.public_select();
        //System.Data.DataView dv = null;
        if (stype == 0)
        {
            return ps.Getps("Fm_model_main", "topclick", "docid=" + id + "")[0]["topclick"].ToString();
        }
        else
        {
            return ps.Getps("Fm_model_main","tread","docid="+id+"")[0]["tread"].ToString(); 
        }
        
    }
    string GetValue(int type,int docid)
    {
        //
        Fm.Tags.Tags_sql sql = new Fm.Tags.Tags_sql();
        System.Data.DataView dv = (sql.GetArticleTopTread(docid,type)) as System.Data.DataView;
        if (type == 0)
        {
            return dv[0]["topclick"].ToString();
        }
        else
        {
            return dv[0]["tread"].ToString(); 
        }
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>
