Initial commit

This commit is contained in:
2020-11-02 15:46:52 +01:00
commit 17f974127c
13788 changed files with 1921656 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
require_once(__DIR__ . "/../liste/accessoire.php");
?>
<?php if(! est_autorise("acces_catalogue")) exit; ?>
<?php
header('Content-Type: text/html; charset=utf-8');
if(isset($_GET['action'])) $action = $_GET['action'];
else $action = '';
switch($_GET['action']){
case 'produit' : accessoire_produit(); break;
case 'ajouter' : accessoire_ajouter(); break;
case 'supprimer' : accessoire_supprimer(); break;
}
?>
<?php
function accessoire_produit(){
$produit = new Produit();
$produit->charger($_GET['ref']);
$query = "select * from $produit->table where rubrique=\"" . $_GET['id_rubrique'] . "\"";
$resul = $produit->query($query);
while($resul && $row = $produit->fetch_object($resul)){
$test = new Accessoire();
if($test->charger_uni($produit->id, $row->id))
continue;
$produitdesc = new Produitdesc();
$produitdesc->charger($row->id);
?>
<option value="<?php echo $row->id; ?>"><?php echo $produitdesc->titre; ?></option>
<?php
}
}
?>
<?php
function accessoire_ajouter(){
$produit = new Produit();
$produit->charger($_GET['ref']);
$accessoire = new Accessoire();
$accessoire = new Accessoire();
$accessoire->produit = $produit->id;
$accessoire->accessoire = $_GET['id'];
$accessoire->add();
lister_accessoires($_GET['ref']);
}
?>
<?php
function accessoire_supprimer(){
$accessoire = new Accessoire();
$accessoire->charger($_GET['id']);
$accessoire->delete();
lister_accessoires($_GET['ref']);
}
?>

View File

@@ -0,0 +1,74 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
?>
<?php if(! est_autorise("acces_configuration")) exit; ?>
<?php
require_once(__DIR__ . "/../liste/caracteristique.php");
header('Content-Type: text/html; charset=utf-8');
if ($_REQUEST['action'] == "" && $_REQUEST['id'] != ""){
$caracteristiquedesc = new Caracteristiquedesc($_REQUEST['id']);
$caracteristiquedesc->titre = $_REQUEST['value'];
$caracteristiquedesc->maj();
echo $caracteristiquedesc->titre;
exit();
}
switch($_REQUEST["action"]){
case "ajouter" :
caracteristique_ajouter($_REQUEST["caracteristique"],$_REQUEST["rubrique"]);
break;
case "liste" :
caracteristique_liste_select($_REQUEST["id"]);
break;
case "supprimer" :
caracteristique_supprimer($_REQUEST["caracteristique"],$_REQUEST["rubrique"]);
break;
}
function caracteristique_ajouter($caracteristique,$rubrique){
if (! empty($caracteristique)) {
$rubcaracteristique = new Rubcaracteristique();
$rubcaracteristique->rubrique = $rubrique;
$rubcaracteristique->caracteristique = $caracteristique;
$rubcaracteristique->add();
}
lister_caracteristiques_rubrique($rubrique);
}
function caracteristique_supprimer($caracteristique,$rubrique){
$rubcaracteristique = new Rubcaracteristique($rubrique, $caracteristique);
$rubcaracteristique->delete();
lister_caracteristiques_rubrique($rubrique);
}
?>

View File

@@ -0,0 +1,87 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once (__DIR__ . "/../pre.php");
require_once (__DIR__ . "/../auth.php");
if (!est_autorise("acces_configuration"))
exit;
require_once ("../../fonctions/modules.php");
header('Content-Type: text/html; charset=utf-8');
list($modif, $id) = explode("_", $_POST['id']);
$classement = $_POST["value"];
if ($modif == "classementrub" && est_autorise("acces_catalogue")) {
$obj = new Rubrique();
$obj->modifier_classement($id, $classement);
echo "rubrique|";
}
else if ($modif == "classementprod" && est_autorise("acces_catalogue")) {
$obj = new Produit();
$obj->modifier_classement($id, $classement);
echo "produit|";
} else if ($modif == "classementdossier" && est_autorise("acces_catalogue")) {
$obj = new Dossier();
$obj->modifier_classement($id, $classement);
echo "...";
} else if ($modif == "classementcontenu" && est_autorise("acces_catalogue")) {
$obj = new Contenu();
$obj->modifier_classement($id, $classement);
echo "...";
} else if ($modif == "classementcarac" && est_autorise("acces_configuration")) {
$obj = new Caracteristique();
$obj->modifier_classement($id, $classement);
echo "...";
}
else if ($modif == "classementdecli" && est_autorise("acces_configuration")) {
$obj = new Declinaison();
$obj->modifier_classement($id, $classement);
echo "...";
}
else if ($modif == "classementplugin" && est_autorise("acces_configuration")) {
$obj = new Modules();
$obj->modifier_classement($id, $classement);
echo "...";
}
?>

View File

@@ -0,0 +1,82 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_contenu")) exit;
header('Content-Type: text/html; charset=utf-8');
list($modif, $id) = explode( "_", lireParam("id", "string"));
if (strstr($modif, "dos") !== false) {
$obj = new Dossier();
$obj->charger($id);
$objdesc = new Dossierdesc();
$objdesc->charger($obj->id);
$point_entree = "moddcont";
$champ_parent = "parent";
}
else if (strstr($modif, "cont") !== false) {
$obj = new Contenu();
$obj->charger($id);
$objdesc = new Contenudesc();
$objdesc->charger($obj->id);
$point_entree = "moddos";
$champ_parent = "dossier";
}
else {
exit();
}
switch($modif) {
case 'titrecont' :
case 'titredos' :
$objdesc->titre = lireParam("value", "string");
echo $objdesc->titre;
break;
case 'lignecont' :
case 'lignedos' :
$obj->ligne = $obj->ligne ? 0 : 1;
break;
case 'lignetouscont' :
case 'lignetousdos' :
$ligne = lireParam("ligne", "int");
$parent = intval(lireParam("parent", "int"));
$obj->query("update $obj->table set ligne=$ligne where $champ_parent=$parent");
break;
default:
exit;
}
$obj->maj();
$objdesc->maj();
ActionsModules::instance()->appel_module($point_entree, $obj);
?>

View File

@@ -0,0 +1,135 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once (__DIR__ . "/../pre.php");
require_once (__DIR__ . "/../auth.php");
require_once (__DIR__ . "/../../fonctions/divers.php");
?>
<?php
if (!est_autorise("acces_catalogue"))
exit;
?>
<?php
require_once (__DIR__ . "/../liste/contenu_associe.php");
header('Content-Type: text/html; charset=utf-8');
if (isset($_GET["action"]))
$action = $_GET["action"];
else
$action = "";
switch ($action) {
case 'contenu_assoc':
contenuassoc_contenu();
break;
case 'ajouter':
contenuassoc_ajouter();
break;
case 'supprimer':
contenuassoc_supprimer();
break;
}
function contenuassoc_contenu() {
if ($_GET['type'] == 1) {
$objet = new Produit();
$objet->charger($_GET['objet']);
} else {
$objet = new Rubrique();
$objet->charger($_GET['objet']);
}
$contenu = new Contenu();
$query = "select * from $contenu->table where dossier=\"" . $_GET['id_dossier'] . "\"";
$resul = $contenu->query($query);
while ($resul && $row = $contenu->fetch_object($resul)) {
$contenuassoc = new Contenuassoc();
if ($contenuassoc->existe($objet->id, $_GET['type'], $row->id))
continue;
$contenudesc = new Contenudesc();
$contenudesc->charger($row->id);
?>
<option value="<?php echo $row->id; ?>"><?php echo $contenudesc->titre; ?></option>
<?php
}
}
function contenuassoc_ajouter() {
if ($_GET['type'] == 1) {
$objet = new Produit();
$objet->charger($_GET['objet']);
} else {
$objet = new Rubrique();
$objet->charger($_GET['objet']);
}
$contenuassoc = new Contenuassoc();
$contenuassoc = new Contenuassoc();
$contenuassoc->objet = $objet->id;
$contenuassoc->type = $_GET['type'];
$contenuassoc->contenu = $_GET['id'];
$contenuassoc->add();
lister_contenuassoc($_GET['type'], $_GET['objet']);
if ($contenuassoc->type == 1)
ActionsModules::instance()->appel_module("modprod", $objet);
else
ActionsModules::instance()->appel_module("modrub", $objet);
}
function contenuassoc_supprimer() {
$contenuassoc = new Contenuassoc();
$contenuassoc->charger($_GET['id']);
$contenuassoc->delete();
if ($contenuassoc->type == 1)
$objet = new Produit();
else
$objet = new Rubrique();
$objet->charger($contenuassoc->objet);
if ($contenuassoc->type == 1)
ActionsModules::instance()->appel_module("modprod", $objet);
else
ActionsModules::instance()->appel_module("modrub", $objet);
lister_contenuassoc($_GET['type'], $_GET['objet']);
}
?>

View File

@@ -0,0 +1,66 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_configuration")) exit;
require_once(__DIR__ . "/../liste/declinaison.php");
header('Content-Type: text/html; charset=utf-8');
switch($_GET["action"]){
case "ajouter" :
declinaison_ajouter($_GET["declinaison"],$_GET["rubrique"]);
break;
case "liste" :
declinaison_liste_select($_GET["id"]);
break;
case "supprimer" :
declinaison_supprimer($_GET["declinaison"],$_GET["rubrique"]);
break;
}
function declinaison_ajouter($declinaison,$rubrique){
$rubdeclinaison = new Rubdeclinaison();
$rubdeclinaison->rubrique = $rubrique;
$rubdeclinaison->declinaison = $declinaison;
$rubdeclinaison->add();
lister_declinaisons_rubrique($rubrique);
}
function declinaison_supprimer($declinaison,$rubrique){
$rubdeclinaison = new Rubdeclinaison($rubrique,$declinaison);
$rubdeclinaison->delete();
lister_declinaisons_rubrique($rubrique);
}
?>

View File

@@ -0,0 +1,79 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
header('Content-Type: text/html; charset=utf-8');
if(! est_autorise("acces_configuration")) exit;
if($_GET['type_droit'] == "1"){
$autorisation = new Autorisation();
$autorisation->charger_id($_GET['autorisation']);
$autorisation_administrateur = new Autorisation_administrateur();
$autorisation_administrateur->charger($autorisation->id, $_GET['administrateur']);
if($autorisation->type == "1"){
if($_GET['valeur'] == 1){
$autorisation_administrateur->lecture = 1;
$autorisation_administrateur->ecriture = 1;
} else {
$autorisation_administrateur->lecture = 0;
$autorisation_administrateur->ecriture = 0;
}
} else if($autorisation->type == "2"){
}
if($autorisation_administrateur->id)
$autorisation_administrateur->maj();
else {
$autorisation_administrateur->autorisation = $autorisation->id;
$autorisation_administrateur->administrateur = $_GET['administrateur'];
$autorisation_administrateur->add();
}
} else if($_GET['type_droit'] == "2"){
$autorisation_modules = new Autorisation_modules();
$autorisation_modules->charger($_GET['module'], $_GET['administrateur']);
if($_GET['valeur'] == 1)
$autorisation_modules->autorise = 1;
else
$autorisation_modules->autorise = 0;
if($autorisation_modules->id)
$autorisation_modules->maj();
else {
$autorisation_modules->module = $_GET['module'];
$autorisation_modules->administrateur = $_GET['administrateur'];
$autorisation_modules->add();
}
}
?>

View File

@@ -0,0 +1,49 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_configuration")) exit;
header('Content-Type: text/html; charset=utf-8');
$data = explode('_', $_POST['id']);
$modif = $data[0];
$id = intval($data[1]);
if ($modif == "titredecli")
{
$objdesc = new Declinaisondesc();
if ($objdesc->charger($id))
{
$objdesc->titre = $_POST['value'];
$objdesc->maj();
echo $objdesc->titre;
}
}
?>

View File

@@ -0,0 +1,63 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
list($modif, $id) = explode( "_", lireParam('id', 'string'));
if($modif == "titrerub"){
$obj = new Rubrique();
$obj->charger($id);
$objdesc = new Rubriquedesc();
$objdesc->charger($obj->id);
echo $objdesc->titre;
}
else if($modif == "titreprod") {
$obj = new Produit();
$obj->charger_id($id);
$objdesc = new Produitdesc();
$objdesc->charger($obj->id);
echo $objdesc->titre;
}
else if($modif == "stock"){
$obj = new Produit();
$obj->charger_id($id);
echo $obj->stock;
}
else if($modif == "prix"){
$obj = new Produit();
$obj->charger_id($id);
echo $obj->prix;
}
else if($modif == "prix2"){
$obj = new Produit();
$obj->charger_id($id);
echo $obj->prix2;
}
?>

View File

@@ -0,0 +1,47 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
function moddecli($produit, $declidisp, $type){
$exdecprod = new Exdecprod();
$exdecprod->query("delete from $exdecprod->table where produit=$produit and declidisp=$declidisp");
if ($type != 0)
{
$exdecprod->produit = $produit;
$exdecprod->declidisp = $declidisp;
$exdecprod->add();
}
}
moddecli(intval($_POST['produit']), intval($_POST['declidisp']), intval($_POST['type']));
?>

View File

@@ -0,0 +1,182 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : thelia@openstudio.fr */
/* web : http://www.openstudio.fr */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/*    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("configuration")) exit;
header('Content-Type: text/html; charset=utf-8');
$action = lireParam('action', 'string');
if ($action == 'tva')
{
$pays = new Pays();
$id = intval(lireParam('pays', 'int'));
if ($pays->charger($id))
{
$pays->tva = intval($_REQUEST['tva']);
$pays->maj();
}
exit();
}
else if ($action == 'defaut')
{
$pays = new Pays();
$id = intval(lireParam('pays', 'int'));
$pays->query("update $pays->table set `defaut`=0");
$pays->query("update $pays->table set `defaut`=1 where id=$id");
exit();
}
else if ($action == 'boutique') {
$pays = new Pays();
$id = intval(lireParam('pays', 'int'));
$pays->query("update $pays->table set `boutique`=0");
$pays->query("update $pays->table set `boutique`=1 where id=$id");
exit();
}
/* Afficher la forme de modif/creation de pays */
$langues = array();
$langue = new Lang();
$result = $langue->query("select * from " . $langue->table . " order by id");
while ($result && $row = $langue->fetch_object($result))
{
$langues[] = $row;
}
$pays = new Pays();
$paysdesc = new Paysdesc();
$id = intval(lireParam('pays', 'int'));
$pays->id = $id;
if ($id > 0)
{
$pays->charger($id);
}
?>
<div class="entete_config" style="width: auto; float: none;">
<div class="titre"><?php echo trad('EDITION', 'admin') ?></div>
<div class="fonction_valider"><a href="#" onclick="$('#pays_edit_form').submit(); return false;"><?php echo trad('VALIDER_LES_MODIFICATIONS', 'admin') ?></a></div>
</div>
<div class="flottant">
<form method="post" action="pays.php" id="pays_edit_form">
<input type="hidden" name="pays" value="<?php echo $pays->id; ?>" />
<input type="hidden" name="offset" value="<?php echo $_REQUEST['offset']; ?>" />
<input type="hidden" name="commande" value="edition" />
<table cellpadding="5" cellspacing="0" style="border: 1px solid #9DACB6;">
<tr class="fonce">
<td class="designation" style="float: none;"><?php echo trad('Numéro ISO-3166', 'admin') ?></td>
<td><input type="text" name="isocode" value="<?php echo htmlspecialchars($pays->isocode); ?>" /></td>
</tr>
<tr class="claire">
<td class="designation" style="float: none;"><?php echo trad('Code alpha-2', 'admin') ?></td>
<td><input type="text" name="isoalpha2" value="<?php echo htmlspecialchars($pays->isoalpha2); ?>" /></td>
</tr>
<tr class="fonce">
<td class="designation" style="float: none;"><?php echo trad('Code alpha-3', 'admin') ?></td>
<td><input type="text" name="isoalpha3" value="<?php echo htmlspecialchars($pays->isoalpha3); ?>" /></td>
</tr>
<tr class="claire">
<td class="designation" style="float: none;"><?php echo trad('Soumis à la TVA française', 'admin') ?></td>
<td>
<input type="radio" name="tva" value="1" <?php echo $pays->tva == 1 ? 'checked="checked"' : '' ?>/><?php echo trad('Oui', 'admin'); ?>
<input type="radio" name="tva" value="0" <?php echo $pays->tva == 0 ? 'checked="checked"' : '' ?>/> <?php echo trad('Non', 'admin'); ?>
</td>
</tr>
<tr class="fonce">
<td class="designation" style="float: none;"><?php echo trad('Zone de transport', 'admin'); ?></td>
<td>
<select name="zone">
<option value="0"><?php echo trad('Aucune', 'admin'); ?></option>
<?php
$zone = new Zone();
$result = $zone->query("select * from $zone->table order by nom");
while ($result && $zone = $zone->fetch_object($result, 'Zone'))
{
echo '<option value="'.$zone->id.'" '.($zone->id == $pays->zone ? 'selected="selected"' : '').'>'.$zone->nom.'</option>';
}
?>
</select>
</td>
</tr>
<?php foreach($langues as $langue)
{
if ($id > 0) $paysdesc->charger($id, $langue->id);
?>
<tr class="fonce">
<th colspan="2" style="height: 40px;">
<img src="gfx/lang<?php echo $langue->id; ?>.gif" alt="<?php echo $langue->description ?>" style="vertical-align: bottom"/>
<?php echo $langue->description ?>
<input type="hidden" name="langue[<?php echo $langue->id; ?>]" value="<?php echo $langue->id; ?>" />
</th>
</tr>
<tr class="claire">
<td class="designation" style="float: none;"><?php echo trad('Nom', 'admin'); ?></td>
<td><input type="text" name="titre[<?php echo $langue->id; ?>]" value="<?php echo htmlspecialchars($paysdesc->titre); ?>" /></td>
</tr>
<tr class="fonce">
<td class="designation" style="float: none;"><?php echo trad('Chapo', 'admin'); ?></td>
<td><input type="text" name="chapo[<?php echo $langue->id; ?>]" value="<?php echo htmlspecialchars($paysdesc->chapo); ?>" /></td>
</tr>
<tr class="claire">
<td class="designation" style="float: none;"><?php echo trad('Description', 'admin'); ?></td>
<td><textarea style="height: 50px; width: 229px;" name="description[<?php echo $langue->id; ?>]"><?php echo $paysdesc->description; ?></textarea></td>
</tr>
<?php } ?>
</table>
</form>
</div>

View File

@@ -0,0 +1,33 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_configuration")) exit;
require_once(__DIR__ . "/../liste/plugins.php");
header('Content-Type: text/html; charset=utf-8');
afficher_plugins();
?>

View File

@@ -0,0 +1,117 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
list($modif, $id) = explode("_", lireParam("id", "string"));
if (strstr($modif, "rub") !== false) {
$obj = new Rubrique();
$obj->charger($id);
$objdesc = new Rubriquedesc();
$objdesc->charger($obj->id);
$point_entree = "modrub";
$champ_parent = "parent";
}
else {
$obj = new Produit();
$obj->charger_id($id);
$obj->datemodif = date('Y-m-d H:i:s');
$objdesc = new Produitdesc();
$objdesc->charger($obj->id);
$point_entree = "modprod";
$champ_parent = "rubrique";
}
switch($modif) {
case 'prix' :
$obj->prix = lireParam('value', 'string');
echo $obj->prix;
break;
case 'prix2' :
$obj->prix2 = lireParam('value', 'string');
echo $obj->prix2;
break;
case 'stock' :
$obj->stock = lireParam('value', 'string');
echo $obj->stock;
break;
case 'titreprod' :
case 'titrerub' :
$objdesc->titre = stripslashes(lireParam('value', 'string'));
echo $objdesc->titre;
break;
case 'promo' :
$obj->promo = $obj->promo ? 0 : 1;
break;
case 'nouveaute' :
$obj->nouveaute = $obj->nouveaute ? 0 : 1;
break;
case 'ligneprod' :
case 'lignerub' :
$obj->ligne = $obj->ligne ? 0 : 1;
break;
case 'lignetousrub' :
case 'lignetousprod' :
$modif = lireParam("modif", "int");
$parent = intval(lireParam("parent", "int"));
$obj->query("update $obj->table set ligne=$modif where $champ_parent=$parent");
break;
case 'nouveautetous' :
$modif = lireParam("modif", "int");
$parent = intval(lireParam("parent", "int"));
$obj->query("update $obj->table set nouveaute=$modif where $champ_parent=$parent");
break;
case 'promotous' :
$modif = lireParam("modif", "int");
$parent = intval(lireParam("parent", "int"));
$obj->query("update $obj->table set promo=$modif where $champ_parent=$parent");
break;
default:
exit;
}
$obj->maj();
$objdesc->maj();
ActionsModules::instance()->appel_module($point_entree, $obj);
?>

View File

@@ -0,0 +1,44 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
$reecriture = new Reecriture();
if($reecriture->charger($_GET['url'])){
?>
<img src="gfx/interdiction.png" style="float: right;" />
<?php
}
else{
?>
<img src="gfx/validation.png" style="float: right;" />
<?php
}
?>

View File

@@ -0,0 +1,47 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
$ref = $_GET["ref_c"];
$produit = new Produit();
if($produit->charger($ref)){
?>
<div class="confirmation_ref"><img src="gfx/interdiction.png" /></div>
<input type="hidden" id="confirm_ref" value="0">
<?php
}
elseif($ref!=""){
?>
<div class="confirmation_ref"><img src="gfx/validation.png" /></div>
<input type="hidden" id="confirm_ref" value="1">
<?php
}
?>

View File

@@ -0,0 +1,39 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
$ref = $_GET["ref_c"];
$produit = new Produit();
if($produit->charger($ref)){
echo "1";
}
else{
echo "0";
}
?>

View File

@@ -0,0 +1,47 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_configuration")) exit;
require_once("../liste/transport.php");
header('Content-Type: text/html; charset=utf-8');
if($_GET['action'] == "supprimer" && $_GET['zone'] != ""){
$transzone = new Transzone();
$transzone->charger_id($_GET['zone']);
$transzone->delete();
} else if($_GET['action'] == "ajouter" && $_GET['id'] != "" && $_GET['zone'] != ""){
$transzone = new Transzone();
$transzone->zone = $_GET['zone'];
$transzone->transport = $_GET['id'];
$transzone->add();
}
modifier_transports($_GET['id']);
?>

View File

@@ -0,0 +1,45 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_catalogue")) exit;
header('Content-Type: text/html; charset=utf-8');
$critere = $_GET["critere"];
$order = $_GET["order"];
$ref = $_GET["ref"];
$alpha = $_GET["alpha"];
if($_GET["type"] == 1) {
require("../liste/rubrique.php");
liste_rubriques($ref, $critere, $order, $alpha);
}
else {
require("../liste/produit.php");
liste_produits($ref, $critere, $order, $alpha);
}
?>

View File

@@ -0,0 +1,36 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_configuration")) exit;
require(__DIR__ . "/../liste/caracteristique.php");
header('Content-Type: text/html; charset=utf-8');
$critere = $_GET["critere"];
$order = $_GET["order"];
lister_caracteristiques($critere, $order);
?>

View File

@@ -0,0 +1,38 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_clients")) exit;
require_once(__DIR__ . "/../liste/client.php");
header('Content-Type: text/html; charset=utf-8');
$order = $_GET["order"];
$critere = $_GET["critere"];
$debut = $_GET["debut"];
liste_clients($order, $critere, $debut);
?>

View File

@@ -0,0 +1,36 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_commandes")) exit;
require_once(__DIR__ . "/../liste/commande.php");
header('Content-Type: text/html; charset=utf-8');
$critere = $_GET["critere"];
$order = $_GET["order"];
lister_commandes($critere, $order);
?>

View File

@@ -0,0 +1,48 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_contenu")) exit;
header('Content-Type: text/html; charset=utf-8');
$critere = $_GET["critere"];
$order = $_GET["order"];
$parent = $_GET["ref"];
$type = $_GET["type"];
$alpha = $_GET["alpha"];
if($type == "dossier"){
require(__DIR__ . "/../liste/dossier.php");
lister_dossiers($parent, $critere, $order, $alpha);
}
else if($type == "contenudos") {
require(__DIR__ . "/../liste/contenu.php");
lister_contenus($parent, $critere, $order, $alpha);
}
?>

View File

@@ -0,0 +1,36 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
if(! est_autorise("acces_configuration")) exit;
require(__DIR__ . "/../liste/declinaison.php");
header('Content-Type: text/html; charset=utf-8');
$critere = $_GET["critere"];
$order = $_GET["order"];
lister_declinaisons($critere, $order);
?>

View File

@@ -0,0 +1,54 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
require_once(__DIR__ . "/../pre.php");
require_once(__DIR__ . "/../auth.php");
require_once(__DIR__ . "/../../fonctions/divers.php");
if(! est_autorise("acces_configuration")) exit;
require_once("../liste/zone.php");
header('Content-Type: text/html; charset=utf-8');
if($_GET['action'] == "forfait" && $_GET['valeur'] != ""){
$zone = new Zone();
$zone->charger($_GET['id']);
$zone->unite = $_GET['valeur'];
$zone->maj();
}
else if($_GET['action'] == "ajouter" && $_GET['pays'] != ""){
$pays = new Pays();
$query = "update $pays->table set zone='" . $_GET['id'] . "' where id=\"" . $_GET['pays'] . "\"";
$resul = $pays->query($query);
}
else if($_GET['action'] == "supprimer" && $_GET['pays'] != ""){
$pays = new Pays();
$query = "update $pays->table set zone='-1' where id=\"" . $_GET['pays'] . "\"";
$resul = $pays->query($query);
}
modifier_pays_zone($_GET['id']);
?>