<?php

/*
 *Test link 
 *http://localhost/~matteo/web-lmul-rangers/api-user-exists.php?username=33windowlicker&password=12345678
 */
require_once './global.php';
extract(GenericHelper::gatherGetData());
if (Model_User::userExists($username, $password)) {
    http_response_code(200);
} else {
    http_response_code(400);
}
<?php

require_once './global.php';
require_once './helpers/unsecure.php';
extract(GenericHelper::gatherPostData());
if (isset($username) && isset($password) && Model_User::userExists($username, $password)) {
    Model_User::login($username, $password);
    $rdr_to = GenericHelper::getRedirectTo();
    if (isset($rdr_to)) {
        header("Location: {$rdr_to}");
        die;
    }
    header("Location: loginpage.php");
} else {
    header("Location: index.php?err=login-unsuccessful#login");
    die;
}
Example #3
0
 public function __construct(Helper $helper, $sheet_name = null, $worksheet_name = null, $sheet_destination = null)
 {
     parent::__construct($helper);
     # init sheet name
     isset($sheet_name) or $sheet_name = $this->h->_client_app_name;
     $this->sheet_name = $sheet_name;
     # init worksheet name
     isset($worksheet_name) or $worksheet_name = 'Sheet1';
     $this->worksheet_name = $worksheet_name;
     # init spreadsheet service
     $service_request = new \Google\Spreadsheet\DefaultServiceRequest($this->h->current_token->access_token, 'Bearer');
     \Google\Spreadsheet\ServiceRequestFactory::setInstance($service_request);
     $this->service = new \Google\Spreadsheet\SpreadsheetService();
 }
Example #4
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->object = GenericHelper::getInstance();
 }
<?php

require_once './global.php';
require_once './helpers/secure.php';
$user = GenericHelper::getLoggedInUser();
$story_status_partial = Template::create("story-progress-partial", array("chapters" => Model_User::getChapters($user)), array("troughLayout" => false));
$loginPageTemplate = Template::create("loginpage", array("name" => $user->name, "birthday" => $user->date, "email" => $user->email, "story_status_partial" => $story_status_partial->render()), array("bodyClass" => "loginpage-body", "header" => "loged-in-header-partial"));
echo $loginPageTemplate;
    ?>
</div>
                            <?php 
}
?>
                            <br><br>

                        </div>
                    </div>
                </div>     	

        </div> <!-- end row -->     

</section>  <!-- end contact -->
<?php 
if (GenericHelper::shouldPlayVideo()) {
    ?>
    <a id ="intro-video" class="fancybox js-fancybox-video fancybox-video" data-type="iframe" href="https://www.youtube.com/watch?v=R3A9aimapbo&feature=youtu.be?autoplay=1" title="Click 'Esc' or outside of the video to see the webpage"></a><br />
<?php 
}
?>



<!-- Testimonials Section
            ================================================== -->
            <section id="testimonials">
    <div class="row content flex-container">
        <div id="testimonial-slider" class="flexslider">
            <ul class="slides">
                <li>