Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'core/init.php';
- $user = new User();
- if($user->isLoggedIn()){ //Checks if user is logged in, redirects to frontpage with an error if not.
- if(Input::exists()){ //Checks for an input from the form
- if(Token::check(Input::get('token'))){ //Matches the form token with the session token to see if data was submitted from the form
- //
- //Do dem uploads here
- //
- }
- }
- include 'upload_form.html';
- }else{
- Session::flash('home', 'You have to be logged in to visit that page');
- Redirect::to('index.php');
- }
- ?>
- <p><a href="index.php">Home</a></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement