Skip to content

Instantly share code, notes, and snippets.

View iammerrick's full-sized avatar

Merrick Christensen iammerrick

View GitHub Profile
function concept($arg, $arg2, $arg3) // Variable amount of parameters
{
foreach($params as $param)
{
echo $param;
}
}
switch ($this->permissions->user_type)
{
case 1:
case 2:
// Global User or Chair
$this->load_global_view($sort);
break;
case 3:
$this->load_faculty_view($sort);
Number.implement({
toFriendly: function(){
switch(this.toInt() + 1)
{
case 1:
return "first";
break;
case 2:
return "second";
var getImage = new Request({
url: '<?php echo base_url(); ?>media/get_photo/',
method: 'post',
onSuccess: fuction(responseText, responseHTML){
$('photo_holder').set('html', responseText);
}
});
var Video = new Class({
initialize: function(url, preview){
this.element = new Element('div',{
'class': 'help_video'
});
new Swiff('swf/player.swf', {
container: this.element,
width: 918,
var MoreForms = new Class({
Implements: [Options,Events],
options: {
clone: '.clone_form',
trigger: '.clone_trigger',
destroy_trigger: 'destroy_trigger',
startArray : ''
},
function determine_pay(average)
{
var action = age > 25 ? 'divide' : 'multiply';
if(action === 'divide')
{
return age / average;
}
if(action === 'multiply')
var GoalForm = new Class({
Implements: [Options, Events],
options:{
},
initialize: function(element, options){
this.setOptions(options);
this.element = $(element);
function is_news()
{
global $wp_query;
$categories = get_the_category($wp_query->post->ID);
foreach($categories as $category)
{
if($category->cat_ID)
{
return true; // Kenneth will this exit the is_news function and return true or just the foreach closure?
}
public static function get_relative_month()
{
$count = 31; // Generally 31 days in a month.
$month = array();
for ($i = 0; $i < $count; $i++)
{
if(($i % $count) < ($count / 2))
{
$month[self::subtract_day($i)] = date('j', self::subtract_day($i));