Example #1
0
                $feedback = ' ' . _('News Added.') . ' ';
            }
        } else {
            form_release_key(getStringFromRequest('form_key'));
            $feedback = ' ' . _('ERROR - both subject and body are required') . ' ';
        }
    }
    //news must now be submitted from a project page -
    if (!$group_id) {
        exit_no_group();
    }
    /*
    	Show the submit form
    */
    news_header(array('title' => _('News')));
    $jsfunc = notepad_func();
    $group = group_get_object($group_id);
    echo '
		<p>
		' . sprintf(_('You can post news about your project if you are an admin on your project. You may also post "help wanted" notes if your project needs help.</p><p>All posts <b>for your project</b> will appear instantly on your project summary page. Posts that are of special interest to the community will have to be approved by a member of the %1$s news team before they will appear on the %1$s home page.</p><p>You may include URLs, but not HTML in your submissions.</p><p>URLs that start with http:// are made clickable.'), $GLOBALS['sys_name']) . '</p>' . $jsfunc . '
		<form action="' . getStringFromServer('PHP_SELF') . '" method="post">
		<input type="hidden" name="group_id" value="' . $group_id . '" />
		<input type="hidden" name="post_changes" value="y" />
		<input type="hidden" name="form_key" value="' . form_generate_key() . '" />
		<p><strong>' . _('For project') . ' ' . $group->getPublicName() . '</strong></p>
		<p>
		<strong>' . _('Subject') . ':</strong>' . utils_requiredField() . '<br />
		<input type="text" name="summary" value="" size="30" maxlength="60" /></p>
		<p>
		<strong>' . _('Details') . ':</strong>' . notepad_button('document.forms[1].details') . utils_requiredField() . '<br />';
    $GLOBALS['editor_was_set_up'] = false;
Example #2
0
 *
 * @version   $Id$
 */
/*

	Project/Task Manager
	By Tim Perdue, Sourceforge, 11/99
	Heavy rewrite by Tim Perdue April 2000

	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
*/
require_once $gfwww . 'include/note.php';
$related_artifact_id = getIntFromRequest('related_artifact_id');
$related_artifact_summary = getStringFromRequest('related_artifact_summary');
pm_header(array('title' => _('Add a new Task'), 'group_project_id' => $group_project_id));
echo notepad_func();
?>

<form action="<?php 
echo getStringFromServer('PHP_SELF') . "?group_id={$group_id}&amp;group_project_id={$group_project_id}";
?>
" method="post">
<input type="hidden" name="func" value="postaddtask" />
<input type="hidden" name="add_artifact_id[]" value="<?php 
echo $related_artifact_id;
?>
" />

<table border="0" width="100%">

	<tr>
Example #3
0
    function showPostForm($thread_id = 0, $is_followup_to = 0, $subject = "")
    {
        global $group_id;
        $body = '';
        if ($this->Forum->userCanPost()) {
            if ($subject) {
                //if this is a followup, put a RE: before it if needed
                if (!eregi('RE:', $subject, $test)) {
                    $subject = 'RE: ' . $subject;
                }
            }
            echo notepad_func();
            ?>
<div align="center">
<form "enctype="multipart/form-data"
	action="<?php 
            echo util_make_url('/forum/forum.php?forum_id=' . $this->Forum->getID() . '&group_id=' . $group_id);
            ?>
"
	method="post"><?php 
            $objid = $this->Forum->getID();
            ?>
 <input
	type="hidden" name="post_message" value="y" /> <input type="hidden"
	name="thread_id" value="<?php 
            echo $thread_id;
            ?>
" /> <input
	type="hidden" name="msg_id" value="<?php 
            echo $is_followup_to;
            ?>
" /> <input
	type="hidden" name="is_followup_to"
	value="<?php 
            echo $is_followup_to;
            ?>
" /> <input type="hidden"
	name="form_key" value="<?php 
            echo form_generate_key();
            ?>
">
<fieldset class="fieldset">
<table>
	<tr>
		<td valign="top"></td>
		<td valign="top"><br>
		<strong><?php 
            echo _('Subject:');
            ?>
</strong><?php 
            echo utils_requiredField();
            ?>
<br />
		<input type="text" name="subject" value="<?php 
            echo $subject;
            ?>
"
			size="45" maxlength="45" /> <br>
		<br>
		<strong><?php 
            echo _('Message:');
            ?>
</strong><?php 
            echo notepad_button('document.forms[1].body');
            echo utils_requiredField();
            ?>
<br />

		<?php 
            $GLOBALS['editor_was_set_up'] = false;
            $params = array();
            $params['body'] = $body;
            $params['width'] = "800";
            $params['height'] = "500";
            $params['group'] = $group_id;
            plugin_hook("text_editor", $params);
            if (!$GLOBALS['editor_was_set_up']) {
                //if we don't have any plugin for text editor, display a simple textarea edit box
                echo '<textarea name="body"  rows="10" cols="50" wrap="soft">' . $body . '</textarea>';
            }
            unset($GLOBALS['editor_was_set_up']);
            ?>
 <?php 
            //$text_support->displayTextField('body');
            ?>
 <br>
		<br>
		<!--		<span class="selected"><?php 
            echo _('HTML tags will display in your post as text');
            ?>
</span> -->
		<p><?php 
            $this->LinkAttachForm();
            ?>
		
		
		<p><?php 
            if (!session_loggedin()) {
                echo '<span class="highlight">';
                printf(_('You are posting anonymously because you are not <a href="%1$s">logged in</a>'), util_make_url('/account/login.php?return_to=' . urlencode(getStringFromServer('REQUEST_URI')))) . '</span>';
            }
            ?>
 <br />
		<input type="submit" name="submit"
			value="<?php 
            echo _('Post Comment');
            echo !session_loggedin() ? ' ' . _('Anonymously') : '';
            ?>
" /><?php 
            echo session_loggedin() ? '&nbsp;&nbsp;&nbsp;<input type="checkbox" value="1" name="monitor" />&nbsp;' . _('Receive followups via email') . '.' : '';
            ?>
		</p>
		</td>
	</tr>
</table>
</fieldset>
</form>
</div>
			<?php 
        } elseif ($this->Forum->allowAnonymous()) {
            echo '<span class="error">';
            printf(_('You could post if you were <a href="%1$s">logged in</a>.'), util_make_url('/account/login.php?return_to=' . urlencode(getStringFromServer('REQUEST_URI'))));
        } elseif (!session_loggedin()) {
            echo '
			<span class="error">' . sprintf(_('Please <a href="%1$s">log in</a>'), util_make_url('/account/login.php?return_to=' . urlencode(getStringFromServer('REQUEST_URI')))) . '</span><br/></p>';
        } else {
            //do nothing
        }
    }