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 upload() | |
{ | |
$signID = isset( $_POST['signID'] ) ? $_POST['signID'] : false ; | |
$uploaddir = '/uploads/'; | |
$file = basename($_FILES['file']['name']); | |
$uploadfile = $uploaddir . $file; | |
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) { | |
sendResponse(200, 'Upload Successful'); |
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
- (IBAction)btnConvert:(id)sender { | |
NSString *urlString = urlField.text; | |
answerData = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]; | |
html = [[NSString alloc] initWithData:answerData encoding:NSUTF8StringEncoding]; | |
NSLog(@"Source: %@", html); | |
NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:@"((?<=ansMap\\[\\d] = ')|(?<=ansMap\\[\\d\\d] = '))\\w+" options:NSRegularExpressionAnchorsMatchLines error:NULL]; | |
NSArray *numberOfMatches = [regexp matchesInString:html options:0 range:NSMakeRange(0, [html length])]; |
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
// Calls the loadGames method in CheckInViewController | |
UITabBarController *tabBarController = (UITabBarController *)self.presentingViewController; | |
UINavigationController *navController = [tabBarController.viewControllers objectAtIndex:0]; | |
CheckInViewController *checkInViewController = [navController.viewControllers objectAtIndex:0]; | |
SettingsTableViewController *settingsTableViewController = [navController.viewControllers objectAtIndex:0]; | |
[checkInViewController loadGames]; | |
[settingsTableViewController loadSettings]; |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; | |
} | |
// Configure the cell... | |
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
// | |
// CheckInViewController.m | |
// Hiskor | |
// | |
// Created by SuchyMac3 on 2/28/13. | |
// Copyright (c) 2013 ITP. All rights reserved. | |
// | |
#import "CheckInViewController.h" | |
#import "ZBarReaderViewController.h" |
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
- (void)loadGames { | |
NSString *userID = [Lockbox stringForKey:kUserIDKeyString]; | |
NSString *type = @"game"; | |
NSLog(@"UserID: %@", userID); | |
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: | |
userID, @"userID", | |
type, @"type", | |
nil]; |
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
#pragma mark - Table view data source | |
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
// Return the number of sections. | |
return 1; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ |
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 | |
function game() { | |
global $db; | |
if ($_SERVER['REQUEST_METHOD'] == "POST") { | |
$userID = isset( $_POST['userID'] ) ? $_POST['userID'] : false ; | |
if ( !$userID ) { | |
header('Content-type: application/json'); |
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 ($_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()) { |
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 | |
$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>"; | |
} |