1.
$r=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$classid][tbname]."where id='$id' and classid='$classid' ");
少了一个空格。。改为以下OK了
$r=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid' ");