示例#1
0
<?php

include '../inc/config.php';
$ecard = getTeamNomination($_GET['id']);
$ecardImage = str_replace(' ', '-', strtolower($ecard->BeliefID));
$searchList = array_to_object(getThisTeamMembers($ecard->ID));
foreach ($searchList as $list) {
    $teamEmailList .= getName($list->EmpNum) . ", ";
    if (!isset($firstPersonEmpNum)) {
        $firstPersonEmpNum = $list;
    }
}
$teamEmailList = chop($teamEmailList, ", ");
$teamEmailList = strrev(implode(strrev(' and'), explode(',', strrev($teamEmailList), 2)));
$ecard->teamEmailList = $teamEmailList;
?>

<div class="ecardPadding">
	<?php 
// get first team member
$ecard->full_name = $firstPersonEmpNum->Fname . ' ' . $firstPersonEmpNum->Sname;
$ecard->Fname = $ecard->Team;
if ($ecard->Volunteer != '') {
    $ecard->NomFull_name = $ecard->Volunteer;
} else {
    $ecard->NomFull_name = getName($ecard->NominatorEmpNum);
}
$ecard->NomFname = getFirstName($ecard->NominatorEmpNum);
if ($ecard->littleExtra == 'Yes') {
    echo indEcardTeamExtraText($ecard);
} else {
示例#2
0
<?php

include '../inc/config.php';
if (isset($_GET['name']) && $_GET['name'] == 'message') {
    global $db;
    $recipientTeam = $_POST["recipientTeam"];
    $EmpNum = $_POST["senderTeam"];
    $date = date('Y-m-d H:i:s');
    // need to get each team member
    $TeamMembers = getThisTeamMembers($recipientTeam);
    foreach ($TeamMembers as $list) {
        $stmt = $db->prepare("INSERT INTO tblmessage (recipient, sender, Department, text, date) VALUES (:recipient, :sender, :Department, :text, :date)");
        $NominatedEmpNum = $list['EmpNum'];
        $stmt->bindValue(':recipient', $NominatedEmpNum, PDO::PARAM_STR);
        $stmt->bindValue(':sender', $EmpNum, PDO::PARAM_STR);
        $Department = $list['Department'];
        $stmt->bindValue(':Department', $Department, PDO::PARAM_STR);
        $text = 'Hi ' . $list['Fname'] . '. I saw your "Our Heroes" award on the Wall of Fame. Congratulations! ' . getName($EmpNum);
        $stmt->bindValue(':text', $text, PDO::PARAM_STR);
        $stmt->bindValue(':date', $date, PDO::PARAM_STR);
        $stmt->execute();
        $recipient = getUser($NominatedEmpNum);
        $senderTeam = getUser($EmpNum);
        $sendEmail = new StdClass();
        $sendEmail->subject = 'Award Notification';
        if (filter_var($recipient->Eaddress, FILTER_VALIDATE_EMAIL)) {
            $sendEmail->emailTo = $recipient->Eaddress;
            $sendEmail->Content = "<p>Hello " . $recipient->Fname . "</p>\n\t\t\t\t\t\t\t\t\t\t<p>" . $senderTeam->Fname . " has sent you a message from the Our Heroes Portal.</p>\n\t\t\t\t\t\t\t\t\t\t<p>Message: " . $text . "</p>\n\t\t\t\t\t\t\t\t\t\t<p>To see who else has recently won awards or to nominate a colleague, please login to the <a href='" . HTTP_PATH . "'>Our Heroes Portal</a>.</p>";
            $email = sendEmail($sendEmail, '');
            echo "success";
        } else {
示例#3
0
文件: index.php 项目: DbyD/cruk
								<p>Belief: <?php 
                echo $employee["BeliefID"];
                ?>
</p>
								<p>Nominated By:<br><b><?php 
                echo getname($employee["NominatorEmpNum"]);
                ?>
</b></p>
							</div>
							<span id="wallT<?php 
                echo $employee["ID"];
                ?>
Text" class="showbehaviour hidden mCustomScrollbar height260" data-mcs-theme="dark-2">
								<?php 
                echo "<b>Team Members:</b><br>";
                $TeamMembers = getThisTeamMembers($employee['ID']);
                foreach ($TeamMembers as $list) {
                    echo getName($list['EmpNum']) . '<br>';
                }
                echo "<hr><b>Award message:</b><br>";
                echo $employee["personalMessage"];
                ?>
							</span>
						</div>
					</div>
					<?php 
            } else {
                ?>
					<div class="callout panel tableColumn-3 <?php 
                echo $class;
                ?>
示例#4
0
文件: footer.php 项目: DbyD/cruk
 Awards
					</div>
					<div id="awardList" class="mCustomScrollbar height158" data-mcs-theme="dark-2">
					<?php 
$res = getMostRecentAwards();
if ($res != 0) {
    foreach ($res as $key => $value) {
        if ($value['Type'] == 'Team') {
            ?>
						<div class="row">
							<div class="small-2 medium-2 columns">
								<i class="icon-icons_group"></i>
							</div>
							<div class="small-10 medium-10 columns">
									<?php 
            $TeamMembers = getThisTeamMembers($value['ID']);
            //print_r($TeamMembers);
            foreach ($TeamMembers as $list) {
                echo getName($list['EmpNum']) . '<br>';
            }
            ?>
								<p><?php 
            echo $value['BeliefID'];
            ?>
</p>
							</div>
						</div>
						<?php 
        } else {
            ?>
						<div class="row">