Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2. require_once 'core/init.php';
  3.  
  4. $user = new User();
  5. if($user->isLoggedIn()){ //Checks if user is logged in, redirects to frontpage with an error if not.
  6.     if(Input::exists()){ //Checks for an input from the form
  7.         if(Token::check(Input::get('token'))){ //Matches the form token with the session token to see if data was submitted from the form
  8.            
  9.             //
  10.             //Do dem uploads here
  11.             //         
  12.  
  13.     }
  14. }
  15.  
  16. include 'upload_form.html';
  17.  
  18. }else{
  19.     Session::flash('home', 'You have to be logged in to visit that page');
  20.     Redirect::to('index.php');
  21. }
  22. ?>
  23.     <p><a href="index.php">Home</a></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement