|
 |
产品展示 |
|
<%
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("");
}
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(objdataset.Tables["single"].Rows[0]["single_content"].ToString());
Response.Write(" | ");
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(" + ") " + objdataset.Tables["product"].Rows[i + j]["product_name"].ToString() + " | ");
}
else
{
Response.Write(" | ");
}
}
Response.Write(" ");
i = i + j - 1;
}
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(" | ");
Response.Write(" ");
}
catch(Exception err)
{
}
%>
|
|
|