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 home extends Module | |
{ | |
protected $template = false; | |
public function __default() | |
{ | |
} |
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 logout extends Module | |
{ | |
public function __default() | |
{ | |
// Saves the error | |
if (isset($_SESSION['__error'])) | |
{ | |
$error = $_SESSION['__error']; |
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
// Display any errors that may be available | |
if ($('#error_type').length == 1) | |
{ | |
var error_type = $('#error_type').val(); | |
var launch_invite = $('#error_code').length == 1 | |
// Pulls up the invite dialog | |
if (launch_invite && error_type != 'user_exists') | |
{ | |
$('#claim-form input[name=code]').val($('#error_code').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
<?php | |
require_once 'pickles.php'; | |
// Includes our vendor paths | |
set_include_path( | |
get_include_path() | |
. PATH_SEPARATOR . SITE_PATH . 'vendors/abraham/twitteroauth/twitteroauth/' | |
// . PATH_SEPARATOR . SITE_PATH . 'vendors/openid/openid/' | |
); |
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 | |
$date = strtotime('2009-12-29'); | |
while ($date <= strtotime('2011-01-11')) | |
{ | |
// Stuffs... | |
$date = strtotime(date('r', $date) . ' +1 day'); | |
} |
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 Utilities | |
{ | |
public static function sortAssociativeArray(&$array, $sort_key) | |
{ | |
usort( | |
$array, | |
create_function( | |
'$a, $b', |
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 event_vote extends UserModule | |
{ | |
public function __default() | |
{ | |
if (isset($_POST['id'])) | |
{ | |
$vote = new Vote(array('event_id' => $_POST['id'], 'user_id' => $_SESSION['__user']['id'])); |
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 | |
$comment = new Comment(array('event_id' => $_POST['event_id'], 'user_id' => $_SESSION['__user']['id'], 'comment' => $comment)); | |
if ($comment->count() == 0) | |
{ | |
$comment->record['event_id'] = $_POST['event_id']; | |
//$comment->record['parent_id'] = $_POST['comment_id']; | |
$comment->record['user_id'] = $_SESSION['__user']['id']; | |
$comment->record['comment'] = $comment; |
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 | |
// Pulls the comments | |
$comment = new Comment(array('conditions' => array('event_id' => $_GET['id']), 'order' => array('id DESC'))); | |
$comments = array(); | |
// Extracts the user IDs for the comments and creates index values | |
while ($comment->record) | |
{ | |
$user_ids[] = $comment->record['user_id']; |
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 Utility | |
{ | |
/** | |
* Get Time | |
* | |
* Sets the timezone to Eastern time, grabs the date/time and resets the | |
* timezone setting. Helps out by normalizing timestamps across multiple | |
* timezones since the site sets the timezone to local time. |