Beispiel #1
0
/**
This is a necessary system file. Do not modify this page unless you are highly
knowledgeable as to the structure of the system. Modification of this file may
cause SMS to no longer function.

Author: David VanScott [ davidv@anodyne-productions.com ]
File: pages/simm.php
Purpose: Main page for the simm section

System Version: 2.6.0
Last Modified: 2007-10-10 1016 EST
**/
/* define the page class and vars */
$pageClass = "simm";
$co = printCO();
/* pull in the menu */
if (isset($sessionCrewid)) {
    include_once 'skins/' . $sessionDisplaySkin . '/menu.php';
} else {
    include_once 'skins/' . $skin . '/menu.php';
}
?>

<div class="body">
	<span class="fontTitle">Welcome to the Simm</span>
	<?php 
/*
	if the person is logged in and has level 5 access, display an icon
	that will take them to edit the entry
*/
Beispiel #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>
Beispiel #3
0
$check = new QueryCheck();
$check->checkQuery($result, $query);
if (!empty($check->query)) {
    $check->message("message", $action);
    $check->display();
}
?>
	
	<span class="fontTitle">Contact Us</span><br /><br />
	
	<table>
		<tr>
			<td class="tableCellLabel">Commanding Officer</td>
			<td>&nbsp;</td>
			<td><?php 
echo printCO();
?>
</td>
		</tr>
		<tr>
			<td class="tableCellLabel">Executive Officer</td>
			<td>&nbsp;</td>
			<td><?php 
echo printXO();
?>
</td>
		</tr>
		
		<?php 
if ($hasWebmaster == "y") {
    ?>
Beispiel #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 */
Beispiel #5
0
            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();
    }
    ?>