本文整理汇总了PHP中Staff::GetTypeReal方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::GetTypeReal方法的具体用法?PHP Staff::GetTypeReal怎么用?PHP Staff::GetTypeReal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::GetTypeReal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<th>Building</th>
<th>Email</th>
<th>Phone Number</th>
<th>Action</th>
</tr>
</thead>
<tbody class="searchable">
<?php
foreach (Staff::GetAll() as $staff) {
if (!$staff->IsActive()) {
continue;
}
echo "<tr>";
echo "<td>" . $staff->GetID() . "</td>";
echo "<td>" . $staff->GetName() . "</td>";
echo "<td>" . Staff::GetTypeReal($staff->GetType()) . "</td>";
echo "<td>" . $staff->GetUsername() . "</td>";
echo "<td>" . $staff->GetBuilding() . "</td>";
echo "<td><a href=\"mailto:" . $staff->GetEmail() . "\">" . $staff->GetEmail() . "</a></td>";
echo "<td>" . $staff->GetPhoneNumber() . "</td>";
echo "<td>";
echo "<a class=\"btn btn-default btn-sm\" href=\"index.php?p=admin&staff&id=" . $staff->GetID() . "&edit\" title=\"Edit Account\"><span class=\"glyphicon glyphicon-pencil\"></span></a> ";
echo "<a class=\"btn btn-default btn-sm staff_delete\" href=\"#confirm_delete\" data-id=\"" . $staff->GetID() . "\" data-toggle=\"modal\" title=\"Delete Account\"><span class=\"glyphicon glyphicon-trash\"></span></a>";
echo "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
<div class="modal fade" id="confirm_delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
示例2: ShowError
if(isset($_GET["id"]))
{
$profile = Staff::Load($_GET["id"]);
}
*/
if (!$profile->IsValid()) {
ShowError("Invalid profile.");
} else {
?>
<h2><?php
echo $profile->GetName() . " (" . $profile->GetUsername() . ")";
?>
</h2>
<p>Account Type: <?php
echo Staff::GetTypeReal($profile->GetType());
?>
</p>
<p>Community: <?php
echo Building::GetCommunity($profile->GetBuilding());
?>
</p>
<p>Building: <?php
echo $profile->GetBuilding();
?>
</p>
<?php
}