当前位置: 首页>>代码示例>>PHP>>正文


PHP Staff::GetAll方法代码示例

本文整理汇总了PHP中Staff::GetAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::GetAll方法的具体用法?PHP Staff::GetAll怎么用?PHP Staff::GetAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Staff的用法示例。


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

示例1: foreach

		<table class="table table-bordered table-striped table-hover">
			<thead>
				<tr>
					<th>#</th>
					<th>Full Name</th>
					<th>Account Type</th>
					<th>Username</th>
					<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&amp;staff&amp;id=" . $staff->GetID() . "&amp;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>";
开发者ID:omusico,项目名称:Xion,代码行数:31,代码来源:admin.php

示例2: strlen

<?php

$staffs = Staff::GetAll();
$correct = null;
foreach ($staffs as $staff) {
    if ($staff->IsValid()) {
        $phoneNumber = $staff->GetPhoneNumber();
        $phoneNumber = preg_replace('/[^0-9]/', '', $phoneNumber);
        if (strlen($phoneNumber) === 10) {
            $phoneNumber = "1" . $phoneNumber;
        }
        $phoneNumber = "+" . $phoneNumber;
        if ($phoneNumber === $_REQUEST['From']) {
            $correct = $staff;
            break;
        }
    }
}
if ($correct === null) {
    exit;
}
$lastTicket = Ticket::GetByStaffIDOrderSingle($staff->GetID(), "last_modified_date", "DESC");
if (!$lastTicket->IsValid()) {
    exit;
}
$client = Client::Load($lastTicket->GetClientID());
if (!$client->IsValid()) {
    exit;
}
$body = "Client Information\nID: " . $client->GetUsername() . "\nName: " . $client->GetName() . "\nCommunity: " . Building::GetCommunity($client->GetBuilding()) . "\nBuilding: " . $client->GetBuilding() . "\nRoom: " . $client->GetLocation();
$remaining = 255 - strlen($body);
开发者ID:omusico,项目名称:Xion,代码行数:31,代码来源:sms.php


注:本文中的Staff::GetAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。