der er en demo her
http://phprecipebook.sourceforge.net/demo.php jeg kan desværre ikke linke til den jeg kører med, da den ligger lokalt.
*****************************************************************
<?php
require_once("classes/DBUtils.class.php");
$where = isset ($_GET['where'] ) ? $_GET['where'] : '';
if (empty( $where )) {
$where = $alphabet[0]; // show the letter 'a' by default to be faster
}
// Pull First Letters
$let = ":";
$sql = "SELECT DISTINCT LOWER(SUBSTRING(recipe_name, 1, 1)) AS A FROM $db_table_recipes";
$rc = $DB_LINK->Execute( $sql );
DBUtils::checkResult($rc, NULL, NULL, $sql);
while (!$rc->EOF) {
if (ord($rc->fields[0]) >= 192 and ord($rc->fields[0]) <= 222 and ord($rc->fields[0]) != 215) // "Select lower"
$rc->fields[0] = chr(ord($rc->fields[0])+32); // above doesn't work with ascii > 192, this fixes it
$let .= $rc->fields[0]; // it could be "a" or "A", so just go with the only returned item
$rc->MoveNext();
}
?>
<table cellspacing="0" cellpadding="1" border="0" width="100%">
<tr>
<td align="left" class="title"><?php echo $LangUI->_('Recipe Index');?></td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="1" class="std">
<tr>
<td width="100%" align=right><?php echo $LangUI->_('Show');?>:</td>
<td align="center" bgcolor="silver"><a href="./index.php?m=recipes&where=%">
<?php echo $LangUI->_('All');?></a></td>
<?php
for ($a=0; isset($alphabet[$a]); $a++) { // List the alphabet
$cu = $alphabet[$a];
$cl = chr( ord( $cu )+32 );
$bg = strpos($let, "$cl") > 0 ? "><a href=./index.php?m=recipes&where=$cu" : 'style="background-color:#ffffff;"';
echo "<TD align=\"center\" $bg>$cu</A></TD>\n";
}
?>
</tr>
</table>
<?php
$sql = "SELECT recipe_id,recipe_name FROM $db_table_recipes WHERE recipe_name LIKE '$where%' OR recipe_name LIKE '"
. strtolower($where) . "%' ORDER BY recipe_name";
$rc = $DB_LINK->Execute( $sql );
DBUtils::checkResult($rc, NULL, NULL, $sql);
while (!$rc->EOF) {
echo '<br /><a href="./index.php?m=recipes&a=view&recipe_id='.$rc->fields['recipe_id'].'">'.$rc->fields['recipe_name'].'</a>';
$rc->MoveNext();
}
?>
****************************************************************
jeg vil mene det er den kode som er aktuel, da det efter hvad jeg kan forstå er den, som henter koden.
jakobclausen-->> jeg ved ik helt hvordan den evt. sættes ind