daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Jun 8th, 2017 75 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['form_action'] = forum_link($forum_url['login']);
  8. $forum_page['hidden_fields'] = array(
  9.     'form_sent'    => '<input type="hidden" name="form_sent" value="1" />',
  10.     'redirect_url'    => '<input type="hidden" name="redirect_url" value="'.forum_htmlencode($forum_page['redirect_url']).'" />',
  11.     'csrf_token'    => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />'
  12. );
  13.  
  14. //!guest = authenticated
  15. if(!$forum_user['is_guest']) {
  16.     ?>
  17.       <form method="post" action="action.php">
  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 echo implode("\n\t\t", $forum_page['hidden_fields'])."\n" ?>
  26.    
  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