Location: PHPKode > projects > Butterfly Organizer > view.php
<?php
/*
Butterfly Organizer
Copyright (C) 2007-2008 Butterfly Media Romania

This file is part of Butterfly Organizer.

Butterfly Organizer is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

include('includes/top.php');

echo '<h2>Site Details</h2>';

$mytable = $_GET['mytable'];
$id = $_GET['id'];

$result = mysql_query("SELECT * FROM ".$mytable." WHERE id=$id",$database);
$myrow = mysql_fetch_array($result);

echo "<table cellspacing='1' cellpadding='2' id='tableCategories'>";
echo "<tr><td class='td_title'>ID:</td><td class='td_content'>".$myrow["id"]."</td></tr>";
echo "<tr><td class='td_title'>Date:</td><td class='td_content'>".$myrow["date"]."</td></tr>";
echo "<tr><td class='td_title'>Reference:</td><td class='td_content'>".$myrow["reference"]."</td></tr>";
echo "<tr><td class='td_title'>Name:</td><td class='td_content'>".$myrow["name"]."</td></tr>";
echo "<tr><td class='td_title'>URL Address:</td><td class='td_content'><a href='".$myrow["url"]."'>".$myrow["url"]."</a></td></tr>";
echo "<tr><td class='td_title'>Username:</td><td class='td_content'>".$myrow["username"]."</td></tr>";
echo "<tr><td class='td_title'>Password:</td><td class='td_content'>".$myrow["password"]."</td></tr>";
echo "<tr><td class='td_title'>Notes:</td><td class='td_content'>".nl2br($myrow["notes"])."</td></tr>";
echo "<tr><td class='td_title'>Other:</td><td class='td_content'>".nl2br($myrow["other"])."</td></tr>";
echo "</table>";

echo '<div class="menubar">';
echo '<a href="addedit.php?id='.$myrow['id'].'&amp;mytable='.$mytable.'" class="bsButton">Edit</a> ';
echo '<a href="delete.php?id='.$myrow['id'].'&amp;mytable='.$mytable.'" onclick="return confirmLinkDropACC(this, \'delete &lt;'.$myrow['reference'].'&gt;?\')" class="bsButton">Delete</a> ';
echo '<a href="viewdb2.php?mytable='.$mytable.'" class="bsButton">Back to main category</a>';
echo '</div>';

include('includes/bottom.php');
?>
Return current item: Butterfly Organizer