コード例 #1
0
ファイル: event.php プロジェクト: JongMenS/JongMenS.github.io
if ((isset($show_teaser) || $user->read_cookie('login', 'show') == 3) && $user->login == true) {
    $log .= '[ show register teaser ]';
    // show login form
    $page['before_text'] = get_tpl('register-teaser');
    $translate = array('{title}' => $page['title']);
    $page['before_text'] = translate_tpl($page['before_text'], $translate);
}
// show current join status
if (!isset($status)) {
    $status = $user->joined($page['title']) ? 'joined' : 'join';
}
require_once './template.php';
$page['event_join'] = get_tpl('event-' . $status);
$log .= '[ join-status is ' . $status . ' ]';
// show others comming
require_once './db.php';
$people = mysql_select_array("SELECT `username` FROM `joined` WHERE `event_title` = '" . mysql_rescue($page['title']) . "'");
if (!empty($people)) {
    $page['event_people'] = '';
    foreach ($people as $person) {
        $page['event_people'] .= '<a href="./index.php?p=' . $person['username'] . '" class="person">' . $person['username'] . '</a>, ';
    }
    $page['event_people'] = trim($page['event_people'], ', ');
} else {
    $page['event_people'] = 'nog niemand..';
}
// add list of events
require_once './specials/events.php';
// don't use cache for event type pages
$page['no_cache'] = true;
$log .= '[ end of event.php ]';
コード例 #2
0
ファイル: user.php プロジェクト: JongMenS/JongMenS.github.io
 function unjoin($title, $force_cookie = false)
 {
     global $log;
     if ($this->login && $force_cookie != true) {
         $result = mysql_insert("DELETE FROM `joined` WHERE `username` = '" . mysql_rescue($this->name) . "' AND `event_title` = '" . mysql_rescue($title) . "'");
         $log .= '[ un-joined ' . $title . ' as ' . $this->name . ': ' . $result . '(' . mysql_error() . ') ]';
     } else {
         $title = str_replace(' ', '_', $title);
         $result = $this->delete_cookie('joined', $title);
         $log .= '[ un-joined ' . $title . ' in cookie ]';
     }
     return $result;
 }
コード例 #3
0
    log_write('user "' . $registration['emailaddress'] . '" arrived at screen 3 (re-check one)' . NLtxt);
    $page['text'] = 'Hallo ' . $name . NLtxt;
    if (!empty($ticket_id)) {
        if ($paid == 0) {
            $page['text'] .= 'We hebben nog geen betaling ontvangen.' . NLtxt . 'Je kunt de betaling van &euro; <strong>' . $costs . '</strong> overmaken naar girorekening <strong>' . PAYMENT_BANK . '</strong> t.a.v. <strong>' . PAYMENT_NAME . '</strong>. Zet in de beschrijving <strong>' . PAYMENT_DESCRIPTION . '</strong> en je <strong>volledige naam</strong>. Als je betaling binnen is ontvang je van ons bericht.';
        } else {
            $page['text'] .= 'We hebben je betaling ontvangen!' . NLtxt . 'Tot zaterdag de 3e!' . NLtxt;
        }
        $page['text'] .= NLtxt . 'Wil je een extra persoon aanmelden? Ga naar een <a href="index.php?p=Heraanmelden">nieuw aanmeldformulier</a>.';
    } else {
        $page['text'] .= 'De status van je betaling is onbekend. Neem <a href="./index.php?p=Contact">contact</a> met ons op of meld je <a href="index.php?p=Heraanmelden">opnieuw aan</a>';
    }
    $page['text'] = paragraphs($page['text']);
}
if ($register_state == 2) {
    $payment_info = mysql_select_row("SELECT `ticket_id`, `ticket`" . " FROM `registers` WHERE `username` = '" . mysql_rescue($user->name) . "'");
    log_write('user "' . $user->name . '" (' . $payment_info['ticket_id'] . ') arrived at screen 2 (confirm one)' . NLtxt);
    $page['text'] = 'Leuk dat je komt! Om je aan te melden kun je simpel de volgende stappen doorlopen.' . NLtxt . '<ol>' . NLtxt . '<li><s>Aanmeldformulier invullen.</s></li>' . NLtxt . '<li><strong>Bevestiging en betaling.</strong></li>' . NLtxt . '<li>.. Geen stap 3, je bent klaar!</li>' . NLtxt . '</ol>' . NLtxt;
    $page['text'] .= 'We hebben je aanmelding ontvangen, dankjewel!' . NLtxt;
    $strict = true;
    $costs = payment_costs($payment_info['ticket'], $strict);
    $page['text'] .= 'Je kunt de betaling van &euro; <strong>' . $costs . '</strong> overmaken naar girorekening <strong>' . PAYMENT_BANK . '</strong> t.a.v. <strong>' . PAYMENT_NAME . '</strong>. Zet in de beschrijving <strong>' . PAYMENT_DESCRIPTION . '</strong> en je <strong>volledige naam</strong>. Als je betaling binnen is ontvang je van ons bericht.';
    $page['text'] .= NLtxt . 'Dat was het! Geef in het <a href="index.php?p=Programma">programma</a> wat je interessant vind als je dat nog niet gedaan had.' . NLtxt . 'Tot zaterdag de 3e!';
    $page['text'] = paragraphs($page['text']);
    // go next
    set_register_state($user, $register_state, 3);
    # temporary delete the registration to test
    #mysql_delete("DELETE FROM `registers` WHERE `payment_code` = '".mysql_rescue($payment_info['payment_code'])."'");
}
if ($register_state == 1) {
    require_once './template.php';
コード例 #4
0
ファイル: page.php プロジェクト: JongMenS/JongMenS.github.io
    // repair wrong paragraphs
    $search = array('<p></p>', '<p><ul></p>', '<p><ol></p>', '<p><li>', '</li></p>', '<p></ul></p>', '<p></ol></p>');
    $replace = array('', '<ul>', '<ol>', '<li>', '</li>', '</ul>', '</ol>');
    $text = str_replace($search, $replace, $text);
    return $text;
}
if (CACHE && !isset($action) && file_exists('./pages/' . $request . '.html')) {
    $html = file_get_contents('./pages/' . $request . '.html');
} else {
    require_once './db.php';
    if (DB == false) {
        // sorry, no db and no cache
        $log .= '[ no db ]';
        require_once './sorry.php';
    } else {
        $page = mysql_select_row("SELECT * FROM `pages` WHERE `title` = '" . mysql_rescue($request) . "'");
        $page['text'] = paragraphs($page['text']);
        if (empty($page)) {
            // sorry, not found
            require_once './sorry.php';
        } elseif ($page['type'] == 'special') {
            if (file_exists('./specials/' . $page['author'] . '.php')) {
                require_once './specials/' . $page['author'] . '.php';
            }
        } elseif ($page['type'] == 'event') {
            require_once './specials/event.php';
        } elseif ($page['type'] == 'person') {
            require_once './specials/person.php';
        } elseif ($page['title'] == 'Welkom!') {
            // add list of events
            require_once './specials/events.php';
コード例 #5
0
        if ($paid == 0) {
            $page['text'] .= 'We hebben nog geen betaling ontvangen.' . NLtxt . 'Je kunt de betaling van &euro; <strong>' . $costs . ',-</strong> overmaken naar girorekening <strong>' . PAYMENT_BANK . '</strong> t.a.v. <strong>' . PAYMENT_NAME . '</strong>. Zet in de beschrijving <strong>' . PAYMENT_DESCRIPTION . '</strong> en je betalingscode <strong>' . $payment_code . '</strong>. Als je betaling binnen is ontvang je van ons bericht.';
        } else {
            $page['text'] .= 'We hebben je betaling ontvangen!' . NLtxt . 'Tot zaterdag de 22e!' . NLtxt;
        }
    } elseif ($method == 'contant') {
        $page['text'] .= 'Je hebt aangegeven contant te betalen.' . NLtxt . 'Als je alsnog wil overmaken kun je de betaling van &euro; <strong>' . $costs . ',-</strong> overmaken naar girorekening <strong>' . PAYMENT_BANK . '</strong> t.a.v. <strong>' . PAYMENT_NAME . '</strong>. Zet in de beschrijving <strong>' . PAYMENT_DESCRIPTION . '</strong> en je betalingscode <strong>' . $payment_code . '</strong>. Als je betaling binnen is ontvang je van ons bericht.';
    } elseif ($method == 'ruilhandel') {
        $page['text'] .= 'Je hebt aangegeven via ruilhandel te betalen.' . NLtxt . 'Als je alsnog wil overmaken kun je de betaling van &euro; <strong>' . $costs . ',-</strong> overmaken naar girorekening <strong>' . PAYMENT_BANK . '</strong> t.a.v. <strong>' . PAYMENT_NAME . '</strong>. Zet in de beschrijving <strong>' . PAYMENT_DESCRIPTION . '</strong> en je betalingscode <strong>' . $payment_code . '</strong>. Als je betaling binnen is ontvang je van ons bericht.';
    } else {
        $page['text'] .= 'De status van je betaling is onbekend. Neem <a href="./index.php?p=Contact">contact</a> met ons op.';
    }
    $page['text'] = paragraphs($page['text']);
}
if ($register_state == 2) {
    $payment_info = mysql_select_row("SELECT `payment_code`, `second_code`, `ticket`, `payment_method`, `payment_exchange`" . " FROM `registers` WHERE `username` = '" . mysql_rescue($user->name) . "'");
    $page['text'] = 'Leuk dat je komt! Om je aan te melden kun je simpel de volgende stappen doorlopen.' . NLtxt . '<ol>' . NLtxt . '<li><s>Aanmeldformulier invullen.</s></li>' . NLtxt . '<li><strong>Bevestiging en eventuele betaling.</strong></li>' . NLtxt . '<li>.. Geen stap 3, je bent klaar!</li>' . NLtxt . '</ol>' . NLtxt;
    $page['text'] .= 'We hebben je aanmelding ontvangen, dankjewel! Je betalingscode is <strong>' . $payment_info['payment_code'] . '</strong>.' . NLtxt;
    $costs = payment_costs($payment_info['ticket']);
    if ($payment_info['payment_method'] == 'overmaken') {
        $page['text'] .= 'Je kunt de betaling van &euro; <strong>' . $costs . ',-</strong> overmaken naar girorekening <strong>' . PAYMENT_BANK . '</strong> t.a.v. <strong>' . PAYMENT_NAME . '</strong>. Zet in de beschrijving <strong>' . PAYMENT_DESCRIPTION . '</strong> en je betalingscode <strong>' . $payment_info['payment_code'] . '</strong>. Als je betaling binnen is ontvang je van ons bericht.';
    } elseif ($payment_info['payment_method'] == 'contant') {
        $page['text'] .= 'Zorg dat je op de dag &euro; <strong>' . $costs . ',-</strong> kunt betalen. Neem je betalingscode <strong>' . $payment_info['payment_code'] . '</strong> mee, dan weten we voor wie je betaald.';
    } elseif ($payment_info['payment_method'] == 'ruilhandel') {
        $page['text'] .= 'Zorg dat je op de dag je ruilmiddel meeneemt. Neem je betalingscode <strong>' . $payment_info['payment_code'] . '</strong> mee, dan weten we voor wie je betaald.';
    }
    $page['text'] .= NLtxt . 'Dat was het! Geef in het <a href="index.php?p=Programma">programma</a> wat je interessant vind als je dat nog niet gedaan had.' . NLtxt . 'Tot zaterdag de 22e!';
    $page['text'] = paragraphs($page['text']);
    // go next
    set_register_state($user, $register_state, 3);
    # temporary delete the registration to test