请J大看看我修改的代码错在何处?
Function jtbc_cms_module_detail() Dim tid, tmpstr Dim classid //添加classid声明 tid = get_num(request.querystring("id"),0) classidstr = "select a_class from " & ndatabase & " where " & nidfield & "=" & tid //提取classid,这句话系统报错 classid = conn.Execute(classidstr) //执行查询语句并赋值
sqlstr = "select * from " & ndatabase & " where " & nidfield & "=" & tid & " and " & cfname("hidden") & "=0" Set rs = conn.Execute(sqlstr) If Not rs.eof Then Dim ttpoic: ttpoic = htmlencode(get_str(rs(cfname("topic")))) Call cntitle(ttpoic) tmpstr = itake("module.detail-" & classid, "tpl") //获取当前文章所在栏目id If check_null(tmpstr) Then tmpstr = itake("module.detail", "tpl") //若为空则使用默认detail模板 tmpstr = Replace(tmpstr, "{$id}", get_num(rs(nidfield), 0))
|