Location: PHPKode > scripts > Impleo Music Collection Script > impleo/templates/detail-types.tpl
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
  <title>Impleo Music Collection - Detail types</title>
  <link href="style.css" rel="stylesheet" type="text/css" media="screen">
</head>
<body>
<div id="container">
  <div id="header">
    <h1>Impleo Music Collection</h1>
  </div>
  <div id="menu">
    <ul>
      <li><a href="./add-record.php">Add record</a></li>
      <li><a href="./edit-records-list.php">Edit/delete records</a></li>
      <li><a href="./detail-types.php">Detail types</a></li>
      <li><a href="./settings.php">Settings</a></li>
      <li><a href="./../">Show</a></li>
    </ul>
  </div>
  <div id="content">
    <h2>Detail types</h2>
{if $addPosted}
  {if $hasError}
  <p class="error">{$errorMsg}</p>
  {else}
  <p class="success">Detail type added.</p>
  {/if}
{/if}
<form method="post" action="./detail-types.php" name="edit">
<table border="1">
  <tr>
    <th id="name">Name</th>
	<th id="required">Required</th>
	<th id="show">Show in table</th>
	<th id="order">Order</th>
	<th></th>
  </tr>
{foreach from=$attributes item=attribute name=add}
  <tr>
    <td headers="name">{if $edit eq $smarty.foreach.add.index}<input type="text" value="{$attribute.name}" name="editname">{else}{$attribute.name}{/if}</td>
	<td headers="required" align="center">{if $edit eq $smarty.foreach.add.index}<input type="checkbox" name="editrequired"{if $attribute.required} checked{/if}>{else}{if $attribute.required}<img src="../images/yes.png" alt="Yes">{else}<img src="../images/no.png" alt="No">{/if}{/if}</td>
	<td headers="show" align="center">{if $edit eq $smarty.foreach.add.index}<input type="checkbox" name="editshow"{if $attribute.show_in_table} checked{/if}>{else}{if $attribute.show_in_table}<img src="../images/yes.png" alt="Yes">{else}<img src="../images/no.png" alt="No">{/if}{/if}</td>
	<td headers="order">
	  {if $edit ne $smarty.foreach.add.index}
	  <input type="submit" name="moveup_{$smarty.foreach.add.index}" value="↑" title="Move up"{if $smarty.foreach.add.first} disabled{/if}>
	  <input type="submit" name="movedown_{$smarty.foreach.add.index}" value="↓" title="Move down"{if $smarty.foreach.add.last} disabled{/if}>
	  {/if}  
	</td>
	<td>
	  {if $edit eq $smarty.foreach.add.index}
	  <input type="hidden" name="id" value="{$attribute.name}">
	  <input type="submit" name="update" value="Update">
	  {else}
	  <input type="submit" value="Edit" name="edit_{$smarty.foreach.add.index}">
	  <input type="submit" value="Delete" name="delete_{$smarty.foreach.add.index}" onclick="return confirm('Are you sure you want to delete attribute \'{$attribute.name}\'?')">
	  {/if}  
	</td>
  </tr>
{/foreach}
</table>
</form>
    <form method="post" action="./detail-types.php" name="add">
	<fieldset>
	  <legend>Add new detail type</legend>
      <p>
        <label for="name">Name:</label> <span class="star">*</span><br>
        <input type="text" id="name" name="name" size="35" maxlength="255" required="required">
        <input type="checkbox" name="required" checked>
		<label>Required</label>
        <input type="checkbox" name="showintable" checked>
		<label>Show in table</label>
      </p>
	  <p><input type="submit" name="add" value="Add detail type"></p>
	</fieldset>
	</form>
  </div>
  <div id="bottom">
    <p class="author"><a href="http://sappy.dk/impleo/">Impleo Music Collection 2.0</a></p>
    <p class="logout"><a href="./?logout">Log out</a></p>
  </div>
</div>
</body>
</html>
Return current item: Impleo Music Collection Script