本文整理汇总了PHP中category::returnAllCategories方法的典型用法代码示例。如果您正苦于以下问题:PHP category::returnAllCategories方法的具体用法?PHP category::returnAllCategories怎么用?PHP category::returnAllCategories使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category
的用法示例。
在下文中一共展示了category::returnAllCategories方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: returnEditor
print $item['title_6'];
?>
"/>
<span id="label">Descrição</span>
<?php
print returnEditor("content_6", $item['content_6']);
?>
<div class="separator30"></div>
</div>
<span id="label">Categoria</span>
<select name="category">
<option value="null">Selecione uma Categoria</option>
<?php
$category = new category();
foreach ($category->returnAllCategories() as $cat) {
$selected = null;
if ($cat["id"] === $item["category_id"]) {
$selected = "selected=\"\"";
}
if ($cat['category_type'] === 'products') {
printf("<option value=\"%s\" %s>%s</option>", $cat["id"], $selected, $cat["name_1"]);
}
}
?>
</select>
<div class="separator30"></div>
<span id="label">Lista de ficheiros</span>
<?php
示例2: category
<?php
$object_category = new category();
$category_list = $object_category->returnAllCategories();
?>
<div class="category-list">
<div class="button-area">
<button onclick="goTo('./backoffice.php?pg=category-add');" class="green"><?php
print $language["template"]["add"];
?>
</button>
<button onclick="buttonAction ('<?php
print $language["template"]["are-you-sure"];
?>
','category-edit');" class="orange"><?php
print $language["template"]["edit"];
?>
</button>
<button onclick="buttonAction ('<?php
print $language["template"]["are-you-sure"];
?>
','category-del');" class="red"><?php
print $language["template"]["del"];
?>
</button>
</div>
<table class="db-list">
<tr>
<th>#</th>
<th>Categoria</th>