Ejemplo n.º 1
0
<?php

include_once 'modules/guestlist/class_guestlist.php';
$guestlist = new guestlist();
switch ($_GET['step']) {
    // Paid
    case 10:
        if (!$_POST['action'] and $_GET['userid']) {
            $_POST['action'][$_GET['userid']] = 1;
        }
        if ($auth['type'] >= 2 and $_POST['action']) {
            $Messages = array('success' => '', 'error' => '');
            foreach ($_POST['action'] as $key => $val) {
                $Msg = $guestlist->SetPaid($key, $party->party_id);
                if ($Msg['success']) {
                    $Messages['success'] .= $Msg['success'] . HTML_NEWLINE;
                }
                if ($Msg['error']) {
                    $Messages['error'] .= $Msg['error'] . HTML_NEWLINE;
                }
            }
            if ($Messages['error'] == '') {
                $func->confirmation(t('Der Zahlstatus wurde erfolgreich gesetzt') . HTML_NEWLINE . HTML_NEWLINE . t('Die Mails wurden erfolgreich an alle Benutzer versandt:') . HTML_NEWLINE . $Messages['success']);
            } else {
                $func->confirmation(t('Der Zahlstatus wurde erfolgreich gesetzt') . HTML_NEWLINE . HTML_NEWLINE . t('Jedoch konnte die Benachrichtigungsmail nicht an alle Benutzer gesendet werden.') . HTML_NEWLINE . t('Erfolgreich:') . HTML_NEWLINE . $Messages['success'] . HTML_NEWLINE . t('Fehlgeschlagen:') . HTML_NEWLINE . $Messages['error']);
            }
        }
        break;
        // Not paid
    // Not paid
    case 11:
Ejemplo n.º 2
0
<?php

include_once 'modules/guestlist/class_guestlist.php';
$guestlist = new guestlist();
switch ($_GET['step']) {
    // Export CSV
    case 10:
        if (!$_POST['action'] and $_GET['userid']) {
            $_POST['action'][$_GET['userid']] = 1;
        }
        if ($auth['type'] >= 2 and $_POST['action']) {
            header('Expires: 0');
            header('Cache-control: private');
            header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
            header('Content-Description: File Transfer');
            header('Content-Type: application/vnd.ms-excel; charset: UTF-8');
            header('Content-disposition: attachment; filename=user.csv');
            echo pack("CCC", 0xef, 0xbb, 0xbf);
            echo "UserID;Username;Firstname;Lastname;Clan\n";
            foreach ($_POST['action'] as $key => $val) {
                echo $func->AllowHTML($guestlist->Export($key, $party->party_id)) . "\n";
            }
            exit;
        }
        $func->information(t('Bitte markiere die User jetzt noch als exportiert.'));
        break;
        // Set Exported
    // Set Exported
    case 11:
        if (!$_POST['action'] and $_GET['userid']) {
            $_POST['action'][$_GET['userid']] = 1;