Example #1
0
<?php

include 'include.php';
isAllowed();
if (isset($_GET['page'])) {
    $content = getVote($_GET['page']);
} else {
    $content = getVote();
}
$content = $content->vote_feed;
$pages = getPages();
getHeader();
?>

<article>
	<!-- Contenu de la page -->
	<div class="contenu">
		<div class="contenu_static">
			<h2>Les publications les mieux not&eacute;es</h2>
			<section id="photos">
				<ul id="inedit">
					<?php 
foreach ($content as $k => $v) {
    ?>
						<li>
							<a href="afficherphoto.php?id=<?php 
    echo $v->id;
    ?>
">
							<img src="http://api-rest-youcef-m.c9.io<?php 
    echo implode("_200x200.", explode(".", $v->chemin));
Example #2
0
<?php

require 'query.php';
$vote = $_POST['vote'];
$obj = $_POST['obj'];
$id = $_POST['id'];
if ($vote == 'up') {
    $addition = 1;
} else {
    $addition = -1;
}
updateVote($obj, $id, $addition);
echo getVote($obj, $id);
?>

<?php 
mysqli_close($conn);