本文整理汇总了PHP中category::getCatById方法的典型用法代码示例。如果您正苦于以下问题:PHP category::getCatById方法的具体用法?PHP category::getCatById怎么用?PHP category::getCatById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category
的用法示例。
在下文中一共展示了category::getCatById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: category
?>
"><?php
echo $val['title'];
?>
</a></td>
<td class="numeric"><img width="200" src="../uploads/<?php
echo $val['images'];
?>
"</td>
<td class="numeric"><?php
echo $val['tomtat'];
?>
</td>
<?php
$cat_obj = new category();
$temp_cat = $cat_obj->getCatById($val['cat_id']);
?>
<td class="numeric"><?php
echo $temp_cat['cat_name'];
?>
</td>
<form action="control/proccess-news.php" method="post">
<td class="numeric">
<a href="index.php?view=form-news&act=update&id=<?php
echo $val['news_id'];
?>
" class="btn default btn-xs purple"><i class="fa fa-edit"></i>
Sửa</a></td>
<td class="numeric">
<input type="hidden" name="act" value="xoa" />
<input type="hidden" name="id" value="<?php
示例2: category
<?php
require_once '../models/class-cat.php';
$cat_obj = new category();
if (isset($_GET['id'])) {
$temp = $cat_obj->getCatById($_GET['id']);
}
?>
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">
<i class="livicon" data-name="bell" data-loop="true" data-color="#fff" data-hovercolor="#fff" data-size="18"></i>
<?php
if (isset($_GET['act'])) {
echo $_GET['act'] == 'update' ? 'Sửa' : 'Thêm';
} else {
echo "Thêm";
}
?>
danh mục
</h3>
<span class="pull-right">
<i class="fa fa-fw fa-chevron-up clickable"></i>
<i class="fa fa-fw fa-times removepanel clickable"></i>
</span>
</div>
<div class="panel-body border">
<form action="control/proccess-cat.php" method="post" class="form-horizontal form-bordered">
<div class="form-group">
<label class="col-md-3 control-label" for="example-text-input">Tên danh mục</label>
<div class="col-md-6">