<?php
if(!defined('MOD'))  die("access die");
$ids = $_POST['ids'];
$displayorder = $_POST['displayorder'];
if(!empty($ids) && !empty($displayorder)){
	foreach($ids as $cid){
		if(!isset($displayorder[$cid])) continue;
		$order = intval($displayorder[$cid]);
		qdb::Query("update ".TABLEPRE."acategory SET displayorder = '{$order}' WHERE cid = '".intval($cid)."' LIMIT 1");
		qbase::get_object('category', $channelid)->update();
		cache::delete('cid_' . $cid);
	}
	commonCache();
	adminLog("栏目分类排序");
}
qbase::showmsg($channeltitle."分类排序完成",'default',"system.php?sys=acategory&channelid=".$channelid."&action=modify");
?>
