本文整理汇总了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';
示例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'];
?>
示例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);
}