Ejemplo n.º 1
0
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once "{$class_path}/indexint.class.php";
// la taille d'un paquet de notices
$lot = SERIE_PAQUET_SIZE;
// defini dans ./params.inc.php
// taille de la jauge pour affichage
$jauge_size = GAUGE_SIZE;
// initialisation de la borne de départ
if (!isset($start)) {
    $start = 0;
}
$v_state = urldecode($v_state);
print "<br /><br /><h2 align='center'>" . htmlentities($msg["nettoyage_suppr_indexint"], ENT_QUOTES, $charset) . "</h2>";
$query = mysql_query("SELECT indexint_id from indexint left join notices on indexint=indexint_id where notice_id is null");
$affected = 0;
if ($affected = mysql_num_rows($query)) {
    while ($ligne = mysql_fetch_object($query)) {
        $tu = new indexint($ligne->indexint_id);
        $tu->delete();
    }
}
$query = mysql_query("update notices left join indexint ON indexint=indexint_id SET indexint=0 WHERE indexint_id is null");
$spec = $spec - CLEAN_INDEXINT;
$v_state .= "<br /><img src=../../images/d.gif hspace=3>" . htmlentities($msg["nettoyage_suppr_indexint"], ENT_QUOTES, $charset) . " : ";
$v_state .= $affected . " " . htmlentities($msg["nettoyage_res_suppr_indexint"], ENT_QUOTES, $charset);
$opt = mysql_query('OPTIMIZE TABLE indexint');
// mise à jour de l'affichage de la jauge
print "<table border='0' align='center' width='{$table_size}' cellpadding='0'><tr><td class='jauge'>\n  \t\t\t<img src='../../images/jauge.png' width='{$jauge_size}' height='16'></td></tr></table>\n \t\t\t<div align='center'>100%</div>";
print "\n\t<form class='form-{$current_module}' name='process_state' action='./clean.php' method='post'>\n\t\t<input type='hidden' name='v_state' value=\"{$v_state}\">\n\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t</form>\n\t<script type=\"text/javascript\"><!--\n\t\tdocument.forms['process_state'].submit();\n\t\t-->\n\t</script>";
Ejemplo n.º 2
0
 function cleanIndexint()
 {
     global $msg, $dbh, $charset, $PMBusername;
     if (SESSrights & ADMINISTRATION_AUTH) {
         $result .= "<h3>" . htmlentities($msg["nettoyage_suppr_indexint"], ENT_QUOTES, $charset) . "</h3>";
         $query = mysql_query("SELECT indexint_id from indexint left join notices on indexint=indexint_id where notice_id is null", $dbh);
         $affected = 0;
         if ($affected = mysql_num_rows($query)) {
             while ($ligne = mysql_fetch_object($query)) {
                 $tu = new indexint($ligne->indexint_id);
                 $tu->delete();
             }
         }
         $query = mysql_query("update notices left join indexint ON indexint=indexint_id SET indexint=0 WHERE indexint_id is null", $dbh);
         $result .= $affected . " " . htmlentities($msg["nettoyage_res_suppr_indexint"], ENT_QUOTES, $charset);
         $opt = mysql_query('OPTIMIZE TABLE indexint');
     } else {
         $result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
     }
     return $result;
 }
Ejemplo n.º 3
0
// $Id: indexint.inc.php,v 1.9 2010-12-06 15:51:18 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// on a besoin des templates indexation interne
include "{$include_path}/templates/indexint.tpl.php";
// la classe de gestion des indexation interne
require_once "{$class_path}/indexint.class.php";
print "<h1>" . $msg[140] . "&nbsp;: " . $msg["indexint_menu_title"] . "</h1>";
switch ($sub) {
    case 'reach':
        include './autorites/indexint/indexint_list.inc.php';
        break;
    case 'delete':
        $indexint = new indexint($id, $id_pclass);
        $sup_result = $indexint->delete();
        if (!$sup_result) {
            include './autorites/indexint/indexint_list.inc.php';
        } else {
            error_message($msg[132], $sup_result, 1, "./autorites.php?categ=indexint&sub=indexint_form&id={$id}");
        }
        break;
    case 'replace':
        if (!$n_indexint_id) {
            $indexint = new indexint($id, $id_pclass);
            $indexint->replace_form();
        } else {
            // routine de remplacement
            $indexint = new indexint($id, $id_pclass);
            $rep_result = $indexint->replace($n_indexint_id, $aut_link_save);
            if (!$rep_result) {