本文整理汇总了PHP中Catalog::viewCatOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Catalog::viewCatOptions方法的具体用法?PHP Catalog::viewCatOptions怎么用?PHP Catalog::viewCatOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Catalog
的用法示例。
在下文中一共展示了Catalog::viewCatOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
</h1>
</div>
<div class="wrapper-md">
<form method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-lg-8">
<div class="panel panel-default">
<div class="panel-heading font-bold">Раздел</div>
<div class="panel-body">
<div class="form-group">
<select name="section" class="form-control m-b">
<?php
echo isset($nowSection) ? '<option value="' . $nowSection[0]["id"] . '">' . $nowSection[0]["name"] . '</option>' : "";
?>
<?php
$section->viewCatOptions($section->getCat(), 0);
?>
</select>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading font-bold">Описание</div>
<div class="panel-body">
<div class="form-group">
<div class="col-lg-12">
<label>Наименование</label>
<input type="text" class="form-control m-b required-js" name="name" value="<?php
echo isset($record[0]["name"]) ? $record[0]["name"] : "";
?>
">
示例2:
<div class="app app-header-fixed ">
<div class="modal section fade" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form method="post">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Раздел</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<label class="hidden_section">Введите раздел</label>
<select name="section" class="form-control m-b hidden_section">
<option value="0" selected="selected"></option>
<?php
$obj->viewCatOptions($obj->getCat(), 0, 0);
?>
</select>
<label>Введите название</label>
<input type="text" class="form-control m-b" placeholder="Название" name="name">
<label>Заголовок в браузере (Title)</label>
<input type="text" class="form-control m-b" placeholder="Title" name="title">
<label>Описание раздела (Description)</label>
<input type="text" class="form-control m-b" placeholder="Description" name="desc">
<label>Ключевые слова (Keywords)</label>
<input type="text" class="form-control m-b" placeholder="Keywords" name="keywords">
<label>Url</label>
<input type="text" class="form-control m-b" placeholder="Url" name="url">
<input type="hidden" name="go" value="save">
<input type="hidden" name="edit" value="">
</div>
示例3: isset
<div class="form-group">
<select name="section" class="form-control m-b">
<?php
if (isset($nowSection) and $nowSection) {
?>
<option value="<?php
echo $nowSection[0]['id'];
?>
"><?php
echo $nowSection[0]['name'];
?>
</option><?php
}
?>
<?php
Catalog::viewCatOptions(Catalog::getCat(), 0);
?>
</select>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading font-bold">Описание</div>
<div class="panel-body">
<div class="form-group">
<div class="col-lg-12">
<label>Наименование</label>
<input type="text" class="form-control m-b required-js" name="name" value="<?php
echo isset($record[0]["name"]) ? $record[0]["name"] : "";
?>
">