This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $config[ 'no_validation' ] = array( | |
| 'auth/login', | |
| 'auth/logout', | |
| 'home' | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| switch( $_SERVER['HTTP_HOST'] ) | |
| { | |
| // Local Site | |
| case 'local.ci.com': | |
| define('SITE', 'local'); | |
| break; | |
| // Development Site |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Runs this function when the page loads | |
| $(document).ready(structureTabs); | |
| function structureTabs() | |
| { | |
| // Insert a list to hold the tab buttons | |
| $('#tabs').prepend('<ul id="tabbtns"></ul>'); | |
| // Split the content up, starting with each h2 and all other content until the following h2 comes. | |
| $('#tabs h2').each(function(index){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* TABS */ | |
| .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, | |
| .ui-tabs .ui-tabs-nav li.ui-state-disabled a, | |
| .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } | |
| .ui-tabs .ui-tabs-nav li a, | |
| .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{ cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ | |
| .ui-tabs .ui-tabs-panel{ | |
| display: block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="tabs"> | |
| <h2>Lorem ipsum</h2> | |
| <p>Auto tabs uses jQuery and jQuery UI to automatically markup your tabs.</p> | |
| <h2>Mauris vitae</h2> | |
| <p>Mauris vitae metus eu enim tempor facilisis.</p> | |
| <h2>Sed comodo porta</h2> | |
| <p>Sed commodo porta libero.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class User_model extends Model { | |
| function add_user($user_array) | |
| { | |
| return $this->db->insert('users',$user_array); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Users extends Controller { | |
| function users() | |
| { | |
| parent::Controller(); | |
| $this->load->model('User_model'); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title>User registration</title> | |
| </head> | |
| <body> | |
| <?=form_open(current_url())?> | |
| <p><?=form_label('first name')?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Change the libraries line as follows | |
| $autoload['libraries'] = array('form_validation','database','session'); | |
| // Change the helper autoload to the following line | |
| $autoload['helper'] = array('language','html','string','url','form','image','file'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $db['default']['hostname'] = "localhost"; // Keep this set to localhost unless you have the database runnning remotely. | |
| $db['default']['username'] = "YOUR DB USER"; | |
| $db['default']['password'] = "YOUR DB PASS"; | |
| $db['default']['database'] = "YOUR DB NAME"; | |
| $db['default']['dbdriver'] = "mysql"; | |
| $db['default']['dbprefix'] = ""; | |
| $db['default']['pconnect'] = TRUE; | |
| $db['default']['db_debug'] = TRUE; | |
| $db['default']['cache_on'] = FALSE; |