コード例 #1
0
ファイル: index.php プロジェクト: jamesdcampbell/clemsoncfa
include "../manager/manager_side.php";
?>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1>Admin Dashboard</h1>
		  <h2>Completed Reviews  <a href="questions.php"><button class="btn btn-default btn-sm rightfloat">
		  View Questions</button></a></h2>
		  <?php 
$completed = CfaReview::getCompleted();
foreach (CfaEmployee::$review_times as $time => $value) {
    //Skip Custom Reviews
    if (empty($completed[$time])) {
        continue;
    }
    print "<h3>{$value[0]}</h3>";
    //Generate Table
    CfaTable::generate([["fName", "First Name"], ["lName", "Last Name"], ["score", "Score"], ["review_link", "Review"], ["compare_link", "Compare"]], $completed[$time]);
}
?>
		  
		  <h2>Reviews Requested by Employees</h2>	  
		  <div class="table-responsive">
			<table class="table table-striped">
				<thead>
					<tr>
						<th>Employee</th>
						<th>Reason for Review</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
				<?php 
コード例 #2
0
ファイル: index.php プロジェクト: jamesdcampbell/clemsoncfa
			</div>
			<br>
			<div class="form-group">
				<div class="col-sm-2">
					<label>Search Text:</label>
				</div>
				<div class="col-sm-10">
					<input type="text" name="search_text" class="form-control">
				</div>
			</div>
			
			<div class="form-group">
				<button type="submit" name="search" class="btn btn-default">Search</button>
			</div>
		  </form>
		  
			<?php 
$care = $porm->read("\n\t\t\tSELECT id, customerName AS custName, callDate AS dateCall, callTime, callTakenByID AS callTakenBy, incidentDate AS doi, incidentTime AS toi, details, followUp, address, phoneOne, phoneTwo, tMemberIssue, handled\n\t\t\tFROM incident WHERE {$sql}", $parts);
$fields = [["custName", "Customer Name"], ["dateCall", "Call Date"], ["callTakenBy", "Call Taken By"], ["doi", "Date of Incident"], ["toi", "Time of Incident"], ["details", "Details of Incident"], ["action", "Action"]];
array_map(function ($el) {
    $el->action = "<form method='post'><input type='hidden' name='care_id' value='{$el->id}'><a href='edit.php?id={$el->id}' class='btn btn-warning'>View/Edit</a><input type='submit' name='delete' value='Delete' class='btn btn-danger form-control'></form>";
}, $care);
print "<h2>Care Log Results <button data-toggle='modal' data-target='#careModal' class='btn btn-default'>New Care Log</button></h2>";
CfaTable::generate($fields, $care);
?>
        </div>
      </div>
    </div>

<?php 
include "footer.php";
コード例 #3
0
ファイル: index.php プロジェクト: jamesdcampbell/clemsoncfa
    print "\t<option value='{$e->id}'{$selected}>{$e->fullName()}</option>";
}
?>
			</select>
			</div>
		  </form>
		  
			<?php 
if (isset($_GET["employee"])) {
    $employee_id = $_GET["employee"];
    $late = $porm->read("\n\t\t\t\tSELECT teammemberlate.id AS id, CONCAT(fName, ' ', lName) AS employeeName, arrivalTime, scheduledTime, `date`, comments, managerName\n\t\t\t\tFROM teammemberlate, teammemberinfo\n\t\t\t\tWHERE memberID = ?\n\t\t\t\tAND teammemberinfo.id = ?\n\t\t\t\tORDER BY `date` DESC\n\t\t\t\t", [$employee_id, $employee_id], "CfaEmployee");
    $fields = [["managerName", "Manager Name"], ["date", "Date of Incident"], ["arrivalTime", "Arrival Time"], ["scheduledTime", "Scheduled Time"], ["comments", "Comments"], ["action", "Action"]];
    foreach ($late as $l) {
        if ($user->isAdmin()) {
            $l->action = "<form method='post'><input type='hidden' name='log' value='{$l->id}'><input type='submit' name='delete' value='Delete' class='form-control btn btn-danger'></form>";
        } else {
            $l->action = "None";
        }
    }
    if (count($late)) {
        print "<h2>{$late[0]->employeeName}</h2>";
    }
    CfaTable::generate($fields, $late);
}
?>
        </div>
      </div>
    </div>

<?php 
include "footer.php";