kompass/modules/event-participants/Controllers/class-updatememberamount.php

20 lines
669 B
PHP
Raw Permalink Normal View History

2024-05-27 16:59:30 +02:00
<?php
namespace Bdp\Modules\EventParticipants\Controllers;
use Bdp\Modules\EventParticipants\Models\EventParticipant;
class UpdateMemberAmountController {
public function __construct() {
global $_POST, $_REQUEST, $dbHandler;
$amount = str_replace(',', '.', $_POST['beitrag_bezahlt']);
$dbHandler->updateRows(
'kompass_veranstaltungen_teilis',
['beitrag_bezahlt' => $amount],
['id' => $_POST['participant-id']]
);
kompass_print_message_box(__('Participation data updated successfull.', BDP_LV_PLUGIN_SLUG));
$participant = EventParticipant::loadById($_REQUEST['participant-id']);
new ListGroupsAndMembersController($participant->eventId);
}
}