Ejemplo n.º 1
0
}
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;
    case 'supprimer':
        supprimer($id, $parent);
        break;
}
$images_adm->action($action);
$documents_adm->action($action);
function modclassement($id, $parent, $type)
{
    $cont = new Contenu($id);
    $cont->changer_classement($id, $type);
    redirige("listdos.php?parent=" . $parent);
}
if (!isset($lang)) {
    $lang = $_SESSION["util"]->lang;
}
if (!isset($tabdisp)) {
    $tabdisp = "";
}
if (!isset($affiche)) {
    $affiche = "";
}
switch ($action) {
    case 'modclassement':
        modclassement($id, $type);
        break;
    case 'modifier':
        modifier($id, $lang, $titre, $chapo, $description, $tabdisp, $affiche);
        break;
    case 'maj':
        maj($id, $lang, $titre, $chapo, $description, $tabdisp, $affiche);
        break;
    case 'ajouter':
        ajouter($lang, $id, $titre, $chapo, $description, $tabdisp, $affiche, $ajoutrub);
        break;
    case 'ajcaracdisp':
        ajcaracdisp($id, $caracdisp, $lang);
        break;
    case 'majcaracdisp':
        majcaracdisp($id, $lang);
        break;
    case 'supprimer':
        supprimer($id);
Ejemplo n.º 3
0
/*************************************/
// init des variables:
/*************************************/
$u_login = getpost_variable('u_login');
$u_login_to_update = getpost_variable('u_login_to_update');
$tab_checkbox_sem_imp = getpost_variable('tab_checkbox_sem_imp');
$tab_checkbox_sem_p = getpost_variable('tab_checkbox_sem_p');
// TITRE
if ($u_login != "") {
    $login_titre = $u_login;
} elseif ($u_login_to_update != "") {
    $login_titre = $u_login_to_update;
}
echo "<h1>" . _('admin_modif_user_titre') . " : <strong>{$login_titre}</strong></h1>\n\n";
if ($u_login != "") {
    modifier($u_login, $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $onglet, $DEBUG);
} elseif ($u_login_to_update != "") {
    $tab_new_jours_an = getpost_variable('tab_new_jours_an');
    $tab_new_solde = getpost_variable('tab_new_solde');
    $tab_new_reliquat = getpost_variable('tab_new_reliquat');
    $tab_new_user['login'] = getpost_variable('new_login');
    $tab_new_user['nom'] = getpost_variable('new_nom');
    $tab_new_user['prenom'] = getpost_variable('new_prenom');
    $tab_new_user['quotite'] = getpost_variable('new_quotite');
    $tab_new_user['is_resp'] = getpost_variable('new_is_resp');
    $tab_new_user['resp_login'] = getpost_variable('new_resp_login');
    $tab_new_user['is_admin'] = getpost_variable('new_is_admin');
    $tab_new_user['is_hr'] = getpost_variable('new_is_hr');
    $tab_new_user['is_active'] = getpost_variable('new_is_active');
    $tab_new_user['see_all'] = getpost_variable('new_see_all');
    $tab_new_user['email'] = getpost_variable('new_email');
Ejemplo n.º 4
0
$tab_new_values = getpost_variable('tab_new_values');
$id_to_update = getpost_variable('id_to_update');
/*************************************/
if ($DEBUG) {
    print_r($tab_new_values);
    echo "<br>\n";
    echo "{$action}<br>\n";
    echo "{$id_to_update}<br>\n";
}
header_popup('CONGES : Configuration');
/*********************************/
/*********************************/
if ($action == "new") {
    commit_ajout($tab_new_values, $session, $DEBUG);
} elseif ($action == "modif") {
    modifier($tab_new_values, $session, $id_to_update, $DEBUG);
} elseif ($action == "commit_modif") {
    commit_modif($tab_new_values, $session, $id_to_update, $DEBUG);
} elseif ($action == "suppr") {
    supprimer($session, $id_to_update, $DEBUG);
} elseif ($action == "commit_suppr") {
    commit_suppr($session, $id_to_update, $DEBUG);
} else {
    affichage($tab_new_values, $session, $DEBUG);
}
/*********************************/
/*********************************/
bottom();
/**************************************************************************************/
/**********  FONCTIONS  ***************************************************************/
function affichage($tab_new_values, $session, $DEBUG = FALSE)
Ejemplo n.º 5
0
// Langue
ActionsLang::instance()->set_id_langue_courante($lang);
// Devise
ActionsDevises::instance()->set_id_devise_courante($devise);
// fonctions à éxecuter avant le moteur
ActionsModules::instance()->appel_module("demarrage");
// Actions
switch ($action) {
    case 'ajouter':
        ajouter($ref, $quantite, $append, $nouveau, $parent);
        break;
    case 'supprimer':
        supprimer($article);
        break;
    case 'modifier':
        modifier($article, $quantite);
        break;
    case 'connexion':
        connexion($email, $motdepasse, $urlok, $urlerr);
        break;
    case 'deconnexion':
        deconnexion();
        break;
    case 'paiement':
        paiement($type_paiement);
        break;
    case 'transport':
        transport($id);
        break;
    case 'creercompte':
        creercompte($raison, $entreprise, $siret, $intracom, $prenom, $nom, $adresse1, $adresse2, $adresse3, $cpostal, $ville, $pays, $telfixe, $telport, $email1, $email2, $motdepasse1, $motdepasse2, $parrain, $obligetel, $urlok, $urlerr);
Ejemplo n.º 6
0
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);
}
$nbPromoParPage = 20;
if ($page == "") {
    $page = 1;
}
$query = "select * from {$promo->table} WHERE actif='1'";
$resul = mysql_query($query, $promo->link);
$num = $resul ? mysql_num_rows($resul) : 0;
$nbpage = ceil($num / $nbPromoParPage);
$debut = ($page - 1) * $nbPromoParPage;
if ($page > 1) {
    $pageprec = $page - 1;
Ejemplo n.º 7
0
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
/*************************************/
// recup des parametres reçus :
// SERVER
$u_login = getpost_variable('u_login');
$u_login_to_update = getpost_variable('u_login_to_update');
$new_pwd1 = getpost_variable('new_pwd1');
$new_pwd2 = getpost_variable('new_pwd2');
/*************************************/
if ($u_login != "") {
    echo "<H1>" . _('admin_chg_passwd_titre') . " : {$u_login} .</H1>\n\n";
    modifier($u_login, $onglet, $DEBUG);
} else {
    if ($u_login_to_update != "") {
        echo "<H1>" . _('admin_chg_passwd_titre') . " : {$u_login_to_update} .</H1>\n\n";
        commit_update($u_login_to_update, $new_pwd1, $new_pwd2, $DEBUG);
    } else {
        // renvoit sur la page principale .
        redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-users', false);
    }
}
/*********************************************************************************/
/*  FONCTIONS   */
/*********************************************************************************/
function modifier($u_login, $onglet, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
Ejemplo n.º 8
0
//conversion des dates
$new_debut = convert_date($new_debut);
$new_fin = convert_date($new_fin);
if ($_SESSION['config']['disable_saise_champ_nb_jours_pris']) {
    $new_nb_jours = compter($user_login, $p_num_to_update, $new_debut, $new_fin, $new_demi_jour_deb, $new_demi_jour_fin, $new_comment, $DEBUG);
} else {
    $new_nb_jours = getpost_variable('new_nb_jours');
}
/*************************************/
// TITRE
echo '<h1>' . _('user_modif_demande_titre') . '</h1>';
if ($p_num != "") {
    confirmer($p_num, $onglet, $DEBUG);
} else {
    if ($p_num_to_update != "") {
        modifier($p_num_to_update, $new_debut, $new_demi_jour_deb, $new_fin, $new_demi_jour_fin, $new_nb_jours, $new_comment, $p_etat, $onglet, $DEBUG);
    } else {
        // renvoit sur la page principale .
        redirect(ROOT_PATH . 'utilisateur/user_index.php', false);
    }
}
/********************************************************************************************************/
/********************************************************************************************************/
/********************************************************************************************************/
function confirmer($p_num, $onglet, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
    // Récupération des informations
    $sql1 = 'SELECT p_login, p_date_deb, p_demi_jour_deb, p_date_fin, p_demi_jour_fin, p_nb_jours, p_commentaire, p_etat, p_num FROM conges_periode where p_num = \'' . SQL::quote($p_num) . '\'';
    $ReqLog1 = SQL::query($sql1);
Ejemplo n.º 9
0
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
/*************************************/
// recup des parametres reçus :
$group = getpost_variable('group');
$group_to_update = getpost_variable('group_to_update');
$new_groupname = getpost_variable('new_groupname');
$new_comment = getpost_variable('new_comment');
$new_double_valid = getpost_variable('new_double_valid');
/*************************************/
// TITRE
echo "<H1>" . _('admin_modif_groupe_titre') . "</H1>\n\n";
if ($group != "") {
    modifier($group, $onglet, $DEBUG);
} elseif ($group_to_update != "") {
    commit_update($group_to_update, $new_groupname, $new_comment, $new_double_valid, $DEBUG);
} else {
    // renvoit sur la page principale .
    redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-group', false);
}
/**************************************************************************************/
/**********  FONCTIONS  ***************************************************************/
function modifier($group, $onglet, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
    // Récupération des informations
    $sql1 = 'SELECT g_groupename, g_comment, g_double_valid FROM conges_groupe WHERE g_gid = \'' . SQL::quote($group) . '\'';
    // AFFICHAGE TABLEAU
Ejemplo n.º 10
0
/*************************************************************************************/
require_once "pre.php";
require_once "auth.php";
if (!est_autorise("acces_clients")) {
    exit;
}
require_once "../fonctions/divers.php";
if (!isset($action)) {
    $action = "";
}
if (!isset($type)) {
    $type = "";
}
switch ($action) {
    case 'modifier':
        modifier($raison, $entreprise, $siret, $intracom, $nom, $prenom, $adresse1, $adresse2, $adresse3, $cpostal, $ville, $pays, $telfixe, $telport, $email, $pourcentage, $ref, $type);
        break;
    case 'supprimer':
        supprimer($ref);
        break;
    case 'supprcmd':
        supprcmd($id);
}
?>

<?php 
function modifier($raison, $entreprise, $siret, $intracom, $nom, $prenom, $adresse1, $adresse2, $adresse3, $cpostal, $ville, $pays, $telfixe, $telport, $email, $pourcentage, $ref, $type)
{
    $client = new Client();
    $client->charger_ref($ref);
    $client->pourcentage = $pourcentage;
Ejemplo n.º 11
0
    $ligne = "";
}
if (!est_autorise("acces_catalogue")) {
    exit;
}
require_once "../fonctions/divers.php";
require_once "liste/accessoire.php";
require_once "liste/contenu_associe.php";
$images_adm = new ImagesAdmin('produit', $ref, $lang);
$documents_adm = new DocumentsAdmin('produit', $ref, $lang);
switch ($action) {
    case 'modclassement':
        modclassement($ref, $parent, $type);
        break;
    case 'modifier':
        modifier($id, $lang, $ref, $prix, $ecotaxe, $promo, $prix2, $rubrique, $nouveaute, $perso, $poids, $stock, $tva, $ligne, $titre, $chapo, $description, $postscriptum, $urlsuiv, $urlreecrite);
        break;
    case 'ajouter':
        ajouter($lang, $ref, $prix, $ecotaxe, $promo, $prix2, $rubrique, $nouveaute, $perso, $poids, $stock, $tva, $ligne, $titre, $chapo, $description, $postscriptum);
        break;
    case 'supprimer':
        supprimer($ref, $parent);
    case 'dupliquer':
        dupliquer($ref, $refn, $rubrique);
        break;
}
$images_adm->action($action);
$documents_adm->action($action);
function dupliquer($ref, $refn, $rubrique)
{
    $test = new Produit();
    $lang = $_SESSION["util"]->lang;
}
if (!isset($tabdisp)) {
    $tabdisp = "";
}
if (!est_autorise("acces_configuration")) {
    exit;
}
require_once "../fonctions/divers.php";
require_once "../lib/JSON.php";
switch ($action) {
    case 'modclassement':
        modclassement($id, $type);
        break;
    case 'modifier':
        modifier($id, $lang, $titre, $chapo, $description, $tabdisp);
        break;
    case 'ajouter':
        ajouter($lang, $id, $titre, $chapo, $description, $tabdisp, $ajoutrub);
        break;
    case 'ajdeclidisp':
        ajdeclidisp($id, $declidisp, $lang);
        break;
    case 'majdeclidisp':
        majdeclidisp($id, $lang);
        break;
    case 'supprimer':
        supprimer($id, $parent);
        break;
    case 'suppdeclidisp':
        suppdeclidisp($declidisp);