Skip to content

Instantly share code, notes, and snippets.

View NaszvadiG's full-sized avatar

Naszvadi Gábor NaszvadiG

View GitHub Profile
@brandoncordell
brandoncordell / gist:799934
Created January 28, 2011 06:54
dZero Auth - CodeIgniter library
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* dZero authentication library
*
* @package dZero Auth Library
* @category authentication
* @author Daniel Nolan (daniel.nolan@dZerodesign.com) & Brandon Cordell (brandon.cordell@dZerodesign.com)
* @copyright Copyright (c) 2009 dZero Web Design & Development.
@brandoncordell
brandoncordell / gist:799936
Created January 28, 2011 06:55
dZero Image Lib - CodeIgniter Library
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* dZero image library
*
* @package dZero Image Library
* @category Image Manipulation
* @author Daniel Nolan (daniel.nolan@dZerodesign.com) & Brandon Cordell (brandon.cordell@dZerodesign.com)
* @copyright Copyright (c) 2009 dZero Web Design & Development.
* @link http://dzerodesign.com
* @version 1.0
@codersatx
codersatx / MY_Model.php
Created May 20, 2011 02:01
My base model class for my CodeIgniter-based cms.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* My Model
*
* Used as a base class for all admin or app related model functions.
*
* @author Alex Garcia
* @since 0.1
* @version 1
*/
@skunkbad
skunkbad / MY_Upload.php
Created September 15, 2011 07:01
CodeIgniter Upload class extension for FTP or Database storage
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Upload extends CI_Upload {
public $destination_not_file_system = FALSE;
public function __construct($props = array())
{
parent::__construct();
@weboAp
weboAp / Qquploadedfilexhr.php
Created September 30, 2011 16:23
Integrating ajax-upload with CodeIgniter
<?php
/**
* Handle file uploads via XMLHttpRequest
*/
class qqUploadedFileXhr {
/**
* Save the file to the specified path
* @return boolean TRUE on success
*/
@apcomplete
apcomplete / Session.php
Created November 28, 2011 20:12
Native session library for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter Native Session Library
*
* @package Session
* @subpackage Libraries
* @category Session
* @author Topic Deisgn
*/
@arjaneising
arjaneising / route_url_helper.php
Created January 7, 2012 14:58
Routed URL helper for CodeIgniter
<?php
function route_url($segments, $slash = true) {
$CI =& get_instance();
$routes = $CI->router->routes;
$toReturn = false;
foreach ($routes as $route => $arch) {
@jonatanfroes
jonatanfroes / MY_Paginations.php
Created January 18, 2012 16:29
Extend CodeIgniter Pagination to add Query String
<?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;
<?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();
@gautamk
gautamk / auth.php
Created February 4, 2012 15:10
CodeIgniter Authentication Library , application/libraries/auth.php
<?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;