}
     }
     $currentCalculation->init(getRequest('pid'), $uid, $priority, 0, '', 0, getRequest('input'));
     if (!$currentCalculation->checkVariables()) {
         handle(ERROR_INPUT . '01');
     }
     $response = $currentCalculation->create();
     if ($response === false) {
         handle(ERROR_SYSTEM . '00');
     }
     handle('0000{"cid":' . $response . '}');
     break;
 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');