source: pmb4.1/trunk/fuentes/pmb/admin/netbase/clean_expl.inc.php @ 478

Last change on this file since 478 was 478, checked in by mabarracus, 4 years ago

copy trusty code 4.1

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1<?php
2// +-------------------------------------------------+
3// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
4// +-------------------------------------------------+
5// $Id: clean_expl.inc.php,v 1.16 2009-05-16 11:11:53 dbellamy Exp $
6
7if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) die("no access");
8
9require_once($class_path."/parametres_perso.class.php");
10require_once($class_path."/audit.class.php");
11
12// la taille d'un paquet de notices
13$lot = NOEXPL_PAQUET_SIZE; // defini dans ./params.inc.php
14
15// taille de la jauge pour affichage
16$jauge_size = GAUGE_SIZE;
17
18// initialisation de la borne de départ
19if(!isset($start)) $start=0;
20
21$v_state=urldecode($v_state);
22
23print "<br /><br /><h2 align='center'>".htmlentities($msg["nettoyage_suppr_notices"], ENT_QUOTES, $charset)."</h2>";
24
25// La routine ne nettoie pour l'instant que les monographies
26$query = mysql_query("delete notices 
27        FROM notices left join exemplaires on expl_notice=notice_id 
28                left join explnum on explnum_notice=notice_id
29                left join notices_relations NRN on NRN.num_notice=notice_id 
30                left join notices_relations NRL on NRL.linked_notice=notice_id
31        WHERE niveau_biblio='m' AND niveau_hierar='0' and explnum_notice is null and expl_notice is null and NRN.num_notice is null and NRL.linked_notice is null");
32$affected = mysql_affected_rows();
33 
34$spec = $spec - CLEAN_NOTICES;
35$v_state .= "<br /><img src=../../images/d.gif hspace=3>".htmlentities($msg[nettoyage_suppr_notices], ENT_QUOTES, $charset);
36$v_state .= $affected." ".htmlentities($msg["nettoyage_res_suppr_notices"], ENT_QUOTES, $charset);
37$opt = mysql_query('OPTIMIZE TABLE notices');
38// mise à jour de l'affichage de la jauge
39print "<table border='0' align='center' width='$table_size' cellpadding='0'><tr><td class='jauge'>
40        <img src='../../images/jauge.png' width='$jauge_size' height='16'></td></tr></table>
41                <div align='center'>100%</div>";
42
43print "
44        <form class='form-$current_module' name='process_state' action='./clean.php' method='post'>
45                <input type='hidden' name='v_state' value=\"".urlencode($v_state)."\">
46                <input type='hidden' name='spec' value=\"$spec\">
47        </form>
48        <script type=\"text/javascript\">
49        <!--
50                document.forms['process_state'].submit();
51        -->
52</script>";
53
Note: See TracBrowser for help on using the repository browser.