当前位置: 首页>>代码示例>>PHP>>正文


PHP Recipe::getList方法代码示例

本文整理汇总了PHP中Recipe::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Recipe::getList方法的具体用法?PHP Recipe::getList怎么用?PHP Recipe::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Recipe的用法示例。


在下文中一共展示了Recipe::getList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Recipe

<?php

include_once 'php/config.php';
include_once 'php/basic.php';
include_once 'php/sql.php';
include_once 'php/recipe.php';
include_once 'php/user.php';
$recipes = new Recipe();
$r_data = $recipes->getList(15);
$r_html = render(__DIR__ . "/views/mr_slide.php", ["recipes" => $r_data]);
$fb_url = Config::getFbUrl();
$vk_url = Config::getVkUrl();
$header = render(__DIR__ . "/views/header.php", ["fb_url" => $fb_url, "vk_url" => $vk_url, "user" => User::getInst()->isAuthorized() ? User::getInst()->getUserInfo()["name"] : false]);
$sidebar = render(__DIR__ . "/views/sidebar.php", ["fb_url" => $fb_url, "vk_url" => $vk_url, "user" => User::getInst()->isAuthorized() ? User::getInst()->getUserInfo()["name"] . " " . User::getInst()->getUserInfo()["soname"] : false]);
$footer = render(__DIR__ . "/views/footer.php", []);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<head>
    <title>FitEat</title>
    <link rel="StyleSheet" type="text/css" href="stylesheets/main.css"/>
    <link rel="StyleSheet" type="text/css" href="stylesheets/datepicker.css"/>
    <script type="text/JavaScript" src="javascript/jquery-2.1.0.js"></script>
    <script type="text/JavaScript" src="javascript/jquery-ui.min.js"></script>
    <script type="text/javascript" src="javascript/datepicker.js"></script>
    <script type="text/javascript" src="javascript/jquery.mask.js"></script>
    <script type="text/JavaScript" src="javascript/jscript.js"></script>
</head>
开发者ID:ksanderpugin,项目名称:fiteat,代码行数:31,代码来源:index.php

示例2: intval

<?php

require_once 'config/config.conf.php';
$type = !empty($_GET['type']) ? intval($_GET['type']) : 0;
$vars = array();
if (!empty($type)) {
    $vars = array('type' => array('=', $type));
}
$recipes = Recipe::getList('*', '', $vars, 'title ASC');
//$recipes = Recipe::select('SELECT * FROM recipe WHERE type = :type ORDER BY title ASC', array('type' => $type));
$count_recipes = count($recipes);
$vars = array('type' => $type, 'recipes' => $recipes, 'count_recipes' => $count_recipes);
Model::displayTemplate('recipes.tpl', $vars);
开发者ID:vincenthib,项目名称:cooking,代码行数:13,代码来源:recipes.php


注:本文中的Recipe::getList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。