Example #1
0
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_catalogue")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$page = $request->get('page', 1);
$pagination = new PaginationAdmin(PromoAdmin::getInstance()->getRequest('count'), $page);
$errorCode = 0;
$addError = 0;
$editError = array();
try {
    ActionsAdminPromo::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::PROMO_ADD_ERROR:
            $addError = 1;
            $errorData = $e->getData();
            break;
        case TheliaAdminException::PROMO_EDIT_ERROR:
            $editError[$request->get("id")] = 1;
            break;
    }
}
?>
<!DOCTYPE html>
<html lang="fr">
Example #2
0
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_configuration")) {
    exit;
}
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
$currentProfil = new ProfilAdmin();
$currentProfil->charger_id($request->get("profil", 0));
if (!$currentProfil->id) {
    $currentProfil->chargerPermier(array(ProfilAdmin::ID_PROFIL_SUPERADMINISTRATEUR));
}
$currentProfilDesc = new Profildesc();
$currentProfilDesc->charger($currentProfil->id);
try {
    ActionsAdminProfil::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    if ($errorCode == TheliaAdminException::BAD_PROFILE_FORMULATION) {
        $addError = 1;
    }
}
?>
<!DOCTYPE html>
<html lang="fr">
    <head>
        <?php 
require_once "title.php";
?>
    </head>
/*      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 "pre.php";
require_once "auth.php";
if (!isset($action)) {
    $action = "";
}
if (!isset($lang)) {
    $lang = $_SESSION["util"]->lang;
}
if (!isset($ligne)) {
    $ligne = "";
}
if (!est_autorise("acces_contenu")) {
    exit;
}
require_once "../fonctions/divers.php";
$images_adm = new ImagesAdmin('contenu', $id, $lang);
$documents_adm = new DocumentsAdmin('contenu', $id, $lang);
switch ($action) {
    case 'modclassement':
        modclassement($id, $parent, $type);
        break;
    case 'modifier':
        modifier($id, $lang, $dossier, $ligne, $titre, $chapo, $description, $postscriptum, $urlsuiv, $urlreecrite);
        break;
    case 'ajouter':
        ajouter($lang, $dossier, $ligne, $titre, $chapo, $description, $postscriptum);
        break;
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_clients")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$client = new Client();
if (!$request->get("ref") || !$client->charger_ref($request->get("ref"))) {
    redirige('client.php');
}
$errorCode = 0;
try {
    ActionsAdminClient::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::CLIENT_ADD_ADRESS:
            $addError = 1;
            break;
        case TheliaAdminException::CLIENT_ADRESS_EDIT_ERROR:
            $editAddressError[$request->get("id")] = 1;
            break;
    }
}
$raisondesc = new Raisondesc($client->raison);
if ($client->parrain) {
    $parrain = new Client();
    $parrain->charger_id($client->parrain);
Example #5
0
/*      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/>.        */
/*                                                                                   */
/*************************************************************************************/
include_once __DIR__ . '/../../fonctions/error_reporting.php';
include_once __DIR__ . "/../../classes/Navigation.class.php";
include_once __DIR__ . "/../../classes/Administrateur.class.php";
include_once __DIR__ . "/../../fonctions/modules.php";
session_start();
$commande = new Commande();
$commande->charger_ref($_GET['ref']);
// Si un client est identifié mais n'est pas celui qui a commandé ou que la commande n'est pas payée
// ou qu'un admin identifié n'est pas autorisé
if (!(isset($_SESSION['navig']) && $_SESSION['navig']->connecte && $_SESSION['navig']->client->id == $commande->client && $commande->facture != "" || isset($_SESSION["util"]) && est_autorise("acces_commandes"))) {
    exit;
}
// Compatibilité 1.4 -> On utilise le modèle PDF si il existe
if (file_exists(__DIR__ . '/modeles/facture.php')) {
    include_once __DIR__ . "/../../classes/Commande.class.php";
    include_once __DIR__ . "/../../classes/Client.class.php";
    include_once __DIR__ . "/../../classes/Venteprod.class.php";
    include_once __DIR__ . "/../../classes/Produit.class.php";
    include_once __DIR__ . "/../../classes/Adresse.class.php";
    include_once __DIR__ . "/../../classes/Zone.class.php";
    include_once __DIR__ . "/../../classes/Pays.class.php";
    include_once __DIR__ . "/../../fonctions/divers.php";
    $client = new Client();
    $client->charger_id($commande->client);
    $pays = new Pays();
Example #6
0
?>
                        <?php 
if (est_autorise("acces_configuration")) {
    ?>
                            <li class="<?php 
    activemenu($menu, "configuration");
    ?>
"><a href="configuration.php"><?php 
    echo trad('Configuration', 'admin');
    ?>
</a></li>
                        <?php 
}
?>
                        <?php 
if (est_autorise("acces_modules")) {
    ?>
                            <li class="<?php 
    activemenu($menu, "plugins");
    ?>
" id="menuplugins"><a href="module_liste.php"><?php 
    echo trad('Modules', 'admin');
    ?>
</a></li>
                        <?php 
}
?>
                    </ul>

                </div><!--/.nav-collapse -->
            </div>
Example #7
0
/*      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 "pre.php";
require_once "auth.php";
if (!isset($action)) {
    $action = "";
}
if (!isset($page)) {
    $page = 0;
}
if (!est_autorise("acces_codespromos")) {
    exit;
}
$promo = new Promo();
if ($expiration == 0) {
    $jour = $mois = $annee = 0;
}
switch ($action) {
    case 'ajouter':
        ajouter($code, $type, $valeur, $mini, $actif, $limite, $nombre_limite, $jour, $mois, $annee);
        break;
    case 'modifier':
        modifier($id, $code, $type, $valeur, $mini, $actif, $limite, $nombre_limite, $jour, $mois, $annee);
        break;
    case 'supprimer':
        supprimer($id);
<?php

require_once "auth.php";
if (!est_autorise("acces_commandes")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$client = new Client();
$client->charger_ref($ref_client);
$paysFacturation = new Paysdesc();
$paysLivraison = new Paysdesc();
$raisonFacturation = new Raisondesc();
$raisonLivraison = new Raisondesc();
try {
    ActionsAdminOrder::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::ORDER_ADD_ERROR:
            $createError = 1;
            break;
        case TheliaAdminException::EMAIL_FORMAT_ERROR:
            $createError = 1;
            $emailBadFormat = 1;
            break;
        case TheliaAdminException::EMAIL_ALREADY_EXISTS:
            $createError = 1;
            $emailAlreadyExists = 1;
            break;
    }
Example #9
0
        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 "...";
                        }
                    }
                }
            }
        }
    }
}
Example #10
0
/*      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();
Example #11
0
        ?>
class="selected"<?php 
    }
    ?>
><?php 
    echo trad('Modules', 'admin');
    ?>
</a></li>
			</ul>
			<ul class="separation_menu"><li>&nbsp;</li></ul>
		  <?php 
}
?>
      	</div>
		  <?php 
if (est_autorise("acces_rechercher")) {
    ?>
            <div id="moteur_recherche">
             <form action="recherche.php" method="post">
              <div class="bouton_recherche">
	         	<input type="image" src="gfx/icone_recherche.jpg" alt="Valider la recherche" />
	         </div>
             <div class="champs_recherche">
	         	<input type="text" name="motcle" value="<?php 
    echo trad('Rechercher', 'admin');
    ?>
" class="zonerecherche" onClick="this.value=''" size="14" />
	         </div>

             </form>
            </div>
Example #12
0
<?php

require_once __DIR__ . '/../auth.php';
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
if ($request->isXmlHttpRequest() === false) {
    redirige("../accueil.php");
}
if (est_autorise("acces_catalogue")) {
    switch ($request->query->get('action')) {
        case 'changeDisplay':
            ProductAdmin::getInstance($request->query->get('product_id'))->changeColumn("ligne", $request->query->get('display') == 'true' ? 1 : 0);
            break;
        case 'changePromo':
            ProductAdmin::getInstance($request->query->get('product_id'))->changeColumn("promo", $request->query->get('display') == 'true' ? 1 : 0);
            break;
        case 'changeNew':
            ProductAdmin::getInstance($request->query->get('product_id'))->changeColumn("nouveaute", $request->query->get('display') == 'true' ? 1 : 0);
            break;
    }
}
if (est_autorise("acces_commande")) {
    switch ($request->request->get('action')) {
        case 'match':
            die(ProductAdmin::getInstance()->match($request->request->get('ref'), $request->request->get('max_accepted')));
            break;
    }
}
Example #13
0
<?php

include_once 'controleur/includes/fonctions/calculs_points.php';
include_once 'modele/rechercher_potins.php';
include_once 'vue/potin/affichage_potin.php';
include_once 'modele/potin_externe.php';
include_once 'modele/pare_feu.php';
$id_concerne = $_POST['id_concerne'];
$id_groupe = $_POST['id_groupe'];
$reponse_potin = NULL;
$reponse_message = NULL;
$nb_potins_sur_user_ds_gp_courant = nb_potins_sur_user_ds_gpe($id_groupe, $id_concerne, $bdd);
// On cherche les potins qu'on a découverts
$potins_decouverts = potins_decouverts_sur_user_dans_gpe($id_concerne, $id_groupe, $id_user);
// Vérification de l'autorisation de voir ce potin
if (est_autorise($id_user, $id_concerne, $id_groupe)) {
    if ($potins_decouverts != 0) {
        $nb_potins_a_decouvrir = $nb_potins_sur_user_ds_gp_courant - sizeof($potins_decouverts);
    } else {
        $nb_potins_a_decouvrir = $nb_potins_sur_user_ds_gp_courant;
    }
    if ($nb_potins_a_decouvrir > 0) {
        if (calculer_points($id_user, $bdd) >= 20) {
            $tous_potins = tous_potins_sur_user_ds_gpe($id_groupe, $id_concerne);
            if ($potins_decouverts != 0) {
                // Il faut les retirer des autres
                $potins_cherches = array_diff($tous_potins, $potins_decouverts);
            } else {
                // Sinon on prend tous les potins
                $potins_cherches = $tous_potins;
            }