<% @page language="c#" %> <% @import namespace="System.Data" %> <% @import namespace="System.Data.OleDb" %> <% string strclassid = Request.QueryString["classid"]; string strsearch = Request.QueryString["search"]; string strpage = Request.QueryString["page"]; strclassid = api_int_string(strclassid, ""); strsearch = api_string_string(strsearch, ""); int intpage = api_int_int(strpage, 1); OleDbConnection objconn = new OleDbConnection(); objconn.ConnectionString = pub_db_string; objconn.Open(); string strwebtitle = ""; string strwebkey = ""; string strwebdescription = ""; try { string strsql = ""; OleDbCommand objcmd = new OleDbCommand(); OleDbDataAdapter objadapter = new OleDbDataAdapter(); DataSet objdataset = new DataSet(); strsql = "select * from _yw_config where config_id = 1"; objcmd.Connection = objconn; objcmd.CommandText = strsql; objadapter.SelectCommand = objcmd; objadapter.Fill(objdataset, "config"); strwebtitle = objdataset.Tables["config"].Rows[0]["config_title"].ToString(); strwebkey = objdataset.Tables["config"].Rows[0]["config_key"].ToString(); strwebdescription = objdataset.Tables["config"].Rows[0]["config_description"].ToString(); } catch(Exception err) { } %> 产品展示 - <%=strwebtitle%>
您的位置:首页 > 产品展示
产品展示
<% try { string strproductclassid = Request.QueryString["classid"]; strproductclassid = api_int_string(strproductclassid, ""); string strsql = ""; OleDbCommand objcmd = new OleDbCommand(); OleDbDataAdapter objadapter = new OleDbDataAdapter(); DataSet objdataset = new DataSet(); strsql = "select * from _yw_product_class where channel_id = 3 and product_class_path = '' order by product_class_order1, product_class_order2, product_class_order3, product_class_order4, product_class_order5"; objcmd.Connection = objconn; objcmd.CommandText = strsql; objadapter.SelectCommand = objcmd; objadapter.Fill(objdataset, "product_class"); Response.Write(""); for(int i = 0; i < objdataset.Tables["product_class"].Rows.Count; i = i + 1) { Response.Write(""); Response.Write(""); } Response.Write("
"); Response.Write(" " + objdataset.Tables["product_class"].Rows[i]["product_class_name"].ToString() + ""); Response.Write("
"); } catch(Exception err) { } %>
联系我们 About US
<% try { string strsql = ""; OleDbCommand objcmd = new OleDbCommand(); OleDbDataAdapter objadapter = new OleDbDataAdapter(); DataSet objdataset = new DataSet(); strsql = "select * from _yw_single where channel_id = 10"; objcmd.Connection = objconn; objcmd.CommandText = strsql; objadapter.SelectCommand = objcmd; objadapter.Fill(objdataset, "single"); Response.Write(""); Response.Write(""); Response.Write("
"); Response.Write(objdataset.Tables["single"].Rows[0]["single_content"].ToString()); Response.Write("
"); } catch(Exception err) { } %>
产品展示
<% try { string strkey = ""; int intpagecount = 0; int intpageup = 0; int intpagedown = 0; string strsql = ""; OleDbCommand objcmd = new OleDbCommand(); OleDbDataAdapter objadapter = new OleDbDataAdapter(); DataSet objdataset = new DataSet(); strsql = "select product_id from _yw_product where channel_id = 3 and product_name like '%" + api_sqllike_string(strsearch, "") + "%'"; if(strclassid != "") { strsql = strsql + " and product_class_id = " + strclassid + " order by product_order"; } objcmd.Connection = objconn; objcmd.CommandText = strsql; objadapter.SelectCommand = objcmd; objadapter.Fill(objdataset, "product_key"); strkey = api_db_key(objdataset, "product_key", "product_id", 18, intpage); intpagecount = api_db_pagecount(objdataset, "product_key", 18); intpageup = api_db_pageup(objdataset, "product_key", intpagecount, intpage); intpagedown = api_db_pagedown(objdataset, "product_key", intpagecount, intpage); if(intpagecount == 0) { intpagecount = 1; } if(intpageup == 0) { intpageup = 1; } if(intpagedown == 0) { intpagedown = 1; } strsql = "select * from _yw_product where product_id in (" + strkey + ") order by product_order"; objcmd.Connection = objconn; objcmd.CommandText = strsql; objadapter.SelectCommand = objcmd; objadapter.Fill(objdataset, "product"); string strproducturl = ""; Response.Write(""); for(int i = 0; i < objdataset.Tables["product"].Rows.Count; i = i + 1) { Response.Write(""); int j = 0; for(j = 0; j < 3; j = j + 1) { if(i + j < objdataset.Tables["product"].Rows.Count) { if(objdataset.Tables["product"].Rows[i + j]["product_html"].ToString() == "0") { strproducturl = "product-detail-3.aspx?productid=" + objdataset.Tables["product"].Rows[i + j]["product_id"].ToString(); } else { strproducturl = "product-detail-3-id-" + objdataset.Tables["product"].Rows[i + j]["product_id"].ToString() + ".html"; } Response.Write(""); } else { Response.Write(""); } } Response.Write(""); i = i + j - 1; } Response.Write("

" + objdataset.Tables["product"].Rows[i + j]["product_name"].ToString() + "
"); Response.Write(""); Response.Write(""); Response.Write("
"); if(strclassid == "") { Response.Write("共计:" + objdataset.Tables["product_key"].Rows.Count + " " + "页次:" + intpage.ToString() + "/" + intpagecount.ToString() + " 首页 上一页 下一页 末页"); } else { Response.Write("共计:" + objdataset.Tables["product_key"].Rows.Count + " " + "页次:" + intpage.ToString() + "/" + intpagecount.ToString() + " 首页 上一页 下一页 末页"); } Response.Write("
"); } catch(Exception err) { } %>
<% objconn.Close(); %>