Skip to content

Instantly share code, notes, and snippets.

View anthonycvella's full-sized avatar

Anthony Vella anthonycvella

View GitHub Profile
Warning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/Hiskor_Admin/addTicket.php:32) in /Applications/XAMPP/xamppfiles/htdocs/Hiskor_Admin/BarcodeQR.php on line 86
�PNG  IHDR���c��bKGD��������IDATx���A��0@Ѥ����.�C:�m���mg�}Y������zP���`��y�I�'a��y�I�'a��y�I�'a��y�I�'a��y�I�'a����x>��o��6�m�j��C]g��A�0O�< �$̛0�٘��dZ1�0n���b�I�'a��y��3�~�O[����F?c�I�'a��y˧3������?�i1 �$̓0O¼�tf�&�a�g�I�'a��y˧3W-|��_F��nK9Fa��y�I�7:s�:��k�����0O�< �$̛0���j�w�컹�0O�< �$�;��37��r��V+�y�I�'a�s��v��ͺ3D��� ������H�'a���M�~��y9ҡϽ|g�Q�'a��y�MX�9�y���L��L��Fa��y�I���ʦ���y�V�ϝ����bvc�I�'a��yg��Lt�F��ޘxT_1 �$̓0O¼�[�׹�9�ug�~�(̓0O�< �>���A9���c6��< �$̓0/�D���j���M�!a��y��A9��1���lX�� �$̓0/<�YwϚ�����0O�< �>����F.G��R� �0O�< �$��_�l:�r$W6q��y�I��� �y�I�'a��y�I�'a��y�I�'a��y�I�'a��y�I�'a��y����$.��[ IEND�B`�1
<?php
session_start();
if(!isset($_SESSION['loggedIn']) || $_SESSION['loggedIn']!=1)
{
header("Location: login.php");
exit();
}
$included = 'true';
<?php if(isset($_SESSION['ticketCode'])) : ?>
<p><?php echo $_SESSION['ticketCode']; ?></p>
<p><?php echo $qr->draw(); unset($_SESSION['ticketCode']); ?></p>
<?php endif; ?>
@anthonycvella
anthonycvella / LoginViewController.mm
Created February 13, 2013 18:14
Anthony Vella : Hiskor - Client/Server Architecture Code Note: I plan on moving my networking code to its own class once I finish working on my PHP backend.
//
// LoginViewController.m
// Hiskor
//
// Created by Anthony Vella on 1/29/13.
// Copyright (c) 2013 ITP. All rights reserved.
//
#import "LoginViewController.h"
#import "AFHTTPClient.h"
<?php
$query = $db->query("SELECT * FROM `schools`", false)->execute();
echo "<label for=\"username\">Home School:</label>";
echo "<select name=\"homeSchool\" class=\"addGameField\">";
if ($db->getTotalRows($query)) {
while ($result = $db->fetch($query)) {
echo "<option value=".$result['schoolID'].">".$result['schoolName']."</option>";
}
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$gameID = generateID();
$createdOn = time();
$homeSchoolID = $_POST['homeSchoolID'];
$awaySchoolID = $_POST['awaySchoolID'];
$numberOfTickets = $_POST['numberOfTickets'];
$db->query("SELECT gameID FROM games WHERE `gameID`=?")->bind(1, $gameID)->execute();
if ($db->getTotalRows()) {
<?php
function game() {
global $db;
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$userID = isset( $_POST['userID'] ) ? $_POST['userID'] : false ;
if ( !$userID ) {
header('Content-type: application/json');
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
- (void)loadGames {
NSString *userID = [Lockbox stringForKey:kUserIDKeyString];
NSString *type = @"game";
NSLog(@"UserID: %@", userID);
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
userID, @"userID",
type, @"type",
nil];
//
// CheckInViewController.m
// Hiskor
//
// Created by SuchyMac3 on 2/28/13.
// Copyright (c) 2013 ITP. All rights reserved.
//
#import "CheckInViewController.h"
#import "ZBarReaderViewController.h"