$emailAuthor = $_POST['author1']; } /* set the email author */ $userFetch = "SELECT crew.crewid, crew.firstName, crew.lastName, crew.email, rank.rankShortName "; $userFetch .= "FROM sms_crew AS crew, sms_ranks AS rank "; $userFetch .= "WHERE crew.crewid = {$emailAuthor} AND crew.rankid = rank.rankid LIMIT 1"; $userFetchResult = mysql_query($userFetch); while ($userFetchArray = mysql_fetch_array($userFetchResult)) { extract($userFetchArray, EXTR_OVERWRITE); } $firstName = str_replace("'", "", $firstName); $lastName = str_replace("'", "", $lastName); $from = $rankShortName . " " . $firstName . " " . $lastName . " < " . $email . " >"; /* define the variables */ $to = getCrewEmails("emailPosts"); $subject = $emailSubject . " " . printMissionTitle($postMission) . " - " . $postTitle; $message = "A Post By " . displayEmailAuthors($postAuthors, 'noLink') . "\r\n"; $message .= "Location: " . stripslashes($postLocation) . "\r\n"; $message .= "Timeline: " . stripslashes($postTimeline) . "\r\n"; $message .= "Tag: " . stripslashes($postTag) . "\r\n\r\n"; $message .= stripslashes($postContent); /* send the email */ mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion()); } } ?> <script type="text/javascript"> $(document).ready(function() { $('#participants').change(function(){ var number = $(this).val();
if (count($missions) == 0) { echo "<b>You must <a href='" . $webLocation . "admin.php?page=manage&sub=missions'>create a mission</a> before posting!</b>"; } elseif (count($missions) > 1) { echo "<select name='postMission'>"; foreach ($missions as $k => $v) { if ($postMission == $v['id']) { $selected = ' selected'; } else { $selected = ''; } echo "<option value='" . $v['id'] . "'" . $selected . ">" . $v['title'] . "</option>"; } echo "</select>"; } else { echo "<a href='" . $webLocation . "index.php?page=mission&id=" . $postMission . "'>"; echo printMissionTitle($postMission); echo "</a>"; echo "<input type='hidden' name='postMission' value='" . $postMission . "' />"; } ?> </td> </tr> <tr> <td class="narrowLabel tableCellLabel">Title</td> <td> </td> <td> <input type="text" class="name" style="font-weight:bold;" maxlength="100" name="postTitle" value="<?php echo print_input_text($postTitle); ?> " /> </td>
System Version: 2.6.0 Last Modified: 2008-04-19 1617 EST **/ /* set the page class */ $pageClass = "admin"; $subMenuClass = "post"; $getNotes = "SELECT missionid, missionNotes FROM sms_missions WHERE missionStatus = 'current' LIMIT 1"; $getNotesResult = mysql_query($getNotes); $notes = mysql_fetch_array($getNotesResult); ?> <div class="body"> <span class="fontTitle"> Mission Notes - <i><?php echo printMissionTitle($notes[0]); ?> </i> <?php if (in_array("m_missionnotes", $sessionAccess)) { ?> <a href="<?php echo $webLocation; ?> admin.php?page=manage&sub=missionnotes"> <img src="<?php echo $webLocation; ?> images/edit.png" border="0" alt="[ Edit ]" />
$getPostContentsResult = mysql_query($getPostContents); $fetchPost = mysql_fetch_assoc($getPostContentsResult); /* set the email author */ $userFetch = "SELECT crew.crewid, crew.firstName, crew.lastName, crew.email, "; $userFetch .= "rank.rankShortName FROM sms_crew AS crew, sms_ranks AS rank WHERE "; $userFetch .= "crew.crewid = '{$fetchPost['postAuthor']}' AND crew.rankid = rank.rankid LIMIT 1"; $userFetchResult = mysql_query($userFetch); while ($userFetchArray = mysql_fetch_array($userFetchResult)) { extract($userFetchArray, EXTR_OVERWRITE); } $firstName = str_replace("'", "", $firstName); $lastName = str_replace("'", "", $lastName); $from = $rankShortName . " " . $firstName . " " . $lastName . " < " . $email . " >"; /* define the variables */ $to = getCrewEmails("emailPosts"); $subject = $emailSubject . " " . printMissionTitle($fetchPost['postMission']) . " - " . $fetchPost['postTitle']; $message = "A Post By " . displayEmailAuthors($fetchPost['postAuthor'], 'noLink') . "\r\n"; $message .= "Location: " . stripslashes($fetchPost['postLocation']) . "\r\n"; $message .= "Timeline: " . stripslashes($fetchPost['postTimeline']) . "\r\n"; $message .= "Tag: " . stripslashes($fetchPost['postTag']) . "\r\n\r\n"; $message .= stripslashes($fetchPost['postContent']); /* send the email */ mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion()); break; case 'delete': $query = "DELETE FROM sms_posts WHERE postid = {$action_id} LIMIT 1"; $result = mysql_query($query); /* optimize the table */ optimizeSQLTable("sms_posts"); break; }