本文整理汇总了PHP中company::get_companies方法的典型用法代码示例。如果您正苦于以下问题:PHP company::get_companies方法的具体用法?PHP company::get_companies怎么用?PHP company::get_companies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类company
的用法示例。
在下文中一共展示了company::get_companies方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<form class="form-horizontal" action="" method="post">
<div class="col-sm-6">
<div class="form-group">
<label for="branch_code" class="col-sm-3 control-label">ID</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="branch_code" id="branch_code" value="<?php
echo isset($ID) ? $branch_result->branch_code : '';
?>
" placeholder="Id" >
</div>
</div>
<?php
if (isset($_SESSION['company_id'])) {
$company_details = $company->get_companies($_SESSION['company_id']);
$company_name = $company_details->company_name;
$company_id = $company_details->company_id;
} else {
echo $company_name = "";
}
?>
<div class="form-group">
<label for="branch_company_name" class="col-sm-3 control-label">Company</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="branch_company_name" id="branch_company_name" value="<?php
echo $company_name;
?>
" placeholder="Company name" readonly>
</div>
示例2: isset
if (isset($ID)) {
$results = $company->update_company($_POST, $ID);
} else {
// Insert new
$results = $company->insert_company($_POST);
}
if ($results) {
echo '<div class="alert alert-success" role="alert">';
echo isset($_GET['id']) ? 'Updated ' : 'Added ';
echo 'company Sucessfully </div>';
} else {
echo '<div class="alert alert-danger" role="alert"> Error </div>';
}
}
if (isset($ID)) {
$company_result = $company->get_companies($ID);
}
?>
<form class="form-horizontal" action="" method="post">
<div class="col-sm-6">
<div class="form-group">
<label for="company_name" class="col-sm-4 control-label">Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="company_name" id="company_name" value="<?php
echo isset($ID) ? $company_result->company_name : '';
?>
" placeholder="Name" required>
</div>
示例3: company
if (!isset($_SESSION['company_id'])) {
?>
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a class="active" href="#">Companies</a></li>
</ul>
<div class="page-heading">
<h1>View Companies</h1>
</div>
<div class="table-responsive custom-table">
<?php
$company = new company();
$results = $company->get_companies();
if ($results) {
}
?>
<table id="myTable">
<thead>
<tr>
<th>Name</th>
<th>Location</th>
<th>Details</th>
<th>Total Branches</th>
<th></th>
</tr>
</thead>
<tbody>