SHARE
TWEET

Untitled

a guest Jun 8th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. define('FORUM_ROOT', '/var/www/punbb/');
  4. require FORUM_ROOT . 'include/common.php';
  5.  
  6. $forum_page['redirect_url'] = "/blog/test/index.php";
  7. $forum_page['hidden_fields'] = array(
  8.     'form_sent'    => '<input type="hidden" name="form_sent" value="1" />',
  9.     'redirect_url'    => '<input type="hidden" name="redirect_url" value="'.forum_htmlencode($forum_page['redirect_url']).'" />',
  10. );
  11.  
  12. //!guest = authenticated
  13. if(!$forum_user['is_guest']) {
  14.     ?>
  15.       <form method="post" action="action.php">
  16.         <?php $forum_page['hidden_fields']['csfr_token'] = '<input type="hidden" name="csrf_token" value="'.generate_form_token(forum_link('/blog/test/action.php')).'" />'; ?>
  17.     <?php echo implode("\n\t\t", $forum_page['hidden_fields'])."\n" ?>
  18.         <input type="submit" name="subscribe" value="Subscribe" />
  19.         </form>
  20.     <?php
  21.  
  22. } else {
  23.       ?>
  24.       <form method="post" action="<?php echo $forum_page['form_action'] ?>">
  25.             <?php $forum_page['hidden_fields']['csfr_token'] = '<input type="hidden" name="csrf_token"  value="'.generate_form_token(forum_link($forum_url['login'])).'" />'; ?>
  26.         <?php echo implode("\n\t\t", $forum_page['hidden_fields'])."\n" ?>
  27.                 User: <input type="text" id="fld1" name="req_username" value="" /> <br />
  28.    
  29.                 Password: <input type="password" id="fld2" name="req_password" value="" /> <br />
  30.    
  31.               <input type="submit" name="login" id="login" value="Login" />
  32.       </form>
  33.       <?php
  34. }
  35.  
  36. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top