$su->auteur = stripslashes($aut);
 $su->code = stripslashes($code);
 $prix = str_replace(',', '.', $prix);
 if (is_numeric($prix)) {
     $su->prix = $prix;
 }
 $su->nb = (int) $nb ? (int) $nb : "1";
 $su->statut = $sug_map->getFirstStateId();
 $su->url_suggestion = stripslashes($url_sug);
 $su->commentaires = stripslashes($comment);
 $su->date_creation = today();
 $su->date_publi = stripslashes($date_publi);
 $su->sugg_src = $sug_src;
 // chargement de la PJ
 if ($_FILES['piece_jointe_sug']['name']) {
     $explnum_doc = new explnum_doc();
     $explnum_doc->load_file($_FILES['piece_jointe_sug']);
     $explnum_doc->analyse_file();
 }
 if ($opac_sugg_categ == '1') {
     if (!suggestions_categ::exists($num_categ)) {
         $num_categ = $opac_sugg_categ_default;
     }
     if (!suggestions_categ::exists($num_categ)) {
         $num_categ = '1';
     }
     $su->num_categ = $num_categ;
 }
 $su->sugg_location = $sugg_location_id;
 $su->save($explnum_doc);
 $orig = new suggestions_origine($userid, $su->id_suggestion);
Beispiel #2
0
 function show_consultation_form()
 {
     global $form_consult_action, $form_see_docnum, $msg, $charset, $pmb_gestion_devise, $dbh, $pmb_type_audit;
     $form_consult_action = str_replace('!!form_title!!', htmlentities($this->sujet_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!idstatut!!', htmlentities($this->statut_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!type_action!!', htmlentities($this->workflow->getTypeCommentById($this->type_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!statut_action!!', htmlentities($this->workflow->getStateCommentById($this->statut_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!detail_action!!', htmlentities($this->detail_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!date_action!!', htmlentities(formatdate($this->date_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!date_butoir_action!!', htmlentities(formatdate($this->deadline_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!time_action!!', htmlentities($this->time_elapsed . $msg['demandes_action_time_unit'], ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!cout_action!!', htmlentities($this->cout, ENT_QUOTES, $charset) . $pmb_gestion_devise, $form_consult_action);
     $form_consult_action = str_replace('!!progression_action!!', htmlentities($this->progression_action, ENT_QUOTES, $charset) . '%', $form_consult_action);
     $form_consult_action = str_replace('!!idaction!!', htmlentities($this->id_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!iddemande!!', htmlentities($this->num_demande, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!createur!!', htmlentities($this->getCreateur($this->actions_num_user, $this->actions_type_user), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!prive_action!!', htmlentities($this->prive_action ? $msg[40] : $msg[39], ENT_QUOTES, $charset), $form_consult_action);
     $path = "<a href=./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}>" . htmlentities($this->libelle_demande, ENT_QUOTES, $charset) . "</a>";
     $form_consult_action = str_replace('!!path!!', $path, $form_consult_action);
     $act_cancel = "document.location='./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}'";
     $form_consult_action = str_replace('!!cancel_action!!', $act_cancel, $form_consult_action);
     $states_btn = $this->getDisplayStateBtn($this->workflow->getStateList($this->statut_action));
     $form_consult_action = str_replace('!!btn_etat!!', $states_btn, $form_consult_action);
     // bouton audit
     if ($pmb_type_audit) {
         $btn_audit = "&nbsp;<input class='bouton' type='button' onClick=\"openPopUp('./audit.php?type_obj=15&object_id={$this->id_action}', 'audit_popup', 700, 500, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" title=\"" . $msg['audit_button'] . "\" value=\"" . $msg['audit_button'] . "\" />&nbsp;";
     } else {
         $btn_audit = "";
     }
     $form_consult_action = str_replace('!!btn_audit!!', $btn_audit, $form_consult_action);
     print $form_consult_action;
     //Notes
     print demandes_notes::show_dialog($this->notes, $this->id_action, $this->num_demande);
     //Documents Numériques
     $req = "select * from explnum_doc join explnum_doc_actions on num_explnum_doc=id_explnum_doc \n\t\twhere num_action='" . $this->id_action . "'";
     $res = pmb_mysql_query($req, $dbh);
     if (pmb_mysql_num_rows($res)) {
         $tab_docnum = array();
         while ($docnums = pmb_mysql_fetch_array($res)) {
             $tab_docnum[] = $docnums;
         }
         $explnum_doc = new explnum_doc();
         $liste_docnum = $explnum_doc->show_docnum_table($tab_docnum, './demandes.php?categ=action&act=modif_docnum&idaction=' . $this->id_action);
         $form_see_docnum = str_replace('!!list_docnum!!', $liste_docnum, $form_see_docnum);
     } else {
         $form_see_docnum = str_replace('!!list_docnum!!', htmlentities($msg['demandes_action_no_docnum'], ENT_QUOTES, $charset), $form_see_docnum);
     }
     $form_see_docnum = str_replace('!!idaction!!', $this->id_action, $form_see_docnum);
     print $form_see_docnum;
     // Annulation de l'alerte sur l'action en cours après lecture des nouvelles notes si c'est la personne à laquelle est affectée l'action qui la lit
     $this->actions_read_gestion = demandes_actions::action_read($this->id_action, true, "_gestion");
     // Mise à jour de la demande dont est issue l'action
     demandes_actions::action_majParentEnfant($this->id_action, $this->num_demande, "_gestion");
 }
 static function show_action_docnum($action)
 {
     global $dbh, $msg, $form_see_docnum;
     //Documents Numériques
     $query = "SELECT * FROM explnum_doc \n\t\tJOIN explnum_doc_actions ON num_explnum_doc=id_explnum_doc\n\t\tWHERE num_action='" . $action->id_action . "'";
     $result = pmb_mysql_query($query, $dbh);
     if (pmb_mysql_num_rows($result)) {
         $tab_docnum = array();
         while ($docnums = pmb_mysql_fetch_array($result)) {
             $tab_docnum[] = $docnums;
         }
         $explnum_doc = new explnum_doc();
         $liste_docnum = $explnum_doc->show_docnum_table($tab_docnum);
         $form_see_docnum = str_replace('!!list_docnum!!', $liste_docnum, $form_see_docnum);
     } else {
         $form_see_docnum = str_replace('!!list_docnum!!', htmlentities($msg['demandes_action_no_docnum'], ENT_QUOTES, $charset), $form_see_docnum);
     }
     $form_see_docnum = str_replace('!!idaction!!', $action->id_action, $form_see_docnum);
     return $form_see_docnum;
 }
Beispiel #4
0
     break;
 case 'catalog':
     update_sug();
     if ($catal_type) {
         include $base_path . '/acquisition/suggestions/analysis_form.inc.php';
     } else {
         include $base_path . '/acquisition/suggestions/notice_form.inc.php';
     }
     break;
 case 'upd_notice':
     include $base_path . '/acquisition/suggestions/update_notice.inc.php';
     $update_action = "./acquisition.php?categ=sug&action=update&id_bibli=" . $id_bibli . "&id_sug=" . $id_sug;
     show_form_sug($update_action);
     break;
 case 'del_pj':
     $explnum_doc = new explnum_doc($id_pj);
     $explnum_doc->delete();
     $req = "delete from explnum_doc_sugg where num_explnum_doc='" . $id_pj . "'";
     mysql_query($req, $dbh);
     $del_url = "./acquisition.php?categ=sug&action=update&id_bibli=" . $id_bibli . "&id_sug=" . $id_sug;
     show_form_sug($del_url);
     break;
 case 'empr_sug':
     break;
 case 'record_uni':
     //Recherche de la fonction auxiliaire d'intégration
     if ($z3950_import_modele) {
         if (file_exists($base_path . "/catalog/z3950/" . $z3950_import_modele)) {
             require_once $base_path . "/catalog/z3950/" . $z3950_import_modele;
         } else {
             error_message("", $msg["admin_error_file_import_modele_z3950"], 1, "./admin.php?categ=param");
function update_sug()
{
    global $id_bibli, $id_sug, $id_notice;
    global $tit, $edi, $aut, $cod, $pri, $com, $com_gestion, $date_publi;
    global $statut, $orig, $typ, $url_sug, $sug_src;
    global $sug_map;
    global $acquisition_sugg_categ, $acquisition_sugg_categ_default;
    global $num_categ;
    global $sugg_location_id;
    global $nombre_expl;
    global $creator_orig_id;
    global $dbh;
    if (!$id_sug && suggestions::exists($orig, $tit, $aut, $edi, $cod)) {
        return;
    }
    $sug = new suggestions($id_sug);
    $sug->titre = stripslashes($tit);
    $sug->editeur = stripslashes($edi);
    $sug->auteur = stripslashes($aut);
    $sug->code = stripslashes($cod);
    $sug->num_notice = $id_notice;
    $pri = str_replace(',', '.', $pri);
    if (is_numeric($pri)) {
        $sug->prix = $pri;
    }
    $sug->url_suggestion = stripslashes($url_sug);
    $sug->commentaires = stripslashes($com);
    $sug->commentaires_gestion = stripslashes($com_gestion);
    $sug->nb = $nombre_expl;
    $sug->date_publi = $date_publi;
    $sug->sugg_src = $sug_src;
    $q = "select count(1) from docs_location where idlocation = '" . $sugg_location_id . "' ";
    $r = mysql_query($q);
    if ($sugg_location_id && mysql_result($r, 0, 0)) {
        $sug->sugg_location = $sugg_location_id;
    } else {
        $sug->sugg_location = 0;
    }
    // chargement de la PJ
    $explnum_doc = "";
    if ($_FILES['piece_jointe_sug']['name']) {
        $explnum_doc = new explnum_doc();
        $explnum_doc->load_file($_FILES['piece_jointe_sug']);
        $explnum_doc->analyse_file();
    }
    if (!$id_sug) {
        $sug->statut = $sug_map->getFirstStateId();
        $sug->date_creation = today();
        if ($num_categ && suggestions_categ::exists($num_categ)) {
            $sug->num_categ = $num_categ;
        } else {
            $sug->num_categ = '1';
        }
        $sug->save($explnum_doc);
        $sug_orig = new suggestions_origine($orig, $sug->id_suggestion);
        $sug_orig->type_origine = $typ;
        $sug_orig->save();
    } else {
        if ($num_categ && suggestions_categ::exists($num_categ)) {
            $sug->num_categ = $num_categ;
        }
        $sug->save($explnum_doc);
        if ($creator_orig_id) {
            $sug_orig = new suggestions_origine($creator_orig_id, $sug->id_suggestion);
            $sug_orig->type_origine = $typ;
            $sug_orig->save();
        }
    }
}
 function show_consultation_form()
 {
     global $form_consult_action, $form_see_docnum, $msg, $charset, $pmb_gestion_devise, $dbh;
     $form_consult_action = str_replace('!!form_title!!', htmlentities($this->sujet_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!type_action!!', htmlentities($this->workflow->getTypeCommentById($this->type_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!statut_action!!', htmlentities($this->workflow->getStateCommentById($this->statut_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!detail_action!!', htmlentities($this->detail_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!date_action!!', htmlentities(formatdate($this->date_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!date_butoir_action!!', htmlentities(formatdate($this->deadline_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!time_action!!', htmlentities($this->time_elapsed . $msg['demandes_action_time_unit'], ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!cout_action!!', htmlentities($this->cout, ENT_QUOTES, $charset) . $pmb_gestion_devise, $form_consult_action);
     $form_consult_action = str_replace('!!progression_action!!', htmlentities($this->progression_action, ENT_QUOTES, $charset) . '%', $form_consult_action);
     $form_consult_action = str_replace('!!idaction!!', htmlentities($this->id_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!iddemande!!', htmlentities($this->num_demande, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!createur!!', htmlentities($this->getCreateur($this->actions_num_user, $this->actions_type_user), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!prive_action!!', htmlentities($this->prive_action ? $msg[40] : $msg[39], ENT_QUOTES, $charset), $form_consult_action);
     $path = "<a href=./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}>" . htmlentities($this->libelle_demande, ENT_QUOTES, $charset) . "</a>";
     $form_consult_action = str_replace('!!path!!', $path, $form_consult_action);
     $act_cancel = "document.location='./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}'";
     $form_consult_action = str_replace('!!cancel_action!!', $act_cancel, $form_consult_action);
     print $form_consult_action;
     //Notes
     $notes = new demandes_notes(0, $this->id_action);
     $notes->show_list_notes($this->id_action);
     //Documents Numériques
     $req = "select * from explnum_doc join explnum_doc_actions on num_explnum_doc=id_explnum_doc \n\t\twhere num_action='" . $this->id_action . "'";
     $res = mysql_query($req, $dbh);
     if (mysql_num_rows($res)) {
         $tab_docnum = array();
         while ($docnums = mysql_fetch_array($res)) {
             $tab_docnum[] = $docnums;
         }
         $explnum_doc = new explnum_doc();
         $liste_docnum = $explnum_doc->show_docnum_table($tab_docnum, './demandes.php?categ=action&act=modif_docnum&idaction=' . $this->id_action);
         $form_see_docnum = str_replace('!!list_docnum!!', $liste_docnum, $form_see_docnum);
     } else {
         $form_see_docnum = str_replace('!!list_docnum!!', htmlentities($msg['demandes_action_no_docnum'], ENT_QUOTES, $charset), $form_see_docnum);
     }
     $form_see_docnum = str_replace('!!idaction!!', $this->id_action, $form_see_docnum);
     print $form_see_docnum;
 }
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: demandes_actions.inc.php,v 1.5 2010-08-27 14:25:08 mbertin Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/demandes_actions.class.php";
require_once $class_path . "/demandes.class.php";
require_once $class_path . "/demandes_notes.class.php";
require_once $class_path . "/explnum_doc.class.php";
$actions = new demandes_actions($idaction);
$demandes = new demandes($iddemande);
$notes = new demandes_notes($idnote, $idaction);
$explnum_doc = new explnum_doc($iddocnum);
switch ($sub) {
    case 'com':
        switch ($act) {
            case 'close_fil':
                $actions->close_fil();
                break;
        }
        $actions->show_com_form();
        break;
    case 'rdv_plan':
        switch ($act) {
            case 'close_rdv':
                $actions->close_rdv();
                break;
        }