Skip to content

Instantly share code, notes, and snippets.

View walesmd's full-sized avatar

Michael Wales walesmd

View GitHub Profile
<?php echo form_open('accounts/index') . PHP_EOL; ?>
<?php if (authentication_errors()): ?>
<p class="error"><?php echo authentication_errors(); ?></p>
<?php endif; ?>
<p><label for="account-email">Your email address:</label><br />
<input type="text" id="account-email" name="email" /></p>
<p><label for="account-password">Your password:</label><br />
<input type="password" id="account-password" name="password" /></p>
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
class Transactions extends Controller {
function Transactions() {
parent::Controller();
$this->erkana_auth->required();
}
// index()
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
class Transactions extends Controller {
function Transactions() {
parent::Controller();
}
// index()
// List all a user's transactions
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
class MY_Form_validation extends CI_Form_validation {
function MY_Form_validation() {
parent::CI_Form_validation();
}
// matches_pattern()
// Ensures a string matches a basic pattern
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
class MY_Form_validation extends CI_Form_validation {
function MY_Form_validation() {
parent::CI_Form_validation();
}
// matches_pattern()
// Ensures a string matches a basic pattern
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
class MY_Form_validation extends CI_Form_validation {
function MY_Form_validation() {
parent::CI_Form_validation();
}
// matches_pattern()
// Ensures a string matches a basic pattern
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');
$lang['matches_pattern'] = "The %s field does not match the required pattern.";
<?php
$this->form_validation->set_rules('due_date', 'due date', 'trim|required|matches_pattern[##-##-####]');
$this->form_validation->set_rules('phone_number', 'phone number', 'trim|required|matches_pattern[(###) ###-####]');
<meta name="openid.server" href="http://openid-provider.appspot.com/[USERNAME]" />
<meta name="openid.delegate" href="http://openid-provider.appspot.com/[USERNAME]" />
<div id="header">
<h1><a href="<?php echo get_option('home', 'http://www.michaelwales.com/'); ?>/" rel="home"><?php bloginfo('name'); ?></a></h1>
<p class="description"><?php bloginfo('description'); ?></p>
</div>