Merge branch 'master' of github.com:joshtronic/leaderbin.com
This commit is contained in:
commit
6c066650af
14 changed files with 257 additions and 7 deletions
|
@ -11,7 +11,7 @@ class api_v1_leaderboard extends APIv1
|
|||
// Checks if we have a UID
|
||||
if (!isset($_GET['uid']))
|
||||
{
|
||||
throw new Exception('Missing UID.');
|
||||
throw new Exception('You must supply a leaderboard UID.');
|
||||
}
|
||||
|
||||
$leaderboard_uid = $_GET['uid'];
|
||||
|
@ -22,7 +22,7 @@ class api_v1_leaderboard extends APIv1
|
|||
|
||||
if (!$leaderboard)
|
||||
{
|
||||
throw new Exception('Leaderboard UID does not exist.');
|
||||
throw new Exception('Leaderboard does not exist.');
|
||||
}
|
||||
|
||||
if ($this->uid != $leaderboard['uid'])
|
||||
|
@ -122,7 +122,8 @@ class api_v1_leaderboard extends APIv1
|
|||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
return array('response_code' => 400, 'error' => $e->getMessage());
|
||||
$this->response_code = 400;
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,12 @@ class api_v1_leaderboards extends APIv1
|
|||
|
||||
public function __default()
|
||||
{
|
||||
$leaderboards = new leaderboards();
|
||||
if (!isset($this->return['error']))
|
||||
{
|
||||
$leaderboards = new leaderboards();
|
||||
|
||||
return $leaderboards->__default();
|
||||
return $leaderboards->__default();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
8
modules/contact.php
Normal file
8
modules/contact.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
class contact extends CustomModule
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
?>
|
26
modules/contact/send.php
Normal file
26
modules/contact/send.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
class contact_send extends contact
|
||||
{
|
||||
public function __default()
|
||||
{
|
||||
if (API_AYAH::isHuman())
|
||||
{
|
||||
// Sends the message
|
||||
mail('support@gravityblvd.com', '[LeaderBin] ' . $_POST['subject'], $_POST['email'] . "\n\n" . $_POST['message']);
|
||||
Browser::redirect('/contact?success');
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<h1>Our system has determined that you may not be a human being.</h1>
|
||||
<p>If you happen to be Lil Wayne please <a href="/contact">contact us</a> as we’d love to hear about how you’re using our service.</p>
|
||||
<p>If you are not Lil Wayne, please <a href="/contact">go back</a> and try the challenge game again.</p>
|
||||
<iframe width="560" height="315" src="//www.youtube.com/embed/daRhEOkUL1o" frameborder="0" allowfullscreen></iframe>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
8
modules/legal/privacy.php
Normal file
8
modules/legal/privacy.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
class legal_privacy extends CustomModule
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
?>
|
8
modules/legal/terms.php
Normal file
8
modules/legal/terms.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
class legal_terms extends CustomModule
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
?>
|
|
@ -26,9 +26,8 @@ class user_authenticate extends AnonymousModule
|
|||
if ($user['password'] == crypt($_POST['password'], $user['password']))
|
||||
{
|
||||
setcookie('__auth', base64_encode($uid . '|' . $user['auth']), time() + Time::YEAR, '/');
|
||||
return array('status' => 'success', 'url' => '/leaderboards');
|
||||
}
|
||||
|
||||
return array('status' => 'success', 'url' => '/leaderboards');
|
||||
}
|
||||
|
||||
return array('error' => 'Invalid email address or password.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue