ÿØÿà 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/cp-admin/ |
Upload File : |
<?php
include_once('includes/header.php');
if($niveauT <> 1) {
echo '<script>';
echo 'window.location = "./index.php"';
echo '</script>';
}
if (isset($_POST['add'])) {
$name = $_POST['name'];
$name=htmlentities($name, ENT_QUOTES, "UTF-8");
$description = $_POST['description'];
$description=htmlentities($description, ENT_QUOTES, "UTF-8");
$ccss ="Html5 Css3";
$GLOBALS['bdd']->exec("INSERT themes(id,name,description,css)
VALUES ( '','$name','$description','$ccss')");
$id_nouveau = $bdd->lastInsertId();
$GLOBALS['bdd']->exec("INSERT themes_empreinte(id,name,description,css)
VALUES ( '','$name','$description','$ccss')");
$success = "A";
}
// Suppression
if (isset($_GET['del'])) {
$id = $_GET['del'];
delete_posted_id($id, $GLOBALS['db_table']['themes']);
delete_posted_id($id, $GLOBALS['db_table']['themes_empreinte']);
$success = "A";
}
// cherche themes defaut
$defaut = get_themes_def();
if (isset($_GET['online'])) {
$id = $_GET['online'];
$values = array(
'status' => '1'
);
update_posted_data($values, $id, $GLOBALS['db_table']['themes']);
}
if (isset($_GET['offline'])) {
$id = $_GET['offline'];
$values = array(
'status' => '0',
'cle' => '0'
);
update_posted_data($values, $id, $GLOBALS['db_table']['themes']);
}
if (isset($_GET['onlineo'])) {
$idd = $_GET['onlineo'];
$zero = '0';
$un = '1';
$sql = $bdd->prepare('UPDATE themes SET cle=:cle WHERE id > 0');
$sql->execute(array(
'cle' => $zero
));
$sql = $bdd->prepare('UPDATE themes SET cle=:cle WHERE id=:id');
$sql->execute(array(
'cle' => $un,
'id' => $_GET['onlineo']
));
}
if (isset($_GET['offlineo'])) {
$id = $_GET['offlineo'];
$values = array(
'cle' => '0'
);
update_posted_data($values, $id, $GLOBALS['db_table']['themes']);
}
?>
<div class="container">
<div class="row">
<div class="span12">
<div class="page-header">
<h1>Ajout et Activation des Thèmes</h1>
</div>
</div>
</div>
<form class="form-horizontal" method="post" action="#" enctype="multipart/form-data">
<div class="row">
<div class="span12">
<div class="span3">
<ul class="nav nav-tabs nav-stacked">
<li><a href="settings.php">Général</a></li>
<li><a href="set_configuration.php">Configuration</a></li>
<li><a href="colmenu.php">Paramètres du Menu</a></li>
<li><a href="colonne_G.php">Colonne Gauche</a></li>
<li><a href="colonne_D.php">Colonne Droite</a></li>
<li class="active"><a href="./themes_a.php">Thèmes</a></li>
</ul>
</div>
<div class="span9" style="margin-left: 0px;">
<form class="" method="post" action="#" enctype="multipart/form-data">
<?php echo '<div class="control-group">';
echo '<label class="control-label" for="title">Nom du thème : </label>';
echo '<div class="controls">';
echo '<input style="width:287px" name="name" id="name" value="" type="text">';
echo ' <a onMouseOver="infobulle(this, \'Entrez le nom du nouveau thème \');"><img src="assets/img/help.png"></a>';
echo '</div>';
echo '</div>';
echo '<div class="control-group">';
echo '<label class="control-label" for="title">Description : </label>';
echo '<div class="controls">';
echo '<input style="width:287px" name="description" id="description" value="" type="text">';
echo ' <a onMouseOver="infobulle(this, \'Entrez la description, par exemple : vert bio avec des lapins qui boivent une bière etc. \');"><img src="assets/img/help.png"></a>';
echo '</div>';
echo '</div>';
?>
<br /><button type="submit" name="add" class="btn btn-success" style="margin-left: 140px;"><i class="icon-ok"></i> Ajouter</button>
</form>
<br />
<br /> Le client peut sélectionner son thème favori dans Outils/Accessoires et Thèmes.
<br /> Seuls les thèmes non bloqués lui seront proposés.
</div>
</div>
</div>
<br /><br />
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-desktop"></i> Thème(s) activation et configuration</h3>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<tbody>
<?php
echo '<tr>
<td class="text-center" width="20%"><i>Nom Thème(s)</i></td>
<td class="text-center" width="13%"><i> Activation</i></td>
<td class="text-center"><i> Description</i></td>
<td class="text-center" width="13%"><i> <b>Par défaut</b></i></td>
<td class="text-center" width="20%"><i> Opérations</i></td>
';
echo '<tr>';
$list = get_themes(array('table'=>'themes', 'order'=>'id'));
for($i=0; $i<count($list); $i++) {
$id = $list[$i]['id'];
$status= $list[$i]['status'];
$name = $list[$i]['name'];
$description= $list[$i]['description'];
$largeur= $list[$i]['largeur'];
$cle = $list[$i]['cle'];
echo '<tr>
<td class="text-center"><b>' . $name . ' </b></td><td class="text-center">';
if(($status== 0) && ($cle == 0)){
echo '<a href="./themes_a.php?online='.$id.'" title="Etat : Désactivé" data-toggle="tooltip" class="btn btn-primary"><i class="fa fa-check-square"></i></a></td>';
} else if(($status== 1) && ($cle == 0) ){
echo '<a href="./themes_a.php?offline='.$id.'" title="Etat : Activé" data-toggle="tooltip" class="btn btn-success"><i class="fa fa-check-square-o"></i></a></td>';
} else if(($status== 1) && ($cle == 1)) {
echo '<a href="" title="Etat : Défaut" data-toggle="tooltip" class="btn btn-danger"><i class="fa fa-check-square-o"></i></a></td>';
} else { }
echo '<td class="text-center"><b>' . $description . '</b></td>';
echo '<td class="text-center">';
if($cle== 0) {
echo '<a href="./themes_a.php?onlineo='.$id.'" title="Défaut : Désactivé" data-toggle="tooltip" class="btn btn-primary"><i class="fa fa-check-square"></i></a></td>';
} else {
echo '<a href="./themes_a.php?offlineo='.$id.'" title="Défaut : Activé" data-toggle="tooltip" class="btn btn-success"><i class="fa fa-check-square-o"></i></a></td>';
}
echo '<td class="text-center">';
echo '<a href="./theme_conf.php?ide='.$id.'" title="Configuration" data-toggle="tooltip" class="btn btn-primary"><i class="fa fa-pencil-square-o"></i> Accès au thème </a>';
if (($cle <1) && ($status <1) ) {
echo ' ';
echo '<a href="./themes_a.php?del='.$id.'" onclick="return confirm(\'Êtes vous sur de vouloir supprimer ce thème ?\');"><img src="assets/img/delete.png" title="Supprimer"></a>';
}
echo '</td>';
echo'</tr>';
}
?>
</tbody>
</table>
</div>
</div>
</div>
<?php
include_once('includes/footer.php');
?>