Пример #1
0
                 }
                 $recipients[] = $user['username'];
             }
             if (empty($recipients)) {
                 $pm['recipients'] = '';
             } else {
                 $pm['recipients'] = implode(' ; ', $recipients);
             }
         }
         ($hook = vBulletinHook::fetch_hook('private_newpm_blank')) ? eval($hook) : false;
     }
     construct_checkboxes(array('savecopy' => true, 'parseurl' => true, 'signature' => iif($vbulletin->userinfo['signature'] !== '', true)));
     $show['bcclink'] = true;
 }
 $folderjump = construct_folder_jump(0, $pm['folderid']);
 $posticons = construct_icons($pm['iconid'], $vbulletin->options['privallowicons']);
 require_once DIR . '/includes/functions_editor.php';
 // set message box width to usercp size
 $stylevar['messagewidth'] = $stylevar['messagewidth_usercp'];
 $editorid = construct_edit_toolbar($pm['message'], 0, 'privatemessage', iif($vbulletin->options['privallowsmilies'], 1, 0));
 // generate navbar
 if ($pm['pmid']) {
     $navbits['private.php?' . $vbulletin->session->vars['sessionurl'] . "folderid={$pm['folderid']}"] = $foldernames["{$pm['folderid']}"];
     $navbits['private.php?' . $vbulletin->session->vars['sessionurl'] . "do=showpm&pmid={$pm['pmid']}"] = $pm['title'];
     $navbits[''] = iif($pm['forward'], $vbphrase['forward_message'], $vbphrase['reply_to_private_message']);
 } else {
     $navbits[''] = $vbphrase['post_new_private_message'];
 }
 $show['sendmax'] = iif($permissions['pmsendmax'], true, false);
 $show['sendmultiple'] = $permissions['pmsendmax'] != 1;
 $show['parseurl'] = $vbulletin->options['privallowbbcode'];
Пример #2
0
 // load prefix stuff if necessary
 if ($can_update_thread) {
     require_once DIR . '/includes/functions_prefix.php';
     $prefix_options = fetch_prefix_html($foruminfo['forumid'], isset($edit['prefixid']) ? $edit['prefixid'] : $threadinfo['prefixid']);
     $show['empty_prefix_option'] = ($threadinfo['prefixid'] == '' or !($foruminfo['options'] & $vbulletin->bf_misc_forumoptions['prefixrequired']));
 } else {
     $prefix_options = '';
 }
 if ($postinfo['userid']) {
     $userinfo = fetch_userinfo($postinfo['userid']);
     $postinfo['username'] = $userinfo['username'];
 }
 if ($edit['iconid']) {
     $posticons = construct_icons($edit['iconid'], $foruminfo['allowicons']);
 } else {
     $posticons = construct_icons($postinfo['iconid'], $foruminfo['allowicons']);
 }
 $attach_editor = array();
 $attachment_js = '';
 // edit / add attachment
 if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] and $vbulletin->userinfo['userid'] and !empty($vbulletin->userinfo['attachmentextensions'])) {
     require_once DIR . '/includes/functions_file.php';
     $inimaxattach = fetch_max_upload_size();
     $maxattachsize = vb_number_format($inimaxattach, 1, true);
     if (!$posthash or !$poststarttime) {
         $poststarttime = TIMENOW;
         $posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);
     }
     if (empty($postattach)) {
         // <-- This is done in two queries since Mysql will not use an index on an OR query which gives a full table scan of the attachment table
         // A poor man's UNION