<%@ Page Language="C#" %>
<%@ import Namespace="System"%>
<%@ import Namespace="Caicai.Framework.Utils"%>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
	string action = CFetch.Get("action");

	if (action == "newscount")
	{
		int id = Convert.ToInt32(CFetch.Get("id"));
		new Caicai.Framework.Data.DBHelper().ExecuteNonQuery("update c_news set clicknum=clicknum+1 where id=" + id);
		string clicknum = Caicai.Framework.Data.DBHelperShortcut.Row("c_news", "clicknum", "id=" + id);
		Response.Write("document.write(\"" + clicknum + "\")");
	}

	if (action == "faqcount")
	{
		int id = Convert.ToInt32(CFetch.Get("id"));
		new Caicai.Framework.Data.DBHelper().ExecuteNonQuery("update c_faq set clicknum=clicknum+1 where id=" + id);
		string clicknum = Caicai.Framework.Data.DBHelperShortcut.Row("c_faq", "clicknum", "id=" + id);
		Response.Write("document.write(\"" + clicknum + "\")");
	}
}
</script>