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


PHP Company::getCompanyByID方法代码示例

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


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

示例1: session_start

session_start();
include "../../bossflex/Helpers/Reject.php";
Reject::permission($_SESSION['hradmin']);
$_SESSION['redir'] = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if (isset($_GET["result"])) {
    echo '<h3>' . urldecode($_GET['result']) . '</h3>';
}
include "../../bossflex/DB/Models/User.php";
include "../../bossflex/DB/Models/Company.php";
include "../../bossflex/DB/Models/Employee.php";
include "../../bossflex/DB/Models/UserRole.php";
include "../../bossflex/DB/Models/DisableCode.php";
$newUser = true;
$User = null;
$Company = Company::getCompanyByID($_SESSION['hradmin']['CID']);
$Employee = null;
$AdminCname = $Company->getCname();
if (isset($_GET['Email']) || isset($_GET['id'])) {
    /** @var User $User */
    if (isset($_GET['Email'])) {
        $Email = urldecode($_GET['Email']);
        $User = User::getUserByEmail($Email);
    } else {
        $User = User::getUserByEmpInfo($_GET['id'], $_SESSION['hradmin']['CID']);
    }
    if (!$User) {
        echo "<h3>User does not exist</h3>";
    } else {
        if ($User->getCID() != $_SESSION['hradmin']['CID'] && $_SESSION['hradmin']['CID'] != 1) {
            include_once "../../bossflex/Helpers/ErrorReport.php";
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:30,代码来源:ManageUser.php

示例2: session_start

<?php

session_start();
include "../Helpers/Reject.php";
Reject::permission($_SESSION['HR']);
include "../DB/Models/Employee.php";
include "../DB/Models/Company.php";
include "../Helpers/Material.php";
include "../Helpers/HRAccountPage.php";
$employees = Employee::getEmployeeListForCompany($_SESSION['HR']['CID']);
$cname = Company::getCompanyByID($_SESSION['HR']['CID'])->getCname();
$error = false;
$success = false;
if ($_FILES['accountChanges']['name']) {
    if (!$_FILES['accountChanges']['error']) {
        $ext = strtolower(end(explode('.', $_FILES['accountChanges']['name'])));
        if ($ext == "csv") {
            $csv = array_map('str_getcsv', file($_FILES['accountChanges']['tmp_name']));
            if ($csv) {
                include "../DB/Models/Ticket.php";
                $new_file_name = $_SESSION['HR']['UID'] . date(" - Y-m-d H-i-s.") . $ext;
                $uploadDir = 'uploads/accountchanges/' . $_SESSION['HR']['CID'] . '/';
                $uploadPath = $uploadDir . $new_file_name;
                if (is_dir($uploadDir) === false) {
                    mkdir($uploadDir, 0777, true);
                }
                move_uploaded_file($_FILES['accountChanges']['tmp_name'], $uploadPath);
                Employee::processAccountChanges($csv, $_SESSION['HR']['CID'], $_SESSION['HR']['UID']);
                $success = "Changes Submitted";
            } else {
                $error = "Error Processing CSV File";
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:31,代码来源:Home.php

示例3: urldecode

$Company = null;
$Employee = null;
$AdminCname = Company::getCompanyByID($_SESSION['admin']['CID'])->getCname();
if (isset($_GET['Email']) || isset($_GET['id'])) {
    /** @var User $User */
    if (isset($_GET['Email'])) {
        $Email = urldecode($_GET['Email']);
        $User = User::getUserByEmail($Email);
    } else {
        $User = User::getUserByEmpInfo($_GET['id'], $_SESSION['admin']['CID']);
    }
    if (!$User) {
        echo "<h3>User does not exist</h3>";
    } else {
        /** @var Company $Company */
        $Company = Company::getCompanyByID($User->getCID());
        if ($User->getCID() == 1) {
            $Employee = BossFlexEmployee::getEmployeeByBFID($User->getEID());
        } else {
            $Employee = Employee::getEmployeeByUID($User->getUID());
        }
        $_SESSION['EditUser'] = serialize($User);
        $_SESSION['EditEmployee'] = serialize($Employee);
        $newUser = false;
    }
}
// If no user is specified, reuse as Add User Form
if ($newUser) {
    $User = new User();
    $Company = new Company();
    $Employee = new Employee();
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:31,代码来源:ManageUser.php

示例4: unassignedPage

    /**
     * @param $assignedTickets
     */
    public static function unassignedPage($assignedTickets)
    {
        $tableRows = "";
        /** @var Ticket $ticket */
        foreach ($assignedTickets as $ticket) {
            $tnum = $ticket->getTicketNum();
            $employee = Employee::getEmployeeByAccount($ticket->getAccountNum());
            $ename = $employee->getFname() . " " . $employee->getLname();
            $EID = $employee->getEID();
            $cname = Company::getCompanyByID($employee->getCID())->getCname();
            $detail = $ticket->getDescription();
            $created = $ticket->getCreateDate();
            $tableRows .= "<tr>";
            $tableRows .= "<td> <a href='UnassignedTickets.php?t=" . $tnum . "'>Assign To Me</a> </td>";
            $tableRows .= "<td> {$tnum} </td>";
            $tableRows .= "<td> {$ename} </td>";
            $tableRows .= "<td> {$EID} </td>";
            $tableRows .= "<td> {$cname} </td>";
            $tableRows .= "<td> {$detail} </td>";
            $tableRows .= "<td> {$created} </td>";
            $tableRows .= "</tr>";
            $tableRows .= '
    ';
        }
        echo <<<home
<div class="row" style="margin: 20px 20px 20px 20px">
            <div class="col-sm-12">
                <h2>Unassigned Tickets:</h2>
            <table id="table" class="display" cellspacing="0" width="100%">
                <thead><tr>
                    <th></th>
                    <th>Ticket Number</th>
                    <th>Employee Name</th>
                    <th>EmployeeID</th>
                    <th>Company</th>
                    <th>Detail</th>
                    <th>Created</th>
                </tr></thead>
                <tbody>
                {$tableRows}
                </tbody>
            </table>
            </div>
    </div>
home;
    }
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:49,代码来源:BFPage.php

示例5: session_start

<?php

session_start();
include "Helpers/Reject.php";
Reject::permission($_SESSION['user']);
include "Helpers/ClientPage.php";
include "Helpers/Material.php";
include "DB/Models/Employee.php";
include "DB/Models/User.php";
include "DB/Models/Dependent.php";
include "DB/Models/Company.php";
include "DB/Models/Ticket.php";
$user = User::getUserByUID($_SESSION['user']['UID']);
$employee = Employee::getEmployeeByUID($_SESSION['user']['UID']);
$cname = Company::getCompanyByID($employee->getCID())->getCname();
$account = $employee->getAccount();
$dependents = Dependent::getEmployeeDependents($employee->getEID(), $employee->getCID());
$claims = Ticket::accountTicketList($account->getAccountNum());
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <?php 
ClientPage::headers("BossFlex");
?>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css">
</head>
<body>
<?php 
ClientPage::clientNav("My History");
ClientPage::sideBarPage($cname, $employee->getFname(), $account->getBalanceFormatted());
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:31,代码来源:MyHistory.php


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