Location: PHPKode > scripts > Impleo Music Collection Script > impleo/templates/edit-records-list.tpl
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
  <title>Impleo Music Collection - Edit/delete records</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>Edit/delete records</h2>
{if $numRecords > 0}
    <form action="./edit-records-list.php" method="get">
    <p>
      <label for="perpage">Records per page:</label>
      <select name="perpage" id="perpage">
        {foreach from=$limitOptions item=option}
        <option value="{$option}"{if $selectedLimit eq $option} selected{/if}>{$option}</option>
        {/foreach}
      </select>
      <input type="submit" value="Submit">
    </p>
    </form>
    <table border="1">
      <tr>
          <th id="info"></th>
		  <th id="artist">Artist</th>
		  <th id="title">Title</th>
		  <th id="year">Year</th>
		  <th id="edit">Edit</th>
		  <th id="delete">Delete</th>   
      </tr>
      {foreach from=$musiclist item=record}
		<tr>
          <td headers="info">
            <a href="../record.php?id={$record->getId()}" class="tip"><img src="../images/information.png"> <span>
            {foreach from=$record->getDetailInfo() key=k item=item name=ext}
              {if $item}<b>{$k}:</b> {$item}<br>{/if}
            {/foreach}
            <b>Added:</b> {$record->getDateAdded()}
            </span></a>
          </td>
		  <td headers="artist" valign="top">{$record->getArtist()}</td>
		  <td headers="title" valign="top">{$record->getTitle()}</td>
		  <td headers="year" valign="top">{$record->getYear()}</td>
		  <td headers="edit" valign="top">
		    <form action="edit-record.php?id={$record->getID()}" method="post">
		    <input type="submit" value="Edit">
		    </form>
		  </td>
		  <td headers="delete" valign="top">
		    <form action="{$uri}" method="post">
		      <input type="hidden" name="delete_id" value="{$record->getID()}">
		      <input type="submit" value="Delete" onclick="return confirm('Are you sure you want to delete \'{$record->getArtist()} - {$record->getTitle()}\'?')">
		    </form>
		  </td>
		</tr>
		{/foreach}
    </table>
{if $showPaging}
<p id="navigation">
{if $paging[0]}<a href="edit-records-list.php{$paging[0]}">Previous</a>{else}Previous{/if}
{foreach from=$paging[1] item=link name=plink}
  {if $link}<a href="edit-records-list.php{$link}">{/if}{$smarty.foreach.plink.index+1}{if $link}</a>{/if}
{/foreach}
 {if $paging[2]}<a href="edit-records-list.php{$paging[2]}">Next</a>{else}Next{/if}
</p>
{/if}
{else}
<p>There are currently no records in the collection.</p>
{/if}
  </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