2012-08-31 16:18:23 -04:00
|
|
|
<h2><?= $section ?></h2>
|
|
|
|
|
|
|
|
<p class="breadcrumbs">
|
|
|
|
<a href="<?= miniMVC\site_url('') ?>">Genres</a> >
|
2012-09-05 11:46:51 -04:00
|
|
|
<a href="<?= miniMVC\site_url('genres/detail/'.$p['genre_id']) ?>"><?= $p['genre'] ?></a> >
|
2012-08-31 16:18:23 -04:00
|
|
|
<a href="<?= miniMVC\site_url('category/detail/'.$p['category_id']) ?>"><?= $p['category'] ?></a> >
|
|
|
|
<?= $section ?>
|
|
|
|
</p>
|
|
|
|
|
2012-09-05 11:46:51 -04:00
|
|
|
<form action="<?= miniMVC\site_url("section/add_data") ?>" method="post">
|
2012-08-31 16:18:23 -04:00
|
|
|
<fieldset>
|
|
|
|
<legend>Add Data</legend>
|
|
|
|
<dl>
|
|
|
|
<!-- Weird tag wrapping is intentional for display: inline-block -->
|
|
|
|
<dt><label for="name">Name:</label></dt><dd>
|
|
|
|
<input type="text" name="name[]" id="section" /></dd>
|
|
|
|
|
|
|
|
<dt><label for="val">Value:</label></dt><dd>
|
|
|
|
<textarea name="val[]" rows="5" cols="40"></textarea></dd>
|
|
|
|
|
|
|
|
<dt><input type="hidden" name="section_id" value="<?= $section_id ?>" /></dt><dd>
|
|
|
|
<button type="submit">Save Data</button></dd>
|
|
|
|
</dl>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php if ( ! empty($sdata)): ?>
|
|
|
|
|
|
|
|
<?php foreach($sdata as $d): ?>
|
|
|
|
<?php foreach($d as $k => $v): ?>
|
|
|
|
<?php $class = (strpos($v, "<br />") !== FALSE) ? 'multiline' : 'pair' ?>
|
|
|
|
<dl class="<?= $class ?>">
|
|
|
|
|
|
|
|
<dt><?= $k ?></dt>
|
|
|
|
<dd><?= $v ?></dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
<?php endif ?>
|