本文整理汇总了PHP中product::get_product_category方法的典型用法代码示例。如果您正苦于以下问题:PHP product::get_product_category方法的具体用法?PHP product::get_product_category怎么用?PHP product::get_product_category使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类product
的用法示例。
在下文中一共展示了product::get_product_category方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$results = $product->pro_category_insert($_POST);
}
if ($results) {
echo '<div class="alert alert-success alert-block fade in alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<strong>Add Product Category Sucessfully</strong>
</div>';
} else {
echo '<div class="alert alert-danger alert-block fade in alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<strong>Error</strong>
</div>';
}
}
if (isset($ID)) {
$product_result = $product->get_product_category($ID);
}
?>
<div class="the-box noborder">
<form id="ExampleBootstrapValidationForm" method="post" action="" class="form-horizontal">
<div class="form-group">
<label class="col-lg-3 control-label">Category Name</label>
<div class="col-lg-5">
<input type="text" name="p_name" value="<?php
echo isset($ID) ? $product_result[0]->pc_name : '';
?>
" class="form-control" required>
</div>
</div>
<div class="form-group">
示例2: product
<!-- End breadcrumb -->
<div class="panel panel-info">
<div class="panel-heading">
<div class="right-content">
<a href="add_product_category.php"><button class="btn btn-success btn-perspective btn-lg pull-right">ADD NEW PRODUCT CATEGORY</button></a>
</div>
<h3>Manage Products Categories</h3>
</div>
<div class="panel-body">
<!-- BEGIN DATA TABLE -->
<div class="the-box">
<div class="table-responsive">
<?php
$product = new product();
$results = $product->get_product_category();
if ($results) {
?>
<table class="table table-striped table-hover" id="datatable-example">
<thead class="the-box dark full">
<tr>
<th>Product Category Name</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($results as $res) {
echo '<tr>';
echo '<td>' . $res->pc_name . '</td>';
echo '<td><a href="add_product_category.php?id=' . $res->pc_id . '" class="btn btn-info active">EDIT</a></td>';