//$myRecipes[] = array($recipeLink,$edit,$delete); $favoriteRecipeLink = new RTK_Link("favorite/"); $myFavoriteRecipes = array(); //$myFavoriteRecipes[] = array($favoriteRecipeLink,$delete); $myMessageLink = new RTK_Link("message/"); $myMessages = array(); // Page Output include_once 'Pages/OnAllPages.php'; // my recipe list $columnMylist = array("Recipe Name", "Edit", "Delete"); $mylistTitle = new RTK_Header("My Recipe"); $mylist = new RTK_Listview($columnMylist); $RTK->AddElement($mylistTitle); if (sizeof($myRecipes) > 0) { foreach ($myRecipes as $recipe) { $mylist->AddRow($recipe); } $RTK->AddElement($mylist); } else { $RTK->AddElement(new RTK_Textview($string_nomyrecipes)); } $RTK->AddElement($createRecipeLink); // my favorite recipes /*$columnMyFavorite = array("Recipe Name","Delete"); $myfavoriteTitle = new RTK_Header("My Favorite"); $RTK->AddElement($myfavoriteTitle); if (sizeof($myFavoriteRecipes) > 0) { $myfavoriteList = new RTK_Listview($columnMyFavorite); foreach ($myFavoriteRecipes as $recipe) { $myfavoriteList->AddRow($recipe);
<?php // Page Logic $home_text = 'Congratulations! You have made it to the front page of our website! Won't you also please try to log in?'; $home_link = 'Go to the login page.'; $listheaders = array("Recipe Name"); $recipes = Recipe::LoadNewest(50, 0); // Page Output include_once 'Pages/OnAllPages.php'; $RTK->AddElement(new RTK_Header("Welcome to securipe")); $RTK->AddElement(new RTK_Textview($home_text)); // Show newest recipies if (_array::IsLongerThan($recipes, 0)) { $list = new RTK_Listview($listheaders); foreach ($recipes as $recipe) { $link = new RTK_Link('ViewRecipe' . URLPAGEEXT . '?id=' . $recipe->GetId(), $recipe->GetTitle()); $list->AddRow(array($link)); } $RTK->AddElement($list); }