예제 #1
0
파일: install_rep.php 프로젝트: hogsim/PMB
        }
    }
    //Mise à jour du mot de passe admin
    @pmb_mysql_query("UPDATE users SET pwd=PASSWORD('admin'), user_digest = '" . md5("admin" . ":" . md5("http://SERVER/DIRECTORY/") . ":" . "admin") . "' WHERE username='******'", $link);
    @rename("./install.php", "./noinstall.php");
    @rename("./install_rep.php", "./noinstall_rep.php");
    echo $msg_crea_30;
    echo $msg_crea_31;
    $query = "select valeur_param from parametres where type_param='pmb' and sstype_param='bdd_version' ";
    $req = pmb_mysql_query($query, $link);
    $data = pmb_mysql_fetch_array($req);
    $version_pmb_bdd = $data['valeur_param'];
    if ($version_pmb_bdd != $pmb_version_database_as_it_should_be) {
        echo str_replace("!!pmb_version!!", $version_pmb_bdd, $msg_crea_control_version);
    }
    pmb_mysql_close($link);
} else {
    print $msg_crea_32;
}
function del_fic_temp($dir)
{
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            if (file_exists($dir . $file) && preg_match("/^XML.*?\\.tmp\$/i", $file)) {
                @unlink($dir . $file);
            }
        }
        closedir($dh);
    }
}
?>
예제 #2
0
파일: select.php 프로젝트: hogsim/PMB
        break;
    case 'origine':
        include './selectors/origine.inc.php';
        break;
    case 'synonyms':
        include './selectors/sel_word.inc.php';
        break;
    case 'titre_uniforme':
        if (!(SESSrights & AUTORITES_AUTH) || $caller == "search_form") {
            $bt_ajouter = "no";
        }
        include './selectors/titre_uniforme.inc.php';
        break;
    case 'notes':
        include './selectors/notes.inc.php';
        break;
    case 'ontology':
        include './selectors/ontology.inc.php';
        break;
    case 'authperso':
        include './selectors/authperso.inc.php';
        break;
    case 'abts':
        include './selectors/abts.inc.php';
        break;
    default:
        print "<script type='text/javascript'>\n\t\t\twindow.close();\n\t\t</script>";
        break;
}
pmb_mysql_close($dbh);
예제 #3
0
 function indexDocnum()
 {
     global $msg, $dbh, $charset, $PMBusername;
     if (SESSrights & ADMINISTRATION_AUTH) {
         $result .= "<h3>" . htmlentities($msg["docnum_reindexation"], ENT_QUOTES, $charset) . "</h3>";
         pmb_mysql_query("set wait_timeout=3600");
         $requete = "select explnum_id as id from explnum order by id";
         $res_explnum = pmb_mysql_query($requete, $dbh);
         if (pmb_mysql_num_rows($res_explnum)) {
             while ($explnum = pmb_mysql_fetch_object($res_explnum)) {
                 pmb_mysql_close($dbh);
                 $dbh = connection_mysql();
                 $index = new indexation_docnum($explnum->id);
                 $index->indexer();
             }
         }
         $explnum = pmb_mysql_query("SELECT count(1) FROM explnum", $dbh);
         $count = pmb_mysql_result($explnum, 0, 0);
         $result .= $count . " " . htmlentities($msg['docnum_reindex_expl'], ENT_QUOTES, $charset);
     } else {
         $result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
     }
     return $result;
 }