Exemple #1
0
     $userFetch .= "WHERE crew.crewid = {$sessionCrewid} 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 . " >";
         $name = $userFetchArray['rankName'] . " " . $userFetchArray['firstName'] . " " . $userFetchArray['lastName'];
     }
     foreach ($_POST as $k => $v) {
         ${$k} = $v;
     }
     /* if the post has an activated status */
     switch ($logStatus) {
         case 'activated':
             $to = getCrewEmails("emailLogs");
             $subject = $emailSubject . " " . $name . "'s Personal Log - " . stripslashes($logTitle);
             $message = stripslashes($logContent);
             break;
         case 'pending':
             $to = printCOEmail();
             $subject = $emailSubject . " " . $name . "'s Personal Log - " . stripslashes($logTitle) . " (Awaiting Approval)";
             $message = stripslashes($logContent) . "\r\n\r\n";
             $message .= "Please log in to approve this log.  " . $webLocation . "login.php?action=login";
             break;
     }
     /* send the email */
     mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
 } elseif (isset($_POST['action_save_x'])) {
     if (!isset($id)) {
         $insert = "INSERT INTO sms_personallogs (logAuthor, logTitle, logContent, logPosted, logStatus) VALUES (%d, %s, %s, %d, %s)";
Exemple #2
0
            if (is_numeric($_POST['author1'])) {
                $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(){
Exemple #3
0
             $getCategory = "SELECT catName FROM sms_news_categories WHERE catid = '{$fetchNews['newsCat']}' LIMIT 1";
             $getCategoryResult = mysql_query($getCategory);
             $category = mysql_fetch_assoc($getCategoryResult);
             /* 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 = '{$fetchNews['newsAuthor']}' 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("emailNews");
             $subject = $emailSubject . " " . stripslashes($category['catName']) . " - " . stripslashes($fetchNews['newsTitle']);
             $message = "A News Item Posted By " . printCrewNameEmail($fetchNews['newsAuthor']) . "\r\n\r\n";
             $message .= stripslashes($fetchNews['newsContent']);
             /* send the email */
             mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
             break;
         case 'delete':
             $query = "DELETE FROM sms_news WHERE newsid = {$action_id} LIMIT 1";
             $result = mysql_query($query);
             /* optimize the table */
             optimizeSQLTable("sms_news");
             break;
     }
 }
 if ($action_category == 'award' && in_array('m_giveaward', $sessionAccess)) {