case 'renew': $currentCalculation = new Calculation(); $currentCalculation->cid = getRequest('cid'); $response = json_decode($currentCalculation->getData(), true); require_once 'site.class.php'; $uid = Site::getSessionUid(); if ($uid == 0) { handle(ERROR_PERMISSION . '00' . '请先登陆!'); } if ($response['uid'] !== $uid && !checkAuthority(9)) { handle(ERROR_PERMISSION . '00'); } $priority = $response['priority']; if (checkAuthority(9) && getRequest('priority') !== '') { $priority = getRequest('priority'); } $currentCalculation->init($response['pid'], $response['uid'], $priority, (int) getRequest('public'), getRequest('password'), $response['status'], $response['input']); if (!$currentCalculation->checkVariables()) { handle(ERROR_INPUT . '01'); } $response = $currentCalculation->modify(); if ($response === false) { handle(ERROR_SYSTEM . '00'); } else { handle('0000'); } break; default: ERROR(ERROR_INPUT . '02', 'Request Error.'); break; }