Example #1
0
EOQ;
        getQueryResults($sql);
        $headers = 'From: No Reply <signup@' . $_SERVER['HTTP_HOST'] . '>' . CRLF;
        $subject = 'Your account signup at ' . $_SERVER['HTTP_HOST'];
        $content = 'Thank you for your request for any account.' . CR . CR;
        $content .= 'To validate your signup please follow the link below' . CR;
        $content .= 'http://' . $_SERVER['HTTP_HOST'] . $config->get('web', 'root') . '/signup/at8/?v=' . md5($member['camra_number']) . CR;
        $content .= CR . CR . 'Thank you.';
        mail($member['email'], $subject, $content, $headers);
        header('Location: ' . $config->get('web', 'root') . '/signup/thankyou/');
        exit;
    } else {
        $form->submiterrormsg .= '<p class="error">Username/CAMRA Number is already registered.</p><p> Please choose another one or check with your system administrator.</p>';
    }
}
$form->addFieldsetOpen('Signup');
$form->addField('firstname', 'text', $member['firstname']);
$form->addLabel('Firstname');
$form->addFieldValidation('required');
$form->addField('lastname', 'text', $member['lastname']);
$form->addLabel('Lastname');
$form->addFieldValidation('required');
$form->addField('email', 'text', $member['email']);
$form->addLabel('Email Address');
$form->addFieldValidation('required email');
$form->addField('camra_number', 'text', $member['camra_number']);
if ($config->get('web', 'signupNonCamra')) {
    $form->addLabel('CAMRA Membership Number/Username');
    $form->addFieldValidation('required');
} else {
    $form->addLabel('CAMRA Membership Number');
Example #2
0
include DOCROOT . '/skin/header.php';
$form = new Form('nbssv2login');
$form->class = 'neoAdminForm';
$form->validationerrormsg = 'The following fields must be completed:';
if ($form->submitted && $form->submiterrors == 0) {
    $user = getUserLogin(md5(strtoupper(trim(ltrim($request->get('post', 'membershipno'), '0')))), md5(strtoupper(str_replace(' ', '', $request->get('post', 'postcode')))));
    if ($user !== false) {
        Session::set('user', $user);
        Session::set('welcomed', false);
        getQueryResults('UPDATE ' . $config->get('database', 'tablePrefix') . 'user SET lastlogin='******'YmdHis', time()) . ' WHERE id=' . $user['id']);
        header('Location: ' . $config->get('web', 'root') . '/');
        exit;
    } else {
        $form->submiterrormsg .= 'Invalid membership number, postcode or inactive account.';
    }
}
$form->addFieldsetOpen('Login');
$form->addField('membershipno', 'text', $request->get('post', 'membershipno'));
$form->addLabel('Membership Number');
$form->addFieldValidation('required');
$form->addHelp('Please use the membership number from your CAMRA membership card.');
$form->addField('postcode', 'text', $request->get('post', 'postcode'));
$form->addLabel('Postcode');
$form->addFieldValidation('required');
$form->addHelp('Enter your postcode from your normal residence (You know, where CAMRA sends your &quot;What\'s Brewing&quot;.)');
$form->addFieldsetClose();
$form->addField('login', 'submit', 'Login');
$form->addInputClass('btnSubmit');
$form->addContent('<div class="reset"><a href="' . $config->get('web', 'root') . '/signup/" class="btnSubmit fleft" title="sign up for an account">Sign up for an account</a></div>');
echo $form->submiterrormsg . $form->display();
include DOCROOT . '/skin/loginfooter.php';
Example #3
0
if ($form->submitted) {
    if ($request->get('post', 'date_nojs')) {
        $currDate = strtotime($request->get('post', 'date_nojs'));
    } else {
        $currDate = strtotime($request->get('post', 'date'));
    }
    Session::set('date', $currDate);
    if (0 == $form->submiterrors && 'enterReviews' == $form->submittedaction) {
        Session::set('submission', $request->get('post'));
        header('Location: ' . $config->get('web', 'root') . '/enter/confirm/');
        exit;
    } elseif ('addPub' == $form->submittedaction) {
        $pubCount++;
    }
}
$form->addFieldsetOpen('Review by ' . $user['firstname'] . ' ' . $user['lastname']);
$form->addField('date_nojs', 'text', date('d-M-Y', $currDate));
$form->addLabel('Date of Visit');
$form->addFieldValidation('required');
if (is_null($town_id) || '' == $town_id) {
    $form->addFieldsetOpen('Town');
    $form->addField('town_id', 'select', $town_id);
    $form->addLabel('Town');
    $form->addOptions(array('' => 'Select town'));
    $form->addOptions($towns, 'id', 'name');
    $form->addField('selectTown', 'submit', 'Select this town');
    $form->addInputClass('btnSubmit');
    $pubs = array(array('id' => '', 'name' => 'Select town first'));
} else {
    $town = getItemFromArray($town_id, $towns);
    $pubs = array('' => 'Select Pub');
Example #4
0
    if ('' != $pub_id) {
        $pub = reset(getQueryResults('SELECT * FROM ' . $config->get('database', 'tablePrefix') . 'pub WHERE id=' . $pub_id));
        $form->addField('town_id', 'hidden', $town_id);
        $form->addField('pub_id', 'hidden', $pub_id);
        $form->addField('name', 'hidden', $pub['name']);
        $form->addField('date', 'text', date('d-M-Y', time()));
        $form->addLabel('Date of Change');
        $form->addFieldValidation('required');
        $form->addContent('<img id="cal1Open" src="' . $config->get('web', 'root') . '/skin/images/cal.gif" /><div id="cal1Container"></div>');
        $form->addField('notes', 'textarea', $pub['notes']);
        $form->addLabel('Notes');
        $form->addField('updatePub', 'submit', 'Submit change');
        $form->addInputClass('btnSubmit');
        $form->addField('resetForm', 'reset', 'Reset Form');
        $form->addInputClass('btnReset');
        $form->addContent('<div class="reset"><a class="btnReset fleft" href="' . $config->get('web', 'root') . '/admin/pubs/newlandlord/?town_id=' . $town_id . '">Cancel &amp; Pick another pub</a></div>');
    } else {
        $pubs = getQueryResults('SELECT * FROM ' . $config->get('database', 'tablePrefix') . 'pub WHERE town_id=' . $town_id);
        $form->addFieldsetOpen('Pubs in ' . $town['name']);
        $form->addField('town_id', 'hidden', $town_id);
        $form->addField('pub_id', 'select');
        $form->addLabel('Pub');
        $form->addOptions($pubs, 'id', 'name');
        $form->addField('selectPub', 'submit', 'Change of landlord');
        $form->addInputClass('btnSubmit');
        $form->addContent('<div class="reset"><a class="btnReset fleft" href="' . $config->get('web', 'root') . '/admin/pubs/newlandlord/">Cancel &amp; Pick another town</a></div>');
        $form->addFieldsetClose();
    }
}
print $form->display() . $form->submiterrormsg;
include DOCROOT . '/skin/footer.php';
Example #5
0
        $subject = 'Feedback on ' . $_SERVER['HTTP_HOST'];
        $content = 'There has been new feedback' . CR . CR;
        $content .= 'From: ' . $user['firstname'] . ' ' . $user['lastname'] . CR;
        $content .= 'About:  ' . $request->get('post', 'about') . CR;
        $content .= 'Message:' . CR;
        $content .= '--------------------------------------' . CR;
        $content .= $request->get('post', 'message') . CR;
        $content .= '--------------------------------------' . CR;
        $content .= 'Post from IP address: ' . $_SERVER['REMOTE_ADDR'] . CR;
        $content .= 'On: ' . date('D jS M Y H:i:s');
        $content .= CR . CR . 'Thank you.';
        mail($config->get('web', 'feedbackEmail'), $subject, $content, $headers);
        header('Location: ' . $config->get('web', 'root') . '/feedback/thankyou/');
        exit;
    }
    $form->addFieldsetOpen('Feedback');
    $form->addContent('<div><p class="fieldSubstitute"><span class="label">From:</span><span class="input">' . $user['firstname'] . ' ' . $user['lastname'] . '</span></p></div>');
    $form->addField('about', 'select');
    $form->addLabel('About');
    $form->addOptions(array('' => 'Select a subject', 'missbeer' => 'Missing Beer', 'missbrewery' => 'Missing Brewery', 'misspubs' => 'Missing Pub', 'misstowns' => 'Missing Town', 'newlandlord' => 'New Landlords', 'suggestion' => 'NBSS Suggestions', 'other' => 'Other'));
    $form->addFormValidationErrorMessage('required');
    $form->addField('message', 'textarea');
    $form->addLabel('Text');
    $form->addFormValidationErrorMessage('required');
    $form->addField('send', 'submit', 'Send');
    $form->addInputClass('btnSubmit');
    $form->addField('reset', 'reset', 'Clear');
    $form->addInputClass('btnReset');
    $form->addFieldsetClose();
    print $form->display();
} else {