This file contains hidden or 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 | |
/** | |
* HTML template for the install | |
* | |
* @package Install | |
* @category Helper | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2014 Open Classifieds Team | |
* @license GPL v3 | |
*/ |
This file contains hidden or 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 | |
/** | |
* HTML template for the install | |
* | |
* @package Install | |
* @category Helper | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2014 Open Classifieds Team | |
* @license GPL v3 | |
*/ |
This file contains hidden or 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 | |
/** | |
* HTML template for the install | |
* | |
* @package Install | |
* @category Helper | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2014 Open Classifieds Team | |
* @license GPL v3 | |
*/ |
This file contains hidden or 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 | |
/* | |
EmailAddressValidator Class | |
http://code.google.com/p/php-email-address-validation/ | |
Released under New BSD license | |
http://www.opensource.org/licenses/bsd-license.php | |
This file contains hidden or 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
//from https://github.com/peachananr/loading-bar | |
//I have recoded it a bit since uses a loop each, which is not convenient for me at all | |
$(function(){ | |
$("a.ajax-load").click(function(e){ | |
e.preventDefault(); | |
button = $(this); | |
//get the link location that was clicked | |
pageurl = button.attr('href'); | |
//to get the ajax content and display in div with id 'content' |
This file contains hidden or 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 | |
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); | |
ini_set('display_errors', 1); | |
function formatcurrency($floatcurr, $curr = 'USD') | |
{ | |
/** | |
* A list of the ISO 4217 currency codes with symbol,format and symbol order |
This file contains hidden or 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 | |
/** | |
* Class to improve the seo of the site | |
* | |
* @package OC | |
* @category SEO | |
* @author Chema <[email protected]> | |
* @version 1.0 | |
* @date 21-02-2014 | |
* @url http://garridodiaz.com/phpseo/ |
This file contains hidden or 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
function getElementsByClassName(node, classname) { | |
if (node.getElementsByClassName) { | |
return node.getElementsByClassName(classname); | |
} else { | |
return (function getElementsByClass(searchClass, node) { | |
if (node == null) | |
node = document; | |
var classElements = [], | |
els = node.getElementsByTagName("*"), | |
elsLen = els.length, |
This file contains hidden or 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
//normal | |
$dates = date_range(strtotime('-1 month'), time()); | |
//advanced, using all parameters | |
$dates = date_range(strtotime('-1 month'), time(),'+1 day','Y-m-d',array('date'=>0,'count'=> 0),'date'); | |
/** | |
* get an array range with dates in a specific format | |
* @param string $start from | |
* @param string $end to |
This file contains hidden or 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 | |
//main class to extend usage | |
require 'remodel.php'; | |
//loading library predis: https://github.com/nrk/predis | |
require 'predis-0.8/autoload.php'; | |
Predis\Autoloader::register(); | |
///MODEL EXAMPLE | |
class Model_Post extends Remodel { |