本文整理汇总了PHP中Categorie::getCategorie方法的典型用法代码示例。如果您正苦于以下问题:PHP Categorie::getCategorie方法的具体用法?PHP Categorie::getCategorie怎么用?PHP Categorie::getCategorie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Categorie
的用法示例。
在下文中一共展示了Categorie::getCategorie方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
$path = "../";
require_once $path . "includes/session.php";
require $path . "Modele/Categorie.class.php";
?>
<!doctype html>
<html>
<?php
require_once $path . "includes/header.php";
?>
<body>
<?php
require_once $path . "includes/navbar.php";
if (isset($_GET['nom'])) {
$categorie = Categorie::getCategorie($_GET['nom']);
} else {
header("Location: " . $path . "index.php");
}
?>
<div class="container">
<div class="jumbotron">
<h2>Modifier une catégorie</h2>
<form class="form-horizontal" role="form" enctype="multipart/form-data" action="<?php
echo $path . "Controleur/categorie_controleur.php";
?>
" method="POST">
<div class="form-group">
<label class="control-label col-sm-3" for="nom_categorie">Nom:</label>
<div class="col-sm-7">
示例2: isset
<?php
require_once '../../module/Connection.php';
require_once '../../module/model/categorie/Categorie.php';
$id = isset($_GET["id"]) ? $_GET["id"] : "";
if ($id != "") {
$model = new Categorie();
$categorie = $model->getCategorie($id);
$data = $categorie->fetch();
} else {
echo "";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<link href="../../css/style.css" rel="stylesheet" type="text/css" >
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252">
<title>Insert title here</title>
<script language="javascript" src="../../js/validation.js"></script>
</head>
<body>
<h3>Modification de la categorie: <?php
echo $data["nom_categorie"];
?>
</h3>
<div id="form">
<form name="categorieForm" action="../../actions/categorie/editerAction.php" method="post"><!-- pour cree le formuulaire -->
<table>
<tr>
<td colspan=2 id="bloc_erreur">
示例3:
$listeCats = $categorie->listeCategorie();
foreach ($listeCats as $cat) {
echo "<label class='checkbox-inline'>";
echo " <input type='checkbox' onclick='filtres(" . $cat['idCategorie'] . ")' id='f" . $cat['idCategorie'] . "' value='" . $cat['idCategorie'] . "'> " . $cat['nom'];
echo "</label>";
}
?>
</div>
</div>
<?php
$listeMovies = $movies->listeFilm();
foreach ($listeMovies as $movie) {
echo "<div class='film num" . $movie['idCategorie'] . "'>";
echo "<h1><a href='lib/movies.php?id=" . $movie['idMovie'] . "'>" . $movie['titre'] . "</a></h1>";
echo "<h4>Catégorie : " . $categorie->getCategorie($movie['idCategorie'])['nom'] . "</h4>";
echo "<p>" . $movie['descShort'] . "</p>";
echo "</div>";
}
?>
</div>
<footer>
<div class="pied">
<hr>
Construit par <a href="http://angelo-chirat.fr" target="_blank">Angelo Chirat</a>
</div>
</footer>
<!-- JS Libraries -->
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
示例4: Categorie
<?php
require_once "backend/module/Connection.php";
require_once "backend/module/model/categorie/Categorie.php";
$categorie = new Categorie();
$resultat = $categorie->getCategorie();
?>
<div id="menu">
<ul>
<?php
#debut de la boucle
while ($data = $resultat->fetch()) {
?>
<!-- contenue de la boucle -->
<li><a href="#"><?php
echo $data["nom_categorie"];
?>
</a></li>
<?php
}
?>
</ul>
<!-- menue statique
<ul>
<li><a href="#">infos nationales</a></li>
<li><a href="#">economie</a></li>
<li><a href="#">politique</a></li>
<li><a href="#">soci�t�</a></li>
<li><a href="#">sport</a></li>
<li><a href="#">art</a></li>
</ul>
示例5: Movies
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
require "topbar.php";
require_once "../modeles/movies.php";
require_once "../modeles/noter.php";
require_once "../modeles/categorie.php";
$movies = new Movies();
$noter = new Noter();
$categorie = new Categorie();
$note = $noter->getNote($_GET['id']);
$film = $movies->getFilm($_GET['id']);
$nomCat = $categorie->getCategorie($film['idCategorie'])['nom'];
?>
<div class="contenu">
<div class="jumbotron">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-4">
<img src='<?php
echo "../" . $film['image'];
?>
' class="thumbnail img-rounded pull-left">
</div>
<div class="col-md-6">
<?php
echo "<h2>" . $film['titre'] . "</h2>";