Exemplo n.º 1
0
function makeDocumentListHTMLRow(Document $document, $position, $isEditable, $isOrganizer, Worker $worker = NULL)
{
    echo "<tr>\n<td class='fieldValueFirst'>";
    if (!is_null($worker)) {
        // reset to match up; note duplicates ok
        echo "<a href='WorkerViewPage.php?" . PARAM_LIST2_INDEX . "={$position}'>" . htmlspecialchars($worker->nameString()) . "</a>";
    }
    echo "</td>\t<td class='fieldValue'><a href='DocumentViewAction.php?" . PARAM_LIST2_INDEX . "={$position}'>" . htmlspecialchars($document->docType) . "</a></td>\n";
    $date = htmlspecialchars(swwat_format_usdate($document->uploadDate));
    echo "\t<td class='fieldValue'>{$date}</td>\n";
    // todo - should this also check (0 == strcmp(UNREVIEWED, $document->reviewStatus))?
    $date = is_null($document->reviewDate) ? "" : htmlspecialchars(swwat_format_usdate($document->reviewDate));
    echo "\t<td class='fieldValue'>{$date}</td>\n";
    echo "\t<td class='fieldValue'>";
    // permissions checks - $isEditable is like a potential to be edited
    if (!$isOrganizer) {
        // workers can only delete a non-reviewed document
        $isEditable &= 0 == strcmp(UNREVIEWED, $document->reviewStatus);
    }
    if ($isEditable) {
        echo "<form method='POST' action='WorkerDocumentAction.php'>";
        swwat_createInputHidden(PARAM_LIST2_INDEX, $position);
        // set up options
        // if Organizer: UnReviewed->Approve, Decline, Delete; Approve->UnReviewed, Decline; Decline->UnReviewed, Approve
        // repeat if Organizer: Delete only from UnReviewed
        // if Worker: UnReviewed->Delete
        $options = ReviewEnum::getList($isOrganizer, $document->reviewStatus);
        swwat_createSelect(0, PARAM_STATUSTYPE, $options, $document->reviewStatus, !$isEditable);
        echo "&nbsp;";
        swwat_createInputSubmit(is_null($worker) ? PARAM_LASTNAME : "", $isOrganizer ? "Change Status" : "Delete");
        echo "</form>";
    } else {
        echo htmlspecialchars(ReviewEnum::getString($document->reviewStatus));
    }
    echo "</td>\n</tr>\n";
    return;
}
Exemplo n.º 2
0
        <p>After registration, you will be able to set your Expo preferences.</p>
        <form method="POST" name="workerregistrationpage_form" action="WorkerRegistrationAction.php">
            <table>
                <tr><th class='rowTitle'>Expo</th>
                    <th class='rowTitle'>Start</th>
                    <th class='rowTitle'>Stop</th>
                    <th class='rowTitle'>Accept</th></tr>
                <?php 
for ($k = 0; $k < count($expoList); $k++) {
    makeExpoRegistrationRow($expoList[$k], $k);
    // uses PARAM_MULTIPLE_INDEX
}
// $k
?>
                <tr><td colspan="4"><?php 
swwat_createInputSubmit(PARAM_SAVE, "Save");
?>
</td></tr>
            </table>
        </form>
    </div><!-- workerregistrationpage -->

</div><!-- main -->

<?php 
$menuItemArray = array();
if ($author->isOrganizer()) {
    $menuItemArray[] = MENU_VIEW_SITEADMIN;
    $menuItemArray[] = MENU_SEND_MESSAGE;
    $menuItemArray[] = MENU_VIEW_WORKERLIST;
}
Exemplo n.º 3
0
        <form method="POST" name="sendmessagepage_form" action="SendMessageAction.php">
            <?php 
echo '<input type="hidden" name="', PARAM_TYPE_MESSAGE, '" value="', PARAM_EMAIL, '"/>';
//echo '<input type="radio" name="', PARAM_TYPE_MESSAGE, '" value="', PARAM_EMAIL, '" checked="checked"/>';
//echo "Email Message<br/>\n";
//echo '<input type="radio" name="', PARAM_TYPE_MESSAGE, '" value="', PARAM_SMS_SERVICE, '"/>';
//echo "SMS Message<br/><br/>\n";
echo "Subject: ";
echo '<input type="text" name="', PARAM_SUBJECT_MESSAGE, '" value="" length="30"/>';
echo "<p/>\n";
echo '<textarea name="', PARAM_MESSAGE, '" rows="3" cols="40"></textarea>';
echo "<br/><br/>\n";
// todo - add javascript such that when sms is checked, the sendmessage button is greyed out if >160 characters
// todo - hava javascript show error message in sms_overlength or similar
// todo - create css errortext
swwat_createInputSubmit(PARAM_SEND_MESSAGE, "Send Message");
echo "<br/><br/>\n";
createWorkerHTMLList($workerList, $author, "To:", $author->isOrganizer());
?>
        </form>
    </div><!-- sendmessagepage_send -->

</div><!-- main -->

<?php 
$menuItemArray = array();
if ($author->isOrganizer()) {
    $menuItemArray[] = MENU_VIEW_SITEADMIN;
}
// todo - fix
//    $menuItemArray[] = MENU_XYZExpo_MESSAGE;
Exemplo n.º 4
0
        </table>
        </form>
		<br />
    </div><!-- workerviewpage_roles -->

    <div id="workerviewpage_disable">
        <table><tr><td>
        <?php 
if ($author->isOrganizer() && $author->workerid != $worker->workerid) {
    if ($worker->isDisabled) {
        echo '<form method="GET" name="workerviewpage_enable_form" action="WorkerDisableAction.php">';
        swwat_createInputSubmit(PARAM_DISABLED, "Enable Login");
        echo '</form>';
    } else {
        echo '<form method="GET" name="workerviewpage_disable_form" action="WorkerDisableConfirmPage.php">';
        swwat_createInputSubmit(PARAM_DISABLED, "Disable Login");
        echo '</form>';
    }
}
/* isOrganizer */
?>
        </td></tr></table>
		<br />
    </div><!-- workerviewpage_disable -->

    <div id="workerviewpage_password">
        <table><tr>
            <td>
                <?php 
if ($isAuthor) {
    echo '<form method="GET" name="workerviewpage_pwchange_form" action="WorkerLoginChangePage.php">
Exemplo n.º 5
0
?>
</td></tr>
            <tr><td></td></tr>
            <tr><td class="fieldTitle">List of emails</td><td>(white-space separated)</td></tr>
                        <tr><td colspan="2">
                    <textarea name="<?php 
echo PARAM_EMAIL;
?>
"
                              value="<?php 
echo htmlspecialchars($email);
?>
"
                              rows="5"></textarea></td></tr>            <tr><td></td></tr>
                        <tr><td><?php 
swwat_createInputSubmit(PARAM_SAVE, "Invite");
?>
</td></tr>
		</table>
		</form>
	</div><!-- invitationpage_data -->

    <div id="invitation_results">
        <h5>Invitation Results</h5>
        <table>
            <tr><th class='rowTitle'>line#</th><th class='rowTitle'>email</th><th class='rowTitle'>data</th><th class='rowTitle'>message</th><th class='rowTitle'>note</th></tr>
            <?php 
// get rid of annoying notice
if (isset($_SESSION[PARAM_MESSAGE])) {
    echo $_SESSION[PARAM_MESSAGE];
}