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


PHP Company::getCompanyList方法代码示例

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


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

示例1: foreach

foreach ($displayFields as $key => $value) {
    echo "<p>" . $value . "<br>";
    echo '<input type="text" name="' . $key . '" title="User ID" value="' . $userProperties[$key] . '"/></p>';
}
if (!$newUser) {
    echo "<p>Employee Number<br>" . $User->getEID() . '</p>';
}
//Show Company as Text if set. Show company option list if not.
echo '<p>Company<br>';
if (!$newUser) {
    echo $Company->getCname() ? $Company->getCname() : $AdminCname . '</p>';
    echo "<input type='hidden' name='CID' value='{$_SESSION['admin']['CID']}'>";
} else {
    /** @var Company $company */
    echo '<select name="CID">';
    $Companys = Company::getCompanyList();
    foreach ($Companys as $company) {
        echo '<option value="' . $company->getCID() . '" ';
        echo '> ' . $company->getCname() . '</option></p>';
    }
    echo '</select>';
}
//Show Access Role Options
echo '<p>Access Role <br>';
echo '<select name="RoleID">';
/** @var UserRole $role */
$UserRoles = UserRole::getRoleList();
foreach ($UserRoles as $role) {
    echo '<option value="' . $role->getRoleID() . '" ';
    if ($role->getRoleID() == $User->getRoleID()) {
        echo 'selected';
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:31,代码来源:ManageUser.php

示例2: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/modules/User.class.php';
require_once dirname(dirname(dirname(__FILE__))) . '/modules/Company.class.php';
$userId = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;
if ($userId != 0) {
    $userObj = new User();
    $userInfo = $userObj->getUserInfo($userId, false);
    $companyObj = new Company();
    $listCompanies = array();
    if ($companyObj) {
        $listCompanies = $companyObj->getCompanyList(false);
    }
    if (count($userInfo) > 0) {
        ?>
		<form method="POST" class="form-horizontal" id="userInfoForm">
		<input type="hidden" id="baseName" name="baseName" value="<?php 
        echo __BASENAME__;
        ?>
" />
		<input type="hidden" name="userId" id="userId" value="<?php 
        echo $userInfo['id'];
        ?>
" />
		<input type="hidden" name="email" id="email" value="<?php 
        echo $userInfo['email'];
        ?>
" />
		<input type="hidden" name="firstName" id="firstName" value="<?php 
        echo $userInfo['firstName'];
        ?>
开发者ID:erickigotho,项目名称:Paxis,代码行数:31,代码来源:profile.php

示例3: session_start

<?php

session_start();
include "../../bossflex/Helpers/Reject.php";
Reject::permission($_SESSION['admin']);
if ($_SESSION['admin']['CID'] != 1) {
    exit;
}
include "../../bossflex/DB/Models/Company.php";
if (isset($_POST['Cname'])) {
    Company::addCompany($_POST['Cname']);
}
$Companies = Company::getCompanyList();
?>

<html>
<head>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css">

    <script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.12.0.min.js">
    </script>

    <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js">
    </script>

    <script type="text/javascript" class="init">
        $(document).ready(function() {
            $('#usertable').DataTable( {
                createdRow: function ( row ) {
                    $('td', row).attr('tabindex', 0);
                }
开发者ID:elmo911,项目名称:WolfeSolutions,代码行数:31,代码来源:AddCompany.php


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