function processImageRendition($link, $itemId, $fileName, $fileExtension, $fileSuffix) { $imageProfileId = getImageProfileId($link, $fileExtension, $fileSuffix); //echo "IMAGE PROFILE: ".$imageProfileId."\n"; if (isMaster($link, $imageProfileId) == true) { if (updateImageRenditionMaster($link, $itemId, $imageProfileId, $fileName . "." . $fileExtension)) { echo "LO ENCONTRE"; } else { echo "NO LO ENCONTRE"; } } else { if (updateImageRendition($link, $itemId, $imageProfileId, $fileName . "." . $fileExtension)) { echo "LO ENCONTRE"; } else { echo "NO LO ENCONTRE"; } } }
public function getMasterStatus() { return isMaster($this->instance); }
<?php include "app/views/teacher/header.php"; // make sure we have a registered TA if (!(isTeacher() || isMaster())) { exitAccessError(); } print '<article class="page">' . "\n"; print '<h1>Review TA Evaluations</h1>' . "\n"; print ' ' . "\n"; $email = strtolower($_SERVER['SSL_CLIENT_S_DN_Email']); // connect to our database $link = getLink(); $active = findActiveTable($link, 'Evaluations'); print "Active evaluations table: {$active['0']}</p>"; $query = "select TeacherEmail,TaEmail,EvalText,Award,Citation from {$active['0']} " . "where TeacherEmail='{$email}'"; $statement = $link->prepare($query); $rc = $statement->execute(); if (!$rc) { $errNum = mysqli_errno($link); $errMsg = mysqli_error($link); print " ERROR - could not get evaluations: ErrNo={$errNum}: {$errMsg}\n"; exit; } $statement->bind_result($teacherEmail, $taEmail, $evalText, $award, $citation); $empty = true; while ($statement->fetch()) { $empty = false; print '<hr>'; print '<p>'; print "<b>Evaluee: </b> {$taEmail}<br>\n";
<?php // make sure we are dealing with a registered TA include "app/views/admin/header.php"; if (!(isMaster() || isAdmin())) { exitAccessError(); } include "app/models/Dbc.php"; include "app/models/ActiveTables.php"; include "app/models/Student.php"; include "app/models/Ta.php"; // connect to our database $db = Dbc::getReader(); // read complete students table $students = ""; $rows = $db->query("select * from Students order by lastName"); foreach ($rows as $key => $row) { $student = Student::fromRow($row); $students[$student->email] = $student; } // find active Ta table $activeTables = new ActiveTables($db); $taTable = $activeTables->getUniqueMatchingName('Tas'); // do the query $rows = $db->query("select Email, Fulltime, PartTime from {$taTable} order by Email"); $i = 0; $tas = ""; foreach ($rows as $key => $row) { $ta = Ta::fromRow($row); $tas[$i] = $ta; $i = $i + 1;
<?php // make sure we have an admin include "app/views/admin/header.php"; if (!isMaster()) { exitAccessError(); } print '<article class="page">' . "\n"; print '<hr>' . "\n"; print '<h1>Parse rough TA List</h1>' . "\n"; print '<hr>' . "\n"; // read rough list $taCandidates = readAccessFile('access/taList'); // connect to our database $link = getLink(); foreach ($taCandidates as $key => $taCandidate) { print '<hr>' . "\n"; print " Candidate: {$taCandidate}<br>\n"; $f = explode(" ", $taCandidate); if (sizeof($f) < 2) { continue; } $candFirstName = $f[0]; $candLastName = $f[sizeof($f) - 1]; $query = "select * from Students where LastName='" . $candLastName . "'"; //print " SQL: $query"; $statement = $link->prepare($query); $statement->execute(); $statement->bind_result($firstName, $lastName, $email, $advisorEmail, $supervisorEmail, $year, $divison, $research); while ($statement->fetch()) { print "{$email} -- {$firstName} {$lastName}<br>\n";
<?php include "app/views/ta/header.php"; // make sure we are dealing with a registered TA if (!(isTa() || isMaster())) { exitAccessError(); } print '<article class="page">' . "\n"; print '<h1>TA Preference Removal</h1>'; // connect to our database $link = getLink(); // find the active tables $tableNames = findActiveTable($link, 'Preferences'); $activeTable = $tableNames[0]; $email = strtolower($_SERVER['SSL_CLIENT_S_DN_Email']); $query = "delete from {$activeTable} where Email = '" . $email . "'"; $statement = $link->prepare($query); $rc = $statement->execute(); if (!$rc) { $errNum = mysqli_errno($link); $errMsg = mysqli_error($link); print " ERROR - could not remove preferences: ErrNo=" . $errNum . ": " . $errMsg . "\n"; } else { print '<p>Selected preferences have been removed.</p>'; } print '</article>' . "\n"; include "app/views/ta/footer.php";
print " <li><a href='/students'><span>all</span></a></li>"; print " <li><a href='/showActiveTas'><span>active</span></a></li>"; print " </ul>"; print " </li>"; print " <li class='has-sub'><a href='#'><span>Assignments</span></a>"; print " <ul>"; print " <li><a href='/assignments'><span>all terms</span></a></li>"; print " <li><a href='/showActiveAssignments?option=ALL'><span>active all</span></a></li>"; print " <li><a href='/showActiveAssignments?option=TA'><span>active TAs</span></a></li>"; print " </ul>"; print " </li>"; print " </ul>"; print " </div>"; print "</div>" . "\n"; } if (isMaster()) { print '<div style="font-family: arial, verdana, sans-serif; font-size: 20px" class="transbox">' . "\n"; print " <div id='cssmenu'>"; print " <ul>"; print " <li class='active'><a href='/admin'><span class=\"fa fa-home\">Master</span></a>"; print " <ul>"; print " <li><a href='/addStudent'><span>add student</span></a></li>"; print " <li><a href='/addActiveTa'><span>add active TA</span></a></li>"; print " <li><a href='/addCourse'><span>add course</span></a></li>"; print " </ul>"; print " </li>"; print " <li class='has-sub'><a href='#'><span>Courses</span></a>"; print " <ul>"; print " <li><a href='/courses'><span>all</span></a></li>"; print " </ul>"; print " </li>";