本文整理汇总了PHP中Photograph::find_all方法的典型用法代码示例。如果您正苦于以下问题:PHP Photograph::find_all方法的具体用法?PHP Photograph::find_all怎么用?PHP Photograph::find_all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Photograph
的用法示例。
在下文中一共展示了Photograph::find_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: url
<?php
require_once "../includes/database.php";
require_once "../includes/user.php";
require_once '../includes/functions.php';
require_once "../includes/photograph.php";
$photos = Photograph::find_all();
?>
<!DOCTYPE html>
<html lang="en" style="background-image: url(mainpage.jpg);>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Gallery Home</title>
<!-- Bootstrap Core CSS -->
<link href="css2/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css2/heroic-features.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
示例2: redirect_to
require_once "../../includes/initialize.php";
if (!$session->is_logged_in()) {
redirect_to("login.php");
}
?>
<?php
include_layout_template("admin_header.php");
?>
<h2>Menu</h2>
<ul>
<li><a href="logout.php">Logout</a></li>
</ul>
<h3>Photo List</h3>
<?php
$photoList = Photograph::find_all();
echo output_message($message);
if (sizeof($photoList) > 0) {
?>
<table border="1">
<tr>
<td>Image</td>
<td>File Name</td>
<td>Caption</td>
<td>Size</td>
<td>Type</td>
<td></td>
</tr>
<?php
foreach ($photoList as $photo) {