This commit is contained in:
Rushabh Gosar
2022-01-07 19:52:48 -08:00
parent 75e0d2f75a
commit 8ea938029a
127 changed files with 25750 additions and 20 deletions

1
TreasureHunt/.ftpquota Normal file
View File

@@ -0,0 +1 @@
8 54300

13
TreasureHunt/Error.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
class Error
{
var $error = "";
public function reportError($err) {
var_dump($err);
echo '\n';
echo $err;
}
}
?>

View File

@@ -0,0 +1,27 @@
<?php
define ("HOSTNAME", "localhost");
define ("USERNAME", "rushjzvr_rushabh");
define ("PASSWORD", "Rushabh%1");
class Connector {
var $connection;
var $clConnection;
var $dbName = "rushjzvr_TreasureHunt";
function __construct () {
}
function runQuery($query) {
$link = mysql_connect(HOSTNAME, USERNAME, PASSWORD);
mysql_select_db($this->dbName, $link);
$result = mysql_query($query, $link);
// $this->clConnection = new mysqli(HOSTNAME, USERNAME, PASSWORD, $this->dbName);
// $result = $this->clConnection->query($query);
return $result;
}
}
?>

53
TreasureHunt/User.php Normal file
View File

@@ -0,0 +1,53 @@
<?php
require_once __DIR__ . '/PHPConnector.php';
function addUser($name, $password, $email, $location) {
$connector = new Connector();
if (!$connector) die ("");
$query = "INSERT INTO Users (username, password, email, location) VALUES ('$name', '$password', '$email', '$location')";
$res = $connector->runQuery($query, $connector->dbName);
if ( $res ) {
return "Success";
}
return "Fail";
}
function edit_loc_id($id, $location){
$connector = new Connector();
if (!$connector) die ("");
$query = "UPDATE Users SET location=".$location." WHERE id =".$id;
$res = $connector->runQuery($query, $connector->dbName);
if ( $res ) {
return "Success";
}
return "Fail";
}
function edit_loc_name($name, $location){
$connector = new Connector();
if (!$connector) die ("");
$query = "UPDATE Users SET location='".$location."' WHERE username ='".$name."'";
echo $query;
$res = $connector->runQuery($query, $connector->dbName);
if ( $res ) {
return "Success";
}
return "Fail";
}
if (isset ( $_GET['q'] )) {
if ($_GET['q'] == 'addUser') {
$res = array ( 'status' => addUser($_GET['username'], $_GET['password'], $_GET['email'], $_GET['location']) );
echo json_encode($res, JSON_PRETTY_PRINT);
} else if($_GET['q'] == 'editUser') {
if(isset($_GET['id']))
{
$res = array ( 'status' => edit_loc_id($_GET['id'], $_GET['location']) );
echo json_encode($res, JSON_PRETTY_PRINT);
} else if(isset($_GET['username']))
{
$res = array ( 'status' => edit_loc_name($_GET['username'], $_GET['location']) );
echo json_encode($res, JSON_PRETTY_PRINT);
}
}
}
?>

View File

@@ -0,0 +1,39 @@
<?php
require_once __DIR__ . '/hunt.php';
$no_nearest_hunts = getCountNearestHunts($_GET['coordinates']);
?>
<style>
body {
margin:2%;
}
#map {
background-color: #80B2CC;
float:left;
height: 40%;
width:100%;
}
div{
float:left;
margin-top: 1%;
}
.left {
float:left;
}
.right {
float:right;
}
</style>
<body>
<div id="map">
</div>
<div class="right">
Active hunts : <?php echo $no_nearest_hunts; ?>
</div>
<div class="left">
User Name : <?php echo $_GET['username']; ?>
</div>
</body>

219
TreasureHunt/error_log Normal file
View File

@@ -0,0 +1,219 @@
[05-Feb-2015 19:08:02 America/New_York] PHP Fatal error: Class 'Connector' not found in /home/rushjzvr/public_html/TreasureHunt/User.php on line 4
[05-Feb-2015 19:10:56 America/New_York] PHP Warning: require_once(/PHPConnector.php): failed to open stream: No such file or directory in /home/rushjzvr/public_html/TreasureHunt/User.php on line 2
[05-Feb-2015 19:10:56 America/New_York] PHP Fatal error: require_once(): Failed opening required '/PHPConnector.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/rushjzvr/public_html/TreasureHunt/User.php on line 2
[05-Feb-2015 19:12:54 America/New_York] PHP Warning: mysql_connect(): Unknown MySQL server host 'rushjzvr_TreasureHunt' (2) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:12:54 America/New_York] PHP Fatal error: Call to undefined function json_ecode() in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 12
[05-Feb-2015 19:14:32 America/New_York] PHP Warning: mysql_connect(): Unknown MySQL server host 'rushjzvr_TreasureHunt' (2) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:14:32 America/New_York] PHP Fatal error: Call to undefined function json_ecode() in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 12
[05-Feb-2015 19:14:35 America/New_York] PHP Warning: mysql_connect(): Unknown MySQL server host 'rushjzvr_TreasureHunt' (2) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:14:35 America/New_York] PHP Fatal error: Call to undefined function json_ecode() in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 12
[05-Feb-2015 19:16:47 America/New_York] PHP Warning: mysql_connect(): Unknown MySQL server host 'rushjzvr_TreasureHunt' (2) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:16:47 America/New_York] PHP Fatal error: Call to undefined function json_ecode() in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 12
[05-Feb-2015 19:16:49 America/New_York] PHP Warning: mysql_connect(): Unknown MySQL server host 'rushjzvr_TreasureHunt' (2) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:16:49 America/New_York] PHP Fatal error: Call to undefined function json_ecode() in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 12
[05-Feb-2015 19:27:01 America/New_York] PHP Warning: mysql_connect(): Unknown MySQL server host 'rushjzvr_TreasureHunt' (2) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:27:01 America/New_York] PHP Fatal error: Call to undefined function json_ecode() in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 12
[05-Feb-2015 19:27:46 America/New_York] PHP Warning: mysql_connect(): Can't connect to MySQL server on '129.21.23.152' (110) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 10
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on '129.21.23.152' (110) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Property access is not allowed yet in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Property access is not allowed yet in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Property access is not allowed yet in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Property access is not allowed yet in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: var_dump(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:30:48 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[05-Feb-2015 19:32:16 America/New_York] PHP Warning: mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on '129.21.23.152' (110) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[05-Feb-2015 19:32:16 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[05-Feb-2015 19:38:37 America/New_York] PHP Warning: mysql_connect(): Can't connect to MySQL server on '129.21.23.152' (110) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[05-Feb-2015 19:38:37 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:38:37 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[05-Feb-2015 19:38:44 America/New_York] PHP Warning: mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on '129.21.23.152' (110) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[05-Feb-2015 19:38:44 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[05-Feb-2015 19:39:47 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[05-Feb-2015 19:39:47 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:39:47 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[05-Feb-2015 19:39:47 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[05-Feb-2015 19:39:47 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[05-Feb-2015 19:44:11 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[05-Feb-2015 19:44:11 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[05-Feb-2015 19:44:11 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[05-Feb-2015 19:44:11 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[05-Feb-2015 19:44:11 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 11:48:24 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 11:48:24 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 11:48:24 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 11:48:24 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 11:48:24 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:22:40 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:22:40 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:22:40 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 12:22:40 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 12:22:40 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:30:02 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:30:02 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:30:02 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 12:30:02 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 12:30:02 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:30:05 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:30:05 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:30:05 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 12:30:05 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 12:30:05 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:30:11 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:30:11 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:30:11 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 12:30:11 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 12:30:11 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:40:27 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:40:27 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:40:27 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 12:40:27 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 12:40:27 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:40:30 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:40:30 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:40:30 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 12:40:30 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 17
[06-Feb-2015 12:40:30 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 12:43:45 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:43:45 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 12:43:53 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 12:43:53 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 15
[06-Feb-2015 13:05:53 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:05:53 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:05:59 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:23:48 America/New_York] PHP Parse error: syntax error, unexpected '”' (T_STRING) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 4
[06-Feb-2015 13:23:53 America/New_York] PHP Parse error: syntax error, unexpected '”' (T_STRING) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 4
[06-Feb-2015 13:24:50 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:40:37 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:40:39 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:40:41 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:41:06 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:41:06 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 13:41:06 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 18
[06-Feb-2015 13:41:06 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 13:41:06 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 21
[06-Feb-2015 13:47:43 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:47:43 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 13:47:43 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 18
[06-Feb-2015 13:47:43 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 13:47:43 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 21
[06-Feb-2015 13:51:55 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:51:55 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 13:51:55 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 18
[06-Feb-2015 13:51:55 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 13:51:55 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 21
[06-Feb-2015 13:55:12 America/New_York] PHP Warning: mysql_connect(): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 14
[06-Feb-2015 13:55:12 America/New_York] PHP Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 16
[06-Feb-2015 13:55:12 America/New_York] PHP Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 18
[06-Feb-2015 13:55:12 America/New_York] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'rushjzvr_rushabh'@'s143.web-hosting.com' (using password: YES) in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 19
[06-Feb-2015 13:55:12 America/New_York] PHP Warning: mysqli::query(): Couldn't fetch mysqli in /home/rushjzvr/public_html/TreasureHunt/PHPConnector.php on line 21
[07-Feb-2015 16:00:50 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 28
[07-Feb-2015 16:03:29 America/New_York] PHP Warning: Missing argument 1 for getNearestHunts(), called in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 53 and defined in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 37
[07-Feb-2015 16:10:10 America/New_York] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:10:32 America/New_York] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:10:33 America/New_York] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:10:34 America/New_York] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:10:35 America/New_York] PHP Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:12:15 America/New_York] PHP Fatal error: Call to undefined method Connector::mysql_fetch_object() in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:16:53 America/New_York] PHP Warning: mysql_fetch_row() expects parameter 1 to be resource, object given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:16:54 America/New_York] PHP Warning: mysql_fetch_row() expects parameter 1 to be resource, object given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 16:16:55 America/New_York] PHP Warning: mysql_fetch_row() expects parameter 1 to be resource, object given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 44
[07-Feb-2015 17:35:10 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:35:21 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:35:31 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:35:32 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:35:33 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:35:33 America/New_York] PHP Parse error: syntax error, unexpected 'var' (T_VAR) in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:36:09 America/New_York] PHP Parse error: syntax error, unexpected ',' in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 39
[07-Feb-2015 17:41:11 America/New_York] PHP Parse error: syntax error, unexpected '}' in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 63
[07-Feb-2015 21:12:34 America/New_York] PHP Warning: Missing argument 1 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:34 America/New_York] PHP Warning: Missing argument 2 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:34 America/New_York] PHP Warning: Missing argument 3 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:34 America/New_York] PHP Warning: Missing argument 4 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:34 America/New_York] PHP Warning: Missing argument 5 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:34 America/New_York] PHP Warning: Missing argument 6 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:55 America/New_York] PHP Warning: Missing argument 1 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:55 America/New_York] PHP Warning: Missing argument 2 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:55 America/New_York] PHP Warning: Missing argument 3 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:55 America/New_York] PHP Warning: Missing argument 4 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:55 America/New_York] PHP Warning: Missing argument 5 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:55 America/New_York] PHP Warning: Missing argument 6 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:56 America/New_York] PHP Warning: Missing argument 1 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:56 America/New_York] PHP Warning: Missing argument 2 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:56 America/New_York] PHP Warning: Missing argument 3 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:56 America/New_York] PHP Warning: Missing argument 4 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:56 America/New_York] PHP Warning: Missing argument 5 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:56 America/New_York] PHP Warning: Missing argument 6 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:57 America/New_York] PHP Warning: Missing argument 1 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:57 America/New_York] PHP Warning: Missing argument 2 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:57 America/New_York] PHP Warning: Missing argument 3 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:57 America/New_York] PHP Warning: Missing argument 4 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:57 America/New_York] PHP Warning: Missing argument 5 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:12:57 America/New_York] PHP Warning: Missing argument 6 for img(), called in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 16 and defined in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 4
[07-Feb-2015 21:20:40 America/New_York] PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource, object given in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 10
[07-Feb-2015 21:20:40 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/rushjzvr/public_html/TreasureHunt/testimg.php:2) in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 13
[07-Feb-2015 21:21:32 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/rushjzvr/public_html/TreasureHunt/testimg.php:2) in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 13
[07-Feb-2015 21:21:55 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/rushjzvr/public_html/TreasureHunt/testimg.php:2) in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 13
[07-Feb-2015 21:25:12 America/New_York] PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 21
[07-Feb-2015 21:25:59 America/New_York] PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 22
[07-Feb-2015 21:26:30 America/New_York] PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 13
[07-Feb-2015 21:26:31 America/New_York] PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 13
[07-Feb-2015 21:26:32 America/New_York] PHP Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 13
[07-Feb-2015 21:26:57 America/New_York] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, object given in /home/rushjzvr/public_html/TreasureHunt/testimg.php on line 10
[08-Feb-2015 13:16:05 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:06 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:07 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:08 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:09 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:10 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:11 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:12 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:13 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:14 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:15 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:16 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:17 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:18 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:19 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:20 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:21 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:22 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:23 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:24 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:16:25 America/New_York] PHP Parse error: syntax error, unexpected '{', expecting '(' in /home/rushjzvr/public_html/TreasureHunt/User.php on line 40
[08-Feb-2015 13:25:09 America/New_York] PHP Warning: Missing argument 4 for addUser(), called in /home/rushjzvr/public_html/TreasureHunt/User.php on line 38 and defined in /home/rushjzvr/public_html/TreasureHunt/User.php on line 3
[08-Feb-2015 14:18:29 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:10:14 America/New_York] PHP Parse error: syntax error, unexpected ';', expecting ')' in /home/rushjzvr/public_html/TreasureHunt/dashboard.php on line 3
[08-Feb-2015 15:11:02 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:16:13 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:17:22 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:17:24 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:18:30 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:18:32 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:19:13 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:19:15 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:19:16 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:19:17 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:19:20 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:20:19 America/New_York] PHP Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 52
[08-Feb-2015 15:28:46 America/New_York] PHP Parse error: syntax error, unexpected ';' in /home/rushjzvr/public_html/TreasureHunt/dashboard.php on line 3
[08-Feb-2015 16:15:55 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:15:55 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:18:16 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:18:16 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:18:51 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:18:51 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:22:13 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:22:13 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:22:20 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30
[08-Feb-2015 16:22:20 America/New_York] PHP Warning: explode() expects parameter 2 to be string, resource given in /home/rushjzvr/public_html/TreasureHunt/hunt.php on line 30

108
TreasureHunt/hunt.php Normal file
View File

@@ -0,0 +1,108 @@
<?php
require_once __DIR__ . '/PHPConnector.php';
function addHunt($name, $image, $hint, $coordinates, $created_user, $count_finished_users, $image_type) {
$connector = new Connector();
if (!$connector) die ("");
$query = "INSERT INTO Hunt (id, name, image, hint, coordinates, created_user, count_finished_users, show_user, image_type) VALUES (null,'$name', '$image', '$hint', '$coordinates', '$created_user', '$count_finished_users', '$show_user','$image_type')";
$res = $connector->runQuery($query, $connector->dbName);
if ( $res ) {
return "Success";
}
return "Fail";
}
function getHunt($id) {
$connector = new Connector();
if (!$connector) die ("");
$query = "SELECT * FROM `Hunt` WHERE `id` = $id";
$res = $connector->runQuery($query, $connector->dbName);
if ( $res ) {
return $res;
}
return null;
}
function rad($a) {
return $a * 3.14 / 180;
}
function getDistance($p1, $p2){
$p1 = explode(",", $p1);
$p2 = explode(",", $p2);
$R = 6378137;
$dLat = rad($p2[0] - $p1[0]);
$dLong = rad($p2[1] - $p1[1]);
$a = sin($dLat / 2) * sin($dLat / 2) +
cos(rad($p1[0])) * cos(rad($p2[0])) *
sin($dLong / 2) * sin($dLong / 2);
$c = 2 * atan2(sqrt($a), sqrt(1 - $a));
$d = $R * $c;
//echo $d."<br />"; // returns the distance in meter
return $d;
}
function getNearestHunts($coord){
$connector = new Connector();
if (!$connector) die ("");
$query = "SELECT * FROM Hunt";
$hunts = $connector->runQuery($query, $connector->dbName);
$nearest_hunts[] = null;
while ($row = mysql_fetch_row($hunts)) {
$dist = getDistance($coord, $row[4]);
if($dist < 10*160000) {
$nearest_hunts[] = $row;
}
}
return $nearest_hunts;
}
function checkinHunt($username,$coord){
$nearest_hunts = getNearestHunts($coord);
foreach($nearest_hunts as $nh)
{
$dist = getDistance($coord, $nh[4]);
if($dist < 50) {
$hunts[] = $nh[1];
}
}
return $hunts;
}
function getCountNearestHunts($coord)
{
$nearest_hunts = getNearestHunts($coord);
return (count( $nearest_hunts)-1);
}
if (isset ( $_POST['q'] )) {
if ($_POST['q'] == 'addHunt') {
$res = array ( 'status' => addHunt($_POST['name'], $_POST['image'], $_POST['hint'], $_POST['coordinates'], $_POST['created_user'], $_POST['count_finished_users'], $_POST['image_type']) );
echo json_encode($res, JSON_PRETTY_PRINT);
}
}
if($_GET['q'] == 'getNearestHunts'){
$coord = $_GET['coord'];
$res = array ( 'status' => getNearestHunts($coord) );
echo json_encode($res, JSON_PRETTY_PRINT);
}
if($_GET['q'] == 'checkinHunt'){ //http://rushg.me/TreasureHunt/hunt.php?username=rushabh&coord=0,0&q=checkinHunt
$coord = $_GET['coord'];
$username = $GET['username'];
$res = array ( 'status' => checkinHunt($GET['username'],$coord) );
echo json_encode($res, JSON_PRETTY_PRINT);
}
?>

154
TreasureHunt/index_old.php Normal file
View File

@@ -0,0 +1,154 @@
<html>
<head><title>File Insert</title></head>
<body>
<h3>Please Choose a File and click Submit</h3>
<form enctype="multipart/form-data" action=
"<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
<input name="userfile" type="file" />
<input type="submit" value="Submit" />
</form>
<?php
// check if a file was submitted
if(!isset($_FILES['userfile']))
{
echo '<p>Please select a file</p>';
}
else
{
try {
$msg= upload(); //this will upload your image
echo $msg; //Message showing success or failure.
}
catch(Exception $e) {
echo $e->getMessage();
echo 'Sorry, could not upload file';
}
}
// the upload function
function upload12() {
include "file_constants.php";
$maxsize = 10000000; //set to approx 10 MB
//check associated error code
if($_FILES['userfile']['error']==UPLOAD_ERR_OK) {
//check whether file is uploaded with HTTP POST
if(is_uploaded_file($_FILES['userfile']['tmp_name'])) {
//checks size of uploaded image on server side
if( $_FILES['userfile']['size'] < $maxsize) {
//checks whether uploaded file is of image type
//if(strpos(mime_content_type($_FILES['userfile']['tmp_name']),"image")===0) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
if(strpos(finfo_file($finfo, $_FILES['userfile']['tmp_name']),"image")===0) {
// prepare the image for insertion
$imgData =addslashes (file_get_contents($_FILES['userfile']['tmp_name']));
// put the image in the db...
// database connection
mysql_connect($host, $user, $pass) OR DIE (mysql_error());
// select the db
mysql_select_db ($db) OR DIE ("Unable to select db".mysql_error());
// our sql query
$sql = "INSERT INTO imageStore2
(image, name)
VALUES
('{$imgData}', '{$_FILES['userfile']['name']}');";
// insert the image
mysql_query($sql) or die("Error in Query: " . mysql_error());
$msg='<p>Image successfully saved in database with id ='. mysql_insert_id().' </p>';
}
else
$msg="<p>Uploaded file is not an image.</p>";
}
else {
// if the file is not less than the maximum allowed, print an error
$msg='<div>File exceeds the Maximum File limit</div>
<div>Maximum File limit is '.$maxsize.' bytes</div>
<div>File '.$_FILES['userfile']['name'].' is '.$_FILES['userfile']['size'].
' bytes</div><hr />';
}
}
else
$msg="File not uploaded successfully.";
}
else {
$msg= file_upload_error_message($_FILES['userfile']['error']);
}
return $msg;
}
function base64_to_image( $imageData ) {
//$imgData = addslashes (file_get_contents($_FILES['userfile']['tmp_name']));
// put the image in the db...
// database connection
$host="rus1311807231982.db.10917081.hostedresource.com";
$user="rus1311807231982";
$pass="Rushabh%1";
$db="rus1311807231982";
mysql_connect($host, $user, $pass) OR DIE (mysql_error());
// select the db
mysql_select_db ($db) OR DIE ("Unable to select db".mysql_error());
// our sql query
$sql = "INSERT INTO imageStore2
(image, name)
VALUES
('{$imageData}', 'anyName1');";
// insert the image
mysql_query($sql) or die("Error in Query: " . mysql_error());
$msg='<p>Image successfully saved in database with id ='. mysql_insert_id().' </p>';
echo $msg;
}
if (isset($_POST['image'])) {
base64_to_image($_POST['image']);
}
else
die("no image data found");
// Function to return error message based on error code
function file_upload_error_message($error_code) {
switch ($error_code) {
case UPLOAD_ERR_INI_SIZE:
return 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
case UPLOAD_ERR_FORM_SIZE:
return 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';
case UPLOAD_ERR_PARTIAL:
return 'The uploaded file was only partially uploaded';
case UPLOAD_ERR_NO_FILE:
return 'No file was uploaded';
case UPLOAD_ERR_NO_TMP_DIR:
return 'Missing a temporary folder';
case UPLOAD_ERR_CANT_WRITE:
return 'Failed to write file to disk';
case UPLOAD_ERR_EXTENSION:
return 'File upload stopped by extension';
default:
return 'Unknown upload error';
}
}
?>
</body>
</html>

26
TreasureHunt/testimg.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
require_once __DIR__ . '/PHPConnector.php';
function img() {
$connector = new Connector();
if (!$connector) die ("");
$query = "SELECT image from Hunt where id=21";//hard coded
$res = $connector->runQuery($query, $connector->dbName);
$result=mysqli_fetch_array($res);
// this is code to display
echo '<img src="data:image/'.$result['image_type'].';base64,'.base64_encode( $result['image'] ).'"/>';
}
//$image = mysqli_fetch_assoc($res);
//$image = $image['image'];
//
// header("Content-type: image/PNG");
//
// echo $image;
$res = array ( 'status' => img() );
echo json_encode($res, JSON_PRETTY_PRINT);
?>