Beispiel #1
0
 case 'deleteGood':
     $id = Utils::getFromPOST('id');
     echo json_encode(GoodsService::deleteGood($id));
     break;
 case 'saveOrder':
     $data = Utils::getFromPOST('order');
     echo json_encode(GoodsService::saveGoodsOrder($data));
     break;
 case 'getAdminOrder':
     echo json_encode(GoodsService::getGoodsOrder());
     break;
 case 'sendFeedbackEmail':
     $messageBody = Utils::getFromPOST('message_body');
     $senderEmail = Utils::getFromPOST('sender_email');
     $senderName = Utils::getFromPOST('sender_name');
     echo json_encode(EmailService::sendFeedbackEmail($messageBody, $senderEmail, $senderName));
     break;
 case 'getDescriptionKeys':
     echo json_encode(DescriptionKeys::$keys);
     break;
 case 'getGoodsKeys':
     echo json_encode(GoodsKeysService::getList());
     break;
 case 'getNextGoodCode':
     $code = Utils::getFromPOST('code');
     echo json_encode(GoodsService::getNextGoodCode($code));
     break;
 case 'uploadImagesForGood':
     $id = Utils::getFromPOST('id');
     $data = $_POST['data'];
     $oldKey = Utils::getFromPOST('old_good_key');