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 | |
/** | |
* Created by PhpStorm. | |
* User: Craig | |
* Date: 10/17/2014 | |
* Time: 8:36 PM | |
*/ | |
class DB { |
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 Brewery { | |
private $key; | |
private $url = 'http://api.brewerydb.com/v2/'; | |
public function __construct($key) { | |
$this->key = $key; |
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
public function postDelete(){ | |
$id = Input::get('id'); | |
try{ | |
$equipment = Equipment::findOrFail($id); | |
$equipment -> delete(); | |
} | |
catch(Exception $e){ | |
return Redirect::to('inventory/equipment')->with(array('status' => 201, 'message' => 'Failed to Delete Equipment', 'error' => $e)); | |
} |
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
public function postDelete(){ | |
$id = Input::get('id'); | |
try{ | |
$equipment = Equipment::findOrFail($id); | |
$equipment -> delete(); | |
} | |
catch(Exception $e){ | |
//return Response::json(array('status' => 400, 'message' => 'equipment not found', 'error' => $e), 400); | |
return Redirect::to('inventory/equipment')->with(array('status' => 201, 'message' => 'Failed to Delete Equipment', 'error' => $e)); | |
} |
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
message = '''From: Bosapp Portal <[email protected]> | |
Subject: Password recovery | |
MIME-Version: 1.0 | |
Content-type: text/html | |
<html> | |
<body> | |
<a href={0}>Here is your password reset link.</a> <br /> | |
<img src=http://static.giantbomb.com/uploads/original/1/17172/1419618-unicorn2.jpg> <br /> | |
</body> |
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 payroll_table(data, s_date) { | |
var html = '<table class="table table-striped table-bordered tablesorter" cellspacing="0" cellpadding="0" id="payrollTable">\ | |
<thead>\ | |
<tr>\ | |
<th width="175px">Employee</th>\ | |
<th colspan="7"></th>\ | |
</tr>\ | |
</thead>\ | |
<tbody>'; |
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 django.http import HttpResponse | |
from scheducal.models import Category | |
from scheducal.lib.obj_helper import get_obj_or_none | |
from scheducal.forms.category import CategoryForm | |
from django.utils import simplejson | |
from django.core import serializers | |
from django.views.decorators.http import require_http_methods | |
from django.views.decorators.csrf import csrf_exempt | |
@require_http_methods(['GET']) |
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 django.conf.urls import( | |
patterns, | |
url, | |
include, | |
) | |
from tokenauth import views | |
urlpatterns = patthers('tokenauth.views', | |
url(r'^login/$', | |
views.login.as_view(), |