PV.Pat File Manager
Kernel Version: Linux webm010.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Domains: CANT READ named.confSites Server IP: 10.127.20.10 [Bing Search] [Zone-H]
| Path : /home/sptporgazz/www/backoffice/ |
| Current File : /home/sptporgazz/www/backoffice/cotisations.php |
<?php
session_start();
include("_inc/connect.php");
if(isset($_POST['submit'])) {
$id_cotisation = $_POST['id_cotisation'];
$titre = $_POST['titre'];
$sous_titre = $_POST['sous_titre'];
$texte = $_POST['texte'];
$legende = $_POST['legende'];
$ex_image_1 = $_POST['ex_image_1'];
$ex_image_2 = $_POST['ex_image_2'];
if($_FILES['image_1']['name']!="")
{
$new_image_1 = $_FILES['image_1']['name'];
move_uploaded_file($_FILES['image_1']['tmp_name'],"../_images/cotisation/" . $new_image_1);
chmod("../_images/cotisation/" . $new_image_1,0777);
} else {
$new_image_1 = $ex_image_1;
}
if($_FILES['image_2']['name']!="")
{
$new_image_2 = $_FILES['image_2']['name'];
move_uploaded_file($_FILES['image_2']['tmp_name'],"../_images/cotisation/" . $new_image_2);
chmod("../_images/cotisation/" . $new_image_2,0777);
} else {
$new_image_2 = $ex_image_2;
}
$sql_upd = "UPDATE page_cotisation SET titre='".addslashes($titre)."',sous_titre='".addslashes($sous_titre)."',texte='".addslashes($texte)."',legende='".addslashes($legende)."',image_1='$new_image_1',image_2='$new_image_2' WHERE id_cotisation=$id_cotisation";
if(mysql_query($sql_upd)) {
?>
<script type="text/javascript">
alert("Modifications effectu\351es");window.location.href=window.location.href;
</script>
<?
} else {
?>
<script type="text/javascript">
alert("Une erreur est survenue. Merci de recommencer.");window.location.href=window.location.href;
</script>
<?
}
}
$sql_cont = "SELECT * FROM page_cotisation ORDER BY id_cotisation DESC LIMIT 1";
$res_cont = mysql_query($sql_cont) or die(mysql_error());
while($row_cont = mysql_fetch_array($res_cont)) {
$id_cotisation = $row_cont['id_cotisation'];
$titre = $row_cont['titre'];
$sous_titre = $row_cont['sous_titre'];
$texte = $row_cont['texte'];
$image_1 = $row_cont['image_1'];
$image_2 = $row_cont['image_2'];
$legende = $row_cont['legende'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SPTP - Syndicat Parisien des Travaux Publics</title>
<?include("modules/tiny.php");?>
<meta name="description" content="Syndicat Parisien des Travaux Publics" />
<link rel="image_src" href="_images/home/logo.jpg" />
<meta name="medium" content="multi" />
<meta property="og:title" content="SPTP"/>
<meta property="og:description" content="Syndicat Parisien des Travaux Publics" />
<meta property="og:image" content="http://dev1.3xo.fr/sptp/_images/home/logo.jpg" />
<link rel="shotcut icon" href="_images/home/logo.jpg" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="author" content="3xo" />
<meta name="copyright" content="SPTP" />
<meta name="expires" content="never" />
<meta name="keywords" content="SPTP,syndicat,parisien,travaux,public,publics,syndicats,parisiens,syndicat parisien,travaux publics,Syndicat Parisien des Travaux Publics" />
<meta name="rating" content="general" />
<meta name="rev" content="ibrahima.sow@3xo.fr" />
<meta name="revisit-after" content="2 days" />
<meta name="robots" content="all" />
<meta name="subject" content="Syndicat Parisien des Travaux Publics" />
<meta http-equiv="robots" content="all" />
<!--Les CSS -->
<link media="all" type="text/css" href="_css/style.css" rel="stylesheet">
<!-- Les JS -->
<script type="text/javascript" src="_js/jquery.js"></script>
<script type="text/javascript" src="_js/fonctionsJS.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
menu_actif=1;placer_menu_actif();
//start_facebox();
});
</script>
</head>
<body>
<div class="fond_principal">
<div class="fond_principal_centre">
<div class="menu">
<?$menu_actif=1;$sous_menu_actif=13;include('_inc/menu.php');?>
</div> <!-- fin menu -->
<div class="centre_page">
<div class="entete_page">Gestion de la Page cotisation</div>
<div class="contenu_page">
<form action="cotisations.php" method="post" enctype="multipart/form-data">
<table cellpadding="5" cellspacing="5">
<tr><td>Titre</td><td><input type="text" name="titre" value="<?echo $titre;?>" /><input type="hidden" name="id_cotisation" value="<?echo $id_cotisation;?>" /></td></tr>
<tr><td>Sous-Titre</td><td><input type="text" name="sous_titre" value="<?echo $sous_titre;?>" /></td></tr>
<tr><td>Texte</td><td><textarea name="texte"><?echo $texte;?></textarea></td></tr>
<tr><td>Legende</td><td><input type="text" name="legende" value="<?echo $legende;?>" /></td></tr>
<tr><td>Image 1</td><td><input type="file" name="image_1" /><input type="hidden" name="ex_image_1" value="<?echo $image_1;?>" /> <img src='../_images/cotisation/<?echo $image_1;?>' alt='' title='' style='max-width:200px;' /></td></tr>
<tr><td>Image 2</td><td><input type="file" name="image_2" /><input type="hidden" name="ex_image_2" value="<?echo $image_2;?>" /> <img src='../_images/cotisation/<?echo $image_2;?>' alt='' title='' style='max-width:200px;' /></td></tr>
<tr><td><br></td><td></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Enregistrer" /></td></tr>
</table>
</form>
</div>
</div> <!-- fin centre_page -->
</div> <!-- fin fond_principal_centre -->
</div> <!-- fin fond_principal -->
</body>
</html>