File index.php in CookBook
<?php /* * Cookbook - a simple php cookbook * Copyright (C) 2004 Christopher Sexton * * This program 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; either version 2 of the License, or (at * your option) any later version. * * 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. * */ ?> <?php require_once('Include/config.php'); ?> <?php if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } ?> <html> <head> <title>The Tullos-Sexton Cookbook</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="cookbook.css" rel="stylesheet" type="text/css"> <style type="text/css"> </style> </head> <body> <div id="main"> <div id="Title" align="center"><?=$cb_title?></div> <?php include('Include/nav.php'); ?> <hr size="1"> <?php $result = mysql_query("SELECT * FROM cookbook_recipes ORDER BY title ASC",$cb_db); //printf("Title: %s<br>\n", mysql_result($result,0,"title")); while ($myrow = mysql_fetch_row($result)) { //printf("<a href='view.php?id=%s'>%s</a> [<a href='edit.php?id=%s'>edit</a>][<a href='delete.php?id=%s'>X</a>]<br>\n", $myrow[0], $myrow[1], $myrow[0], $myrow[0]); ?> <a href='view.php?id=<?=$myrow[0]?>'><?=$myrow[1]?></a> <!--span class="TextTitle">[<a href='edit.php?id=<?=$myrow[0]?>'>edit</a>][<a href='delete.php?id=<?=$myrow[0]?>'>delete</a>]</span--><br /> <?php } ?> <hr size="1"> <?php include('Include/nav.php'); ?> <div class="copyright" align="center">© 2004 <a href="http://www.fuzzymonk.com">Chrisopher Sexton</a></div> </div></body> </html>
