Пример #1
0
include '../include.php';
if ($posting) {
    error_debug("handling bb post");
    format_post_bits("isAdmin,temporary");
    $id = db_enter("bulletin_board_topics", "title |description isAdmin temporary");
    db_query("UPDATE bulletin_board_topics SET threadDate = GETDATE() WHERE id = " . $id);
    if ($_POST["isAdmin"] == "'1'") {
        //send admin email
        //get topic
        $r = db_grab("SELECT \n\t\t\t\tt.title,\n\t\t\t\tt.description,\n\t\t\t\tu.userID,\n\t\t\t\tISNULL(u.nickname, u.firstname) firstname,\n\t\t\t\tu.lastname,\n\t\t\t\tt.createdOn\n\t\t\t\tFROM bulletin_board_topics t\n\t\t\t\tJOIN intranet_users u ON t.createdBy = u.userID\n\t\t\t\tWHERE t.id = " . $id);
        //construct email
        $message = drawEmailHeader();
        $message .= drawServerMessage("<b>Note</b>: This is an Administration/Human Resources topic from the <a href='http://" . $server . "/bulletin_board/'>Intranet Bulletin Board</a>.  For more information, please contact the <a href='mailto:hrpayroll@seedco.org'>Human Resources Department</a>.");
        $message .= '<table class="center">';
        $message .= drawHeaderRow("Email", 2);
        $message .= drawThreadTop($r["title"], $r["description"], $r["userID"], $r["firstname"] . " " . $r["lastname"], $r["createdOn"]);
        $message .= '</table>' . drawEmailFooter();
        $headers = "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        $headers .= "From: " . $_josh["email_default"] . "\r\n";
        //get addresses & send
        $users = db_query("SELECT email FROM intranet_users WHERE isactive = 1");
        while ($u = db_fetch($users)) {
            mail($u["email"], $r["title"], $message, $headers);
        }
    }
    syndicateBulletinBoard();
    url_change();
}
drawTop();
echo drawSyndicateLink("bb");
Пример #2
0
        ?>
</a></td>
			</tr>
		<?php 
    }
    ?>
		</table>
		</td>
	</tr>
	<?php 
}
?>
	</form>
	<?php 
$editurl = $page['is_admin'] ? "ticket-edit.php?id=" . $_GET["id"] : false;
echo drawThreadTop($r["title"], $r["description"], $r["created_user"], $r["first"] . " " . $r["last"], $r["created_date"], $editurl);
$result = db_query("SELECT\r\n\t\t\t\t\tu.id,\r\n\t\t\t\t\tf.message,\r\n\t\t\t\t\tISNULL(u.nickname, u.firstname) first,\r\n\t\t\t\t\tu.lastname last,\r\n\t\t\t\t\tf.created_date,\r\n\t\t\t\t\tf.is_admin\r\n\t\t\t\tFROM helpdesk_tickets_followups\tf\r\n\t\t\t\tJOIN users\t\t\tu ON f.created_user\t= u.id\r\n\t\t\t\tWHERE f.ticketID = " . $_GET['id'] . "\r\n\t\t\t\tORDER BY f.created_date");
while ($r = db_fetch($result)) {
    if ($r['is_admin'] && !$page['is_admin']) {
        continue;
    }
    echo drawThreadComment($r["message"], $r["id"], $r["first"] . " " . $r["last"], $r["created_date"], $r["is_admin"]);
}
echo drawThreadCommentForm(true);
echo '</table>';
?>
<table class="left" cellspacing="1">
	<?php 
echo drawHeaderRow("Attach Document", 2);
?>
	<form enctype="multipart/form-data" action="<?php