本文整理汇总了PHP中Recipe::updatePicture方法的典型用法代码示例。如果您正苦于以下问题:PHP Recipe::updatePicture方法的具体用法?PHP Recipe::updatePicture怎么用?PHP Recipe::updatePicture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Recipe
的用法示例。
在下文中一共展示了Recipe::updatePicture方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Recipe
$ingArray[] = $ingObj;
//Add the object to the list
}
$i++;
}
/*
Handle adding and editing of recipes
*/
$recipeObj = new Recipe($recipe_id, $recipe_name, $recipe_ethnic, $recipe_base, $recipe_course, $recipe_prep_time, $recipe_difficulty, $recipe_directions, $recipe_comments, $recipe_serving_size, $recipe_source, $recipe_source_desc, $SMObj->getUserID(), $recipe_private, $_FILES['recipe_picture'], $recipe_picture_type, $recipe_picture_oid);
// Add or update the recipe
$recipeObj->addUpdate();
// Handle the picture
if ($remove_picture == "yes") {
$recipeObj->deletePicture();
} else {
$recipeObj->updatePicture($resize_picture);
}
if ($recipe_id) {
// Clear out the old ingredients, this could be done by an update if desired.
$sql = "DELETE FROM {$db_table_ingredientmaps} WHERE map_recipe=" . $DB_LINK->addq($recipe_id, get_magic_quotes_gpc());
$result = $DB_LINK->Execute($sql);
// Also clear out the related_recipes
$sql = "DELETE FROM {$db_table_related_recipes} WHERE related_parent=" . $DB_LINK->addq($recipe_id, get_magic_quotes_gpc());
$result = $DB_LINK->Execute($sql);
}
$recipe_id = $recipeObj->getID();
/*
Add the ingredients into the database. The order field is needed because mysql does not consistently put them in or retrieve them
in a specific order.
*/
foreach ($ingArray as $ing) {