Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.volley92.asso.fr
/
htdocs
/
admin174
/
connected
/
pages
/
/srv/data/web/vhosts/www.volley92.asso.fr/htdocs/admin174/connected/pages/album-add-image.php
<?php $idAlbum = $_GET['id']; $stmt=$db_client->prepare("SELECT * FROM album WHERE id=? AND id_company=?"); $stmt->execute(array($idAlbum,$conf_id_company)); $row = $stmt->fetch(); if(empty($row))//Si la gellerie n'existe pas on redirige header('Location: albums'); include "functions/album-add-image.php"; ?> <h1>Ajout d'une image dans l'album "<?=$row->name?>" <small> - <a href="album-edition-<?=$row->id?>">retour</a></small></h1> <form role="form" method="post" action="#" enctype="multipart/form-data"> <div class="row"> <div class="col-sm-4"> <div class="form-group"> <label for="imageForm1">Image</label> <input type="file" id="imageForm1" name="image"> <p class="help-block">2 Mo maximum par fichier</p> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label for="nameForm1">Titre <i>(facultatif)</i></label> <input id="nameForm1" class='form-control' type="text" name="name" value="<?=$name?>" autofocus> </div> <div class="form-group"> <label for="legendForm1">Légende <i>(facultatif)</i></label> <input id="legendForm1" class='form-control' type="text" name="legend" value="<?=$legend?>" autofocus> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label for="rankForm1">Ordre d'affichage</label> <select name="rank" id="rankForm1" class='form-control'> <?php foreach (range(1,sizeof($pictures)+1) as $rank): ?> <option><?=$rank?></option> <?php endforeach ?> </select> </div> </div> </div> <div class="text-center"> <a href="album-edition-<?=$row->id?>" class='btn btn-default'>Annuler</a> <button type='submit' name='formAdd' class='btn btn-success'>Ajouter</button> </div> </form> <hr> <div class="row"> <?php if(empty($pictures))echo "<p><i>Aucune image n'a encore été créée dans le bandeau.</i></p>"; $i = 0; foreach ($pictures as $row):?> <div class='modal fade' id='remove<?=$row->id?>'> <div class='modal-dialog'> <div class='modal-content'> <div class='modal-header'> <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> <h4 class='modal-title'>Suppression d'une image</h4> </div> <div class='modal-body'> Confirmez-vous la suppression de cette image <b><?=$row->name?></b> ? <img src="../../<?=$row->src?>" alt="..." class="img-responsive"> </div> <div class='modal-footer'> <form method="post" action="#"> <input type="hidden" name="id" value="<?=$row->id?>"> <input type="hidden" name="src" value="<?=$row->src?>"> <a class='btn btn-default' data-dismiss='modal'>Annuler</a> <button type='submit' name='formRemove' class='btn btn-danger'>Supprimer</button> </form> </div> </div> </div> </div> <div class="col-sm-4"> <div class="well well-sm"> <div class="row"> <div class="col-sm-6"> <div class="thumbnail"> <img src="../../<?=$row->src?>" alt="..."> </div> </div> <div class="col-sm-6"> <form action="#" method="post"> <input type="hidden" name="id" value="<?=$row->id?>"> <div class="form-group"> <label for="nameForm2">Nom</label> <input id="nameForm2" class='form-control input-sm' type="text" name="name" value="<?=$row->name?>"> </div> <div class="form-group"> <label for="legendForm2">Légende</label> <input id="legendForm2" class='form-control input-sm' type="text" name="legend" value="<?=$row->legend?>"> </div> <div class="form-group"> <label for="rankForm2">Rang</label> <select name="rank" id="rankForm2" class='form-control input-sm'> <?php foreach (range(1,sizeof($pictures)) as $rank): ?> <option <?=($row->rank==$rank)?'selected':''?>><?=$rank?></option> <?php endforeach ?> </select> </div> <div class="text-center"> <button type='submit' name='formUpdate' class='btn btn-success btn-xs'>Mettre à jour</button> <a data-toggle='modal' href='#remove<?=$row->id?>' class='btn btn-xs btn-danger'>Supprimer</a> </div> </form> </div> </div> </div> </div> <?php $i++;if($i%3==0)echo"</div><div class='row'>" ?> <?php endforeach; ?> </div>