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


PHP Staff::Load方法代码示例

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


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

示例1: GetStaff

 public static function GetStaff()
 {
     if (!self::Is_Set("sid") || !self::Is_Set("secret")) {
         return null;
     }
     return Staff::Load(self::GetStaffID());
 }
开发者ID:omusico,项目名称:Xion,代码行数:7,代码来源:session.class.php

示例2: elseif

			<div class="form-group">
				<label for="type">Account Type</label>
				<select class="form-control" id="type" name="type">
					<?php 
        for ($i = TYPE_FIRST; $i <= TYPE_LAST; $i++) {
            echo "<option value=\"" . $i . "\">" . Staff::GetTypeReal($i) . "</option>";
        }
        ?>
				</select>
			</div>

			<button type="submit" name="add" class="btn btn-default">Create Account</button>
		</form>
		<?php 
    } elseif (isset($_GET["id"])) {
        $staff = Staff::Load($_GET["id"]);
        if ($staff->IsValid() && $staff->IsActive() && $me->GetType() == TYPE_SUPERSTAFF) {
            if (isset($_POST["edit"])) {
                $password = $_POST["password"];
                $password_confirm = $_POST["password_confirm"];
                $name = $_POST["name"];
                $building = $_POST["building"];
                $email = CleanString($_POST["email"]);
                $phone_number = CleanString($_POST["phone_number"]);
                $type = $_POST["type"];
                if (empty($name) || empty($building) || empty($email) || empty($phone_number)) {
                    ShowError("One or more fields were empty!");
                } elseif ($password != $password_confirm) {
                    ShowError("Passwords did not match! Go back and try again.");
                } elseif (!Building::Exists($building) && $building !== "N/A") {
                    ShowError("Invalid building.");
开发者ID:omusico,项目名称:Xion,代码行数:31,代码来源:admin.php

示例3: COUNT

/*
	Query
*/
$statement = $database->prepare("SELECT COUNT(*) FROM tickets");
$statement->execute();
$totalNumRows = $statement->fetch(PDO::FETCH_NUM);
$statement = $database->prepare("SELECT SQL_CALC_FOUND_ROWS " . implode(",", $aColumns) . " FROM tickets " . $sWhere . " " . $sOrder . " " . $sLimit);
$statement->execute();
$statement2 = $database->prepare("SELECT FOUND_ROWS()");
$statement2->execute();
$filteredNumRows = $statement2->fetch(PDO::FETCH_NUM);
$rows = $statement->fetchAll(PDO::FETCH_ASSOC);
$rowCount = count($rows);
for ($i = 0; $i < $rowCount; $i++) {
    $row = $rows[$i];
    $color = "";
    if ($q == -1) {
        $color = " danger";
        $rows[$i] = array($row["id"], Client::Load($row["cid"])->GetUsername(), DisplayDatetime($row["creation_date"]), DisplayLimited($row["description"]));
    } else {
        $sid = $row["sid"];
        $status = $row["status"];
        if ($sid == $me->GetID()) {
            $color = " " . ($status == STATUS_OPENED ? "danger" : "success");
        }
        $rows[$i] = array($row["id"], $status == STATUS_OPENED ? "Opened" : "Closed", Client::Load($row["cid"])->GetUsername(), DisplayDatetime($row["creation_date"]), DisplayLimited($row["description"]), implode(", ", json_decode($row["tags"], true)), Staff::Load($sid)->GetUsername(), DisplayDatetime($row["closed_date"]));
    }
    $rows[$i]["DT_RowClass"] = "linkrow" . $color;
}
$output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $totalNumRows[0], "iTotalDisplayRecords" => $filteredNumRows[0], "aaData" => $rows);
echo json_encode($output);
开发者ID:omusico,项目名称:Xion,代码行数:31,代码来源:dt_tickets.php

示例4: DisplayDatetime

	</div>
</div>

<?php 
    $updates = $ticket->GetUpdates();
    if (!is_null($updates)) {
        ?>
<div class="row">
	<div class="col-lg-12">
		<?php 
        for ($i = 0; $i < count($updates); $i++) {
            $update = $updates[$i];
            $id = $update["id"];
            $time = $update["time"];
            $description = $update["description"];
            $update_staff = Staff::Load($id);
            ?>
			<div class="panel panel-default">
				<div class="panel-heading">
					Update #<?php 
            echo $i + 1;
            ?>
 - <?php 
            echo $update_staff->GetUsername();
            ?>
 - <?php 
            echo DisplayDatetime($time);
            ?>
				</div>
				<div class="panel-body">
					<?php 
开发者ID:omusico,项目名称:Xion,代码行数:31,代码来源:ticket.php


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