echo $smellyfish_base_uri; ?> editAll.php"> <? if (strlen($cat) != 0) {?> <input type="hidden" name="cat" value="<?php echo $cat; ?> "> <? } ?> <p> <table border="0" cellpadding="2" cellspacing="0"> <? $bg = FALSE; ?> <? foreach ($all as $r) { ?> <? include("recipe_line.php"); ?> <? } ?> <? if (Recipe::havePermission("CHANGE")) { ?> <tr> <td colspan="5"> <input type="submit" value="<?php echo Text::getText("Save"); ?> "> </td> </tr> <? } ?> </table> </p> </form> <? } else { ?> <? if ($c == NULL) { ?> <?php
?> </a> </td> </tr> <tr class="navitem"> <td class="navitem"> <a href="<?php echo $smellyfish_base_uri; ?> search.php"><?php echo Text::getText("Search"); ?> </a> </td> </tr> <? if (Recipe::havePermission("ADD")) { ?> <tr class="navitem"> <td class="navitem"> <a href="<?php echo $smellyfish_base_uri; ?> add.php"><?php echo Text::getText("Add"); ?> </a> </td> </tr> <? } ?> <tr class="navitem"> <td class="navitem"> <a href="<?php
echo $r->getId(); ?> "><?php echo Text::getText("Print"); ?> </a> <? if (Recipe::havePermission("CHANGE")) { ?> <a href="editkupu.php?id=<?php echo $r->getId(); ?> "><?php echo Text::getText("Edit"); ?> </a> <? } ?> <? if (Recipe::havePermission("DELETE")) { ?> <a href="delete.php?id=<?php echo $r->getId(); ?> " onClick="return confirm('<?php echo Text::getText("ConfirmDelete"); ?> ')"><?php echo Text::getText("Delete"); ?> </a> <? } ?> </td> </tr> </table> </p>
$r->setSteps($_REQUEST['steps']); $cat = $_REQUEST['cat']; if (strlen($cat) > 0) { $c = Category::getById($cat); $r->setCategory($c); } if (!Recipe::havePermission("ADD")) { $errMsg=Text::getText("You are not allowed to add recipes."); include("error.php"); exit; } $action = $_REQUEST['action']; if ($action == "save" && Recipe::havePermission("ADD")) { if ($_REQUEST['title'] != "") { if ($_FILES['photo']['size'] != 0) { $filename = $_FILES['photo']['name']; $extension = strrchr($filename, '.'); if ($extension != ".jpg") { $r->insert(); header("Location: edit.php?id=".$r->getId()."&err=OnlyJpegFiles"); } else { $r->hasPhoto(TRUE); $r->insert(); $r->setPhoto($_FILES['photo']['tmp_name'], $extension); header("Location: view.php?id=".$r->getId()); } } else { $r->insert();