Commits

Anonymous committed b488ffd

Inital Init

Comments (0)

Files changed (110)

+syntax: glob
+system
+nbproject
+wiki
+#RewriteEngine On
+#RewriteCond %{REQUEST_FILENAME} !-f
+#RewriteCond %{REQUEST_FILENAME} !-d
+#RewriteRule (.*) index.php/$1 [L]
+<IfModule mod_rewrite.c>
+    RewriteEngine On
+    RewriteBase /
+    
+	RewriteCond $1 !^(index\.php|robots\.txt|sitemap.xml|assets)
+	RewriteCond %{REQUEST_FILENAME} !-f
+	RewriteCond %{REQUEST_FILENAME} !-d
+	RewriteRule ^(.*)$ index.php/$1 [L,QSA]
+	
+</IfModule>
+
+<IfModule !mod_rewrite.c>
+
+    ErrorDocument 404 /index.php
+    
+</IfModule> 

application/.htaccess

+<IfModule mod_rewrite.c>
+    RewriteEngine On
+    RewriteBase /
+
+    #Removes access to the system folder by users.
+    #Additionally this will allow you to create a System.php controller,
+    #previously this would not have been possible.
+    #'system' can be replaced if you have renamed your system folder.
+    RewriteCond %{REQUEST_URI} ^system.*
+    RewriteRule ^(.*)$ /index.php?/$1 [L]
+    
+    #When your application folder isn't in the system folder
+    #This snippet prevents user access to the application folder
+    #Submitted by: Fabdrol
+    #Rename 'application' to your applications folder name.
+    RewriteCond %{REQUEST_URI} ^application.*
+    RewriteRule ^(.*)$ /index.php?/$1 [L]
+
+    #Checks to see if the user is attempting to access a valid file,
+    #such as an image or css document, if this isn't true it sends the
+    #request to index.php
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteCond %{REQUEST_FILENAME} !-d
+    RewriteRule ^(.*)$ index.php?/$1 [L]
+</IfModule>
+
+<IfModule !mod_rewrite.c>
+    # If we don't have mod_rewrite installed, all 404's
+    # can be sent to index.php, and everything works as normal.
+    # Submitted by: ElliotHaughin
+
+    ErrorDocument 404 /index.php
+</IfModule>  

application/cache/.htaccess

+deny from all

application/cache/index.html

+<html>
+<head>
+	<title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html>

application/cli-config.php

+<?php
+use Doctrine\Common\ClassLoader,
+    Doctrine\ORM\Configuration,
+    Doctrine\ORM\EntityManager,
+    Doctrine\Common\Cache\ArrayCache,
+    Doctrine\DBAL\Logging\EchoSqlLogger;
+ 
+define('BASEPATH', __DIR__ . '/../system/');
+ 
+require_once __DIR__ . '/config/database.php';
+require_once __DIR__ . '/libraries/Doctrine/Common/ClassLoader.php';
+ 
+$doctrineClassLoader = new ClassLoader('Doctrine',  __DIR__.'libraries');
+$doctrineClassLoader->register();
+$entitiesClassLoader = new ClassLoader('models', __DIR__);
+$entitiesClassLoader->register();
+$proxiesClassLoader = new ClassLoader('Proxies', __DIR__.'models/proxies');
+$proxiesClassLoader->register();
+$config = new \Doctrine\ORM\Configuration();
+$config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache);
+$config->setProxyDir(__DIR__ . '/Proxies');
+$config->setProxyNamespace('Proxies');
+ 
+$cache = new ArrayCache;
+// Set up driver
+$Doctrine_AnnotationReader = new \Doctrine\Common\Annotations\AnnotationReader($cache);
+$Doctrine_AnnotationReader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
+$driver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($Doctrine_AnnotationReader, realpath('../models'));
+$config->setMetadataDriverImpl($driver);
+ 
+// Database connection information
+$connectionOptions = array(
+    'driver' => 'pdo_mysql',
+    'user' =>     $db['default']['username'],
+    'password' => $db['default']['password'],
+    'host' =>     $db['default']['hostname'],
+    'dbname' =>   $db['default']['database']
+);
+ 
+$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
+ 
+$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
+    'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
+    'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
+));

application/config/autoload.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| AUTO-LOADER
+| -------------------------------------------------------------------
+| This file specifies which systems should be loaded by default.
+|
+| In order to keep the framework as light-weight as possible only the
+| absolute minimal resources are loaded by default. For example,
+| the database is not connected to automatically since no assumption
+| is made regarding whether you intend to use it.  This file lets
+| you globally define which systems you would like loaded with every
+| request.
+|
+| -------------------------------------------------------------------
+| Instructions
+| -------------------------------------------------------------------
+|
+| These are the things you can load automatically:
+|
+| 1. Packages
+| 2. Libraries
+| 3. Helper files
+| 4. Custom config files
+| 5. Language files
+| 6. Models
+|
+*/
+
+/*
+| -------------------------------------------------------------------
+|  Auto-load Packges
+| -------------------------------------------------------------------
+| Prototype:
+|
+|  $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
+|
+*/
+
+$autoload['packages'] = array(APPPATH.'third_party');
+
+
+/*
+| -------------------------------------------------------------------
+|  Auto-load Libraries
+| -------------------------------------------------------------------
+| These are the classes located in the system/libraries folder
+| or in your application/libraries folder.
+|
+| Prototype:
+|
+|	$autoload['libraries'] = array('database', 'session', 'xmlrpc');
+*/
+
+$autoload['libraries'] = array('session');
+
+
+/*
+| -------------------------------------------------------------------
+|  Auto-load Helper Files
+| -------------------------------------------------------------------
+| Prototype:
+|
+|	$autoload['helper'] = array('url', 'file');
+*/
+
+$autoload['helper'] = array('url', 'form');
+
+
+/*
+| -------------------------------------------------------------------
+|  Auto-load Config files
+| -------------------------------------------------------------------
+| Prototype:
+|
+|	$autoload['config'] = array('config1', 'config2');
+|
+| NOTE: This item is intended for use ONLY if you have created custom
+| config files.  Otherwise, leave it blank.
+|
+*/
+
+$autoload['config'] = array();
+
+
+/*
+| -------------------------------------------------------------------
+|  Auto-load Language files
+| -------------------------------------------------------------------
+| Prototype:
+|
+|	$autoload['language'] = array('lang1', 'lang2');
+|
+| NOTE: Do not include the "_lang" part of your file.  For example
+| "codeigniter_lang.php" would be referenced as array('codeigniter');
+|
+*/
+
+$autoload['language'] = array();
+
+
+/*
+| -------------------------------------------------------------------
+|  Auto-load Models
+| -------------------------------------------------------------------
+| Prototype:
+|
+|	$autoload['model'] = array('model1', 'model2');
+|
+*/
+
+$autoload['model'] = array();
+
+
+/* End of file autoload.php */
+/* Location: ./application/config/autoload.php */

application/config/config.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+/*
+|--------------------------------------------------------------------------
+| Base Site URL
+|--------------------------------------------------------------------------
+|
+| URL to your CodeIgniter root. Typically this will be your base URL,
+| WITH a trailing slash:
+|
+|	http://example.com/
+|
+*/
+$config['base_url']	= "http://tanur.local/";
+
+/*
+|--------------------------------------------------------------------------
+| Index File
+|--------------------------------------------------------------------------
+|
+| Typically this will be your index.php file, unless you've renamed it to
+| something else. If you are using mod_rewrite to remove the page set this
+| variable so that it is blank.
+|
+*/
+$config['index_page'] = "";
+
+/*
+|--------------------------------------------------------------------------
+| URI PROTOCOL
+|--------------------------------------------------------------------------
+|
+| This item determines which server global should be used to retrieve the
+| URI string.  The default setting of "AUTO" works for most servers.
+| If your links do not seem to work, try one of the other delicious flavors:
+|
+| 'AUTO'			Default - auto detects
+| 'PATH_INFO'		Uses the PATH_INFO
+| 'QUERY_STRING'	Uses the QUERY_STRING
+| 'REQUEST_URI'		Uses the REQUEST_URI
+| 'ORIG_PATH_INFO'	Uses the ORIG_PATH_INFO
+|
+*/
+$config['uri_protocol']	= "AUTO";
+
+/*
+|--------------------------------------------------------------------------
+| URL suffix
+|--------------------------------------------------------------------------
+|
+| This option allows you to add a suffix to all URLs generated by CodeIgniter.
+| For more information please see the user guide:
+|
+| http://codeigniter.com/user_guide/general/urls.html
+*/
+
+$config['url_suffix'] = "";
+
+/*
+|--------------------------------------------------------------------------
+| Default Language
+|--------------------------------------------------------------------------
+|
+| This determines which set of language files should be used. Make sure
+| there is an available translation if you intend to use something other
+| than english.
+|
+*/
+$config['language']	= "english";
+
+/*
+|--------------------------------------------------------------------------
+| Default Character Set
+|--------------------------------------------------------------------------
+|
+| This determines which character set is used by default in various methods
+| that require a character set to be provided.
+|
+*/
+$config['charset'] = "UTF-8";
+
+/*
+|--------------------------------------------------------------------------
+| Enable/Disable System Hooks
+|--------------------------------------------------------------------------
+|
+| If you would like to use the "hooks" feature you must enable it by
+| setting this variable to TRUE (boolean).  See the user guide for details.
+|
+*/
+$config['enable_hooks'] = TRUE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Class Extension Prefix
+|--------------------------------------------------------------------------
+|
+| This item allows you to set the filename/classname prefix when extending
+| native libraries.  For more information please see the user guide:
+|
+| http://codeigniter.com/user_guide/general/core_classes.html
+| http://codeigniter.com/user_guide/general/creating_libraries.html
+|
+*/
+$config['subclass_prefix'] = 'EM_';
+
+
+/*
+|--------------------------------------------------------------------------
+| Allowed URL Characters
+|--------------------------------------------------------------------------
+|
+| This lets you specify with a regular expression which characters are permitted
+| within your URLs.  When someone tries to submit a URL with disallowed
+| characters they will get a warning message.
+|
+| As a security measure you are STRONGLY encouraged to restrict URLs to
+| as few characters as possible.  By default only these are allowed: a-z 0-9~%.:_-
+|
+| Leave blank to allow all characters -- but only if you are insane.
+|
+| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
+|
+*/
+$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
+
+
+/*
+|--------------------------------------------------------------------------
+| Enable Query Strings
+|--------------------------------------------------------------------------
+|
+| By default CodeIgniter uses search-engine friendly segment based URLs:
+| example.com/who/what/where/
+|
+| You can optionally enable standard query string based URLs:
+| example.com?who=me&what=something&where=here
+|
+| Options are: TRUE or FALSE (boolean)
+|
+| The other items let you set the query string "words" that will
+| invoke your controllers and its functions:
+| example.com/index.php?c=controller&m=function
+|
+| Please note that some of the helpers won't work as expected when
+| this feature is enabled, since CodeIgniter is designed primarily to
+| use segment based URLs.
+|
+*/
+$config['allow_get_array']		= TRUE;
+$config['enable_query_strings'] = FALSE;
+$config['controller_trigger']	= 'c';
+$config['function_trigger']		= 'm';
+$config['directory_trigger']	= 'd'; // experimental not currently in use
+
+/*
+|--------------------------------------------------------------------------
+| Error Logging Threshold
+|--------------------------------------------------------------------------
+|
+| If you have enabled error logging, you can set an error threshold to
+| determine what gets logged. Threshold options are:
+| You can enable error logging by setting a threshold over zero. The
+| threshold determines what gets logged. Threshold options are:
+|
+|	0 = Disables logging, Error logging TURNED OFF
+|	1 = Error Messages (including PHP errors)
+|	2 = Debug Messages
+|	3 = Informational Messages
+|	4 = All Messages
+|
+| For a live site you'll usually only enable Errors (1) to be logged otherwise
+| your log files will fill up very fast.
+|
+*/
+$config['log_threshold'] = 0;
+
+/*
+|--------------------------------------------------------------------------
+| Error Logging Directory Path
+|--------------------------------------------------------------------------
+|
+| Leave this BLANK unless you would like to set something other than the default
+| system/logs/ folder.  Use a full server path with trailing slash.
+|
+*/
+$config['log_path'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| Date Format for Logs
+|--------------------------------------------------------------------------
+|
+| Each item that is logged has an associated date. You can use PHP date
+| codes to set your own date formatting
+|
+*/
+$config['log_date_format'] = 'Y-m-d H:i:s';
+
+/*
+|--------------------------------------------------------------------------
+| Cache Directory Path
+|--------------------------------------------------------------------------
+|
+| Leave this BLANK unless you would like to set something other than the default
+| system/cache/ folder.  Use a full server path with trailing slash.
+|
+*/
+$config['cache_path'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| Encryption Key
+|--------------------------------------------------------------------------
+|
+| If you use the Encryption class or the Session class you
+| MUST set an encryption key.  See the user guide for info.
+|
+*/
+$config['encryption_key'] = 'ci_c#@Ge!-~';
+
+/*
+|--------------------------------------------------------------------------
+| Session Variables
+|--------------------------------------------------------------------------
+|
+| 'sess_cookie_name'		= the name you want for the cookie
+| 'sess_expiration'			= the number of SECONDS you want the session to last.
+|   by default sessions last 7200 seconds (two hours).  Set to zero for no expiration.
+| 'sess_expire_on_close'	= Whether to cause the session to expire automatically
+|   when the browser window is closed
+| 'sess_encrypt_cookie'		= Whether to encrypt the cookie
+| 'sess_use_database'		= Whether to save the session data to a database
+| 'sess_table_name'			= The name of the session database table
+| 'sess_match_ip'			= Whether to match the user's IP address when reading the session data
+| 'sess_match_useragent'	= Whether to match the User Agent when reading the session data
+| 'sess_time_to_update'		= how many seconds between CI refreshing Session Information
+|
+*/
+$config['sess_cookie_name']		= 'ci_session';
+$config['sess_expiration']		= 7200;
+$config['sess_expire_on_close']	= FALSE;
+$config['sess_encrypt_cookie']	= FALSE;
+$config['sess_use_database']	= FALSE;
+$config['sess_table_name']		= 'ci_sessions';
+$config['sess_match_ip']		= FALSE;
+$config['sess_match_useragent']	= TRUE;
+$config['sess_time_to_update']	= 300;
+
+/*
+|--------------------------------------------------------------------------
+| Cookie Related Variables
+|--------------------------------------------------------------------------
+|
+| 'cookie_prefix' = Set a prefix if you need to avoid collisions
+| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
+| 'cookie_path'   =  Typically will be a forward slash
+|
+*/
+$config['cookie_prefix']	= "";
+$config['cookie_domain']	= "";
+$config['cookie_path']		= "/";
+
+/*
+|--------------------------------------------------------------------------
+| Global XSS Filtering
+|--------------------------------------------------------------------------
+|
+| Determines whether the XSS filter is always active when GET, POST or
+| COOKIE data is encountered
+|
+*/
+$config['global_xss_filtering'] = TRUE;
+
+/*
+|--------------------------------------------------------------------------
+| Cross Site Request Forgery
+|--------------------------------------------------------------------------
+| Enables a CSRF cookie token to be set. When set to TRUE, token will be
+| checked on a submitted form. If you are accepting user data, it is strongly
+| recommended CSRF protection be enabled.
+|
+| 'csrf_token_name' = The token name
+| 'csrf_cookie_name' = The cookie name
+| 'csrf_expire' = The number in seconds the token should expire.
+*/
+$config['csrf_protection'] = TRUE;
+$config['csrf_token_name'] = 'csrf_test_name';
+$config['csrf_cookie_name'] = 'csrf_cookie_name';
+$config['csrf_expire'] = 7200;
+
+/*
+|--------------------------------------------------------------------------
+| Output Compression
+|--------------------------------------------------------------------------
+|
+| Enables Gzip output compression for faster page loads.  When enabled,
+| the output class will test whether your server supports Gzip.
+| Even if it does, however, not all browsers support compression
+| so enable only if you are reasonably sure your visitors can handle it.
+|
+| VERY IMPORTANT:  If you are getting a blank page when compression is enabled it
+| means you are prematurely outputting something to your browser. It could
+| even be a line of whitespace at the end of one of your scripts.  For
+| compression to work, nothing can be sent before the output buffer is called
+| by the output class.  Do not "echo" any values with compression enabled.
+|
+*/
+$config['compress_output'] = FALSE;
+
+/*
+|--------------------------------------------------------------------------
+| Master Time Reference
+|--------------------------------------------------------------------------
+|
+| Options are "local" or "gmt".  This pref tells the system whether to use
+| your server's local time as the master "now" reference, or convert it to
+| GMT.  See the "date helper" page of the user guide for information
+| regarding date handling.
+|
+*/
+$config['time_reference'] = 'local';
+
+
+/*
+|--------------------------------------------------------------------------
+| Rewrite PHP Short Tags
+|--------------------------------------------------------------------------
+|
+| If your PHP installation does not have short tag support enabled CI
+| can rewrite the tags on-the-fly, enabling you to utilize that syntax
+| in your view files.  Options are TRUE or FALSE (boolean)
+|
+*/
+$config['rewrite_short_tags'] = FALSE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Reverse Proxy IPs
+|--------------------------------------------------------------------------
+|
+| If your server is behind a reverse proxy, you must whitelist the proxy IP
+| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
+| header in order to properly identify the visitor's IP address.
+| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
+|
+*/
+$config['proxy_ips'] = '';
+
+
+/* End of file config.php */
+/* Location: ./application/config/config.php */

application/config/constants.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+/*
+|--------------------------------------------------------------------------
+| File and Directory Modes
+|--------------------------------------------------------------------------
+|
+| These prefs are used when checking and setting modes when working
+| with the file system.  The defaults are fine on servers with proper
+| security, but you may wish (or even need) to change the values in
+| certain environments (Apache running a separate process for each
+| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
+| always be used to set the mode correctly.
+|
+*/
+define('FILE_READ_MODE', 0644);
+define('FILE_WRITE_MODE', 0666);
+define('DIR_READ_MODE', 0755);
+define('DIR_WRITE_MODE', 0777);
+
+/*
+|--------------------------------------------------------------------------
+| File Stream Modes
+|--------------------------------------------------------------------------
+|
+| These modes are used when working with fopen()/popen()
+|
+*/
+
+define('FOPEN_READ',							'rb');
+define('FOPEN_READ_WRITE',						'r+b');
+define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
+define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
+define('FOPEN_WRITE_CREATE',					'ab');
+define('FOPEN_READ_WRITE_CREATE',				'a+b');
+define('FOPEN_WRITE_CREATE_STRICT',				'xb');
+define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');
+
+
+/* End of file constants.php */
+/* Location: ./application/config/constants.php */

application/config/database.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| DATABASE CONNECTIVITY SETTINGS
+| -------------------------------------------------------------------
+| This file will contain the settings needed to access your database.
+|
+| For complete instructions please consult the 'Database Connection'
+| page of the User Guide.
+|
+| -------------------------------------------------------------------
+| EXPLANATION OF VARIABLES
+| -------------------------------------------------------------------
+|
+|	['hostname'] The hostname of your database server.
+|	['username'] The username used to connect to the database
+|	['password'] The password used to connect to the database
+|	['database'] The name of the database you want to connect to
+|	['dbdriver'] The database type. ie: mysql.  Currently supported:
+				 mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
+|	['dbprefix'] You can add an optional prefix, which will be added
+|				 to the table name when using the  Active Record class
+|	['pconnect'] TRUE/FALSE - Whether to use a persistent connection
+|	['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
+|	['cache_on'] TRUE/FALSE - Enables/disables query caching
+|	['cachedir'] The path to the folder where cache files should be stored
+|	['char_set'] The character set used in communicating with the database
+|	['dbcollat'] The character collation used in communicating with the database
+|	['swap_pre'] A default table prefix that should be swapped with the dbprefix
+|	['autoinit'] Whether or not to automatically initialize the database.
+|	['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
+|							- good for ensuring strict SQL while developing
+|
+| The $active_group variable lets you choose which connection group to
+| make active.  By default there is only one group (the 'default' group).
+|
+| The $active_record variables lets you determine whether or not to load
+| the active record class
+*/
+
+$active_group = 'default';
+$active_record = TRUE;
+
+$db['default']['hostname'] = 'localhost';
+$db['default']['username'] = 'nug';
+$db['default']['password'] = 'dini';
+$db['default']['database'] = 'proyek_tanur';
+$db['default']['dbdriver'] = 'mysql';
+$db['default']['dbprefix'] = 'mpu_';
+$db['default']['pconnect'] = TRUE;
+$db['default']['db_debug'] = TRUE;
+$db['default']['cache_on'] = FALSE;
+$db['default']['cachedir'] = '';
+$db['default']['char_set'] = 'utf8';
+$db['default']['dbcollat'] = 'utf8_general_ci';
+$db['default']['swap_pre'] = '';
+$db['default']['autoinit'] = TRUE;
+$db['default']['stricton'] = FALSE;
+
+
+/* End of file database.php */
+/* Location: ./application/config/database.php */

application/config/doctypes.php

+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+$_doctypes = array(
+					'xhtml11'		=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
+					'xhtml1-strict'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
+					'xhtml1-trans'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
+					'xhtml1-frame'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
+					'html5'			=> '<!DOCTYPE html>',
+					'html4-strict'	=> '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
+					'html4-trans'	=> '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
+					'html4-frame'	=> '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'
+					);
+
+/* End of file doctypes.php */
+/* Location: ./application/config/doctypes.php */

application/config/foreign_chars.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| Foreign Characters
+| -------------------------------------------------------------------
+| This file contains an array of foreign characters for transliteration
+| conversion used by the Text helper
+|
+*/
+$foreign_characters = array('223'	=>	"ss", // ß
+							'224'	=>	"a",
+							'225'	=>	"a",
+							'226'	=>	"a",
+							'229'	=>	"a",
+							'227'	=>	"ae",
+							'230'	=>	"ae",
+							'228'	=>	"ae",
+							'231'	=>	"c",
+							'232'	=>	"e",  // è
+							'233'	=>	"e",  // é
+							'234'	=>	"e",  // ê
+							'235'	=>	"e",  // ë
+							'236'	=>	"i",
+							'237'	=>	"i",
+							'238'	=>	"i",
+							'239'	=>	"i",
+							'241'	=>	"n",
+							'242'	=>	"o",
+							'243'	=>	"o",
+							'244'	=>	"o",
+							'245'	=>	"o",
+							'246'	=>	"oe", // ö
+							'249'	=>	"u",
+							'250'	=>	"u",
+							'251'	=>	"u",
+							'252'	=>	"ue", // ü
+							'255'	=>	"y",
+							'257'	=>	"aa",
+							'269'	=>	"ch",
+							'275'	=>	"ee",
+							'291'	=>	"gj",
+							'299'	=>	"ii",
+							'311'	=>	"kj",
+							'316'	=>	"lj",
+							'326'	=>	"nj",
+							'353'	=>	"sh",
+							'363'	=>	"uu",
+							'382'	=>	"zh",
+							'256'	=>	"aa",
+							'268'	=>	"ch",
+							'274'	=>	"ee",
+							'290'	=>	"gj",
+							'298'	=>	"ii",
+							'310'	=>	"kj",
+							'315'	=>	"lj",
+							'325'	=>	"nj",
+							'352'	=>	"sh",
+							'362'	=>	"uu",
+							'381'	=>	"zh",
+							);
+
+
+/* End of file foreign_chars.php */
+/* Location: ./application/config/foreign_chars.php */

application/config/hooks.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------------
+| Hooks
+| -------------------------------------------------------------------------
+| This file lets you define "hooks" to extend CI without hacking the core
+| files.  Please see the user guide for info:
+|
+|	http://codeigniter.com/user_guide/general/hooks.html
+|
+*/
+
+$hook['pre_system'] = array(
+	'function' => 'load_exceptions',
+	'filename' => 'uhoh.php',
+	'filepath' => 'hooks',
+);
+
+/* End of file hooks.php */
+/* Location: ./application/config/hooks.php */

application/config/index.html

+<html>
+<head>
+	<title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html>

application/config/mimes.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| MIME TYPES
+| -------------------------------------------------------------------
+| This file contains an array of mime types.  It is used by the
+| Upload class to help identify allowed file types.
+|
+*/
+
+$mimes = array(	'hqx'	=>	'application/mac-binhex40',
+				'cpt'	=>	'application/mac-compactpro',
+				'csv'	=>	array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
+				'bin'	=>	'application/macbinary',
+				'dms'	=>	'application/octet-stream',
+				'lha'	=>	'application/octet-stream',
+				'lzh'	=>	'application/octet-stream',
+				'exe'	=>	array('application/octet-stream', 'application/x-msdownload'),
+				'class'	=>	'application/octet-stream',
+				'psd'	=>	'application/x-photoshop',
+				'so'	=>	'application/octet-stream',
+				'sea'	=>	'application/octet-stream',
+				'dll'	=>	'application/octet-stream',
+				'oda'	=>	'application/oda',
+				'pdf'	=>	array('application/pdf', 'application/x-download'),
+				'ai'	=>	'application/postscript',
+				'eps'	=>	'application/postscript',
+				'ps'	=>	'application/postscript',
+				'smi'	=>	'application/smil',
+				'smil'	=>	'application/smil',
+				'mif'	=>	'application/vnd.mif',
+				'xls'	=>	array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
+				'ppt'	=>	array('application/powerpoint', 'application/vnd.ms-powerpoint'),
+				'wbxml'	=>	'application/wbxml',
+				'wmlc'	=>	'application/wmlc',
+				'dcr'	=>	'application/x-director',
+				'dir'	=>	'application/x-director',
+				'dxr'	=>	'application/x-director',
+				'dvi'	=>	'application/x-dvi',
+				'gtar'	=>	'application/x-gtar',
+				'gz'	=>	'application/x-gzip',
+				'php'	=>	'application/x-httpd-php',
+				'php4'	=>	'application/x-httpd-php',
+				'php3'	=>	'application/x-httpd-php',
+				'phtml'	=>	'application/x-httpd-php',
+				'phps'	=>	'application/x-httpd-php-source',
+				'js'	=>	'application/x-javascript',
+				'swf'	=>	'application/x-shockwave-flash',
+				'sit'	=>	'application/x-stuffit',
+				'tar'	=>	'application/x-tar',
+				'tgz'	=>	array('application/x-tar', 'application/x-gzip-compressed'),
+				'xhtml'	=>	'application/xhtml+xml',
+				'xht'	=>	'application/xhtml+xml',
+				'zip'	=>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
+				'mid'	=>	'audio/midi',
+				'midi'	=>	'audio/midi',
+				'mpga'	=>	'audio/mpeg',
+				'mp2'	=>	'audio/mpeg',
+				'mp3'	=>	array('audio/mpeg', 'audio/mpg', 'audio/mpeg3'),
+				'aif'	=>	'audio/x-aiff',
+				'aiff'	=>	'audio/x-aiff',
+				'aifc'	=>	'audio/x-aiff',
+				'ram'	=>	'audio/x-pn-realaudio',
+				'rm'	=>	'audio/x-pn-realaudio',
+				'rpm'	=>	'audio/x-pn-realaudio-plugin',
+				'ra'	=>	'audio/x-realaudio',
+				'rv'	=>	'video/vnd.rn-realvideo',
+				'wav'	=>	'audio/x-wav',
+				'bmp'	=>	'image/bmp',
+				'gif'	=>	'image/gif',
+				'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
+				'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
+				'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
+				'png'	=>	array('image/png',  'image/x-png'),
+				'tiff'	=>	'image/tiff',
+				'tif'	=>	'image/tiff',
+				'css'	=>	'text/css',
+				'html'	=>	'text/html',
+				'htm'	=>	'text/html',
+				'shtml'	=>	'text/html',
+				'txt'	=>	'text/plain',
+				'text'	=>	'text/plain',
+				'log'	=>	array('text/plain', 'text/x-log'),
+				'rtx'	=>	'text/richtext',
+				'rtf'	=>	'text/rtf',
+				'xml'	=>	'text/xml',
+				'xsl'	=>	'text/xml',
+				'mpeg'	=>	'video/mpeg',
+				'mpg'	=>	'video/mpeg',
+				'mpe'	=>	'video/mpeg',
+				'qt'	=>	'video/quicktime',
+				'mov'	=>	'video/quicktime',
+				'avi'	=>	'video/x-msvideo',
+				'movie'	=>	'video/x-sgi-movie',
+				'doc'	=>	'application/msword',
+				'docx'	=>	'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+				'xlsx'	=>	'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+				'word'	=>	array('application/msword', 'application/octet-stream'),
+				'xl'	=>	'application/excel',
+				'eml'	=>	'message/rfc822'
+			);
+
+
+/* End of file mimes.php */
+/* Location: ./application/config/mimes.php */

application/config/profiler.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------------
+| Profiler Sections
+| -------------------------------------------------------------------------
+| This file lets you determine whether or not various sections of Profiler
+| data are displayed when the Profiler is enabled.
+| Please see the user guide for info:
+|
+|	http://codeigniter.com/user_guide/general/profiling.html
+|
+*/
+
+
+
+/* End of file profiler.php */
+/* Location: ./application/config/profiler.php */

application/config/routes.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------------
+| URI ROUTING
+| -------------------------------------------------------------------------
+| This file lets you re-map URI requests to specific controller functions.
+|
+| Typically there is a one-to-one relationship between a URL string
+| and its corresponding controller class/method. The segments in a
+| URL normally follow this pattern:
+|
+|	example.com/class/method/id/
+|
+| In some instances, however, you may want to remap this relationship
+| so that a different class/function is called than the one
+| corresponding to the URL.
+|
+| Please see the user guide for complete details:
+|
+|	http://codeigniter.com/user_guide/general/routing.html
+|
+| -------------------------------------------------------------------------
+| RESERVED ROUTES
+| -------------------------------------------------------------------------
+|
+| There is one reserved routes:
+|
+|	$route['default_controller'] = 'welcome';
+|
+| This route indicates which controller class should be loaded if the
+| URI contains no data. In the above example, the "welcome" class
+| would be loaded.
+*/
+
+
+$route['default_controller'] = "home";
+$route['404_override'] = '';
+
+$route['admin/(:any)/(:any)'] = '$1/admin/$2';
+$route['admin/(:any)'] = '$1/admin';
+
+
+/* End of file routes.php */
+/* Location: ./application/config/routes.php */

application/config/smileys.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| SMILEYS
+| -------------------------------------------------------------------
+| This file contains an array of smileys for use with the emoticon helper.
+| Individual images can be used to replace multiple simileys.  For example:
+| :-) and :) use the same image replacement.
+|
+| Please see user guide for more info:
+| http://codeigniter.com/user_guide/helpers/smiley_helper.html
+|
+*/
+
+$smileys = array(
+
+//	smiley			image name						width	height	alt
+
+	':-)'			=>	array('grin.gif',			'19',	'19',	'grin'),
+	':lol:'			=>	array('lol.gif',			'19',	'19',	'LOL'),
+	':cheese:'		=>	array('cheese.gif',			'19',	'19',	'cheese'),
+	':)'			=>	array('smile.gif',			'19',	'19',	'smile'),
+	';-)'			=>	array('wink.gif',			'19',	'19',	'wink'),
+	';)'			=>	array('wink.gif',			'19',	'19',	'wink'),
+	':smirk:'		=>	array('smirk.gif',			'19',	'19',	'smirk'),
+	':roll:'		=>	array('rolleyes.gif',		'19',	'19',	'rolleyes'),
+	':-S'			=>	array('confused.gif',		'19',	'19',	'confused'),
+	':wow:'			=>	array('surprise.gif',		'19',	'19',	'surprised'),
+	':bug:'			=>	array('bigsurprise.gif',	'19',	'19',	'big surprise'),
+	':-P'			=>	array('tongue_laugh.gif',	'19',	'19',	'tongue laugh'),
+	'%-P'			=>	array('tongue_rolleye.gif',	'19',	'19',	'tongue rolleye'),
+	';-P'			=>	array('tongue_wink.gif',	'19',	'19',	'tongue wink'),
+	':P'			=>	array('raspberry.gif',		'19',	'19',	'raspberry'),
+	':blank:'		=>	array('blank.gif',			'19',	'19',	'blank stare'),
+	':long:'		=>	array('longface.gif',		'19',	'19',	'long face'),
+	':ohh:'			=>	array('ohh.gif',			'19',	'19',	'ohh'),
+	':grrr:'		=>	array('grrr.gif',			'19',	'19',	'grrr'),
+	':gulp:'		=>	array('gulp.gif',			'19',	'19',	'gulp'),
+	'8-/'			=>	array('ohoh.gif',			'19',	'19',	'oh oh'),
+	':down:'		=>	array('downer.gif',			'19',	'19',	'downer'),
+	':red:'			=>	array('embarrassed.gif',	'19',	'19',	'red face'),
+	':sick:'		=>	array('sick.gif',			'19',	'19',	'sick'),
+	':shut:'		=>	array('shuteye.gif',		'19',	'19',	'shut eye'),
+	':-/'			=>	array('hmm.gif',			'19',	'19',	'hmmm'),
+	'>:('			=>	array('mad.gif',			'19',	'19',	'mad'),
+	':mad:'			=>	array('mad.gif',			'19',	'19',	'mad'),
+	'>:-('			=>	array('angry.gif',			'19',	'19',	'angry'),
+	':angry:'		=>	array('angry.gif',			'19',	'19',	'angry'),
+	':zip:'			=>	array('zip.gif',			'19',	'19',	'zipper'),
+	':kiss:'		=>	array('kiss.gif',			'19',	'19',	'kiss'),
+	':ahhh:'		=>	array('shock.gif',			'19',	'19',	'shock'),
+	':coolsmile:'	=>	array('shade_smile.gif',	'19',	'19',	'cool smile'),
+	':coolsmirk:'	=>	array('shade_smirk.gif',	'19',	'19',	'cool smirk'),
+	':coolgrin:'	=>	array('shade_grin.gif',		'19',	'19',	'cool grin'),
+	':coolhmm:'		=>	array('shade_hmm.gif',		'19',	'19',	'cool hmm'),
+	':coolmad:'		=>	array('shade_mad.gif',		'19',	'19',	'cool mad'),
+	':coolcheese:'	=>	array('shade_cheese.gif',	'19',	'19',	'cool cheese'),
+	':vampire:'		=>	array('vampire.gif',		'19',	'19',	'vampire'),
+	':snake:'		=>	array('snake.gif',			'19',	'19',	'snake'),
+	':exclaim:'		=>	array('exclaim.gif',		'19',	'19',	'excaim'),
+	':question:'	=>	array('question.gif',		'19',	'19',	'question') // no comma after last item
+
+		);
+
+/* End of file smileys.php */
+/* Location: ./application/config/smileys.php */

application/config/user_agents.php

+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| USER AGENT TYPES
+| -------------------------------------------------------------------
+| This file contains four arrays of user agent data.  It is used by the
+| User Agent Class to help identify browser, platform, robot, and
+| mobile device data.  The array keys are used to identify the device
+| and the array values are used to set the actual name of the item.
+|
+*/
+
+$platforms = array (
+					'windows nt 6.0'	=> 'Windows Longhorn',
+					'windows nt 5.2'	=> 'Windows 2003',
+					'windows nt 5.0'	=> 'Windows 2000',
+					'windows nt 5.1'	=> 'Windows XP',
+					'windows nt 4.0'	=> 'Windows NT 4.0',
+					'winnt4.0'			=> 'Windows NT 4.0',
+					'winnt 4.0'			=> 'Windows NT',
+					'winnt'				=> 'Windows NT',
+					'windows 98'		=> 'Windows 98',
+					'win98'				=> 'Windows 98',
+					'windows 95'		=> 'Windows 95',
+					'win95'				=> 'Windows 95',
+					'windows'			=> 'Unknown Windows OS',
+					'os x'				=> 'Mac OS X',
+					'ppc mac'			=> 'Power PC Mac',
+					'freebsd'			=> 'FreeBSD',
+					'ppc'				=> 'Macintosh',
+					'linux'				=> 'Linux',
+					'debian'			=> 'Debian',
+					'sunos'				=> 'Sun Solaris',
+					'beos'				=> 'BeOS',
+					'apachebench'		=> 'ApacheBench',
+					'aix'				=> 'AIX',
+					'irix'				=> 'Irix',
+					'osf'				=> 'DEC OSF',
+					'hp-ux'				=> 'HP-UX',
+					'netbsd'			=> 'NetBSD',
+					'bsdi'				=> 'BSDi',
+					'openbsd'			=> 'OpenBSD',
+					'gnu'				=> 'GNU/Linux',
+					'unix'				=> 'Unknown Unix OS'
+				);
+
+
+// The order of this array should NOT be changed. Many browsers return
+// multiple browser types so we want to identify the sub-type first.
+$browsers = array(
+					'Flock'				=> 'Flock',
+					'Chrome'			=> 'Chrome',
+					'Opera'				=> 'Opera',
+					'MSIE'				=> 'Internet Explorer',
+					'Internet Explorer'	=> 'Internet Explorer',
+					'Shiira'			=> 'Shiira',
+					'Firefox'			=> 'Firefox',
+					'Chimera'			=> 'Chimera',
+					'Phoenix'			=> 'Phoenix',
+					'Firebird'			=> 'Firebird',
+					'Camino'			=> 'Camino',
+					'Netscape'			=> 'Netscape',
+					'OmniWeb'			=> 'OmniWeb',
+					'Safari'			=> 'Safari',
+					'Mozilla'			=> 'Mozilla',
+					'Konqueror'			=> 'Konqueror',
+					'icab'				=> 'iCab',
+					'Lynx'				=> 'Lynx',
+					'Links'				=> 'Links',
+					'hotjava'			=> 'HotJava',
+					'amaya'				=> 'Amaya',
+					'IBrowse'			=> 'IBrowse'
+				);
+
+$mobiles = array(
+					// legacy array, old values commented out
+					'mobileexplorer'	=> 'Mobile Explorer',
+//					'openwave'			=> 'Open Wave',
+//					'opera mini'		=> 'Opera Mini',
+//					'operamini'			=> 'Opera Mini',
+//					'elaine'			=> 'Palm',
+					'palmsource'		=> 'Palm',
+//					'digital paths'		=> 'Palm',
+//					'avantgo'			=> 'Avantgo',
+//					'xiino'				=> 'Xiino',
+					'palmscape'			=> 'Palmscape',
+//					'nokia'				=> 'Nokia',
+//					'ericsson'			=> 'Ericsson',
+//					'blackberry'		=> 'BlackBerry',
+//					'motorola'			=> 'Motorola'
+
+					// Phones and Manufacturers
+					'motorola'			=> "Motorola",
+					'nokia'				=> "Nokia",
+					'palm'				=> "Palm",
+					'iphone'			=> "Apple iPhone",
+					'ipod'				=> "Apple iPod Touch",
+					'sony'				=> "Sony Ericsson",
+					'ericsson'			=> "Sony Ericsson",
+					'blackberry'		=> "BlackBerry",
+					'cocoon'			=> "O2 Cocoon",
+					'blazer'			=> "Treo",
+					'lg'				=> "LG",
+					'amoi'				=> "Amoi",
+					'xda'				=> "XDA",
+					'mda'				=> "MDA",
+					'vario'				=> "Vario",
+					'htc'				=> "HTC",
+					'samsung'			=> "Samsung",
+					'sharp'				=> "Sharp",
+					'sie-'				=> "Siemens",
+					'alcatel'			=> "Alcatel",
+					'benq'				=> "BenQ",
+					'ipaq'				=> "HP iPaq",
+					'mot-'				=> "Motorola",
+					'playstation portable'	=> "PlayStation Portable",
+					'hiptop'			=> "Danger Hiptop",
+					'nec-'				=> "NEC",
+					'panasonic'			=> "Panasonic",
+					'philips'			=> "Philips",
+					'sagem'				=> "Sagem",
+					'sanyo'				=> "Sanyo",
+					'spv'				=> "SPV",
+					'zte'				=> "ZTE",
+					'sendo'				=> "Sendo",
+
+					// Operating Systems
+					'symbian'				=> "Symbian",
+					'SymbianOS'				=> "SymbianOS",
+					'elaine'				=> "Palm",
+					'palm'					=> "Palm",
+					'series60'				=> "Symbian S60",
+					'windows ce'			=> "Windows CE",
+
+					// Browsers
+					'obigo'					=> "Obigo",
+					'netfront'				=> "Netfront Browser",
+					'openwave'				=> "Openwave Browser",
+					'mobilexplorer'			=> "Mobile Explorer",
+					'operamini'				=> "Opera Mini",
+					'opera mini'			=> "Opera Mini",
+
+					// Other
+					'digital paths'			=> "Digital Paths",
+					'avantgo'				=> "AvantGo",
+					'xiino'					=> "Xiino",
+					'novarra'				=> "Novarra Transcoder",
+					'vodafone'				=> "Vodafone",
+					'docomo'				=> "NTT DoCoMo",
+					'o2'					=> "O2",
+
+					// Fallback
+					'mobile'				=> "Generic Mobile",
+					'wireless'				=> "Generic Mobile",
+					'j2me'					=> "Generic Mobile",
+					'midp'					=> "Generic Mobile",
+					'cldc'					=> "Generic Mobile",
+					'up.link'				=> "Generic Mobile",
+					'up.browser'			=> "Generic Mobile",
+					'smartphone'			=> "Generic Mobile",
+					'cellphone'				=> "Generic Mobile"
+				);
+
+// There are hundreds of bots but these are the most common.
+$robots = array(
+					'googlebot'			=> 'Googlebot',
+					'msnbot'			=> 'MSNBot',
+					'slurp'				=> 'Inktomi Slurp',
+					'yahoo'				=> 'Yahoo',
+					'askjeeves'			=> 'AskJeeves',
+					'fastcrawler'		=> 'FastCrawler',
+					'infoseek'			=> 'InfoSeek Robot 1.0',
+					'lycos'				=> 'Lycos'
+				);
+
+/* End of file user_agents.php */
+/* Location: ./application/config/user_agents.php */

application/controllers/.htaccess

+deny from all

application/controllers/home.php

+<?php
+
+class Home extends EM_Controller {
+	### Extended CI_Controller /application/core/DI_Controller.php
+
+ 
+	private static function makeRandomDateInclusive($startDate,$endDate){ 
+		return date("Y-m-d",strtotime("$startDate + ".rand(0,round((strtotime($endDate) - strtotime($startDate)) / (60 * 60 * 24)))." days"));
+	}
+ 
+	function  __construct()  {
+		/* Inherit the CI_Controller construct because we're using a 
+		   custom controller with $this->em for Doctrine already set */
+		parent::__construct();
+	}
+            
+  function index() {
+		// To make a new user model!
+		// $user = new models/User;
+		
+		// Example Doctrine Queries
+		// $user = $this->em->find('models\User','1');
+		// $user = $this->em->getRepository('models\User')->find('1');
+		// $users = $this->em->getRepository('models\User')->findBy(array('username' => 'Gariasdkfjs', 'password' => 'asdfasdfasdf'));
+		
+		// create query
+		$users = $this->em->createQuery("select a from models\User a")->getResult();
+	
+		/* Now that we're changed the "username" column in the "user" table go ahead and grab it and pass it into our view for testing. */
+		// $message = "<h2 id='number_of_users'>Number of users " . count($users) . "</h2><br />";
+		$message = "";
+		
+		// Declare the $user variable as an object
+		$user = new models\User;
+	
+		// Treat print each user data
+		foreach ($users as $user) {
+			// $user_referrer = new models\User;
+			$user_referrer = $this->em->find('models\User',$user->getRefererID());
+			
+			$message .= "<div class='post'>\n"; // div post
+			
+			$message .= "<h2 class='title'><a href='#'>User " . $user->getUsername() . "</a></h2>";
+			$message .= "<p class='meta'>Posted by <a href='#'>" . $user->getUsername() . "</a> on " . $this::makeRandomDateInclusive('2009-04-01',date("Y-M-m")) . " &nbsp;&bull;&nbsp; <a href='#' class='comments'>Comments (" . rand(1,100) . ")</a> &nbsp;&bull;&nbsp; <a href='#' class='permalink'>Full article</a></p>";
+			
+			$message .= "<div class='entry' id='" . $user->getID() . "'>\n"; // div entry
+			$message .= "<p>"; // p
+			
+			// This adds a picture to the result message depending on the value of rand (random, 0 or 1)
+			if (rand(0,1)) {
+				$message .= "<img src='" . site_url() . "application/views/images/img05.jpg' width='143' height='143' alt='' class='alignleft border' />"; }
+			
+			$message .= "User <strong>" . $user->getUsername() . "</strong>";
+			
+			// only adds referrer if it exists, since referrer is set as not null in the models (not strictly required), there will be instances that this can be skipped entirely during registration.
+			if ($user_referrer){
+				$message .= " was reffered by  " . $user_referrer->getUsername() . ". He ";
+			}
+			
+			
+			$message .= "has an ID number autogenerated from the database with a value of " . $user->getId() . " and his email address is " . $user->getEmail() . ".</p>\n"; // end p
+			
+			$message .= "</div>\n";  // end entry
+			
+			$message .= "</div>\n";  // end post
+		}
+		
+		// The data to send to the view
+		$this->data['title'] = "Home";
+		$this->data['header'] = "Users";
+		$this->data['content'] = $message;
+				
+		// Load the view with the data
+		$this->load->view('home', $this->data);
+	}
+
+}

application/controllers/index.html

+<html>
+<head>
+	<title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html>

application/controllers/login.php

+<?php
+
+class Login extends EM_Controller {
+	public function __construct() {
+		parent::__construct();
+		$this->load->helper(array('form','url'));
+	}
+	
+	// this is the default function
+	public function index() {
+		$this->data['title'] = "Login now!";
+		$this->load->view('login_form', $this->data);
+	}
+
+	// this function will recieve information from the login_form view.
+	public function submit() {
+		// Receive the post data
+		$posted_username = $this->input->post('username');
+		$posted_password = $this->input->post('password');
+
+		// Setup the Doctrine Query
+		$DQLquery = "select a from models\User a WHERE a.username = :username AND a.password = :password";
+		
+		// Serupt the query parameters
+		$query = $this->em->createQuery($DQLquery);
+		$query->setParameters(array(
+				'username' => $posted_username,
+				'password' => $posted_password,
+		)); 
+		
+		$this->data['content'] = "";
+		
+		// Get the array of models\User objects
+		$users = $query->getResult();
+		
+		if (count($users) == 1) {
+			$user = new models\User;
+			$user = $users[0];
+			
+			$this->data['content'] .= "<div class='post'>\n"; // div post
+			
+			$this->data['content'] .= "<h2 class='title'><a href='#'>Logged in " . $user->getUsername() . "</a></h2>";
+			$this->data['content'] .= "<p class='meta'>Posted by <a href='#'>" . $user->getUsername() . "</a> on " . '2009-04-01' . " &nbsp;&bull;&nbsp; <a href='#' class='comments'>Comments (" . rand(1,100) . ")</a> &nbsp;&bull;&nbsp; <a href='#' class='permalink'>Full article</a></p>";
+			
+			$this->data['content'] .= "<div class='entry' id='" . $user->getID() . "'>\n"; // div entry
+			$this->data['content'] .= "<p>"; // p
+			
+			$this->data['content'] .= "<p>Success!</p><br />\n";
+			$this->data['content'] .= "<p>Your username is " . $user->getUsername()  . "</p><br />\n";
+			$this->data['content'] .= "<p>Your email address is " . $user->getEmail()  . "</p><br />\n";
+			$this->data['content'] .= "<p>Your password is " . $user->getPassword() . "</p><br />\n";
+			$this->data['content'] .= "<p>Your facebook id is " . $user->getFacebookID() . "</p><br />\n";
+						
+			$this->data['content'] .= "</div>\n";  // end entry
+			
+			$this->data['content'] .= "</div>\n";  // end post
+			
+
+			$this->data['header'] = "Success";
+			$this->data['title'] = "Success";
+		} else {
+			$this->data['header'] = "Login Failed!";
+			$this->data['title'] = "Login Failed!";
+			
+			$this->data['content'] .= "<div class='post'>\n"; // div post
+			$this->data['content'] .= "<h2 class='title'><a href='#'>Login Failed</a></h2>";
+			$this->data['content'] .= "<div class='entry'>\n"; // div entry
+			$this->data['content'] .= "<p>Failed!</p><br />\n";
+			$this->data['content'] .= "</div>\n";  // end entry
+			$this->data['content'] .= "</div>\n";  // end post
+		}
+		
+		// $data['content'] .= $query . "<br />";
+		$this->load->view('login_success', $this->data);
+	}
+
+}

application/controllers/signup.php

+<?php
+
+class Signup extends EM_Controller {
+
+	public function __construct() {
+		parent::__construct();
+		
+		$this->load->helper(array('form','url'));
+		$this->load->library('form_validation');
+
+	}
+
+	public function submit() {
+
+		if ($this->_submit_validate() === FALSE) {
+			$this->index();
+			return;
+		}
+		
+		$user = new models\User;
+		$user->setUsername($this->input->post('username'));
+		$user->setPassword($this->input->post('password'));
+		$user->setEmail($this->input->post('email'));	
+		$user->setRefererID(1);	
+		$user->setFacebookID($this->input->post('facebook_id'));	
+		
+		$this->em->persist($user);
+		$this->em->flush();
+		
+		$this->data['content'] = "<div class='post'>\n"; // div post
+		
+		$this->data['content'] .= "<h2 class='title'><a href='#'>Signedup " . $user->getUsername() . "</a></h2>";
+		$this->data['content'] .= "<p class='meta'>Posted by <a href='#'>" . $user->getUsername() . "</a> on " . '2009-04-01' . " &nbsp;&bull;&nbsp; <a href='#' class='comments'>Comments (" . rand(1,100) . ")</a> &nbsp;&bull;&nbsp; <a href='#' class='permalink'>Full article</a></p>";
+		
+		$this->data['content'] .= "<div class='entry' id='" . $user->getID() . "'>\n"; // div entry
+		$this->data['content'] .= "<p>"; // p
+		
+		$this->data['content'] .= "<p>Success!</p><br />\n";
+		$this->data['content'] .= "<p>Your username is " . $user->getUsername()  . "</p><br />\n";
+		$this->data['content'] .= "<p>Your email address is " . $user->getEmail()  . "</p><br />\n";
+		$this->data['content'] .= "<p>Your password is " . $user->getPassword() . "</p><br />\n";
+		$this->data['content'] .= "<p>Your facebook id is " . $user->getFacebookID() . "</p><br />\n";
+					
+		$this->data['content'] .= "</div>\n";  // end entry
+		
+		$this->data['content'] .= "</div>\n";  // end post
+		
+		// Prepare the header and the title
+		$this->data['title'] = "Success!";
+		$this->data['header'] = "Success!";
+		
+		$this->load->view('signup_success', $this->data);
+	}
+	
+	private function _submit_validate() {
+
+		// validation rules
+		$this->form_validation->set_rules('username', 'Username',
+			'required|alpha_numeric|min_length[6]|max_length[12]|unique[User.email]');
+
+		$this->form_validation->set_rules('password', 'Password',
+			'required|min_length[6]|max_length[12]');
+
+		$this->form_validation->set_rules('passconf', 'Confirm Password',
+			'required|matches[password]');
+
+		$this->form_validation->set_rules('email', 'E-mail',
+			'required|valid_email|unique[User.email]');
+			
+		$this->form_validation->set_rules('facebook_id', 'Your facebook ID',
+			'required');
+			
+		return $this->form_validation->run();
+
+	}
+	
+	public function index() {
+		$this->load->view('signup_form');
+	}
+
+}

application/controllers/welcome.php

+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class Welcome extends EM_Controller {
+
+	function __construct()
+	{
+		parent::__construct();
+	}
+
+	function index()
+	{
+		$data['title'] = "Welcome home!";
+		$data['message'] = "<h1>Welcome home!</h1>";
+		
+		$this->load->view('welcome_message', $data);
+	}
+}
+
+/* End of file welcome.php */
+/* Location: ./application/controllers/welcome.php */

application/core/EM_Config.php

+<?php
+class EM_Config extends CI_Config
+{
+    /**
+     * Site URL
+     *
+     * Extended to allow a combination segment-based URLs and query strings when using the
+     * uri_protocol = PATH_INFO / enable_query_strings = TRUE configuration setting.
+     *
+     * @access  public
+     * @param   string  the URI string
+     * @return  string
+     */
+    function site_url($uri = '')
+    {
+        if ($uri == '')
+        {
+            if ($this->item('base_url') == '')
+            {
+                return $this->item('index_page');
+            }
+            else
+            {
+                return $this->slash_item('base_url').$this->item('index_page');
+            }
+        }
+ 
+        if ($this->item('enable_query_strings') == FALSE OR $this->item('uri_protocol') == 'PATH_INFO')
+        {
+            if (is_array($uri))
+            {
+                $uri = implode('/', $uri);
+            }
+ 
+            $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
+            return $this->slash_item('base_url').$this->slash_item('index_page').trim($uri, '/').$suffix;
+        }
+        else
+        {
+            if (is_array($uri))
+            {
+                $i = 0;
+                $str = '';
+                foreach ($uri as $key => $val)
+                {
+                    $prefix = ($i == 0) ? '' : '&';
+                    $str .= $prefix.$key.'='.$val;
+                    $i++;
+                }
+ 
+                $uri = $str;
+            }
+ 
+            if ($this->item('base_url') == '')
+            {
+                return $this->item('index_page').'?'.$uri;
+            }
+            else
+            {
+                return $this->slash_item('base_url').$this->item('index_page').'?'.$uri;
+            }
+        }
+    }
+}

application/core/EM_Controller.php

+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+
+## Extend CI_Controller to include Doctrine Entity Manager
+
+class  EM_Controller  extends  CI_Controller  {
+
+	public $em;
+	public $data;
+
+	function __construct()  {
+	
+		parent::__construct();
+		
+		
+		/* Initialize things you don't want to do over and over again in all your controllers. */
+		$this->data['footer']= "&copy; 2011";
+		$this->data['content']= "No content yet.";
+		$this->data['header']= "No header defined";
+		$this->data['title']= "Untitled";
+		
+		/* Instantiate Doctrine's Entity manage so we don't have to everytime we want to use Doctrine */
+		$this->em = $this->doctrine->em;
+		
+	}
+
+}
+
+/* End of file EM_Controller.php */
+/* location ./application/core/EM_Controller.php */

application/core/EM_Loader.php

+<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
+
+/* load the MX_Loader class */
+require APPPATH."third_party/MX/Loader.php";
+
+class EM_Loader extends MX_Loader {}

application/core/EM_Router.php

+<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
+
+/* load the MX_Router class */
+require APPPATH."third_party/MX/Router.php";
+
+class EM_Router extends MX_Router {}

application/core/index.html

+<html>
+<head>
+	<title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html>

application/doctrine.php

+<?php
+chdir(dirname(__FILE__) . '/libraries');
+ 
+require_once 'Doctrine/Common/ClassLoader.php';
+// require_once '/lib/vendor/lib/Doctrine/Core.php'; 
+ 
+$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
+$classLoader->register();
+ 
+$classLoader = new \Doctrine\Common\ClassLoader('Symfony', 'Doctrine');
+$classLoader->register();
+ 
+$configFile = '../cli-config.php';
+$helperSet = null;
+if (file_exists($configFile)) {
+    if ( ! is_readable($configFile)) {
+        trigger_error(
+            'Configuration file [' . $configFile . '] does not have read permission.', E_ERROR
+        );
+    }
+ 
+    require $configFile;
+ 
+    foreach ($GLOBALS as $helperSetCandidate) {
+        if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) {
+            $helperSet = $helperSetCandidate;
+            break;
+        }
+    }
+}
+ 
+$helperSet = ($helperSet) ?: new \Symfony\Component\Console\Helper\HelperSet();
+ 
+$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', Doctrine\ORM\Version::VERSION);
+$cli->setCatchExceptions(true);
+$cli->setHelperSet($helperSet);
+$cli->addCommands(array(
+    // DBAL Commands
+    new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
+    new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(),
+ 
+    // ORM Commands
+    new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
+    new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),
+ 
+));
+$cli->run();

application/errors/error_404.php

+<html>
+<head>
+<title>404 Page Not Found</title>
+<style type="text/css">
+
+body {
+background-color:	#fff;
+margin:				40px;
+font-family:		Lucida Grande, Verdana, Sans-serif;
+font-size:			12px;
+color:				#000;
+}
+
+#content  {
+border:				#999 1px solid;
+background-color:	#fff;
+padding:			20px 20px 12px 20px;
+}
+
+h1 {
+font-weight:		normal;
+font-size:			14px;
+color:				#990000;
+margin:				0 0 4px 0;
+}
+</style>
+</head>
+<body>
+	<div id="content">
+		<h1><?php echo $heading; ?></h1>
+		<?php echo $message; ?>
+	</div>
+</body>
+</html>

application/errors/error_db.php

+<html>
+<head>
+<title>Database Error</title>
+<style type="text/css">
+
+body {
+background-color:	#fff;
+margin:				40px;
+font-family:		Lucida Grande, Verdana, Sans-serif;
+font-size:			12px;
+color:				#000;
+}
+
+#content  {
+border:				#999 1px solid;
+background-color:	#fff;
+padding:			20px 20px 12px 20px;
+}
+
+h1 {
+font-weight:		normal;
+font-size:			14px;
+color:				#990000;
+margin:				0 0 4px 0;
+}
+</style>
+</head>
+<body>
+	<div id="content">
+		<h1><?php echo $heading; ?></h1>
+		<?php echo $message; ?>
+	</div>
+</body>
+</html>

application/errors/error_general.php

+	<style type="text/css">
+#exception_error {
+	background: #ddd;
+	font-size: 1em;
+	font-family:sans-serif;
+	text-align: left;
+	color: #333333;
+}
+#exception_error h1,
+#exception_error h2 {
+	margin: 0;
+	padding: 1em;
+	font-size: 1em;
+	font-weight: normal;
+	background: #911911;
+	color: #FFFFFF;
+}
+#exception_error h1 a,
+#exception_error h2 a {
+	color: #FFFFFF;
+}
+#exception_error h2 {
+	background: #666666;
+}
+#exception_error h3 {
+	margin: 0;
+	padding: 0.4em 0 0;
+	font-size: 1em;
+	font-weight: normal;
+}
+#exception_error p {
+	margin: 0;
+	padding: .4em;
+}
+#exception_error a {
+	color: #1b323b;
+}
+</style>
+
+<div id="exception_error">
+	<h1><span class="type"><?php echo $heading ?> [ <?php echo $status_code ?> ]</span></h1>
+	<div class="content">
+		<p><?php echo $message ?></p>
+	</div>
+</div>

application/errors/error_php.php

+<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
+
+<h4>A PHP Error was encountered</h4>
+
+<p>Severity: <?php echo $severity; ?></p>
+<p>Message:  <?php echo $message; ?></p>
+<p>Filename: <?php echo $filepath; ?></p>
+<p>Line Number: <?php echo $line; ?></p>
+
+</div>

application/errors/error_php_custom.php

+<?php
+// Unique error identifier
+$error_id = uniqid('error'); ?>
+	<style type="text/css">
+#exception_error {
+	background: #ddd;
+	font-size: 1em;
+	font-family:sans-serif;
+	text-align: left;
+	color: #333333;
+}
+#exception_error h1,
+#exception_error h2 {
+	margin: 0;
+	padding: 1em;
+	font-size: 1em;
+	font-weight: normal;
+	background: #911911;
+	color: #FFFFFF;
+}
+#exception_error h1 a,
+#exception_error h2 a {
+	color: #FFFFFF;
+}
+#exception_error h2 {
+	background: #666666;