$ck_index = 0;
        if ($deflt_upload_repertoire) {
            $id_rep = $deflt_upload_repertoire;
            if ($id_rep) {
                $r = new upload_folder($id_rep);
                $path = $r->repertoire_nom;
                $up_place = 1;
            }
        }
        if ($pmb_indexation_docnum && $pmb_indexation_docnum_default) {
            $ck_index = 1;
        }
        $explnum = new explnum();
        // Url de retour après téléchargement du document.
        $retour = "{$base_path}/catalog/serials/pointage/pointage_exemplarise.php?act=memo_doc_num&id_bull={$id_bull}&bul_id={$bul_id}";
        $explnum->mise_a_jour(0, $bul_id, $f_filename, $f_url, $retour, 0, 0, $f_explnum_statut);
        exit;
    } else {
        // Pas de doc numérique, on ferme l'iframe
        $id_form = md5(microtime());
        $templates = str_replace("!!form!!", "<script type='text/javascript'>enregistre('{$id_bull}','{$bul_id}');</script>", $templates);
    }
} else {
    // Formulaire
    include "{$include_path}/templates/serials.tpl.php";
    abts_pointage::delete_retard($abt_id, $value['date_date'], $numero);
    if ($nonrecevable) {
        $value['bul_titre'] = $msg['abonnements_bulletin_non_recevable'];
        $requete = "update abts_grille_abt set state='3' where id_bull= '{$id_bull}' ";
        pmb_mysql_query($requete);
        abts_pointage::delete_retard($abt_id);
// +-------------------------------------------------+
// $Id: ana_explnum_update.inc.php,v 1.14 2015-04-03 11:16:27 jpermanne Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// mise à jour de l'entête de page
echo str_replace('!!page_title!!', $msg[4000] . $msg[1003] . $msg[explnum_doc_associe], $serial_header);
//verification des droits de modification notice
$acces_m = 1;
if ($gestion_acces_active == 1 && $gestion_acces_user_notice == 1) {
    require_once "{$class_path}/acces.class.php";
    $ac = new acces();
    $dom_1 = $ac->setDomain(1);
    $acces_j = $dom_1->getJoin($PMBuserid, 8, 'bulletin_notice');
    $q = "select count(1) from bulletins {$acces_j} where bulletin_id=" . $bul_id;
    $r = pmb_mysql_query($q, $dbh);
    if (pmb_mysql_result($r, 0, 0) == 0) {
        $acces_m = 0;
    }
}
if ($acces_m == 0) {
    if (!$f_explnum_id) {
        error_message('', htmlentities($dom_1->getComment('mod_depo_error'), ENT_QUOTES, $charset), 1, '');
    } else {
        error_message('', htmlentities($dom_1->getComment('mod_enum_error'), ENT_QUOTES, $charset), 1, '');
    }
} else {
    $retour = "./catalog.php?categ=serials&sub=bulletinage&action=view&bul_id={$bul_id}";
    $explnum = new explnum($f_explnum_id);
    $explnum->mise_a_jour($f_notice, $f_bulletin, $f_nom, $f_url, $retour, $conservervignette, $f_statut_chk, $f_explnum_statut);
}
Example #3
0
function upload_file()
{
    global $f_fichier, $id_lig, $typ_lig, $id_prod, $no, $base_path;
    global $id_rep, $path, $up_place, $f_fichier, $f_url, $deflt_upload_repertoire, $pmb_indexation_docnum, $pmb_indexation_docnum_default, $ck_index;
    switch ($typ_lig) {
        case '1':
            //notice
        //notice
        case '5':
            //article
            $f_notice = $id_prod;
            $f_bulletin = 0;
            break;
        case '2':
            //bulletin
            $f_notice = 0;
            $f_bulletin = $id_prod;
            break;
        default:
            //non catalogué
            break;
    }
    if (($f_notice || $f_bulletin) && $f_fichier) {
        $up_place = 0;
        $id_rep = 0;
        $path = '';
        $ck_index = 0;
        if ($deflt_upload_repertoire) {
            $id_rep = $deflt_upload_repertoire;
            if ($id_rep) {
                $r = new upload_folder($id_rep);
                $path = $r->repertoire_nom;
                $up_place = 1;
            }
        }
        if ($pmb_indexation_docnum && $pmb_indexation_docnum_default) {
            $ck_index = 1;
        }
        $explnum = new explnum();
        $retour = $base_path . '/acquisition/achats/receptions/receptions_frame.php?action=delivery&no=' . $no . '&id_lig=' . $id_lig . '&typ_lig=' . $typ_lig . '&id_prod=' . $id_prod;
        $explnum->mise_a_jour($f_notice, $f_bulletin, '', $f_url, $retour, 0, 0);
    }
    return;
}