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
/** | |
* @author wwatson | |
* | |
* the semicolon at the beginning is there on purpose in order to protect the | |
* integrity of the script when mixed with incomplete objects, arrays, etc. | |
* | |
*/ | |
;(function($) { |
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
//Codeigniter, a clever way to get data out of the Request URI. | |
private function getRequests(){ | |
//get the default object | |
$CI =& get_instance(); | |
//declare an array of request and add add basic page info | |
$requestArray = array(); | |
$requests = $CI->uri->segment_array(); | |
foreach ($requests as $request) | |
{ |
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
//searchin' for what? | |
$id = $_REQUEST['id']; | |
//no layout, via AJAX | |
$this->render_layout=false; | |
//No id to request | |
if (!$id) exit; | |
//leads by service | |
$leads_by_service = array(); | |
//find reseller by id | |
$reseller = new Reseller; |
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
<script language="javascript" type="text/javascript"> | |
jQuery.noConflict(); | |
function fill_leads(reseller_id){ | |
jQuery.getJSON('/resellers/grab_leads/' + reseller_id, function(data) { | |
jQuery.each(data, function(key, val) { | |
jQuery('#service_leads_' + reseller_id + '_' + key).html(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
function display_object($object,$parameters,$action=null){ | |
//this is all a bit redundant, on purpose i guess... | |
$partial[name] = strtolower( get_class($object) ) . strtolower($action?"_{$action}":""); | |
//view to render | |
$partial[filename] = "{$partial_name}.phtml"; | |
//path to check with file_exists | |
$partial[path] = TRAX_ROOT . "/app/views/includes/" . $partial[filename]; | |
//path within app to use with render_partial | |
$partial[relative] = "includes/" . $partial[filename]; |
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
var DERP = { | |
serialize : function(a1){t=[];for(x in a1)t.push(x+"="+encodeURI(a1[x]));return t.join("&");} | |
}; |
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
if (!Object.create) {Object.create = function (o) {if (arguments.length > 1) {throw new Error('Object.create implementation only accepts the first parameter.');}function F() {}F.prototype = o;return new F();};} |
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 ($_GET['id']) push_out( read_record($_GET['id'])); | |
if ($_POST){ | |
if (is_numeric($_POST['id'])){ | |
//update record | |
push_out(json_encode(save_record($_POST))); | |
}elseif(is_numeric($_POST['_delete_record'])){ |
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
/* | |
Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/. | |
Based on a script from http://www.kryogenix.org/code/browser/sorttable/. <-- this script didn't offer dynamic sorting! | |
Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html . | |
Copyright (c) 1997-2007 Stuart Langridge, Joost de Valk. | |
Version 1.5.7 | |
* 8-22-2012 Modified for LV |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<title>LIGHTBOX EXAMPLE</title> | |
<style> | |
.black_overlay{ | |
display: none; | |
position: absolute; | |
top: 0%; | |
left: 0%; |
OlderNewer