• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP nameByNetId函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中nameByNetId函数的典型用法代码示例。如果您正苦于以下问题:PHP nameByNetId函数的具体用法?PHP nameByNetId怎么用?PHP nameByNetId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了nameByNetId函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: printCurrentRaiseTable

function printCurrentRaiseTable()
{
    global $area;
    global $netID;
    global $db;
    //This query sums up the raises field to give us accurate wage totals.
    try {
        $logQuery = $db->prepare("SELECT `index`, `netID`, `raise`, FORMAT((SELECT SUM(ew.raise) FROM `employeeRaiseLog` AS ew WHERE ew.date <= ew_outer.date AND ew.netid = ew_outer.netid), 2)\n\t\t\t AS `newWage`, `submitter`, `date`, `comments`, `isSubmitted` FROM `employeeRaiseLog` AS `ew_outer` WHERE `submitter` = :netId AND isSubmitted='0' ORDER BY netID ASC,`date` ASC");
        $logQuery->execute(array(':netId' => $netID));
    } catch (PDOException $e) {
        exit("error in query");
    }
    while ($curRaise = $logQuery->fetch(PDO::FETCH_ASSOC)) {
        echo "<tr><td>";
        echo "<input type='checkbox' name='email[" . $curRaise['index'] . "]' id='email[" . $curRaise['index'] . "]' value='1' </td><td>";
        echo nameByNetId($curRaise['netID']) . "</td><td>";
        echo $curRaise['newWage'] . "</td><td>";
        echo $curRaise['raise'] . "</td><td>";
        echo $curRaise['comments'] . "</td><td>";
        echo date("Y-m-d", strtotime($curRaise['date'])) . "</td><td>";
        echo "<input type='button' value='Edit' id='edit" . $curRaise['index'] . "' onclick='javascript:newwindow(\"../editRaise.php?raiseId=" . $curRaise['index'] . "\")' /></td><td>";
        echo "<input type='button' value='Delete' id='delete" . $curRaise['index'] . "' onclick='deleteRaise(" . $curRaise['index'] . ")' />";
        echo "</td></tr>";
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:25,代码来源:printRaise.php


示例2: printFamousPeople

function printFamousPeople()
{
    global $area, $db;
    try {
        $commendableQuery = $db->prepare("SELECT * FROM `reportCommendable` WHERE `public`='1' AND `area`=:area AND `timeStamp` > (NOW() - INTERVAL 3 WEEK) ORDER BY timeStamp DESC");
        $commendableQuery->execute(array(':area' => $area));
    } catch (PDOException $e) {
        exit("error in query");
    }
    if ($first = $commendableQuery->fetch(PDO::FETCH_ASSOC)) {
        echo "<div class='employee'>";
        echo "<img class='employeeImage' src='" . getenv("BYUPIPHOTO") . "?n={$first['employee']}'>";
        echo "<div class='employeeName'>" . nameByNetId($first['employee']) . "</div>";
        echo "<div class='date'>" . $first['date'] . "</div>";
        echo "<div class='comments'>" . $first['reason'] . "</div>";
        echo "</div>";
        while ($cur = $commendableQuery->fetch(PDO::FETCH_ASSOC)) {
            echo "<div class='employee'>";
            echo "<img class='employeeImage' src='" . getenv("BYUPIPHOTO") . "?n={$cur['employee']}'>";
            echo "<div class='employeeName'>" . nameByNetId($cur['employee']) . "</div>";
            echo "<div class='date'>" . $cur['date'] . "</div>";
            echo "<div class='comments'>" . $cur['reason'] . "</div>";
            echo "</div>";
        }
        echo "</table>";
    } else {
        echo "<h2 align='center'>No Commendables awarded in the last week.</h2>";
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:29,代码来源:wallOfFame.php


示例3: displayTeamsTable

function displayTeamsTable($area)
{
    global $db;
    try {
        $teamsQuery = $db->prepare("SELECT * FROM teams WHERE area=:area ORDER BY name");
        $teamsQuery->execute(array(':area' => $area));
    } catch (PDOException $e) {
        exit("error in query");
    }
    while ($curTeam = $teamsQuery->fetch(PDO::FETCH_ASSOC)) {
        echo "<tr>";
        echo "<td>" . $curTeam['name'] . "</td>";
        echo "<td>" . nameByNetId($curTeam['lead']) . "</td>";
        echo "<td>" . $curTeam['email'] . "</td>";
        try {
            $membersQuery = $db->prepare("SELECT * FROM `teamMembers` JOIN `employee` ON `teamMembers`.`netID`=`employee`.`netID` WHERE `teamMembers`.`teamID` = :id ORDER BY `employee`.`firstName`");
            $membersQuery->execute(array(':id' => $curTeam['ID']));
        } catch (PDOException $e) {
            exit("error in query");
        }
        echo "<td>";
        while ($cur = $membersQuery->fetch(PDO::FETCH_ASSOC)) {
            echo nameByNetId($cur['netID']);
            if ($cur['isSupervisor']) {
                echo " (Supervisor)";
            }
            echo "<br/>";
        }
        echo "</td></tr>";
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:31,代码来源:viewTeams.php


示例4: formEmail

function formEmail($postData)
{
    echo "Subject: " . getEmailType($postData['type']) . "Executive Notification: ";
    echo $postData['subject'];
    echo "\nNotification Time: " . $postData['time'];
    echo "\nNotification Date: " . date('m/d/Y', strtotime($postData['date']));
    echo "\nParent Ticket: INC" . $postData['parentTicket'];
    echo "\nPriority: " . $postData['priority'];
    echo "\nIncident Coordinator: " . nameByNetId($postData['ic']);
    echo "\nProblem Description: " . $postData['desc'];
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:11,代码来源:preview.php


示例5: printEmployees

function printEmployees()
{
    global $netID;
    global $readPermission;
    if ($readPermission) {
        echo "<select id='employees' name='employees' onchange>";
        employeeFillCurrentArea();
        echo "</select>";
    } else {
        echo nameByNetId($netID);
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:12,代码来源:absenceLog.php


示例6: formatEmailBody

 function formatEmailBody($supressed)
 {
     global $netID, $db;
     $body = '';
     $count = 0;
     echo "<br/>";
     //This queries for the list of employees you have raises pending for, with each net ID appearing once.
     try {
         $employeeQuery = $db->prepare("SELECT DISTINCT netID FROM employeeRaiseLog WHERE submitter = :netId AND isSubmitted = '0' ORDER BY netID ASC");
         $employeeQuery->execute(array(':netId' => $netID));
     } catch (PDOException $e) {
         exit("error in query");
     }
     //This cycles through each net ID producing the section of the email for that net ID
     while ($cur = $employeeQuery->fetch(PDO::FETCH_ASSOC)) {
         $count = 0;
         $toBeAdded = '';
         $toBeAdded .= "<b>" . nameByNetId($cur['netID']) . " - BYU ID: " . getEmployeeByuIdByNetId($cur['netID']) . " - Net ID: " . $cur['netID'] . "</b><br/>";
         $toBeAdded .= "<table><tr><th>Reason</th><th>Raise</th><th>Date Effective</th></tr>";
         //Queries for ALL pending raises for the current net ID that was submitted by you
         try {
             $logQuery = $db->prepare("SELECT * FROM employeeRaiseLog WHERE submitter = :submitter AND isSubmitted = '0' AND netID = :employee ORDER BY date ASC");
             $logQuery->execute(array(':submitter' => $netID, ':employee' => $cur['netID']));
         } catch (PDOException $e) {
             exit("error in query");
         }
         //Adds each pending raise to the html table in the email.
         while ($raise = $logQuery->fetch(PDO::FETCH_ASSOC)) {
             if (!in_array($raise['index'], $supressed)) {
                 $toBeAdded .= "<tr>";
                 $toBeAdded .= "<td>" . $raise['comments'] . "</td>";
                 $toBeAdded .= "<td><b>" . $raise['raise'] . "</b></td>";
                 $toBeAdded .= "<td>" . date('Y-m-d', strtotime($raise['date'])) . "</td>";
                 $toBeAdded .= "</tr>";
                 $count++;
             }
             //This updates the raise in the database to no longer be pending.
             try {
                 $updateQuery = $db->prepare("UPDATE employeeRaiseLog SET isSubmitted = '1' WHERE `index` = :index");
                 $updateQuery->execute(array(':index' => $raise['index']));
             } catch (PDOException $e) {
                 exit("error in query");
             }
         }
         $toBeAdded .= "<tr><th>New wage</th><th>" . getEmployeeWageByNetId($cur['netID']) . "</th>";
         $toBeAdded .= "</table><br/><br/>";
         if ($count > 0) {
             $body .= $toBeAdded;
         }
     }
     return $body;
 }
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:52,代码来源:index.php


示例7: printAvailableMonitors

function printAvailableMonitors()
{
    global $db;
    try {
        $incompleteQuery = $db->prepare("SELECT * FROM silentMonitor WHERE completed ='0' AND `deleted` = '0' ORDER BY submitDate ASC");
        $incompleteQuery->execute();
    } catch (PDOException $e) {
        exit("error in query");
    }
    while ($cur = $incompleteQuery->fetch(PDO::FETCH_ASSOC)) {
        echo '<input type="radio" name="id" id="id" value="' . $cur['index'] . '" />Started on: ' . date("l, M j, Y", strtotime($cur['submitDate'])) . ', for ' . nameByNetId($cur['netID']) . '  <a href="deleteMonitor.php?id=' . $cur['index'] . '">Delete</a><br />';
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:13,代码来源:loadIncompleteMonitor.php


示例8: printEmployees

function printEmployees($employee)
{
    global $netID;
    global $admin;
    global $area;
    if ($admin) {
        echo "<select id='employees' name='employees' onchange>";
        echo employeeFillSelected($employee, $area);
        echo "</select>";
    } else {
        echo nameByNetId($netID);
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:13,代码来源:silentMonitorLog.php


示例9: sendEmail

function sendEmail($comments, $location)
{
    global $area;
    global $env;
    global $netID;
    $employeeName = nameByNetId($netID);
    $employeeEmail = getEmployeeEmailByNetId($netID);
    $subject = 'Info Change Request';
    $emailBody = <<<STRING
\t<b>Info Change Request: </b> <br />{$comments}<br /> <br />
\t<b>Location: </b>{$location}<br /> <br />
\t
\tThank you, <br />
\t{$employeeName}
\t
STRING;
    if ($env == 2) {
        if ($area == 3) {
            //Service Desk
            $to = getenv("SDALIAS");
        } else {
            if ($area == 4) {
                //COS
                $to = getenv("COSALIAS");
            } else {
                if ($area == 6) {
                    // Security Desk
                    $to = getenv("SECURITYDESKEMAILS");
                }
            }
        }
    } else {
        $to = getenv("DEVEMAILADDRESS");
    }
    $headers = 'From: ' . $employeeName . ' <' . $employeeEmail . '>' . "\r\n";
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'Return-Path: ' . $employeeEmail . "\r\n";
    if (mail($to, $subject, $emailBody, $headers)) {
        echo '<h2 style="text-align: center;">Email was sent successfully.</h2>';
    } else {
        echo '<h2 style="text-align: center;">Email failed to be sent.</h2>';
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:44,代码来源:index.php


示例10: printReport

function printReport($employee, $start, $end, $securityProblems, $shiftProblems, $misc, $params)
{
    global $area, $admin, $db;
    $default = ' 1=1 ';
    $params[':area'] = $area;
    $params[':start'] = $start;
    $params[':end'] = $end;
    try {
        $securityDeskQuery = $db->prepare("SELECT * FROM `supervisorReportSecurityDesk` WHERE `area` = :area AND `date` >= :start AND `date` <= :end AND (" . $default . $employee . $securityProblems . $shiftProblems . $misc . ")");
        $securityDeskQuery->execute($params);
    } catch (PDOException $e) {
        exit("error in query");
    }
    if ($first = $securityDeskQuery->fetch(PDO::FETCH_ASSOC)) {
        echo "<table>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<th>Employee</th><th>Date</th><th>Shift</th><th>securityProblems</th><th>Shift Problems</th>\r\n\t\t\t\t<th>Misc</th><th></th></tr>";
        echo "<tr>";
        echo "<td>" . nameByNetId($first['submitter']) . "</td>";
        echo "<td>" . $first['date'] . "</td>";
        echo "<td>" . $first['startTime'] . " - " . $first['endTime'] . "</td>";
        echo "<td>" . $first['securityProblems'] . "</td>";
        echo "<td>" . $first['shiftProblems'] . "</td>";
        echo "<td>" . $first['misc'] . "</td><td>";
        if ($admin) {
            echo "<input type='button' value='Edit' onclick=editReport('" . $first['ID'] . "') />";
        }
        echo "</td></tr>";
        while ($cur = $securityDeskQuery->fetch(PDO::FETCH_ASSOC)) {
            echo "<tr>";
            echo "<td>" . nameByNetId($cur['submitter']) . "</td>";
            echo "<td>" . $cur['date'] . "</td>";
            echo "<td>" . $cur['startTime'] . " - " . $cur['endTime'] . "</td>";
            echo "<td>" . $cur['securityProblems'] . "</td>";
            echo "<td>" . $cur['shiftProblems'] . "</td>";
            echo "<td>" . $cur['misc'] . "</td><td>";
            if ($admin) {
                echo "<input type='button' value='Edit' onclick=editReport('" . $cur['ID'] . "') />";
            }
            echo "</td></tr>";
        }
        echo "</table>";
    } else {
        echo "No reports during this period";
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:44,代码来源:printSecurityLog.php


示例11: sendEmail

function sendEmail($employeeNetID, $timeStamp, $supervisor)
{
    global $area;
    global $env;
    $server = '';
    $to = '';
    if ($env == 0) {
        $server = getenv("DEVURL");
    } else {
        if ($env == 1) {
            $server = getenv("STAGEURL");
        } else {
            if ($env == 2) {
                $server = getenv("PRODURL");
            }
        }
    }
    $timeStampDate = explode(" ", $timeStamp);
    // $timeStampDate[0] = yyyy/mm/dd // $timeStampDate[1]  hh:mm:ss
    $timeStampTime = explode(":", $timeStampDate[1]);
    $formattedTimeStamp = $timeStampDate[0] . '-' . $timeStampTime[0] . '-' . $timeStampTime[1] . '-' . $timeStampTime[2];
    $subject = 'Ticket Reviews were submitted for you';
    $emailBody = 'Dear ' . nameByNetId($employeeNetID) . ', <br /><br />';
    $emailBody .= 'Ticket Reviews were submitted for you by ' . nameByNetId($supervisor) . '.  Please view the information in the link below.<br /> <br />';
    $emailBody .= '<a href=https://' . $server . '/ticketReview/individualTicketReview.php?employee=' . $employeeNetID . '&timeSubmitted=' . urlencode($formattedTimeStamp) . '>Click here to see your ticket reviews</a><br /><br />Or copy this link in the address bar of your browser.<br /> 
	https://' . $server . '/ticketReview/individualTicketReview.php?employee=' . $employeeNetID . '&timeSubmitted=' . urlencode($formattedTimeStamp) . '<br /><br />Thanks!';
    if ($env == 2) {
        $to = getEmployeeEmailByNetId($employeeNetID);
    } else {
        $to = getenv("DEVEMAILADDRESS");
    }
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: ' . nameByNetId($supervisor) . ' <' . getEmployeeEmailByNetId($supervisor) . '>' . "\r\n";
    $headers .= 'Return-Path: ' . getEmployeeEmailByNetId($supervisor) . "\r\n";
    if (mail($to, $subject, $emailBody, $headers)) {
        return true;
    } else {
        return false;
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:41,代码来源:ticketReviewFunctions.php


示例12: getICList

function getICList($selected)
{
    global $db;
    try {
        $permissionQuery = $db->prepare("SELECT * FROM `permissionArea` JOIN `permission` ON `permissionArea`.`permissionId` = `permission`.`permissionId` WHERE shortName='ic'");
        $permissionQuery->execute();
    } catch (PDOException $e) {
        exit("error in query");
    }
    $perm = $permissionQuery->fetch(PDO::FETCH_ASSOC);
    try {
        $employeePermissionQuery = $db->prepare("SELECT * FROM employeePermissions JOIN employee ON `employeePermissions`.`netID` = `employee`.`netID` WHERE employeePermissions.permission = :permission ORDER BY `employee`.`firstName`");
        $employeePermissionQuery->execute(array(':permission' => $perm['index']));
    } catch (PDOException $e) {
        exit("error in query");
    }
    while ($cur = $employeePermissionQuery->fetch(PDO::FETCH_ASSOC)) {
        if ($selected == $cur['netID']) {
            echo "<option value='" . $cur['netID'] . "' selected>" . nameByNetId($cur['netID']) . "</option>";
        } else {
            echo "<option value='" . $cur['netID'] . "'>" . nameByNetId($cur['netID']) . "</option>";
        }
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:24,代码来源:execNoteFunctions.php


示例13: confirmSubmission

</script>
<form id='reportData' method='post' onsubmit="return confirmSubmission()">
<input type="hidden" id="employeeName" name="employeeName" value="<?php 
echo nameByNetId($netID);
?>
">
<input type="hidden" id="employeeEmail" name="employeeEmail" value="<?php 
echo getEmployeeEmailByNetId($netID);
?>
">
<div id='headInfo'>
<h1>Supervisor Report Form</h1>
<table>
	<tr>
	<th>NAME: <?php 
echo nameByNetId($netID);
?>
</th>
	<th colspan='2'>EMAIL: <?php 
echo getEmployeeEmailByNetId($netID);
?>
</th><th>Load Draft</th><th>Save as Draft</th><th>Report Finished?</th>
	</tr><tr>
	<td>DATE: <input type='text' class='datepicker' size='10' id='reportDate' name='reportDate' value="<?php 
echo date('Y-m-d', strtotime("today"));
?>
" /></td>
	<td>Start Time: <input type="text" name="start" id='start' maxlength=5 size=8 value="<?php 
echo date('h:iA');
?>
"/></td>
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:31,代码来源:index.php


示例14: catch

//------------TASK TO BE COMPLETED------------------
try {
    $tasksQuery = $db->prepare("SELECT * FROM routineTasks WHERE ID=:id");
    $tasksQuery->execute(array(':id' => $_REQUEST['id']));
} catch (PDOException $e) {
    exit("error in query");
}
$task = $tasksQuery->fetch(PDO::FETCH_ASSOC);
//------------SET VARIABLES---------------------
$title = $task['title'];
$timeDue = $task['timeDue'];
$area = $task['area'];
$completed = '1';
$timeCompleted = date('G:i');
$dateCompleted = date('Y-m-d');
$completedBy = nameByNetId($netID);
//------------------------------------------------
//Query to test whether this task is in the log already ie. its been muted.
try {
    $logQuery = $db->prepare("SELECT * FROM routineTaskLog WHERE taskId =:taskId AND (dateMuted IS NOT NULL AND dateCompleted IS NULL)");
    $logQuery->execute(array(':taskId' => $taskId));
} catch (PDOException $e) {
    exit("error in query");
}
$mutedTask = $logQuery->fetch(PDO::FETCH_ASSOC);
$logID = $mutedTask['ID'];
//queries the database and then add or updates an entry to the TaskLog
try {
    $insertQuery = $db->prepare("INSERT INTO routineTaskLog (ID,title,taskId,timeDue,dateDue,area,completed,completedBy,timeCompleted,dateCompleted,comments,guid) VALUES (:id,:title,:taskId,:timeDue,:dateDue,:area,:completed,:by,:timeCompleted,:dateCompleted,:comments,:guid) ON DUPLICATE KEY UPDATE title=:title2,taskId=:taskId2,timeDue=:timeDue2,area=:area2,completed=:completed2,completedBy=:by2,timeCompleted=:timeCompleted2,dateCompleted=:dateCompleted2,comments=:comments2");
    $insertQuery->execute(array(':id' => $logID, ':title' => $title, ':taskId' => $taskId, ':timeDue' => $timeDue, ':dateDue' => $dateDue, ':area' => $area, ':completed' => $completed, ':by' => $completedBy, ':timeCompleted' => $timeCompleted, ':dateCompleted' => $dateCompleted, ':comments' => $comments, ':guid' => newGuid(), ':title2' => $title, ':taskId2' => $taskId, ':timeDue2' => $timeDue, ':area2' => $area, ':completed2' => $completed, ':by2' => $completedBy, ':timeCompleted2' => $timeCompleted, ':dateCompleted2' => $dateCompleted, ':comments2' => $comments));
} catch (PDOException $e) {
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:31,代码来源:completeTask.php


示例15: printTeamOrganizer

function printTeamOrganizer($area)
{
    global $db;
    try {
        $employeeQuery = $db->prepare("SELECT * FROM employee WHERE area=:area AND active='1' ORDER BY firstName ASC");
        $employeeQuery->execute(array(':area' => $area));
    } catch (PDOException $e) {
        exit("error in query");
    }
    $nameCount = 1;
    while ($cur = $employeeQuery->fetch(PDO::FETCH_ASSOC)) {
        try {
            $membersQuery = $db->prepare("SELECT * FROM teamMembers WHERE netID = :netId AND `area` = :area");
            $membersQuery->execute(array(':netId' => $cur['netID'], ':area' => $area));
            $teamCountQuery = $db->prepare("SELECT COUNT(ID) FROM teamMembers WHERE netID = :netId AND `area` = :area");
            $teamCountQuery->execute(array(':netId' => $cur['netID'], ':area' => $area));
        } catch (PDOException $e) {
            exit("error in query");
        }
        $countResult = $teamCountQuery->fetch(PDO::FETCH_NUM);
        $numOfTeamsEmployeeBelongsTo = $countResult[0];
        if ($numOfTeamsEmployeeBelongsTo > 0) {
            while ($teamMember = $membersQuery->fetch(PDO::FETCH_ASSOC)) {
                $teamID = $teamMember['teamID'];
                echo "<tr><td>";
                echo nameByNetId($cur['netID']);
                echo "</td><td>";
                echo teamLeadByTeamID($teamID);
                echo "</td><td>";
                if ($numOfTeamsEmployeeBelongsTo > 1) {
                    //Make the selects name unique if employee belongs to multiple teams.
                    echo teamSelectByTeam($teamID, $nameCount, $cur['netID']);
                    echo "</td><td id='futureTeamLeader_" . $nameCount . "'></td></tr>";
                    $nameCount++;
                } else {
                    echo teamSelectByTeam($teamID, $nameCount, $cur['netID']);
                    echo "</td><td id='futureTeamLeader_" . $nameCount . "'></td></tr>";
                    $nameCount++;
                }
            }
        } else {
            $teamID = 0;
            echo "<tr><td>";
            echo nameByNetId($cur['netID']);
            echo "</td><td>";
            echo teamLeadByTeamID($teamID);
            echo "</td><td>";
            echo teamSelectByTeam($teamID, $nameCount, $cur['netID']);
            echo "</td><td id='futureTeamLeader_" . $nameCount . "'></td></tr>";
            $nameCount++;
        }
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:53,代码来源:teamingFunctions.php


示例16: catch

         $deleteQuery = $db->prepare("DELETE FROM `supervisorReportDraft` WHERE `ID` = :id");
         $deleteQuery->execute(array(':id' => $draftID));
     } catch (PDOException $e) {
         exit("error in query");
     }
 } else {
     if ($action == 'load') {
         $draftID = $_GET['id'];
         try {
             $draft2Query = $db->prepare("SELECT * FROM `supervisorReportDraft` WHERE `ID` = :id");
             $draft2Query->execute(array(':id' => $draftID));
         } catch (PDOException $e) {
             exit("error in query");
         }
         $row = $draft2Query->fetch(PDO::FETCH_ASSOC);
         echo "<form id='reportData' method='post' onsubmit='return confirmSubmission()'>\n<input type='hidden' id='employeeName' name='employeeName' value='" . nameByNetId($row['submitter']) . "'>\n<input type='hidden' id='employeeEmail' name='employeeEmail' value='" . getEmployeeEmailByNetId($row['submitter']) . "'>\n<div id='headInfo'>\n<h1>Supervisor Report Form</h1>\n<table>\n\t<tr>\n\t<th>NAME: " . nameByNetId($row['submitter']) . "</th>\n\t<th colspan='2'>EMAIL: " . getEmployeeEmailByNetId($row['submitter']) . "</th><th>Load Draft</th><th>Save as Draft</th><th>Report Finished?</th>\n\t</tr><tr>\n\t<td>DATE: <input type='text' class='tcal' size='10' id='reportDate' name='reportDate' value='" . $row['date'] . "' /></td>\n\t<td>Start Time: <input type='text' name='start' id='start' maxlength=5 size=8 value='" . $row['startTime'] . "'/></td>\n\t<td>End Time: <input type='text' name='end' id='end' maxlength=5 size=8 value='" . $row['endTime'] . "'/></td>\n\t<td><input type='button' name='load' id='load' value='Load Draft' onClick='loadDraftDialog()'/></td>\n\t<td><input type='button' name='save' id='save' value='Save Draft' onClick='saveDraft()' /></td>\n\t<td><input type='submit' name='submit' id='submit' value='Submit Report'/></td>\n\t</tr>\n</table>\n</div>\n<div id='instructions'>\n<br/>\n<b>Report Instructions: </b>Click <a href='reportInstructions.php'>here</a> for detailed instructions.\n<br/>\n<br/>\n1. Include ALL details: TIME, names, situations,etc.<br/>\n2. Keep this form open throught your shift and record things as they occur.<br/><br/>\nUse these buttons to enter in activites as they occur.<br/>\n<input type='button' id='absence' name='absence' value='Absence' onclick='newwindow('../performance/absence.php')' />\n<input type='button' id='tardy' name='tardy' value='Tardy' onclick='newwindow('../performance/tardy.php')' />\n<input type='button' id='reminder' name='reminder' value='Policy Reminder' onclick='newwindow('../performance/policyReminder.php')' />\n<input type='button' id='commendable' name='commendable' value='Commendable Performance' onclick='newwindow('../performance/commendablePerformance.php')' />\n</div>\n<br/>\n<div id='openResults'>\n</div>\n<br/>\n<div id='textFields'>\n<table>\n\t<tr>\n\t<th>PRODUCT/SERVICE OUTAGES EXPERIENCED AND MESSAGE RELAYS RECEIVED:<br/> Include any service outage affecting our customers. (ie: problems with Route Y, servers, IP Phones, AIM, etc.)</th>\n\t</tr><tr>\n\t<td><textarea id='first' name='first' cols='100' rows='4'>" . $row['outages'] . "</textarea></td>\n\t</tr><tr>\n\t<th>SHIFT PROBLEMS: <br/>Include high queue loads and possible reasons why. (ie: building evacuations, fire alarms, power outages, etc.)</th>\n\t</tr><tr>\n\t<td><textarea id='second' name='second' cols='100' rows='4'>" . $row['problems'] . "</textarea></td>\n\t</tr><tr>\n\t<th>MISCELLANEOUS INFORMATION: <br/>Include anything you want to bring to our attention. (ie: problems with consoles, applications, or our office computers, alarms, etc.)</th>\n\t</tr><tr>\n\t<td><textarea id='third' name='third' cols='100' rows='4'>" . $row['misc'] . "</textarea></td>\n\t</tr><tr>\n\t<th>SUPERVISING TASKS:<br/>Include what you did while supervising. (ie: teaming, projects, mentoring, reviewing tickets, etc.)</th>\n\t</tr><tr>\n\t<td><textarea id='fourth' name='fourth' cols='100' rows='4'>" . $row['supTasks'] . "</textarea></td>\n\t</tr>\n</table>\n</div>\n<br/>\n<div id='closeResults'>\n</div>\n<input type='hidden' id='checkList' name='checkList' value=''>\n</form>";
     } else {
         if ($action == 'checkList') {
             $list = $_GET['list'];
             $draftID = $_GET['id'];
             if ($list == 0) {
                 echo "<table id='openList'>\n\t\t<tr>\n\t\t<th>Opening Office Checklist<br/><input type='checkbox' id='openingList' name='openingList' /><label for='opening' >Please check if this is an opening shift</label></th><td>";
                 if (can("update", "7db1df8d-0a15-46ed-9c83-701393e9596c")) {
                     echo "<input type='button' value=\"Add Item\" onclick='addItem(0)' />";
                 }
                 echo "<input type='button' value=\"Reload\" onclick='printList(0,\"openResults\")' /></td></tr>";
             } else {
                 echo "<table id='closeList'>\n\t\t<tr>\n\t\t<th>Closing Office Checklist<br/><input type='checkbox' id='closingList' name='closingList' /><label for='closing' >Please check if this is a closing shift</label></th><td>";
                 if (can("update", "7db1df8d-0a15-46ed-9c83-701393e9596c")) {
                     echo "<input type='button' value=\"Add Item\" onclick='addItem(1)' />";
                 }
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:31,代码来源:draft.php


示例17: nameByNetId

<?php

require '../includes/includeMeBlank.php';
//This script is run to post a trade
global $netID;
$name = nameByNetId($netID);
$tradeArray = array();
if (isset($_POST['JSON'])) {
    $tradeArray = json_decode($_POST['JSON'], true);
} else {
    $tradeArray = json_decode($_GET['JSON'], true);
}
$tradeMessage = "{$name} put some shifts up for trade. See the available trades page for details.";
foreach ($tradeArray as $trade) {
    $postedBy = $trade['postedBy'];
    $postedDate = date("Y-m-d", strtotime("today"));
    $shiftId = $trade['shiftId'];
    $startDate = $trade['startDate'];
    $startTime = $trade['startTime'];
    $endDate = $trade['endDate'];
    $endTime = $trade['endTime'];
    $hourType = $trade['hourType'];
    if (isset($trade['notes'])) {
        $notes = $trade['notes'];
    } else {
        $notes = '';
    }
    try {
        $insertQuery = $db->prepare("INSERT INTO `scheduleTrades` (postedBy,postedDate,shiftId,startTime,startDate,endTime,endDate,hourType,notes,area,guid)\n\t\t\t\t\tVALUES(:postedBy,:postedDate,:shiftId,:startTime,:startDate,:endTime,:endDate,:hourType,:notes,:area,:guid)");
        $insertQuery->execute(array(':postedBy' => $postedBy, ':postedDate' => $postedDate, ':shiftId' => $shiftId, ':startTime' => $startTime, ':startDate' => $startDate, ':endTime' => $endTime, ':endDate' => $endDate, ':hourType' => $hourType, ':notes' => $notes, ':area' => $area, ':guid' => newGuid()));
    } catch (PDOException $e) {
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:31,代码来源:postNewTrade.php


示例18: getCommentLog

function getCommentLog($name, $start, $end)
{
    global $admin;
    global $terminated;
    global $db;
    $query = '';
    if (isset($terminated) && $terminated == 'true') {
        $queryString = "SELECT * FROM reportComments WHERE netID=:name";
        $queryParams = array(':name' => $name);
    } else {
        $queryString = "SELECT * FROM reportComments WHERE netID=:name AND date >= :start AND date <= :end";
        $queryParams = array(':name' => $name, ':start' => $start, ':end' => $end);
    }
    try {
        $commentsQuery = $db->prepare($queryString);
        $commentsQuery->execute($queryParams);
    } catch (PDOException $e) {
        exit("error in query");
    }
    if ($first = $commentsQuery->fetch(PDO::FETCH_ASSOC)) {
        echo "<table>\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Employee</th>\n\t\t\t\t\t<th>Date</th>\n\t\t\t\t\t<th>Submitted By</th>\n\t\t\t\t\t<th>Comment</th>\n\t\t\t\t\t<th>Meeting Request</th>";
        if ($admin) {
            echo "<th></th>\n\t\t\t\t\t<th></th>";
        }
        echo "</tr>";
        echo "<tr>";
        echo "<td>" . nameByNetId($first['netID']) . "</td>";
        echo "<td>" . date("Y-m-d", strtotime($first['date'])) . "</td>";
        echo "<td>" . nameByNetId($first['submitter']) . "</td>";
        echo "<td>" . $first['comments'] . "</td>";
        echo "<td>";
        if ($first['meetingRequest'] == 1) {
            echo "Yes";
        } else {
            echo "No";
        }
        echo "</td>";
        if ($admin) {
            echo "<td><input type='button' value='Edit' onclick='editLog(\"" . $first['id'] . "\",\"comment\")' /></td>";
            echo "<td><input type='button' value='Delete' onclick='deleteLog(\"" . $first['id'] . "\",\"Comments\")' /></td>";
        }
        echo "</tr>";
        while ($current = $commentsQuery->fetch(PDO::FETCH_ASSOC)) {
            echo "<tr>";
            echo "<td>" . nameByNetId($current['netID']) . "</td>";
            echo "<td>" . date("Y-m-d", strtotime($current['date'])) . "</td>";
            echo "<td>" . nameByNetId($current['submitter']) . "</td>";
            echo "<td>" . $current['comments'] . "</td>";
            echo "<td>";
            if ($current['meetingRequest'] == 1) {
                echo "Yes";
            } else {
                echo "No";
            }
            echo "</td>";
            if ($admin) {
                echo "<td><input type='button' value='Edit' onclick='editLog(\"" . $current['id'] . "\",\"comment\")' /></td>";
                echo "<td><input type='button' value='Delete' onclick='deleteLog(\"" . $current['id'] . "\",\"Comments\")' /></td>";
            }
            echo "</tr>";
        }
        echo "</table>";
    } else {
        echo "0 Comments for this period";
    }
}
开发者ID:byu-oit-ssengineering,项目名称:team-managment-tool,代码行数:66,代码来源:printLog.php


示例19: nameByNetId

            $netId = $curShift['employee'];
            if (!in_array($netId, $employees)) {
                continue;
            }
            if (checkStartShift($curShift, $hour) && $printMode == false) {
                echo "<span style='color:green'>" . nameByNetId($netId) . "</span>";
                if (can("access", "033e3c00-4989-4895-a4d5-a059984f7997")) {
                    echo " <a href='https://" . $_SERVER['SERVER_NAME'] . "/performance/tardy.php?employee=" . $netId . "&startTime=" . $hour . "' >(T)</a>";
                    echo " <a href='https://" . $_SERVER['SERVER_NAME'] . "/performance/absence.php?employee=" . $netId . "&startTime=" . $hour . "'>(A)</a>";
                }
                echo " (" . date("g:ia", strtotime($curShift['startTime'])) . " - " . date("g:ia", strtotime($curShift['endTime'])) . ")";
            } else {
                if (checkEndShift($curShift, $hour + $hourSize) && $printMode == false) {
                    echo "<span style='color:red'>" . nameByNetId($netId) . "</span>";
                } else {
                    echo nameByNetId($netId);
                }
            }
            echo "<br />";
        }
        echo "</td>";
    }
    echo "</tr>";
}
echo "</tbody></table>";
function getShifts($start, $end, $type, $date)
{
    global $area, $db, $showUnposted;
    $prevDay = date( 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP nameof函数代码示例发布时间:2022-05-15
下一篇:
PHP name函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap