PHP Classes

File: modifyBookmark.tpl.php

Recommend this page to a friend!
  Classes of barry@nauta.be   Bookmarks   modifyBookmark.tpl.php   Download  
File: modifyBookmark.tpl.php
Role: Application script
Content type: text/plain
Description: Modifying bookmarks
Class: Bookmarks
Manage lists of bookmark with Web interface
Author: By
Last change:
Date: 20 years ago
Size: 3,914 bytes
 

Contents

Class file image Download
<?php
/**
 * The template file that draws the layout to add a bookmark.
 *
 * @package be.nauta.booby.plugins.bookmarks.view
 * @author Barry Nauta
 * @copyright Barry Nauta
 *
 * This file is part of the Booby project.
 * The booby project is located at the following location:
 * http://www.nauta.be/booby/
 *
 * Copyright (c) 2003 - 2004 Barry Nauta
 *
 * The Booby project is released under the General Public License
 * More detailes in the file 'gpl.html' or on the following
 * website: <code>http://www.gnu.org</code> and look for licenses
 *
 * Enjoy :-)
 */
   
require_once ('base/util/StringUtils.php');
   
$stringUtils = new StringUtils ();
?>
<table border="0" width="100%">
<tr>
   
    <td><h2><?php echo $dictionary['modify'] ?>&nbsp;<?php echo $dictionary['bookmark'] ?></h2></td>
</tr>
</table>

<form method="POST" action="BookmarkController.php">
    <table width="80%" border="0">
    <!--
        If we have errors from the previous post, show them. Contributed by Michael Haussmann
    -->
    <?php
       
if(!empty($parameters['errors']))
        {
            foreach(
$parameters['errors'] as $error)
            {
                echo (
'<tr><td>'.$dictionary[$error].'</td></tr>');
            }
        }
   
?>

    <!--
        The bookmarks name
    -->
    <tr>
        <td>
            <?php echo $dictionary['name'] ?>:
        </td>
        <td>
            <input type="text" name="name"
            size="60" value="<?php echo $stringUtils->urlEncode ($renderObjects->name) ?>" />
        </td>
    </tr>
   
    <!--
        Its URL/locators
    -->
    <tr>
        <td>
            <?php echo $dictionary['url'] ?>:
        </td>
        <td>
            <input type="text" name="locator"
            size="60" value="<?php echo $stringUtils->urlEncode ($renderObjects->locator) ?>" />
        </td>
    </tr>
   
    <!--
        Its description
    -->
    <tr>
        <td>
            <?php echo $dictionary['description'] ?>:
        </td>
        <td>
            <textarea rows="4" cols="40"
            name="description"><?php echo $stringUtils->urlEncode ($renderObjects->description) ?></textarea>
        </td>
    </tr>
   
    <!--
        Visibility
    -->
    <tr>
        <td>
            <?php echo $dictionary['item_public'] ?>: <input type="radio" name="visibility"
                value="public" <?php if($renderObjects->visibility == "public") echo 'checked="checked"' ?> /><br />

            <?php echo $dictionary['item_private'] ?>: <input type="radio" name="visibility"
                value="private" <?php if($renderObjects->visibility == "private") echo 'checked="checked"' ?> />
        </td>
    </tr>
    </table>
   
<!--
    MODIFY button
-->
<h2><?php echo $dictionary['modify'] ?> <?php echo $dictionary['bookmark'] ?></h2>
    <input type="hidden" value=<?php echo $renderObjects->itemId ?>
        name="itemId" />
    <input type="hidden" name="action" value="modifyBookmark" />
    <input type="hidden" name="parentId"
        value=<?php echo $renderObjects->parentId ?> />
    <input type="hidden" name="isParent"
        value=<?php echo $renderObjects->isParent ?> />
    <input type="submit" value="<?php echo $dictionary['modify'] ?>" name="modifyBookmark" />
</form>

<!--
    MOVE button
-->
<h2><?php echo $dictionary['move'] ?> <?php echo $dictionary['bookmark'] ?></h2>
<form method="POST" action="BookmarkController.php">
    <input type="hidden" value=<?php echo $renderObjects->itemId ?>
        name="itemId" />
    <input type="hidden" name="action" value="move" />
    <input type="submit" value="<?php echo $dictionary['move'] ?>"
        name="move" />
</form>

<!--
    DELETE button
-->
<h2><?php echo $dictionary['delete'] ?> <?php echo $dictionary['bookmark'] ?></h2>
<form method="POST" action="BookmarkController.php"
    onsubmit="return confirmDelete()"
>
    <input type="hidden" value=<?php echo $renderObjects->itemId ?>
        name="itemId" />
    <input type="hidden" name="parentId"
        value=<?php echo $renderObjects->parentId ?> />
    <input type="hidden" name="action" value="deleteBookmark" />
    <input type="submit" value="<?php echo $dictionary['delete'] ?>"
        name="deleteBookmark" />
</form>