Пример #1
0
         $id_new_bud = budgets::duplicate($id_bud);
         show_budg_form($id_bibli, $id_new_bud);
     } else {
         show_list_budg($id_bibli);
     }
     break;
 case 'add_rub':
     show_rub_form($id_bud, $id_rub, $id_parent);
     break;
 case 'modif_rub':
     show_rub_form($id_bud, $id_rub, $id_parent);
     break;
 case 'update_rub':
     //vérification des éléments saisis
     if ($mnt && (!is_numeric($mnt) || $mnt < 0.0 || $mnt > 999999.99)) {
         error_form_message($libelle . $msg["acquisition_rub_mnt_error"]);
         break;
     }
     $rub = new rubriques($id_rub);
     $rub->num_budget = $id_bud;
     $rub->num_parent = $id_parent;
     $rub->libelle = $libelle;
     $rub->commentaires = $comment;
     if (isset($mnt)) {
         $rub->montant = $mnt;
     }
     $rub->num_cp_compta = $ncp;
     if (is_array($user_aut)) {
         $rub->autorisations = ' ' . implode(' ', $user_aut) . ' ';
     } else {
         $rub->autorisations = '';
Пример #2
0
// +-------------------------------------------------+
// $Id: categ_form.inc.php,v 1.32.2.1 2014-03-31 12:11:48 dgoron Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// inclusions diverses
include_once "{$include_path}/templates/category.tpl.php";
require_once "{$class_path}/category.class.php";
require_once "{$class_path}/thesaurus.class.php";
require_once "{$class_path}/noeuds.class.php";
require_once "{$class_path}/categories.class.php";
require_once "{$class_path}/XMLlist.class.php";
require_once "{$class_path}/aut_pperso.class.php";
require_once "{$class_path}/audit.class.php";
if (noeuds::isRacine($id)) {
    error_form_message($msg['categ_forb']);
    exit;
}
//recuperation du thesaurus session
if (!$id_thes) {
    $id_thes = thesaurus::getSessionThesaurusId();
}
if ($id_thes == '-1') {
    $id_thes = $thesaurus_defaut;
}
thesaurus::setSessionThesaurusId($id_thes);
$thes = new thesaurus($id_thes);
//Récuperation de la liste des langues définies pour l'interface
$langages = new XMLlist("{$include_path}/messages/languages.xml", 1);
$langages->analyser();
$lg = $langages->table;
Пример #3
0
    } else {
        $admin_emplacement_form = str_replace('!!form_title!!', $msg["admin_collstate_edit_emplacement"], $admin_emplacement_form);
        print confirmation_delete("./admin.php?categ=collstate&sub=emplacement&action=del&id=");
        $admin_emplacement_form = str_replace('!!supprimer!!', "<input class='bouton' type='button' value=' " . $msg["supprimer"] . " ' onClick=\"javascript:confirmation_delete({$id},'" . addslashes($libelle) . "')\" />", $admin_emplacement_form);
    }
    $admin_emplacement_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $admin_emplacement_form);
    print $admin_emplacement_form;
}
switch ($action) {
    case 'update':
        // vérification validité des données fournies.
        $requete = " SELECT count(1) FROM arch_emplacement WHERE (archempla_libelle='{$form_libelle}' AND archempla_id!='{$id}' )  LIMIT 1 ";
        $res = mysql_query($requete, $dbh);
        $nbr = mysql_result($res, 0, 0);
        if ($nbr > 0) {
            error_form_message($form_libelle . $msg["emplacement_label_already_used"]);
        } else {
            // O.K.,  now if item already exists UPDATE else INSERT
            if ($id != 0) {
                $requete = "UPDATE arch_emplacement SET archempla_libelle='{$form_libelle}' WHERE archempla_id={$id} ";
                $res = mysql_query($requete, $dbh);
            } else {
                $requete = "INSERT INTO arch_emplacement (archempla_id,archempla_libelle) VALUES (0, '{$form_libelle}') ";
                $res = mysql_query($requete, $dbh);
            }
        }
        show_emplacement($dbh);
        break;
    case 'add':
        if (empty($form_libelle) && empty($form_pret)) {
            emplacement_form();
Пример #4
0
     } else {
         show_list_tva();
     }
     break;
 case 'update':
     // vérification validité des données fournies.
     //Pas deux libelles de tva achats identiques
     $nbr = tva_achats::existsLibelle($libelle, $id);
     if ($nbr > 0) {
         error_form_message($libelle . $msg["acquisition_tva_already_used"]);
         break;
     }
     //Vérification du format du taux de tva
     $taux_tva = str_replace(',', '.', $taux_tva);
     if ($taux_tva < 0.0 || $taux_tva > 99.98999999999999) {
         error_form_message($libelle . $msg["acquisition_tva_error"]);
         break;
     }
     $tva = new tva_achats($id);
     $tva->libelle = $libelle;
     $tva->taux_tva = $taux_tva;
     $tva->num_cp_compta = $cp_compta;
     $tva->save();
     show_list_tva();
     break;
 case 'del':
     if ($id) {
         $total1 = tva_achats::hasTypesProduits($id);
         $total2 = tva_achats::hasFrais($id);
         if ($total1 + $total2 == 0) {
             tva_achats::delete($id);
Пример #5
0
$delete_url = "./autorites.php?categ=indexint&sub=pclass_delete&id_pclass=" . $id_pclass;
$cancel_url = "./autorites.php?categ=indexint&sub=pclass";
if ($id_pclass) {
    //modification
    $title = $msg[pclassement_modification];
    $delete_button = "<input type='button' class='bouton' value='{$msg['63']}' onClick=\"confirm_delete();\">";
    // on récupère les données
    $q = "select id_pclass,name_pclass,typedoc from pclassement where id_pclass='{$id_pclass}' ";
    $r = pmb_mysql_query($q, $dbh);
    if ($row = pmb_mysql_fetch_object($r)) {
        $identifiant = "<div class='row'><label class='etiquette' >" . $msg[38] . "</label></div>";
        $identifiant .= "<div class='row'>" . $id_pclass . "</div>";
        $libelle = $row->name_pclass;
        $typedoc = $row->typedoc;
    } else {
        error_form_message($msg["pclassement_modification_impossible"]);
        exit;
    }
} else {
    //creation
    $title = $msg[pclassement_creation];
    $delete_button = '';
    $identifiant = '';
    $libelle = '';
}
$doctype = new marc_list('doctype');
$toprint_typdocfield = " <select name='typedoc_list[]' MULTIPLE SIZE=20 >";
foreach ($doctype->table as $value => $libelletypdoc) {
    if (strpos($typedoc, $value) === false) {
        $tag = "<option value='{$value}'>";
    } else {
Пример #6
0
     $fourn = new entites($id);
     $fourn->num_paiement = $paiement;
     $fourn->raison_sociale = $fourn->raison_sociale;
     $fourn->commentaires = $fourn->commentaires;
     $fourn->siret = $fourn->siret;
     $fourn->naf = $fourn->naf;
     $fourn->rcs = $fourn->rcs;
     $fourn->tva = $fourn->tva;
     $fourn->site_web = $fourn->site_web;
     $fourn->save();
     show_rem_form($id_bibli, $id, $id_prod);
     break;
 case 'updaterem':
     $rem = str_replace(',', '.', $rem);
     if (!is_numeric($rem) || $rem < 0 || $rem >= 100) {
         error_form_message($msg['acquisition_rem_err']);
         break;
     }
     if (!$id_prod) {
         $id_prod = $sel_prod;
     }
     if ($id_prod) {
         $offre = new offres_remises($id, $id_prod);
         $offre->remise = $rem;
         $offre->condition_remise = $comment;
         $offre->save();
     }
     show_list_cond($id_bibli, $id);
     break;
 case 'deleterem':
     offres_remises::delete($id, $id_prod);
Пример #7
0
 function save_request($request_id = '', $vue_id = '')
 {
     global $f_request_name, $f_request_code, $f_request_comment, $msg;
     $chaine = strpos($f_request_code, 'VUE()');
     if ($chaine !== false) {
         if (!$request_id && $vue_id) {
             $req = "INSERT INTO statopac_request(name,requete,comment,num_vue) VALUES ('" . $f_request_name . "', '" . $f_request_code . "','" . $f_request_comment . "','" . $vue_id . "')";
             mysql_query($req);
         } else {
             $req = "UPDATE statopac_request SET name='" . $f_request_name . "', requete='" . $f_request_code . "', num_vue='" . $vue_id . "', comment='" . $f_request_comment . "' WHERE idproc='" . $request_id . "'";
             mysql_query($req);
         }
     } else {
         error_form_message($msg["stat_wrong_query_format"]);
     }
 }
Пример #8
0
             $conn->sources[$source_id]["REP_UPLOAD"] = stripslashes($rep_upload);
             $conn->sources[$source_id]["ENRICHMENT"] = stripslashes($enrichment);
             $conn->sources[$source_id]["UPLOAD_DOC_NUM"] = stripslashes($upload_doc_num);
             $conn->sources[$source_id]["OPAC_AFFILIATE_SEARCH"] = stripslashes($opac_affiliate_search);
             $conn->sources[$source_id]["OPAC_SELECTED"] = stripslashes($opac_selected);
             $conn->sources[$source_id]["TYPE_ENRICHMENT_ALLOWED"] = $type_enrichment_allowed;
             $conn->sources[$source_id]["UPLOAD_DOC_NUM"] = stripslashes($upload_doc_num);
             $conn->sources[$source_id]["ICO_NOTICE"] = stripslashes($ico_notice);
             //Vérification du nom
             $requete = "select count(*) from connectors_sources where name='" . $name . "' and source_id!={$source_id} and id_connector='" . addslashes($contrs->catalog[$id]["NAME"]) . "'";
             $resultat = pmb_mysql_query($requete);
             if (pmb_mysql_result($resultat, 0, 0) == 0) {
                 $conn->source_save_property_form($source_id);
                 show_connectors();
             } else {
                 error_form_message($msg["connecteurs_name_exists"]);
             }
         }
     }
     break;
 case "delete_source":
     if ($id) {
         $contrs = new connecteurs();
         require_once $base_path . "/admin/connecteurs/in/" . $contrs->catalog[$id]["PATH"] . "/" . $contrs->catalog[$id]["NAME"] . ".class.php";
         eval("\$conn=new " . $contrs->catalog[$id]["NAME"] . "(\"" . $base_path . "/admin/connecteurs/in/" . $contrs->catalog[$id]["PATH"] . "\");");
         if ($source_id && $conn) {
             $conn->del_source($source_id);
         }
         show_connectors();
     }
     break;
Пример #9
0
 /**
  * Execution des différentes actions
  */
 function proceed()
 {
     global $msg, $id_col, $col_name, $expr_col, $expr_filtre, $view_name, $view_comment, $id_view;
     global $id, $id_req, $move, $conso, $date_deb, $date_fin, $date_ech, $list_ck, $remove_data;
     if ($id) {
         $id_req = $id;
     }
     switch ($this->section) {
         case 'view_list':
             switch ($this->action) {
                 case 'save_view':
                     //Enregistrement/Insertion d'une vue
                     $this->save_view($id_view, $view_name, $view_comment);
                     print $this->do_form();
                     break;
                 case 'suppr_view':
                     //Suppression d'une vue
                     $this->delete_view($id_view);
                     print $this->do_form();
                     break;
                 case 'consolide_view':
                     if ($date_deb > $date_fin) {
                         error_form_message($msg['stat_wrong_date_interval']);
                     } elseif (!$list_ck) {
                         error_form_message($msg['stat_no_view_selected']);
                     } else {
                         $consolidation = new consolidation($conso, $date_deb, $date_fin, $date_ech, $list_ck, $remove_data);
                         $consolidation->make_consolidation();
                     }
                     print $this->do_form();
                     break;
                 case 'reinit':
                     //Réinitialisation de la vue
                     $this->reinitialiser_view($id_view);
                     print $this->do_form();
                     break;
                     //Actions liées aux requêtes
                 //Actions liées aux requêtes
                 case 'configure':
                 case 'update_config':
                 case 'update_request':
                 case 'exec_req':
                 case 'final':
                     //Actions liées aux requêtes
                     $stq = new stat_query($id_req, $this->action, $id_view);
                     $stq->proceed();
                     break;
                 case 'save_request':
                 case 'suppr_request':
                     $stq = new stat_query($id_req, $this->action, $id_view);
                     $stq->proceed();
                     print $this->do_form();
                     break;
                 default:
                     print $this->do_form();
                     break;
             }
             break;
         case 'view_gestion':
             switch ($this->action) {
                 case 'add_view':
                     //ajout d'une vue
                     //print $this->do_addview_form();
                     break;
                 case 'update_view':
                     //MaJ vue
                     switch ($move) {
                         case 'up':
                             //Déplacer un élément dans la liste des colonnes
                             $this->monter_element($id_col);
                             break;
                         case 'down':
                             //Déplacer un élément dans la liste des colonnes
                             $this->descendre_element($id_col);
                             break;
                     }
                     break;
                 case 'save_col':
                     //Enregistrement/Insertion d'une colonne
                     $this->save_col($id_col, $col_name, $expr_col, $expr_filtre, $id_view);
                     break;
                 case 'suppr_col':
                     //Suppression d'une colonne
                     $this->delete_col($id_col);
                     break;
             }
             print $this->do_addview_form($id_view);
             break;
         case 'colonne':
             switch ($this->action) {
                 case 'add_col':
                     //ajout d'une colonne
                     print $this->do_col_form();
                     break;
                 case 'save_col':
                     //Enregistrement/Insertion d'une colonne
                     $this->save_col($id_col, $col_name, $expr_col, $expr_filtre, $id_view);
                     print $this->do_addview_form($id_view);
                     break;
                 case 'update_col':
                     //MaJ colonne
                     print $this->do_col_form($id_col);
                     break;
                 case 'suppr_col':
                     //Suppression d'une colonne
                     $this->delete_col($id_col);
                     print $this->do_addview_form($id_view);
                     break;
             }
             break;
         case 'query':
             //Actions liées aux requêtes
             $stq = new stat_query($id_req, $this->action, $id_view);
             $stq->proceed();
             break;
         case 'import':
             //Formulaire import de requete
             print $this->do_import_req_form($id_view);
             break;
         case 'importsuite':
             //Import de requete
             $this->do_import_req($id_view);
             break;
         default:
             break;
     }
 }
Пример #10
0
<?php

// +-------------------------------------------------+
// � 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: pclass_update.inc.php,v 1.3 2007-07-31 09:23:03 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// si tout est OK, on a les variables suivantes � exploiter :
// $id_pclass				identifiant de classement (0 si nouveau)
// $libelle					libelle du classement
// $typedoc_list			Liste des document � associer
if ($typedoc_list) {
    foreach ($typedoc_list as $doc) {
        $typedoc .= $doc;
    }
}
// libelle non renseigne
if (trim($libelle) == '') {
    error_form_message($msg["pclassement_libelle_manquant"]);
    exit;
}
$requete = "";
if ($id_pclass) {
    $requete = "UPDATE pclassement SET name_pclass='" . $libelle . "', typedoc='" . $typedoc . "'  WHERE id_pclass =" . $id_pclass;
} else {
    $requete = "INSERT INTO pclassement SET name_pclass='" . $libelle . "', typedoc='" . $typedoc . "' ";
}
mysql_query($requete, $dbh);
include './autorites/indexint/pclass.inc.php';
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: suggestions_export.inc.php,v 1.1 2009-07-31 14:37:09 kantin Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/suggestions_export.class.php";
//Génération des notices
if (count($chk)) {
    $sugg_export = new suggestions_export($chk);
    $origine = SESSid . "_" . str_replace(" ", "", microtime());
    $filename = $origine . ".xml";
    $fp = fopen($base_path . "/temp/" . $filename, "w+");
    fwrite($fp, "<?xml version='1.0' encoding='" . $charset . "' ?>\n<unimarc>\n");
    if ($fp) {
        while ($notice = $sugg_export->get_next_notice()) {
            fwrite($fp, $notice);
        }
        fwrite($fp, "</unimarc>\n");
        fclose($fp);
        print "<iframe name='frame_export_sugg' src='admin/convert/start_import.php?import_type={$export_list}&file_in=" . rawurlencode($filename) . "&noimport=1&origine=' style='width:100%;height:400px'></iframe>";
    } else {
        error_form_message($msg["write_file_error"]);
    }
} else {
    print "<script>alert(\"" . $msg["acquisition_sug_msg_nocheck_export"] . "\"); history.go(-1);</script>";
}
Пример #12
0
    }
    $admin_procs_clas_form = str_replace('!!libelle!!', htmlentities($libproc_classement, ENT_QUOTES, $charset), $admin_procs_clas_form);
    $admin_procs_clas_form = str_replace('!!libelle_suppr!!', addslashes($libproc_classement), $admin_procs_clas_form);
    print confirmation_delete("./admin.php?categ=proc&sub=clas&action=del&idproc_classement=");
    print $admin_procs_clas_form;
}
switch ($action) {
    case 'update':
        // vérification validité des données fournies.
        $requete = " SELECT count(1) FROM procs_classements WHERE (libproc_classement='{$form_libproc_classement}' AND idproc_classement!='{$idproc_classement}' ) LIMIT 1 ";
        $res = mysql_query($requete, $dbh);
        $nbr = mysql_result($res, 0, 0);
        if (!trim($form_libproc_classement)) {
            error_form_message($msg["acquisition_lib_liv_inv"]);
        } elseif ($nbr > 0) {
            error_form_message($form_libelle . $msg["proc_clas_lib_already_used"]);
        } else {
            // O.K.  if item already exists UPDATE else INSERT
            if ($idproc_classement) {
                $requete = "UPDATE procs_classements SET libproc_classement='{$form_libproc_classement}' WHERE idproc_classement='{$idproc_classement}' ";
                $res = mysql_query($requete, $dbh);
            } else {
                $requete = "INSERT INTO procs_classements SET libproc_classement='{$form_libproc_classement}' ";
                $res = mysql_query($requete, $dbh);
            }
        }
        show_clas($dbh);
        break;
    case 'add':
        if (empty($form_libproc_classement)) {
            clas_form();
Пример #13
0
        $unused_list_form = str_replace('!!unused_list_lib!!', htmlentities($dom->getComment('res_prf_unused_list_lib'), ENT_QUOTES, $charset), $unused_list_form);
        $unused_list_form = str_replace('<!-- unused_profiles -->', $rows, $unused_list_form);
        $form = str_replace('<!-- unused_list_form -->', $unused_list_form, $form);
    }
    $bt_calc = "<input type='button' onclick=\"\n\t\tthis.form.action='./admin.php?categ=acces&sub=res_prf&action=calc&id={$id}'; \n\t\tthis.form.submit();return false;\" \n\t\tvalue=\"" . $dom->getComment('res_prf_bt_calc') . "\" class='bouton' />";
    $form = str_replace('<!-- bt_calc -->', $bt_calc, $form);
    $bt_enr = "<input type='button' onclick=\"\n\t\tthis.form.action='./admin.php?categ=acces&sub=res_prf&action=update&id={$id}'; \n\t\tthis.form.submit();return false;\" \n\t\tvalue=\"" . addslashes($msg['77']) . "\" class='bouton' />";
    $form = str_replace('<!-- bt_enr -->', $bt_enr, $form);
    print $form;
}
switch ($action) {
    case 'calc':
        if (count($chk_prop)) {
            show_calc_res_prf_list($id);
        } else {
            error_form_message(addslashes($msg['dom_prop_chx_err']));
        }
        break;
    case 'update':
        $dom->saveResourceProfiles($prf_id, $prf_lib, $prf_rule, $prf_hrule, $prf_used, $unused_prf_id);
        show_res_prf_list($id, true);
        break;
    case 'delete':
        $dom->deleteResourceProfiles();
        show_res_prf_list($id);
        break;
    case 'list':
    default:
        show_res_prf_list($id);
        break;
}
Пример #14
0
     break;
 }
 if ($date_deb && $date_fin) {
     //Vérification des dates
     //Format date début et format date fin
     $deb = extraitdate($date_deb);
     $fin = extraitdate($date_fin);
     $ex_deb = explode('-', $deb);
     $ex_fin = explode('-', $fin);
     if ($deb == '' || $fin == '' || strlen($ex_deb[0]) != 4 || strlen($ex_fin[0]) != 4 || !checkdate($ex_deb[1], $ex_deb[2], $ex_deb[0]) || !checkdate($ex_fin[1], $ex_fin[2], $ex_fin[0])) {
         error_form_message($libelle . $msg["acquisition_compta_date_inv"]);
         break;
     }
     //Date fin > date début
     if ($ex_deb[0] > $ex_fin[0] || $ex_deb[0] == $ex_fin[0] && $ex_deb[1] > $ex_fin[1] || $ex_deb[0] == $ex_fin[0] && $ex_deb[1] == $ex_fin[1] && $ex_deb[2] >= $ex_fin[2]) {
         error_form_message($libelle . $msg["acquisition_compta_date_inf"]);
         break;
     }
     //A voir , Pas de recoupements entre exercices
 }
 $ex = new exercices($id);
 $ex->libelle = $libelle;
 $ex->num_entite = $ent;
 if ($date_deb && $date_fin) {
     $ex->date_debut = $deb;
     $ex->date_fin = $fin;
 }
 $ex->save();
 if ($def) {
     $ex->setDefault();
 }
Пример #15
0
        $checkbox = "checked";
    } else {
        $checkbox = "";
    }
    $admin_empr_statut_form = str_replace('!!allow_scan_request!!', $checkbox, $admin_empr_statut_form);
    print confirmation_delete("./admin.php?categ=empr&sub=statut&action=del&id=");
    print $admin_empr_statut_form;
}
switch ($action) {
    case 'update':
        // vérification validité des données fournies.
        $requete = " SELECT count(1) FROM empr_statut WHERE (statut_libelle='{$statut_libelle}' AND idstatut!='{$id}' ) ";
        $res = pmb_mysql_query($requete, $dbh);
        $nbr = pmb_mysql_result($res, 0, 0);
        if ($nbr > 0) {
            error_form_message($statut_libelle . $msg["empr_statut_label_already_used"]);
        } else {
            // O.K.,  now if item already exists UPDATE else INSERT
            if ($id) {
                $requete = "UPDATE empr_statut SET statut_libelle='{$statut_libelle}', allow_loan='{$allow_loan}', allow_loan_hist='{$allow_loan_hist}', allow_book='{$allow_book}', allow_opac='{$allow_opac}', allow_dsi='{$allow_dsi}', allow_dsi_priv='{$allow_dsi_priv}', allow_sugg='{$allow_sugg}', allow_dema='{$allow_dema}', allow_prol='{$allow_prol}', allow_avis='{$allow_avis}', allow_tag='{$allow_tag}', allow_pwd='{$allow_pwd}', allow_liste_lecture='{$allow_liste_lecture}', allow_self_checkout='{$allow_self_checkout}', allow_self_checkin='{$allow_self_checkin}', allow_serialcirc='{$allow_serialcirc}', allow_scan_request='{$allow_scan_request}' WHERE idstatut={$id} ";
                $res = pmb_mysql_query($requete, $dbh);
            } else {
                $requete = "INSERT INTO empr_statut set idstatut=0, statut_libelle='{$statut_libelle}', allow_loan='{$allow_loan}', allow_loan_hist='{$allow_loan_hist}', allow_book='{$allow_book}', allow_opac='{$allow_opac}', allow_dsi='{$allow_dsi}', allow_dsi_priv='{$allow_dsi_priv}', allow_sugg='{$allow_sugg}', allow_dema='{$allow_dema}', allow_prol='{$allow_prol}', allow_avis='{$allow_avis}', allow_tag='{$allow_tag}', allow_pwd='{$allow_pwd}', allow_liste_lecture='{$allow_liste_lecture}', allow_self_checkout='{$allow_self_checkout}', allow_self_checkin='{$allow_self_checkin}', allow_serialcirc='{$allow_serialcirc}', allow_scan_request='{$allow_scan_request}' ";
                $res = pmb_mysql_query($requete, $dbh);
            }
        }
        show_statut($dbh);
        break;
    case 'add':
        if (empty($form_libelle)) {
            statut_form();
Пример #16
0
}
if ($form_fiches) {
    $droits = $droits + FICHES_AUTH;
}
if ($form_cms) {
    $droits = $droits + CMS_AUTH;
}
if ($form_catal_modif_cb_expl) {
    $droits = $droits + CATAL_MODIF_CB_EXPL_AUTH;
}
// no duplication
$requete = " SELECT count(1) FROM users WHERE (username='******' AND userid!='{$id}' )  LIMIT 1 ";
$res = pmb_mysql_query($requete, $dbh);
$nbr = pmb_mysql_result($res, 0, 0);
if ($nbr > 0) {
    error_form_message($form_login . $msg["user_login_already_used"]);
} elseif ($form_actif) {
    // visibilité des exemplaires
    if ($pmb_droits_explr_localises) {
        $requete_droits_expl = "select idlocation from docs_location order by location_libelle";
        $resultat_droits_expl = pmb_mysql_query($requete_droits_expl);
        $form_expl_visibilite = array();
        while ($j = pmb_mysql_fetch_array($resultat_droits_expl)) {
            $temp_global = "form_expl_visibilite_" . $j["idlocation"];
            global ${$temp_global};
            switch (${$temp_global}) {
                case "explr_invisible":
                    $form_expl_visibilitei[] = $j["idlocation"];
                    break;
                case "explr_visible_mod":
                    $form_expl_visibilitevm[] .= $j["idlocation"];
Пример #17
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: pclass_delete.inc.php,v 1.5 2015-04-03 11:16:27 jpermanne Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// si tout est OK, on a les variables suivantes à exploiter :
// $id_pclass				identifiant de classement (0 si nouveau)
if ($id_pclass == 1) {
    // Interdire l'effacement de l'id 1
    error_form_message($msg["pclassement_suppr_impossible_protege"]);
    exit;
}
$requete = "SELECT indexint_id FROM indexint WHERE num_pclass='" . $id_pclass . "' ";
$result = pmb_mysql_query($requete, $dbh) or die($requete . "<br />" . pmb_mysql_error());
if (pmb_mysql_num_rows($result)) {
    // Il y a des enregistrements. Interdire l'effacement.
    error_form_message($msg["pclassement_suppr_impossible"]);
    exit;
} else {
    // effacement
    $dummy = "delete FROM pclassement WHERE id_pclass='{$id_pclass}' ";
    pmb_mysql_query($dummy, $dbh);
}
include './autorites/indexint/pclass.inc.php';
Пример #18
0
 case "new":
     $question = new faq_question($id);
     print $question->get_form($num_demande);
     break;
 case "edit":
     $question = new faq_question($id);
     print $question->get_form();
     break;
 case "save":
     $question = new faq_question($faq_question_id);
     $result = $question->get_value_from_form();
     if ($result) {
         $result = $question->save();
     }
     if (!$result) {
         error_form_message($msg['faq_question_save_error']);
     }
     print faq_questions::get_list();
     break;
 case "delete":
     $question = new faq_question($id);
     $result = $question->delete();
     if (!$result) {
         error_message("", $msg['faq_question_delete_error']);
         print "<div class='row'>&nbsp;</div>";
     }
     print faq_questions::get_list();
     break;
 case "list":
 default:
     print faq_questions::get_list(true, $id_theme, $id_type, $id_statut);
Пример #19
0
    } else {
        $admin_support_form = str_replace('!!form_title!!', $msg["admin_collstate_edit_support"], $admin_support_form);
        print confirmation_delete("./admin.php?categ=collstate&sub=support&action=del&id=");
        $admin_support_form = str_replace('!!supprimer!!', "<input class='bouton' type='button' value=' " . $msg["supprimer"] . " ' onClick=\"javascript:confirmation_delete({$id},'" . addslashes($libelle) . "')\" />", $admin_support_form);
    }
    $admin_support_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $admin_support_form);
    print $admin_support_form;
}
switch ($action) {
    case 'update':
        // vérification validité des données fournies.
        $requete = " SELECT count(1) FROM arch_type WHERE (archtype_libelle='{$form_libelle}' AND archtype_id!='{$id}' )  LIMIT 1 ";
        $res = pmb_mysql_query($requete, $dbh);
        $nbr = pmb_mysql_result($res, 0, 0);
        if ($nbr > 0) {
            error_form_message($form_libelle . $msg["support_label_already_used"]);
        } else {
            // O.K.,  now if item already exists UPDATE else INSERT
            if ($id != 0) {
                $requete = "UPDATE arch_type SET archtype_libelle='{$form_libelle}' WHERE archtype_id={$id} ";
                $res = pmb_mysql_query($requete, $dbh);
            } else {
                $requete = "INSERT INTO arch_type (archtype_id,archtype_libelle) VALUES (0, '{$form_libelle}') ";
                $res = pmb_mysql_query($requete, $dbh);
            }
        }
        show_support($dbh);
        break;
    case 'add':
        if (empty($form_libelle) && empty($form_pret)) {
            support_form();
Пример #20
0
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: thes_update.inc.php,v 1.4 2007-03-10 09:03:18 touraine37 Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// si tout est OK, on a les variables suivantes à exploiter :
// $id_thes				identifiant de thesaurus (0 si nouveau)
// $libelle_thesaurus	libelle du thesaurus
// $langue_defaut		langue par défaut du thesaurus (rien si inchangée)
require_once "{$class_path}/thesaurus.class.php";
// libelle thesaurus non renseigne
if (trim($libelle_thesaurus) == '') {
    error_form_message($msg["thes_libelle_manquant"]);
    exit;
}
if ($id_thes) {
    //thesaurus existant
    $thes = new thesaurus($id_thes);
    $thes->libelle_thesaurus = $libelle_thesaurus;
    $thes->save();
} else {
    //thesaurus a creer
    $thes = new thesaurus();
    $thes->libelle_thesaurus = $libelle_thesaurus;
    $thes->langue_defaut = $langue_defaut;
    $thes->save();
}
include './autorites/subjects/thesaurus.inc.php';
Пример #21
0
 case 'add':
     show_lgstat_form();
     break;
 case 'modif':
     if (lgstat::exists($id)) {
         show_lgstat_form($id);
     } else {
         show_lgstat_list();
     }
     break;
 case 'update':
     // vérification validité des données fournies.
     //Pas deux statuts de lignes d'actes identiques
     $nbr = lgstat::existsLibelle($libelle, $id);
     if ($nbr > 0) {
         error_form_message($libelle . $msg['acquisition_lgstat_already_used']);
         break;
     }
     $lgstat = new lgstat($id);
     $lgstat->libelle = $libelle;
     $lgstat->relance = $relance;
     $lgstat->save();
     show_lgstat_list();
     break;
 case 'del':
     if ($id) {
         if ($id == '1') {
             //statut de ligne d'acte avec id=1 non supprimable
             $msg_suppr_err = $msg['acquisition_lgstat_used'];
             error_message($msg[321], $msg_suppr_err, 1, 'admin.php?categ=acquisition&sub=lgstat');
         } else {
Пример #22
0
        while ($obj_emp = pmb_mysql_fetch_object($res)) {
            $requete = "SELECT id_empr FROM empr WHERE empr_cb='" . $obj_emp->empr_cb . "'";
            $result = pmb_mysql_query($requete, $dbh);
            $id_empr = pmb_mysql_result($result, 0, 0);
            $link = './circ.php?categ=pret&form_cb=' . rawurlencode($obj_emp->empr_cb);
            $lien_suppr_cart = "";
            $empr = new emprunteur($id_empr, "", FALSE, 3);
            $empr->fiche_consultation = str_replace('!!image_suppr_caddie_empr!!', $lien_suppr_cart, $empr->fiche_consultation);
            $empr->fiche_consultation = str_replace('!!lien_vers_empr!!', $link, $empr->fiche_consultation);
            print $empr->fiche_consultation;
        }
        exit;
    } else {
        $error_message = str_replace("<p>ERREUR DOUBLON LECTEUR</p>", "", $error_message);
        $error_message = str_replace("<p>", "", $error_message);
        error_form_message(str_replace("</p>", "", $error_message));
        //error_message("$msg[751] : $nberrors", $error_message."<p>".$msg[760]."</p>");
    }
} else {
    if (!$id) {
        // création empr
        $requete = "SELECT empr_cb FROM empr WHERE empr_cb='{$f_cb}' LIMIT 1 ";
        $res = pmb_mysql_query($requete, $dbh);
        $nbr_lignes = pmb_mysql_num_rows($res);
        if (!$nbr_lignes) {
            $requete = "INSERT INTO empr SET ";
            $requete .= "empr_cb='" . (string) $f_cb . "', ";
            $requete .= "empr_nom='{$form_nom}', ";
            $requete .= "empr_prenom='{$form_prenom}', ";
            $requete .= "empr_adr1='{$form_adr1}', ";
            $requete .= "empr_adr2='{$form_adr2}', ";
Пример #23
0
 case 'add':
     show_mode_form();
     break;
 case 'modif':
     if (paiements::exists($id)) {
         show_mode_form($id);
     } else {
         show_list_mode();
     }
     break;
 case 'update':
     // vérification validité des données fournies.
     //Pas deux libelles de modes de paiement
     $nbr = paiements::existsLibelle($libelle, $id);
     if ($nbr > 0) {
         error_form_message($libelle . $msg["acquisition_mode_already_used"]);
         break;
     }
     $mode = new paiements($id);
     $mode->libelle = $libelle;
     $mode->commentaire = $comment;
     $mode->save();
     show_list_mode();
     break;
 case 'del':
     if ($id) {
         $total1 = paiements::hasFournisseurs($id);
         if ($total1 == 0) {
             paiements::delete($id);
         } else {
             $msg_suppr_err = $msg[acquisition_mode_used];
Пример #24
0
//recuperation de la table des langues
$langages = new XMLlist("{$include_path}/messages/languages.xml", 1);
$langages->analyser();
$lg = $langages->table;
//recuperation du thesaurus session
$id_thes = thesaurus::getSessionThesaurusId();
$thes = new thesaurus($id_thes);
// libelle langue defaut thesaurus non renseigne
if (trim($category_libelle[$thes->langue_defaut]) == '') {
    error_form_message($msg["thes_libelle_categ_ref_manquant"] . '\\n(' . $lg[$thes->langue_defaut] . ')');
    exit;
}
//Vérification de l'unicité du numéro d'autorité
$num_aut = trim(stripslashes($num_aut));
if ($num_aut && !noeuds::isUnique($id_thes, $num_aut, $id)) {
    error_form_message($msg['categ_num_aut_not_unique']);
    exit;
}
//Si pas de parent, le parent est le noeud racine du thesaurus
if (!$category_parent_id) {
    $category_parent_id = $thes->num_noeud_racine;
}
//synchro_rdf : on empile les noeuds impactés pour les traiter plus loin
if ($pmb_synchro_rdf) {
    $arrayIdImpactes = array();
    if ($id) {
        $noeud = new noeuds($id);
        //on est en mise à jour
        $arrayIdImpactes[] = $id;
        //parent
        if ($noeud->num_parent != $thes->num_noeud_racine) {
Пример #25
0
        }
        $coord_form = str_replace('!!checked!!', $chk, $coord_form);
        if ($id_check_list) {
            $id_check_list .= '|';
        }
        $id_check_list .= "user_aut[" . $row->userid . "]";
    }
    $coord_form = str_replace('!!auto_id_list!!', $id_check_list, $coord_form);
}
//Traitement des actions
switch ($action) {
    case 'update':
        // vérification validité des données fournies.( pas deux raisons sociales identiques)
        $nbr = entites::exists_rs($raison, 0, $id);
        if ($nbr > 0) {
            error_form_message($raison . $msg["acquisition_raison_already_used"]);
            break;
        }
        $biblio = new entites($id);
        $biblio->type_entite = '1';
        $biblio->raison_sociale = $raison;
        $biblio->commentaires = $comment;
        $biblio->siret = $siret;
        $biblio->naf = $naf;
        $biblio->rcs = $rcs;
        $biblio->tva = $tva;
        $biblio->site_web = $site_web;
        $biblio->logo = $logo;
        if (is_array($user_aut)) {
            $biblio->autorisations = ' ' . implode(' ', $user_aut) . ' ';
        } else {
            $redirect = rawurlencode("../../acquisition.php?categ=sug&sub=multi&act=import&src_liste=" . $src_liste . "&origine_id=" . $origine_id . "&type_origine=" . $type_origine);
            if ($import_type == 'uni') {
                //Si on a un fichier unimarc en entrée
                global $file_in;
                $file_in = rawurlencode($file_name);
                $sug = new suggestion_multi();
                $sug->create_table_from_uni();
                print $sug->display_form();
            } else {
                //Sinon on effectue la conversion vers l'unimarc
                print "<iframe name='import_sugg_frame' src='admin/convert/start_import.php?import_type={$import_type}&file_in=" . rawurlencode($file_name) . "&redirect={$redirect}' style='width:100%;height=500px;'></iframe>";
            }
        } elseif ($explnum_id) {
            $req = "select explnum_doc_data as data from explnum_doc where id_explnum_doc='" . $explnum_id . "'";
            $res = pmb_mysql_query($req, $dbh);
            $expl = pmb_mysql_fetch_object($res);
            $file_name = SESSid . "_" . str_replace(" ", "", microtime());
            $file_name = str_replace(".", "", $file_name);
            $fp = fopen("temp/" . $file_name, "w+");
            fwrite($fp, $expl->data);
            fclose($fp);
            $redirect = rawurlencode("../../acquisition.php?categ=sug&sub=multi&act=import&src_liste=" . $src_liste . "&origine_id=" . $origine_id . "&type_origine=" . $type_origine);
            print "<iframe name='import_sugg_frame' src='admin/convert/start_import.php?import_type={$import_type}&file_in=" . rawurlencode($file_name) . "&redirect={$redirect}' style='width:100%;height=500px;'></iframe>";
        } else {
            error_form_message($msg["field_file_copy"]);
        }
        break;
    default:
        $sug_import->show_form();
        break;
}
Пример #27
0
    $admin_zbib_form = str_replace('!!sutrs!!', $zsutrs, $admin_zbib_form);
    $admin_zbib_form = str_replace('!!zfunc!!', $zfunc, $admin_zbib_form);
    $admin_zbib_form = str_replace('!!nom_script!!', addslashes($znom), $admin_zbib_form);
    // added by Marco Vaninetti
    print confirmation_delete("./admin.php?categ=z3950&sub=zbib&action=del&id=");
    // end
    print $admin_zbib_form;
}
switch ($action) {
    case 'update':
        // no duplication
        $requete = " SELECT count(1) FROM z_bib WHERE (bib_nom='{$form_nom}' AND bib_id!='{$id}' )  LIMIT 1 ";
        $res = mysql_query($requete, $dbh);
        $nbr = mysql_result($res, 0, 0);
        if ($nbr > 0) {
            error_form_message($form_nom . $msg["docs_label_already_used"]);
        } else {
            // O.k., now if the id already exist UPDATE else INSERT
            if (!empty($form_nom) && !empty($form_base) && !empty($form_search_type) && !empty($form_url) && !empty($form_port) && !empty($form_format)) {
                if ($id) {
                    $requete = "UPDATE z_bib SET bib_nom='{$form_nom}', base='{$form_base}', \n\t\t\t\t\tsearch_type='{$form_search_type}', url='{$form_url}', port='{$form_port}', \n\t\t\t\t\tformat='{$form_format}', auth_user='******', \n\t\t\t\t\tauth_pass='******', sutrs_lang='{$form_sutrs}', fichier_func='{$form_zfunc}' WHERE bib_id={$id} ";
                    $res = mysql_query($requete, $dbh);
                } else {
                    $requete = "INSERT INTO z_bib (bib_nom, search_type, url, port, base, format, auth_user, auth_pass, sutrs_lang, fichier_func) VALUES ('{$form_nom}', '{$form_search_type}', '{$form_url}', '{$form_port}', '{$form_base}', '{$form_format}', '{$form_user}', '{$form_password}', '{$form_sutrs}', '{$form_zfunc}') ";
                    $res = mysql_query($requete, $dbh);
                    $id_insert = mysql_insert_id();
                    $requete = "INSERT INTO z_attr (attr_bib_id,  attr_libelle, attr_attr) VALUES ('{$id_insert}', 'sujet', '21') ";
                    $res = mysql_query($requete, $dbh);
                    $requete = "INSERT INTO z_attr (attr_bib_id,  attr_libelle, attr_attr) VALUES ('{$id_insert}', 'auteur', '1003') ";
                    $res = mysql_query($requete, $dbh);
                    $requete = "INSERT INTO z_attr (attr_bib_id,  attr_libelle, attr_attr) VALUES ('{$id_insert}', 'isbn', '7') ";
Пример #28
0
 /**
  * Enregistrement d'un répertoire
  */
 function enregistrer($id = 0)
 {
     global $rep_nom, $rep_url, $rep_path, $rep_hash, $rep_navig, $rep_sub, $dbh, $rep_utf8, $msg;
     if (substr($rep_path, strlen($rep_path) - 1) !== '/') {
         $rep_path = $rep_path . "/";
     }
     if ($id) {
         $req = "update upload_repertoire set repertoire_nom='" . $rep_nom . "', repertoire_url='" . $rep_url . "', repertoire_path='" . $rep_path . "', repertoire_navigation='" . $rep_navig . "', repertoire_hachage='" . $rep_hash . "', repertoire_utf8='" . $rep_utf8 . "' where repertoire_id='" . $id . "'";
         mysql_query($req, $dbh);
     } else {
         $req = "select repertoire_id from upload_repertoire where repertoire_nom='" . $rep_nom . "'";
         $res = mysql_query($req, $dbh);
         if (mysql_num_rows($res)) {
             error_form_message($msg["upload_repertoire_name_exists"]);
         } else {
             $req = "insert into upload_repertoire (repertoire_nom, repertoire_url, repertoire_path, repertoire_navigation, repertoire_hachage, repertoire_subfolder,repertoire_utf8) values ('" . $rep_nom . "', '" . $rep_url . "', '" . $rep_path . "', '" . $rep_navig . "', '" . $rep_hash . "', '" . $rep_sub . "', '" . $rep_utf8 . "')";
             mysql_query($req, $dbh);
         }
     }
 }
Пример #29
0
<?php

// +-------------------------------------------------+
// � 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: thes_delete.inc.php,v 1.4 2009-12-18 11:18:25 mbertin Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// si tout est OK, on a les variables suivantes � exploiter :
// $id_thes				identifiant de thesaurus (0 si nouveau)
// $libelle_thesaurus	libelle du thesaurus
// $langue_defaut		langue par d�faut du thesaurus (rien si inchang�e)
require_once "{$class_path}/thesaurus.class.php";
if (thesaurus::hasNotices($id_thes)) {
    //le thesaurus est utilis� dans les notices.
    error_form_message($msg["thes_suppr_impossible"]);
    exit;
} else {
    if ($opac_thesaurus_defaut === $id_thes or $thesaurus_defaut === $id_thes or $deflt_thesaurus === $id_thes) {
        error_form_message($msg["thes_suppr_categ_utilisee"]);
    } else {
        thesaurus::delete($id_thes);
        thesaurus::setSessionThesaurusId(-1);
    }
}
include './autorites/subjects/thesaurus.inc.php';
Пример #30
0
    } else {
        $admin_group_form = str_replace('!!form_title!!', $msg['admin_usr_grp_mod'], $admin_group_form);
    }
    $admin_group_form = str_replace('!!libelle!!', htmlentities($libelle, ENT_QUOTES, $charset), $admin_group_form);
    $admin_group_form = str_replace('!!libelle_suppr!!', addslashes($libelle), $admin_group_form);
    print confirmation_delete("./admin.php?categ=users&sub=groups&action=del&id=");
    print $admin_group_form;
}
switch ($action) {
    case 'update':
        // verification validite des donnees fournies
        $q = "SELECT count(1) FROM users_groups WHERE grp_name='{$form_libelle}' AND grp_id!='{$id}'  LIMIT 1 ";
        $r = mysql_query($q, $dbh);
        $nb = mysql_result($r, 0, 0);
        if ($nb > 0) {
            error_form_message($form_libelle . $msg['admin_usr_grp_lib_used']);
        } else {
            //if item already exists UPDATE else INSERT
            if ($id != 0) {
                $q = "UPDATE users_groups SET grp_name='{$form_libelle}' WHERE grp_id='{$id}' ";
                mysql_query($q, $dbh);
            } else {
                $q = "INSERT INTO users_groups (grp_id, grp_name) VALUES (0, '{$form_libelle}') ";
                mysql_query($q, $dbh);
            }
        }
        show_group_list();
        break;
    case 'add':
        if (empty($form_libelle)) {
            group_form($libelle = "", $id = 0);