Eerste commit
Hopelijk is dit wat je wilde, Christiaan.
This commit is contained in:
		
							
								
								
									
										46
									
								
								src/Application/Daniel.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/Application/Daniel.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *  Informatica Eindproject D4p
 | 
			
		||||
 *  6in3, Stedelijk Gymnasium Nijmegen
 | 
			
		||||
 *  Docent: Hans de Wolf
 | 
			
		||||
 *
 | 
			
		||||
 *  ==================
 | 
			
		||||
 *
 | 
			
		||||
 *  Daniel Boutros,
 | 
			
		||||
 *  Christiaan Goossens,
 | 
			
		||||
 *  Jelmer Hinssen
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
namespace Inforbank\Application;
 | 
			
		||||
 | 
			
		||||
use \Slim\App;
 | 
			
		||||
 | 
			
		||||
class Daniel
 | 
			
		||||
{
 | 
			
		||||
    public function __construct(App $app)
 | 
			
		||||
    {
 | 
			
		||||
        $app->get('/Daniel', function ($request, $response, $args) {
 | 
			
		||||
            // Render index view
 | 
			
		||||
            return $this->renderer->render($response, 'Daniel.phtml', $args);
 | 
			
		||||
        });
 | 
			
		||||
        $app->post('/Daniel', function ($request, $response, $args) {
 | 
			
		||||
            // Render index view
 | 
			
		||||
            $post = $request->getParsedBody();
 | 
			
		||||
 | 
			
		||||
            try {
 | 
			
		||||
                $resp = $this->auth->login($post['rekeningnr'], $post['pascode']);
 | 
			
		||||
 | 
			
		||||
                if ($resp) {
 | 
			
		||||
                    echo "HIER EEN REDIRECT GRAAG";
 | 
			
		||||
                } else {
 | 
			
		||||
                    echo "ERR PASS!";
 | 
			
		||||
                }
 | 
			
		||||
            } catch (\Exception $e) {
 | 
			
		||||
                echo "ERR REK!";
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            die();
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user