- $cuts = displayshortcuts();
- $html = '<h1>'._b_('Nouveau message').'</h1>'.$cuts;
- $html .= '<form enctype="multipart/form-data" action="?group='.$group.'" method="post" accept-charset="utf-8">';
- $html .= '<table class="bicol" cellpadding="0" cellspacing="0">';
- $html .= '<tr><th colspan="2">'._b_('En-têtes').'</th></tr>';
- $html .= '<tr><td>'._b_('Nom').'</td><td>'.htmlentities($this->profile['name']).'</td></tr>';
- $html .= '<tr><td>'._b_('Sujet').'</td><td><input type="text" name="subject" value="'.htmlentities($subject).'" size="60" /></td></tr>';
- $html .= '<tr><td>'._b_('Forums').'</td><td><input type="text" name="newsgroups" value="'.htmlentities($target).'" size="60" /></td></tr>';
- $html .= '<tr><td>'._b_('Suivi à').'</td><td><input type="text" name="followup" value="" size="60" /></td></tr>';
- $html .= '<tr><td>'._b_('Organisation').'</td><td>'.$this->profile['org'].'</td></tr>';
- $html .= '<tr><th colspan="2">'._b_('Corps').'</th></tr>';
- $html .= '<tr><td colspan="2"><textarea name="body" cols="74" rows="16">'
- . to_entities($body).($this->profile['sig'] ? "\n\n-- \n".htmlentities($this->profile['sig']) : '').'</textarea></td></tr>';
- $html .= '<tr><th colspan="2">'._b_('Pièces jointes').'</th></tr>';
- $html .= '<tr><td colspan="2"><input type="hidden" name="MAX_FILE_SIZE" value="'.$this->maxfilesize.'" />';
- $html .= '<input type="file" name="newpj" size="40"/></td></tr>';
- $html .= '<tr><th colspan="2">';
- if ($id > 0) {
- $html .= '<input type="hidden" name="artid" value="'.$id.'" />';
- }
- $html .= '<input type="hidden" name="action" value="new" />';
- $html .= '<input type="submit" /></th></tr>';
- $html .= '</table></form>';
-
- return $html.$cuts;
+ $html = '<form enctype="multipart/form-data" action="'
+ . htmlentities(makeLink(Array('group' => $group)))
+ . '" method="post" accept-charset="utf-8">'
+ . '<table class="bicol" cellpadding="0" cellspacing="0">'
+ . '<tr><th colspan="2">' . _b_('En-têtes') . '</th></tr>'
+ . '<tr><td>' . _b_('Nom') . '</td>'
+ . '<td>' . htmlentities($this->profile['name']) . '</td></tr>'
+ . '<tr><td>' . _b_('Sujet') . '</td>'
+ . '<td><input type="text" name="subject" value="' . htmlentities($subject) . '" size="60" /></td></tr>'
+ . '<tr><td>' . _b_('Forums') . '</td>'
+ . '<td><input type="text" name="newsgroups" value="' . htmlentities($target) . '" size="60" /></td></tr>'
+ . '<tr><td>' . _b_('Suivi à') . '</td>'
+ . '<td><input type="text" name="followup" value="' . htmlentities($followup). '" size="60" /></td></tr>'
+ . '<tr><td>' . _b_('Organisation') . '</td>'
+ . '<td>' . $this->profile['org'] . '</td></tr>'
+ . '<tr><th colspan="2">' . _b_('Corps') . '</th></tr>'
+ . '<tr><td colspan="2"><textarea name="body" cols="74" rows="16">'
+ . $body . '</textarea></td></tr>';
+ if ($this->can_attach) {
+ $html .= '<tr><th colspan="2">' . _b_('Pièce jointe') . '</th></tr>'
+ . '<tr><td colspan="2">'
+ . '<input type="hidden" name="MAX_FILE_SIZE" value="' . $this->maxfilesize . '" />'
+ . '<input type="file" name="newpj" size="40"/></td></tr>';
+ }
+ $html .= '<tr><th colspan="2">';
+ if ($id != -1) {
+ $html .= '<input type="hidden" name="artid" value="' . $id . '" />';
+ }
+ $html .= '<input type="hidden" name="action" value="new" />'
+ . '<input type="submit" value="' . _b_('Envoyer le message') . '" /></th></tr>'
+ . '</table></form>';
+
+ return $html;