您现在的位置是:首页 > cms教程 > phpcms教程phpcms教程

phpcms推荐位无法排序的解决方法代码实例

卫耿羿2025-04-28 19:22:48phpcms教程已有4人查阅

导读phpcms无法排序的解决办法:首先找到并打开“content/content.php”文件;然后找到文中第454行的内容;接着更改推荐排序;最后保存修改过后的文件即可。

phpcms无法排序的解决办法:首先找到并打开“content/content.php”文件;然后找到文中第454行的内容;接着更改推荐排序;最后保存修改过后的文件即可。
解决phpcmsV9 推荐位无法排序
/phpcms/modules/content/content.php  454行
/**
* 排序
*/
public function listorder() {
if(isset($_GET['dosubmit'])) {
$catid = intval($_GET['catid']);
if(!$catid) showmessage(L('missing_part_parameters'));
$modelid = $this->categorys[$catid]['modelid'];
$this->db->set_model($modelid);
foreach($_POST['listorders'] as $id => $listorder) {
$this->db->update(array('listorder'=>$listorder),array('id'=>$id));
//更改推荐排序开始--新添加的
$r = $this->db->get_one(array('id'=>$id));
if($r['posids']){
$this->db_config = pc_base::load_config('database');
$tablepre = $this->db_config['default']['tablepre'];
$this->db->table_name = $tablepre."position_data";
$this->db->update(array('listorder'=>$listorder),array('id'=>$id,modelid=>$modelid));
}
//更改推荐排序结束--
}
showmessage(L('operation_success'));
} else {
showmessage(L('operation_failure'));
}
}

本文标签:

很赞哦! (1)

暂无内容
暂无内容
暂无内容
暂无内容
留言与评论 (共有 0 条评论)
昵称:
匿名发表 登录账号
         
验证码: