| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
<span class="code-comment"> * quick_reply.php |
|---|
| 4 |
* ------------------- |
|---|
| 5 |
* begin : Tuesday, May 4, 2004 |
|---|
| 6 |
* copyright : Xpert |
|---|
| 7 |
* contact : <xpert@phpbbguru.net> http://www.phpbbguru.net |
|---|
| 8 |
* |
|---|
| 9 |
* $Id: quick_reply.php,v 2.3.0 2005/03/26 14:21 xpert Exp $ |
|---|
| 10 |
* |
|---|
| 11 |
***************************************************************************/ |
|---|
| 12 |
|
|---|
| 13 |
/*************************************************************************** |
|---|
| 14 |
* |
|---|
| 15 |
* This program is free software; you can redistribute it and/or modify |
|---|
| 16 |
* it under the terms of the GNU General Public License as published by |
|---|
| 17 |
* the Free Software Foundation; either version 2 of the License, or |
|---|
| 18 |
* (at your option) any later version. |
|---|
| 19 |
* |
|---|
| 20 |
***************************************************************************/ |
|---|
| 21 |
|
|---|
| 22 |
if ( !defined('IN_PHPBB') )</span> |
|---|
| 23 |
<span class="code-keyword">{ |
|---|
| 24 |
die("Hacking attempt"); |
|---|
| 25 |
} |
|---|
| 26 |
|
|---|
| 27 |
$template->set_filenames(array('quick_reply_output' => 'forum/quick_reply.tpl'));</span> |
|---|
| 28 |
<span class="code-lang"> |
|---|
| 29 |
if ( ($is_auth['auth_reply'] && !(($forum_topic_data['forum_status'] == FORUM_LOCKED) || ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) ) || ($userdata['user_level'] == ADMIN) ) |
|---|
| 30 |
{ |
|---|
| 31 |
|
|---|
| 32 |
$attach_sig = ( $userdata['session_logged_in'] && $config['allow_sig'] && $userdata['user_sig'] != '' ) ? "checked='checked'" : ''; |
|---|
| 33 |
$notify_user = ( $userdata['commentpm'] ? 'checked="checked"' : '' ); |
|---|
| 34 |
|
|---|
| 35 |
$template->assign_vars(array( |
|---|
| 36 |
'POST_ACTION' => append_sid($root_path . "phpbb2.php?page=posting"), |
|---|
| 37 |
'TOPIC_ID' => $topic_id) |
|---|
| 38 |
); |
|---|
| 39 |
|
|---|
| 40 |
if( $userdata['session_logged_in']) |
|---|
| 41 |
{ |
|---|
| 42 |
$template->assign_block_vars('user_logged_in', array( |
|---|
| 43 |
'L_NOTIFY_ON_REPLY' => $lang['notify'], |
|---|
| 44 |
'NOTIFY_ON_REPLY' => $notify_user) |
|---|
| 45 |
); |
|---|
| 46 |
if( $config['allow_sig'] ) { |
|---|
| 47 |
$template->assign_block_vars('user_logged_in.switch_signature_checkbox', array( |
|---|
| 48 |
'ATTACH_SIGNATURE' => $attach_sig) |
|---|
| 49 |
); |
|---|
| 50 |
} |
|---|
| 51 |
} |
|---|
| 52 |
else |
|---|
| 53 |
{ |
|---|
| 54 |
$template->assign_block_vars('user_logged_out', array()); |
|---|
| 55 |
} |
|---|
| 56 |
|
|---|
| 57 |
$template->assign_vars(array( |
|---|
| 58 |
'S_EDITOR_NAME' => $userdata['name'], |
|---|
| 59 |
'L_NOTIFY_ON_REPLY' => $lang['notify'], |
|---|
| 60 |
'L_NO_TEXT_SELECTED' => $lang['qreply_no_text_selected']) |
|---|
| 61 |
); |
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
Multi_BBCode(); |
|---|
| 65 |
generate_smilies('inline'); |
|---|
| 66 |
|
|---|
| 67 |
$tpl = $template->assign_display('quick_reply_output'); |
|---|
| 68 |
|
|---|
| 69 |
$template->assign_vars(array( |
|---|
| 70 |
'QUICKREPLY_FORM' => $tpl) |
|---|
| 71 |
); |
|---|
| 72 |
} |
|---|
| 73 |
?> |
|---|