phpcms推荐位无法排序怎么办

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

解决phpcms V9 推荐位无法排序

/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'));
    }
}

推荐:《phpcms教程》

以上就是phpcms推荐位无法排序怎么办的详细内容,更多请关注本网内其它相关文章!

你也想0元试听小码王编程课程吗?
填写信息免费预约
免责申明:以上展示内容来源于合作媒体、企业机构、网友提供或网络收集整理,版权争议与本站无关,文章涉及见解与观点不代表小码王官方立场,请读者仅做参考。本文标题:phpcms推荐位无法排序怎么办,本文链接:https://www.xiaomawang.cn/help/213830.html;欢迎转载,转载请说明出处。若您认为本文侵犯了您的版权信息,或您发现该内容有任何涉及有违公德、触犯法律等违法信息,请您立即通过邮件(邮箱号:)联系我们及时修正或删除。
校区接待前厅
校区太空走廊
校区教室环境
校区多功能教室
小码王少儿编程体验课程免费预约