Example #1
0
File: jp.php Project: anodyne/sms
     foreach ($_POST as $key => $value) {
         ${$key} = $value;
     }
     /* if the post has an activated status */
     switch ($postStatus) {
         case 'activated':
             $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);
             break;
         case 'pending':
             $to = printCOEmail();
             $subject = $emailSubject . " " . printMissionTitle($postMission) . " - " . $postTitle . " (Awaiting Approval)";
             $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) . "\r\n\r\n";
             $message .= "Please log in to approve this post.  " . $webLocation . "login.php?action=login";
             break;
     }
     /* send the nomination email */
     mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
 } elseif (isset($_POST['action_save_x'])) {
     $author_count = $_POST['authorCount'];
     $authors_array = array();
     $authors_emails = array();
Example #2
0
            /* set up a counter */
            $i = 0;
            /* add random characters to $password until $length is reached */
            while ($i < $length) {
                /* pick a random character from the possible ones */
                $char = substr($possible, mt_rand(0, strlen($possible) - 1), 1);
                /* we don't want this character if it's already in the password */
                if (!strstr($password, $char)) {
                    $password .= $char;
                    $i++;
                }
            }
            $from = printCOEmail();
            $newPassword = md5($password);
            $to = $fetch[1];
            $from = printCO() . ' <' . printCOEmail() . '>';
            $subject = "[" . $shipPrefix . " " . $shipName . "] Password Reset";
            $message = "Your new password is listed below. You can log in with this new password and your existing username. It is recommended that you change your password once you log in.\n\n\tPassword: {$password}\n\n\tThis is an automatically generated email, please do not reply.";
            mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
            $updatePassword = "******";
            $passwordResult = mysql_query($updatePassword);
        }
    }
}
?>

<!DOCTYPE html PUBLIC "-/*W3C/*DTD XHTML 1.0 Transitional/*EN"
"http:/*www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>Login</title>
Example #3
0
            $result = mysql_query($query);
            /* optimize the table */
            optimizeSQLTable("sms_starbase_docking");
            foreach ($_POST as $key => $value) {
                ${$key} = $value;
            }
            if (!empty($result)) {
                /* email the ship CO */
                $subject1 = $emailSubject . " Docking Request";
                $to1 = $dockingShipCOEmail;
                $from1 = printCO() . " < " . printCOEmail() . " >";
                $message1 = $dockingShipCO . ", thank you for submitting a request to dock with " . $shipPrefix . " " . $shipName . ".  The CO has been sent a copy of your request and will be reviewing it shortly.  In the meantime, please feel free to browse our site (" . $webLocation . ") until the CO reviews your request.\n\t\t\nThis is an automatically generated message, please do not respond.";
                mail($to1, $subject1, $message1, "From: " . $from1 . "\nX-Mailer: PHP/" . phpversion());
                /* email the CO */
                $subject2 = $emailSubject . " Docking Request";
                $to2 = printCOEmail();
                $from2 = $dockingShipCO . " < " . $dockingShipCOEmail . " >";
                $message2 = "Greetings " . printCO() . ",\n\t\t\t\n\t{$dockingShipCO} of the {$dockingShipName} has sent a request to dock with the {$shipName}.  To answer the Commanding Officer and approve or deny his request, please log in to your Control Panel.\n\t\t\n" . $webLocation . "login.php?action=login";
                mail($to2, $subject2, $message2, "From: " . $from2 . "\nX-Mailer: PHP/" . phpversion());
            }
        }
    }
    ?>

	<div class="body">
		<?php 
    $check = new QueryCheck();
    $check->checkQuery($result, $query);
    if (!empty($check->query)) {
        $check->message("docking request", "submit");
        $check->display();
Example #4
0
                 /* send the email */
                 mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
                 break;
             case 'deny':
                 $query = "DELETE FROM sms_starbase_docking WHERE dockid = {$action_id} LIMIT 1";
                 $result = mysql_query($query);
                 /* optimize the table */
                 optimizeSQLTable("sms_stabase_docking");
                 /** EMAIL THE DENIAL **/
                 /* set the email author */
                 $emailFetch = "SELECT dockingShipCOEmail FROM sms_starbase_docking WHERE dockid = {$action_id} LIMIT 1";
                 $emailFetchResult = mysql_query($emailFetch);
                 $coEmail = mysql_fetch_assoc($emailFetchResult);
                 /* define the variables */
                 $to = $coEmail['dockingShipCOEmail'] . ", " . printCOEmail();
                 $from = printCO('short_rank') . " < " . printCOEmail() . " >";
                 $subject = $emailSubject . " Your Docking Request";
                 $message = "Thank you for submitting a request to dock with the " . $shipPrefix . " " . $shipName . ".  After reviewing your application, we regret to inform you that your request to dock with our starbase has been denied.  There can be many reasons for this.  If you would like clarification, please contact the CO.";
                 /* send the email */
                 mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
                 break;
         }
     }
 }
 /* get pending users */
 $getPendingUsers = "SELECT crew.crewid, crew.firstName, crew.lastName, position.positionName ";
 $getPendingUsers .= "FROM sms_crew AS crew, sms_positions AS position WHERE ";
 $getPendingUsers .= "crew.positionid = position.positionid AND crew.crewType = 'pending'";
 $getPendingUsersResult = mysql_query($getPendingUsers);
 $countPendingUsers = mysql_num_rows($getPendingUsersResult);
 /* get pending mission posts */
Example #5
0
                break;
        }
        /** EMAIL THE REQUEST **/
        /* 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 = '{$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 . " >";
        /* define the email variables */
        $to = printCOEmail() . ", " . printXOEmail();
        $subject = $emailSubject . " Status Change Request";
        $message = $_POST['crewMember'] . " has requested that their status be changed to {$newStatus}.\n\nDuration: " . stripslashes($_POST['duration']) . "\nReason: " . stripslashes($_POST['reason']);
        /* send the nomination email */
        mail($to, $subject, $message, "From: " . $from . "\nX-Mailer: PHP/" . phpversion());
    }
    ?>

	<div class="body">
		
		<?php 
    $check = new QueryCheck();
    $check->checkQuery($result, $query);
    if (!empty($check->query)) {
        $check->message("status", "update");
        $check->display();