Skip to content

Instantly share code, notes, and snippets.

View NaszvadiG's full-sized avatar

Naszvadi Gábor NaszvadiG

View GitHub Profile
<?php
/**
* Generate an encryption key for CodeIgniter.
* http://codeigniter.com/user_guide/libraries/encryption.html
*/
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP
function generate_token ($len = 32)
{
<?php if(! defined('BASEPATH')) exit();
class Browsercache
{
private $ci;
function __construct()
{
$this->ci =& get_instance();
}
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Backup {
private $path;
private $default;
var $CI;
public function getPath() {
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Base Admin Controller
*
*/
class GRR_Admin_Controller extends CI_Controller
{
/**
* Assets (JS/CSS) from the Controllers
*
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Authors Model
*
* All model methods related to authors.
*
* @license Commercial
* @author Mike Funk
* @link http://xulonpress.com
* @email webmaster@xulonpress.com
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter Better Form Validation
*
* @package CodeIgniter
* @author Sepehr Lajevardi <me@sepehr.ws>
* @copyright Copyright (c) 2012 Sepehr Lajevardi.
* @license http://codeigniter.com/user_guide/license.html
* @link https://github.com/sepehr/ci-form-validation
* @version Version 1.0
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter Drupal-inspited Form API plus Bootstrap integration
*
* NOTE: This library does not provide utilities to protect forms
* against CSRF attacks. Make sure that you already turned CI's CSRF
* protection ON.
*
* @package CodeIgniter
* @author Sepehr Lajevardi <me@sepehr.ws>
@NaszvadiG
NaszvadiG / user.php
Created September 6, 2013 23:01 — forked from dimak57/user.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
* statuses:
* 0 - banned
* 1 - member
* 2 - moderator
* 3 - admin
*
*
@NaszvadiG
NaszvadiG / gist:6807981
Last active January 25, 2024 23:41 — forked from ffub/gist:1084424
Balsamiq HTML export
#!/usr/bin/php
<?php
error_reporting(E_ALL);
if (count($argv) <= 1) {
print("usage createMockup src_dir dst_dir images_dir\n");
print("\tsrc_dir : dir where all bmml file are\n");
print("\tdst_dir : dir where write all html files\n");
print("\timages_dir : dir where all export mockup png are (will be copied to the \$dst_dir/images directory)\n");
exit(1);
}
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author Rick Ellis
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://www.codeignitor.com/user_guide/license.html