本文整理汇总了PHP中isMaster函数的典型用法代码示例。如果您正苦于以下问题:PHP isMaster函数的具体用法?PHP isMaster怎么用?PHP isMaster使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isMaster函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processImageRendition
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";
}
}
}
示例2: getMasterStatus
public function getMasterStatus()
{
return isMaster($this->instance);
}
示例3: exitAccessError
<?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";
示例4: exitAccessError
<?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;
示例5: exitAccessError
<?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";
示例6: exitAccessError
<?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";
示例7:
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>";