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 / index.html
Created September 14, 2013 13:02
A Pen by terryyounghk.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>File Uploader</title>
<style>
/* Style for demo, not required */
body { font-size: 62.5%; margin: 50px; }
fieldset { padding: .6em 0;border:0;border-top: 1px dotted #ddd; }
legend { font-size: 1.5em; font-weight: bold; color: #555; padding: .5em 1em .5em 0; background: #fff; }