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 | |
function module_img( $image = '', $module = '' ) | |
{ | |
if (strlen($image) > 0 && array_key_exists('DOCUMENT_ROOT', $_SERVER) ) | |
{ | |
$file_path = module_file_path ('module', 'assets/images/' . $image ); | |
$file_path = substr ( $file_path, 0, strlen($_SERVER['DOCUMENT_ROOT']) ); |
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
public function search() | |
{ | |
Console::log($this->input->get_post('search_feeds')); | |
$data = array( | |
'search_feeds' => $this->input->get_post('search_feeds') | |
); | |
Console::log($data); | |
$this->form_validation->set_data($data); |
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
//Attempts to figure out Base URL Automagically | |
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); | |
$config['base_url'] .= "://".$_SERVER['HTTP_HOST']; | |
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']); |
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 SmartPageRoutes($action, $slug=NULL, $filename=NULL, $page=NULL) | |
{ | |
if($slug!=NULL) $slug = $this->_generateSlug($slug); | |
// Add link to routes file | |
$routeFile = '../primary_app/config/routes.php'; | |
$arr = file($routeFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); | |
foreach ($arr as $key => $line) | |
{ | |
if($action == 'add') |
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
/** | |
* Form Validation callback to format phone numbers properly. | |
* | |
* @param string $number Current phone number, should be 10 chars | |
* | |
* @return string|bool Formatted phone number in (XXX)-XXX-XXXX or FALSE if failed. | |
*/ | |
public function _phone_formater($number = '') | |
{ | |
$len = strlen($number); |
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 if ( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' ); | |
// ------------------------------------------------------------------------ | |
/** | |
* Mobbr APC Output caching class | |
* | |
* @package CodeIgniter | |
* @subpackage Libraries | |
* @category Core | |
* @author Patrick Savalle |
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
/** | |
* Sends email after successful contact | |
* | |
* @param array $data Form Post Variables to send in email. | |
* | |
* @example input $data requires the following fields | |
*<code> | |
* $data = array( | |
* 'to' => '', // either string or array |
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
"use strict"; | |
if ($("#affiliates_company_phone").length > 0) | |
{ | |
$("#affiliates_company_phone").keyup(function() { | |
var curchr = this.value.length; | |
var curval = $(this).val(); |
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
Show hidden characters
{ | |
"cmd": ["grunt", "develop"], | |
"selector": ["source.js", "source.less", "source.json"], | |
"path": "/usr/bin" | |
} |
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
/** | |
* @property CI_DB_active_record $db | |
* @property CI_DB_forge $dbforge | |
* @property CI_Benchmark $benchmark | |
* @property CI_Calendar $calendar | |
* @property CI_Cart $cart | |
* @property CI_Config $config | |
* @property CI_Controller $controller | |
* @property CI_Email $email |