<?php
error_reporting(0);
if (!eregi($_SERVER['SERVER_NAME'], $_SERVER['HTTP_REFERER'])) {
	exit();
}
close_browse();
global $db, $CcTvAi_com_userid;
if ($CcTvAi_com_userid) {
	if (!IsNumID($CcTvAi_com_userid)) {exit();}
	$cd_id=unescape(SafeRequest("idArr", "post"));
	if ($cd_id) {
		$count=explode(",", $cd_id);
		$icount=count($count);
		for ($i=0; $i<count($count); $i++) {
			$db->query("update " . tname('pic') . " set cd_weborder=$icount-$i where cd_id='" . $count[$i] . "'");
		}
	} else {
		die('10005');
	}
} else {
	die('20001');
}
?>