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 | |
/* | |
* Name: phpMyDB | |
* URL: http://neo22s.com/phpmydb/ | |
* Version: v1.1 | |
* Date: 21/11/2010 | |
* Author: Chema Garrido | |
* License: GPL v3 | |
* Notes: Mysql Object with cache integrated |
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 | |
/** | |
* BBcode helper class | |
* | |
* @package BBcode | |
* @category Helper | |
* @author Chema <chema@garridodiaz.com> | |
* @copyright (c) 2012 | |
* @license GPL v3 | |
*/ |
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 | |
/** | |
* | |
* SEO report for different metrics | |
* | |
* @category SEO | |
* @author Chema <chema@garridodiaz.com> | |
* @copyright (c) 2009-2012 Open Classifieds Team | |
* @license GPL v3 | |
* Based on seo report script http://www.phpeasycode.com && PHP class SEOstats |
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 | |
/** | |
* ultra light captcha class | |
* | |
* @package Open Classifieds | |
* @subpackage Core | |
* @category Helper | |
* @author Chema Garrido <chema@garridodiaz.com> | |
* @license GPL v3 |
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 | |
//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 { |
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
//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 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 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 <chema@open-classifieds.com> | |
* @version 1.0 | |
* @date 21-02-2014 | |
* @url http://garridodiaz.com/phpseo/ |
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 | |
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 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' |
OlderNewer