$object->updateCheckDate(tep_db_prepare_input($_POST['check_date'])); } $result = array(); $result['id'] = $id; $result['old_status'] = $old_status; $result['new_status'] = $new_status; $result['st_counter'] = datasCountByStatus(); $result['err_msg'] = $err_message; ajaxReturn($result); exit; } elseif ($_POST['me_action'] == 'UPDATESORT') { $id = tep_db_prepare_input($_POST['datas_id']); $old_sort = tep_db_prepare_input($_POST['old_sort']); $new_sort = tep_db_prepare_input($_POST['new_sort']); $object = new improvement($id); echo $object->updateSort($old_sort, $new_sort) ? 'SUCCESS' : 'FAIL'; echo 'FAIL'; exit; } elseif ($_POST['me_action'] == 'UPDATESORTS') { foreach ($_POST['newsorts'] as $priority => $id) { $id = intval(str_replace('data-', '', $id)); improvement::updatePriority($id, $priority); } echo 'OK'; exit; } elseif ($_POST['me_action'] == 'UPDATECHECKDATE') { $id = tep_db_prepare_input($_POST['datas_id']); $check_date = tep_db_prepare_input($_POST['check_date']); $object = new improvement($id); $scd = $object->updateCheckDate($check_date); $result = array();