本文整理匯總了PHP中Images::imageList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Images::imageList方法的具體用法?PHP Images::imageList怎麽用?PHP Images::imageList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Images
的用法示例。
在下文中一共展示了Images::imageList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Images
<?php
require_once './includes/dbcon.php';
require_once './includes/Images/Images.php';
$status = false;
$dbImages = new Images($conn);
$list = $dbImages->imageList();
for ($i = count($list) - 1; $i >= 0; $i--) {
if ($dbImages->getImage($list[$i][0])[7] == 1) {
echo "<article>\n <p>" . htmlspecialchars($list[$i][2]) . "</p>\n <figure class='img'>\n <a href='browse.php?img={$list[$i][0]}'><img src='./img/thumbs/thumb_{$list[$i][1]}'></a>\n </figure>\n <div class='fadeout'></div>\n </article>\n ";
}
}
示例2: header
$_SESSION['upload'] = $loader->getNameList();
}
header("Location: review.php");
die;
}
}
if (isset($validUpdate)) {
$dbUsers = new Users($conn);
$dbUsers->updateUser($_SESSION['userID'], $_SESSION['first_name'], $_SESSION['last_name'], $email, $username, $password);
$_SESSION['username'] = $username;
$_SESSION['user_email'] = $email;
}
//Gets all images user can delete.
//Replace with database
$dbImages = new Images($conn);
$filenames = $dbImages->imageList($_SESSION['userID']);
if (isset($_POST['delete'])) {
//delete Code (rember to check if user has permission to delete image)
}
include './includes/title.php';
?>
<!DOCTYPE html>
<?php
require "./includes/head.php";
?>
<body>
<?php
include "./includes/header.php";
?>
<?php
include "./includes/menu.php";
示例3: basename
<?php
$currentPage = basename($_SERVER['SCRIPT_FILENAME']);
require_once './includes/dbcon.php';
require_once './includes/Images/Images.php';
$dbImages = new Images($conn);
if (count($dbImages->imageList()) > 0) {
$latestImage = array_reverse($dbImages->imageList())[0][0];
} else {
$latestImage = 0;
}
?>
<nav>
<ul>
<li <?php
if ($currentPage == "index.php") {
echo "class=\"current\"";
}
?>
>
<a href="index.php">Heim</a>
</li>
<li <?php
if ($currentPage == "ummig.php") {
echo "class=\"current\"";
}
?>
>
<a href="ummig.php">Um mig</a>
</li>