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

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            default_();
        }
    }
    void default_()
    {
        //Bind(string strSQL, string str, int SerialNumber, string strDateTime, string DateTimeFormat, string strCutField, int CutFieldLen, string CutFieldOmit, string ReplacerStr, string ReplacerType, string ReplacerSQL, string ReplacerField)

        //站长工具  http://tool.chinaz.com/Tools/Escape.aspx

        //http://localhost/s/plus/JS.aspx?strSQL=&str=&SerialNumber=&strDateTime=&DateTimeFormat=&strCutField=&CutFieldLen=&CutFieldOmit=
        //http://localhost/s/plus/JS.aspx?strSQL=select%20top%205%20*%20from%20shop_info%20order%20by%20time%20desc%2Cid%20desc&str=ABC&SerialNumber=&strDateTime=&DateTimeFormat=&strCutField=&CutFieldLen=&CutFieldOmit=

        string strSQL = R(WM.RQ("strSQL"));
        string str = R(WM.RQ("str"));
        string SerialNumber = R(WM.RQ("SerialNumber"));
        string strDateTime = R(WM.RQ("strDateTime"));
        string DateTimeFormat = R(WM.RQ("DateTimeFormat"));
        string strCutField = R(WM.RQ("strCutField"));
        string CutFieldLen = R(WM.RQ("CutFieldLen"));
        string CutFieldOmit = R(WM.RQ("CutFieldOmit"));
        string ReplacerStr = R(WM.RQ("ReplacerStr"));
        string ReplacerType = R(WM.RQ("ReplacerType"));
        string ReplacerSQL = R(WM.RQ("ReplacerSQL"));
        string ReplacerField = R(WM.RQ("ReplacerField"));

        if (strSQL == "") return;
        if (str == "") return;
        if (SerialNumber == "") SerialNumber = "1";
        if (strDateTime == "") strDateTime = "time";
        if (DateTimeFormat == "") DateTimeFormat = "yyyy-MM-dd";
        if (strCutField == "") strCutField = "title";
        if (CutFieldLen == "") CutFieldLen = "28";
        if (CutFieldOmit == "") CutFieldOmit = "..";
        if (ReplacerStr == "") ReplacerStr = "$替换符$";
        if (ReplacerType == "") ReplacerType = "";
        if (ReplacerSQL == "") ReplacerSQL = "";
        if (ReplacerField == "") ReplacerField = "";

        string strTemp = "";
        //strTemp = WMbind.Bind("select top 6 * from life where enable=" + WM.True + " and thumbnail<>'' order by time desc,id desc", "<li>$序号$<a href=\"/life/<<id>>.aspx\" target=\"_blank\"><<title>></a></li>", 1, "time", "yyyy-MM-dd", "title", 28, "..", "$替换符$", "", "", "");
        strTemp = WMbind.Bind(strSQL, str, Convert.ToInt32(SerialNumber), strDateTime, DateTimeFormat, strCutField, Convert.ToInt32(CutFieldLen), CutFieldOmit, ReplacerStr, ReplacerType, ReplacerSQL, ReplacerField);
        if (strTemp != "") strTemp = strTemp.Replace("\"", "\\\"").Replace("\'", "\\\'");
        WMprompt.DWnohr("document.write(\"" + strTemp + "\");");
    }
    string R(string str1) { return str1; }
</script>

