This file contains 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 (defined('BASEPATH')) OR exit('No direct script access allowed'); | |
/* load the MX_Router class */ | |
require APPPATH."third_party/MX/Router.php"; | |
class MY_Router extends MX_Router { | |
function _set_routing() | |
{ | |
// Are query strings enabled in the config file? Normally CI doesn't utilize query strings |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Jonahlyn subscriptions in Google Reader</title> | |
</head> | |
<body> | |
<outline text="Bokardo" title="Bokardo" type="rss" | |
xmlUrl="http://bokardo.com/feed/" htmlUrl="http://bokardo.com"/> | |
<outline | |
text="Computer Science 169, 001|Spring 2012|UC Berkeley" |
This file contains 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Article extends MY_Controller { | |
public function author($author = null,$offset = 0) | |
{ | |
if($author == null){ | |
show_404("Author not found !"); | |
return true; | |
} |
This file contains 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class ArticleModel extends CI_Model { | |
function __construct() | |
{ | |
parent::__construct(); | |
} | |
function insert($author,$title,$content){ | |
$this->db->insert("article", |
This file contains 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 | |
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Blog_model extends CI_Model { | |
function __construct() { | |
parent::__construct(); | |
//var_dump(get_instance()); exit; | |
// $CI = get_instance(); | |
// $CI->load->database(); |
This file contains 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Auth { | |
/** | |
* @author K.Gautam | |
* @version 0.1 | |
* @todo ability to add configuration. | |
*/ | |
protected $CI=NULL; |
This file contains 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Model extends CI_Model { | |
/** Set this to the table name that the model is mapped to */ | |
protected $tableName; | |
/** Set this to the primary key of the table for this model.*/ | |
protected $primaryKey; | |
function __construct() { | |
parent::__construct(); |
This file contains 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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* MY_Pagination Class | |
* | |
* Extends Pagination library | |
* | |
*/ | |
class MY_Pagination extends CI_Pagination { | |
public $add_query_string = FALSE; |
This file contains 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 | |
function route_url($segments, $slash = true) { | |
$CI =& get_instance(); | |
$routes = $CI->router->routes; | |
$toReturn = false; | |
foreach ($routes as $route => $arch) { |
This file contains 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* CodeIgniter Native Session Library | |
* | |
* @package Session | |
* @subpackage Libraries | |
* @category Session | |
* @author Topic Deisgn | |
*/ |
NewerOlder