Ejemplo n.º 1
0
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 ]';
<?php

/*--- jongeren inspiratiedag . nl --- jong mens (lode) november 2008 ---*/
/*--- request all registered users ---*/
require_once './db.php';
echo mysql_error();
$new = mysql_select_array("SELECT * FROM `registers` WHERE `payment_paid` = '0'");
echo mysql_error();
$paid = mysql_select_array("SELECT * FROM `registers` WHERE `payment_paid` = '1'");
echo mysql_error();
function display_time($time_string)
{
    return date('l jS F', strtotime($time_string));
}
function list_regs($reg_array)
{
    $list = '';
    foreach ($reg_array as $reg) {
        $ticket = '';
        switch ($reg['ticket']) {
            case 'dag':
                $ticket = 'dag (€ 10)';
                break;
            case 'dag_overnacht':
                $ticket = 'dag met overnachting (€ 12,50)';
                break;
            case 'overnacht':
                $ticket = 'overnachting (€ 7,50)';
                break;
            default:
                $ticket = 'onbekend';
Ejemplo n.º 3
0
<?php

/*--- jongeren inspiratiedag . nl --- jong mens (lode) november 2008 ---*/
/*--- process ---*/
/* process module
 * load page
*/
$log .= '[ special events ]';
$page['no_cache'] = 1;
$events = mysql_select_array("SELECT * FROM `pages` WHERE `type` = 'event'");
if (empty($events)) {
    $page['text'] = 'Sorry, ik kan helemaal geen programma vinden..' . NLtxt . 'Neem <a href="./index.php?=contact">contact</a> met ons op.';
} else {
    $class = 'events';
    if ($request == 'Welkom!') {
        $class = 'events-start';
    }
    if ($request == 'Welkom!') {
        $place = 'before_text';
    } else {
        $place = 'after_text';
    }
    $page[$place] = '<p class="' . $class . '">';
    $tpl = file_get_contents('./tpls/events.html');
    foreach ($events as $event) {
        // skip own page
        if ($event['title'] == $request) {
            continue;
        }
        // skip text on other pages
        if ($request != 'events') {
Ejemplo n.º 4
0
<?php

/*--- jongeren inspiratiedag . nl --- jong mens (lode) november 2008 ---*/
/*--- process ---*/
/* process module
 * load page
*/
$log .= '[ special person ]';
$page['no_cache'] = 1;
$events = mysql_select_array("SELECT `event_title` FROM `joined` WHERE `username` = '" . $request . "'");
if (empty($events)) {
    $page['after_text'] = '<p>Ik heb me nog niet aangemeld voor <a href="./index.php?p=Programma">programmaonderdelen</a>.</p>';
} else {
    $page['after_text'] = '<p>Ik ga naar ';
    foreach ($events as $event) {
        $page['after_text'] .= '<a href="./index.php?p=' . $event['event_title'] . '">' . $event['event_title'] . '</a>, ';
    }
    $page['after_text'] = trim($page['after_text'], ', ');
    $page['after_text'] .= '</p>';
}