2.2.3用的时候发现无法更新专题,问题如下:
后台更新专题时出现:
Fatal error: Call to undefined function: unbuffered_query() in /usr/.....s/xas/admin_topic.php on line 41
具体代码为:
<?php
/***********************************************************************/
/* 站点文章管理系统(XAS) 1.0.0 */
/* admin_system.php 1.0.0 */
/* [Discuz! HACK ] 本系统为Discuz! 插件,运行在Discuz!下 */
/* DISCUZ官方网站 https://discuz.dismall.com */
/* XAS官方网站: http://www.xooo.net */
/* EMAIL: 362360@qq.com */
/* 作者:小文龙 */
/* 最后更新:2004-12-03 04:00 */
/* */
/* 有任何问题请至 论坛:http://qq.xooo.net 提出 */
/***********************************************************************/
if(!defined('XAS')) {
exit('Access Denied');
}
$discuz_action = 300;
if ($action==''){
$query = $db->query("SELECT * FROM $xas[pre]_xas_topic ORDER BY tstatus ASC,tintime DESC ");
while($topic = $db->fetch_array($query)) {
$xas_numtopic++;
$topic['id']= $xas_numtopic;
$topic['tintime'] = gmdate("$dateformat $timeformat", $topic['tintime'] + ($timeoffset * 3600));
$topic['tname'] = dhtmlspecialchars($topic['tname']) ;
$topic['ttext'] = dhtmlspecialchars($topic['ttext']) ;
$topiclist[] = $topic;
}
include template('xas_admin_topic');
}
//更新数据
if ($action=='update'){
if(is_array($order)) {
$ids = $comma = "";
foreach($order as $tid) {
$ids .= "$comma'$tid'";
$comma = ", ";
}
$db->unbuffered_query("DELETE FROM $xas[pre]_xas_topic WHERE tid IN ($ids) ");
}
if(is_array($tnamenew)) {
foreach($tnamenew as $tid => $value) {
$db->unbuffered_query("UPDATE $xas[pre]_xas_topic SET tname='$tnamenew[$tid]' WHERE tid='$tid'");
}
}
if(is_array($timagesnew)) {
foreach($timagesnew as $tid => $value) {
$db->unbuffered_query("UPDATE $xas[pre]_xas_topic SET timages='$timagesnew[$tid]' WHERE tid='$tid'");
}
}
if(is_array($tstatusnew)) {
foreach($tstatusnew as $tid => $value) {
$db->unbuffered_query("UPDATE $xas[pre]_xas_topic SET tstatus='$tstatusnew[$tid]' WHERE tid='$tid'");
}
}
if(is_array($thiddennew)) {
foreach($thiddennew as $tid => $value) {
$thiddennew[$tid] = ($thiddennew[$tid]=='0')? '0':'1';
$db->unbuffered_query("UPDATE $xas[pre]_xas_topic SET thidden='$thiddennew[$tid]' WHERE tid='$tid'");
}
}
xas_showmessage('专题设置成功','xasadmin.php?mod=topic');
}
//添加专题
if ($action=='newtopic'){
$thiddennew = ($thiddennew=='0')? '0':'1';
$query = $db->query("INSERT INTO $xas[pre]_xas_topic (tid,ttype,tname,tintime,timages,tstatus,thidden,ttext) VALUES ('', 'big', '$tnamenew', '$timestamp', '$timagesnew', '$tstatusnew', '$thiddennew', '$ttextnew') ");
xas_showmessage('专题添加成功','xasadmin.php?mod=topic');
}
//更新日期
if ($action=='uptime'){
$db->unbuffered_query("UPDATE $xas[pre]_xas_topic SET tintime='$timestamp' WHERE tid='$tid'");
xas_showmessage('日期已更新','xasadmin.php?mod=topic');
}
//编辑专题
if ($action=='edittopic'){
if ($ok!=ok){
$query = $db->query("SELECT * FROM $xas[pre]_xas_topic WHERE tid='$tid' ");
$topic = $db->fetch_array($query);
include template('xas_admin_topic_edit');
}else{
$thiddennew = ($thiddennew=='0')? '0':'1';
$db->unbuffered_query("UPDATE $xas[pre]_xas_topic SET tname='$tnamenew',timages='$timagesnew',tstatus='$tstatusnew',thidden='$thiddennew',tintime='$timestamp' WHERE tid='$tid'");
xas_showmessage('专题编辑更新','xasadmin.php?mod=topic');
}
}
?>
麻烦有空的时候协助解决 |