diff --git a/Makefile.am b/Makefile.am
index 747793087..a45b7434c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,280 +1,280 @@
## $Id$
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
confignicedir = $(sysconfdir)/build
confignice_SCRIPTS=config.nice
SUBDIRS = po config modules
EXTRA_DIST = UNINSTALL CREDITS RELEASE-NOTES configure-tests.py config.nice.in
## submit stuff for demo data link creation
sbmdir = $(localstatedir)/www/submit/access/protected
sbmdat = SBITEXT MBITEXT FTTTEXT SRVTEXT TFUTEXT \
SBIRTEXT MBIRTEXT FTTRTEXT SRVRTEXT TFURTEXT APPRTEXT \
SBIPICT MBIPICT FTTPICT \
SBIRPICT MBIRPICT FTTRPICT APPRPICT
all:
@echo "**************************************************************"
@echo "** CDS Invenio has been successfully built. Proceed now by **"
@echo "** running 'make install'. **"
@echo "**************************************************************"
test:
@if [ -e @prefix@/bin/testsuite ]; then \
@prefix@/bin/testsuite ; \
else \
echo "Hmm, testsuite does not seem to be installed. Please do 'make install' first."; \
fi
regression-test:
@if [ -e @prefix@/bin/regressiontestsuite ]; then \
@prefix@/bin/regressiontestsuite ; \
else \
echo "Hmm, regressiontestsuite does not seem to be installed. Please do 'make install' first."; \
fi
kwalitee-check:
$(PYTHON) $(top_srcdir)/modules/miscutil/lib/kwalitee.py $(top_srcdir)
install-data-local:
for d in / /cache /log /tmp /data /run ; do \
mkdir -p $(localstatedir)$$d && \
chmod ug=rwx $(localstatedir)$$d ; \
done
@echo "************************************************************"
@echo "** CDS Invenio has been successfully installed! **"
@echo "** **"
@echo "** If you are installing CDS Invenio for the first time, **"
@echo "** please continue with the Apache httpd configuration **"
@echo "** step, as described in the INSTALL file. **"
@echo "** Afterwards you may want to run 'make create-demo-site' **"
@echo "** to test your new installation. **"
@echo "** **"
@echo "** If you are reinstalling CDS Invenio because you have **"
@echo "** edited CDS Invenio sources or its WML configuration, **"
@echo "** you may want to restart your Apache server now by **"
@echo "** running 'sudo apachectl restart'. **"
@echo "************************************************************"
create-tables: local-dbexec local-tabfill
./modules/miscutil/bin/dbexec < $(top_srcdir)/modules/miscutil/sql/tabcreate.sql
./modules/miscutil/bin/dbexec < ./modules/miscutil/sql/tabfill.sql
update-v0.3.0-tables update-v0.3.1-tables: local-dbexec
echo "ALTER TABLE idxINDEXNAME CHANGE id_idxINDEX id_idxINDEX mediumint(9) unsigned NOT NULL FIRST;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE rnkMETHODNAME CHANGE id_rnkMETHOD id_rnkMETHOD mediumint(9) unsigned NOT NULL FIRST;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE collectionname CHANGE id_collection id_collection mediumint(9) unsigned NOT NULL FIRST;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE formatname CHANGE id_format id_format mediumint(9) unsigned NOT NULL FIRST;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE fieldname CHANGE id_field id_field mediumint(9) unsigned NOT NULL FIRST;" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'runbibrank','run BibRank','','no');" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'cfgbibrank','configure BibRank','','no');" | ./modules/miscutil/bin/dbexec
update-v0.3.2-tables: local-dbexec
echo "ALTER TABLE sbmCOLLECTION_sbmDOCTYPE CHANGE id_son id_son char(10) NOT NULL default '0';" | ./modules/miscutil/bin/dbexec
update-v0.3.3-tables: local-dbexec
./modules/miscutil/bin/dbexec < $(top_srcdir)/modules/miscutil/sql/tabcreate.sql
echo "ALTER TABLE flxLINKTYPEPARAMS CHANGE pname pname varchar(78) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE rnkMETHOD DROP star_category_ranges;" | ./modules/miscutil/bin/dbexec
echo "DROP TABLE rnkSET;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE schTASK CHANGE arguments arguments LONGTEXT;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE schTASK CHANGE status status varchar(50);" | ./modules/miscutil/bin/dbexec
update-v0.5.0-tables: local-dbexec
./modules/miscutil/bin/dbexec < $(top_srcdir)/modules/miscutil/sql/tabcreate.sql
echo "ALTER TABLE session ADD INDEX uid (uid);" | ./modules/miscutil/bin/dbexec
echo "UPDATE idxINDEXNAME SET ln='cs' WHERE ln='cz';" | ./modules/miscutil/bin/dbexec
echo "UPDATE rnkMETHODNAME SET ln='cs' WHERE ln='cz';" | ./modules/miscutil/bin/dbexec
echo "UPDATE collectionname SET ln='cs' WHERE ln='cz';" | ./modules/miscutil/bin/dbexec
echo "UPDATE collection_portalbox SET ln='cs' WHERE ln='cz';" | ./modules/miscutil/bin/dbexec
echo "UPDATE formatname SET ln='cs' WHERE ln='cz';" | ./modules/miscutil/bin/dbexec
echo "UPDATE fieldname SET ln='cs' WHERE ln='cz';" | ./modules/miscutil/bin/dbexec
echo "UPDATE idxINDEXNAME SET ln='sv' WHERE ln='se';" | ./modules/miscutil/bin/dbexec
echo "UPDATE rnkMETHODNAME SET ln='sv' WHERE ln='se';" | ./modules/miscutil/bin/dbexec
echo "UPDATE collectionname SET ln='sv' WHERE ln='se';" | ./modules/miscutil/bin/dbexec
echo "UPDATE collection_portalbox SET ln='sv' WHERE ln='se';" | ./modules/miscutil/bin/dbexec
echo "UPDATE formatname SET ln='sv' WHERE ln='se';" | ./modules/miscutil/bin/dbexec
echo "UPDATE fieldname SET ln='sv' WHERE ln='se';" | ./modules/miscutil/bin/dbexec
update-v0.7.1-tables: local-dbexec
echo "DROP TABLE oaiHARVEST;" | ./modules/miscutil/bin/dbexec
./modules/miscutil/bin/dbexec < $(top_srcdir)/modules/miscutil/sql/tabcreate.sql
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'cfgbibharvest','configure BibHarvest','','no');" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'runoaiharvest','run BibHarvest oaiharvest','','no');" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'cfgwebcomment','configure WebComment','','no');" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'runoaiarchive','run BibHarvest oaiarchive','','no');" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION (id,name,description,allowedkeywords,optional) VALUES (NULL,'runbibedit','run BibEdit','','no');" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE user ADD nickname varchar(255) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE user ADD last_login datetime NOT NULL default '0000-00-00 00:00:00';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE user ADD INDEX nickname (nickname);" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE sbmFIELD CHANGE subname subname varchar(13) default NULL;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE user_query_basket CHANGE alert_name alert_name varchar(30) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "TRUNCATE TABLE session;" | ./modules/miscutil/bin/dbexec
@echo "**********************************************************"
@echo "** Do not forget to run the basket migration now: **"
@echo "** @PYTHON@ modules/webbasket/lib/webbasket_migration_kit.py "
@echo "** Please see the RELEASE-NOTES for details. **"
@echo "**********************************************************"
@echo "INSERT INTO oaiARCHIVE (id, setName, setSpec, setDescription, setDefinition, setRecList) SELECT id, setName, setSpec, CONCAT_WS('', setDescription), setDefinition, setRecList FROM oaiSET;"
update-v0.90.0-tables: local-dbexec
./modules/miscutil/bin/dbexec < $(top_srcdir)/modules/miscutil/sql/tabcreate.sql
echo "ALTER TABLE format ADD COLUMN (description varchar(255) default '');" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE format ADD COLUMN (content_type varchar(255) default '');" | ./modules/miscutil/bin/dbexec
update-v0.90.1-tables: local-dbexec
./modules/miscutil/bin/dbexec < $(top_srcdir)/modules/miscutil/sql/tabcreate.sql
echo "ALTER TABLE schTASK ADD INDEX status (status);" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE schTASK ADD INDEX runtime (runtime);" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE sbmCATEGORIES ADD COLUMN score TINYINT UNSIGNED NOT NULL DEFAULT 0;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE sbmCATEGORIES ADD PRIMARY KEY (doctype, sname);" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE sbmCATEGORIES ADD KEY doctype (doctype);" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiHARVEST ADD COLUMN setspecs TEXT NOT NULL DEFAULT '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE setDescription setDescription text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE p1 p1 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE f1 f1 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE m1 m1 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE p2 p2 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE f2 f2 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE m2 m2 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE p3 p3 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE f3 f3 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiARCHIVE CHANGE m3 m3 text NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "UPDATE bibdoc SET status=0 WHERE status='';" | ./modules/miscutil/bin/dbexec
echo "UPDATE bibdoc SET status=1 WHERE status='deleted';" | ./modules/miscutil/bin/dbexec
update-v0.92.0-tables: local-dbexec
echo "UPDATE bibdoc SET status=0 WHERE status='';" | ./modules/miscutil/bin/dbexec
echo "UPDATE bibdoc SET status=1 WHERE status='deleted';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE schTASK CHANGE arguments arguments mediumblob;" | ./modules/miscutil/bin/dbexec
echo "UPDATE user SET note=1 WHERE nickname='admin' AND note IS NULL;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE usergroup CHANGE name name varchar(255) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE usergroup ADD login_method varchar(255) NOT NULL default 'INTERNAL';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE usergroup ADD UNIQUE KEY login_method_name (login_method(70), name);" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE user CHANGE settings settings blob default NULL;" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO sbmALLFUNCDESCR VALUES ('Get_Recid', 'This function gets the recid for a document with a given report-number (as stored in the global variable rn).');" | ./modules/miscutil/bin/dbexec
update-v0.92.1-tables: local-dbexec
echo "UPDATE bibdoc SET status=0 WHERE status='';" | ./modules/miscutil/bin/dbexec
echo "UPDATE bibdoc SET status=1 WHERE status='deleted';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiHARVEST CHANGE postprocess postprocess varchar(20) NOT NULL default 'h';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE oaiHARVEST ADD COLUMN bibfilterprogram varchar(255) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE idxINDEXNAME CHANGE ln ln char(5) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE rnkMETHODNAME CHANGE ln ln char(5) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE collectionname CHANGE ln ln char(5) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE collection_portalbox CHANGE ln ln char(5) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE formatname CHANGE ln ln char(5) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE fieldname CHANGE ln ln char(5) NOT NULL default '';" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE accROLE ADD COLUMN firerole_def_ser tinyblob NULL;" | ./modules/miscutil/bin/dbexec
echo "ALTER TABLE accROLE ADD COLUMN firerole_def_src tinytext NULL;" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION VALUES (22,'accrestrcoll','view restricted collection','collection','no');" | ./modules/miscutil/bin/dbexec
echo "INSERT INTO accACTION VALUES (23,'runsessiongc','run SessionGC','','no');" | ./modules/miscutil/bin/dbexec
- echo "ALTER TABLE user CHANGE password password TINYBLOB NULL default NULL;" | ./modules/miscutil/bin/dbexec
+ echo "ALTER TABLE user CHANGE password password tinyblob NULL default NULL;" | ./modules/miscutil/bin/dbexec
echo "UPDATE user SET password=AES_ENCRYPT(email,password);" | ./modules/miscutil/bin/dbexec
- echo "ALTER TABLE user ADD COLUMN reset_date DATE NULL;" | ./modules/miscutil/bin/dbexec
- echo "ALTER TABLE user ADD COLUMN reset_key BINARY(32) NULL;" | ./modules/miscutil/bin/dbexec
+ echo "ALTER TABLE user ADD COLUMN reset_date date NOT NULL default '0000-00-00';" | ./modules/miscutil/bin/dbexec
+ echo "ALTER TABLE user ADD COLUMN reset_key binary(32) NULL default NULL;" | ./modules/miscutil/bin/dbexec
drop-tables: local-dbexec
./modules/miscutil/bin/dbexec < $(srcdir)/modules/miscutil/sql/tabdrop.sql
local-dbexec:
(cd ./modules/miscutil/bin; make)
local-tabfill: $(srcdir)/modules/miscutil/sql/tabfill.sql.wml
(cd ./modules/miscutil/sql; make)
create-demo-site:
# for f in $(sbmdat); do \
# if [ ! -e $(sbmdir)/$$f.shtml ]; then \
# ln -s $(sbmdir)/go.shtml $(sbmdir)/$$f.shtml ; \
# else \
# echo "link $(sbmdir)/$$f.shtml already exists"; \
# fi \
# done
./modules/miscutil/bin/dbexec < ./modules/miscutil/demo/democfgdata.sql
./modules/webaccess/bin/webaccessadmin -u admin -c
echo "TRUNCATE schTASK;" | ${prefix}/bin/dbexec
${prefix}/bin/webcoll -uadmin
${prefix}/bin/webcoll 1
@echo "***********************************************************************"
@echo "** The demo site has been successfully created. **"
@echo "** **"
@echo "** Please point your browser to @WEBURL@ "
@echo "** It should ressemble our 'Atlantis Institute of Fictive Science' **"
@echo "** demo site that is available at , **"
@echo "** with the exception that no demo records have been loaded yet. **"
@echo "** **"
@echo "** To load demo records, you can run 'make load-demo-records'. **"
@echo "** To drop the demo site, you can run 'make drop-demo-site'. **"
@echo "***********************************************************************"
load-demo-records:
echo "TRUNCATE schTASK;" | ${prefix}/bin/dbexec
${prefix}/bin/bibupload -i $(srcdir)/modules/miscutil/demo/demobibdata.xml
${prefix}/bin/bibupload 1
${prefix}/bin/bibindex -uadmin
${prefix}/bin/bibindex 2
${prefix}/bin/bibreformat -uadmin -oHB
${prefix}/bin/bibreformat 3
${prefix}/bin/bibupload 4
${prefix}/bin/webcoll -uadmin
${prefix}/bin/webcoll 5
${prefix}/bin/bibrank -uadmin
${prefix}/bin/bibrank 6
@echo "***********************************************************************"
@echo "** The demo records have been successfully loaded. **"
@echo "** **"
@echo "** Please point your browser to @WEBURL@ "
@echo "** It should ressemble our 'Atlantis Institute of Fictive Science' **"
@echo "** demo site that is available at . **"
@echo "** **"
@echo "** To remove demo records, you can run 'make remove-demo-records'. **"
@echo "** To drop also the demo site collection etc configurations, **"
@echo "** you can run 'make drop-demo-site'. **"
@echo "***********************************************************************"
drop-demo-site:
./modules/miscutil/bin/dbexec < $(srcdir)/modules/miscutil/sql/tabdrop.sql
./modules/miscutil/bin/dbexec < $(srcdir)/modules/miscutil/sql/tabcreate.sql
./modules/miscutil/bin/dbexec < ./modules/miscutil/sql/tabfill.sql
echo "TRUNCATE schTASK;" | ${prefix}/bin/dbexec
${prefix}/bin/webcoll -uadmin
${prefix}/bin/webcoll 1
# for f in $(sbmdat); do rm -f $(sbmdir)/$$f.shtml ; done
@echo "***************************************************************"
@echo "** The demo site and records have been successfully dropped. **"
@echo "***************************************************************"
remove-demo-records:
./modules/miscutil/bin/dbexec < $(srcdir)/modules/miscutil/sql/tabbibclean.sql
echo "TRUNCATE schTASK;" | ${prefix}/bin/dbexec
${prefix}/bin/webcoll -uadmin
${prefix}/bin/webcoll 1
@echo "**********************************************************"
@echo "** The demo records have been successfully removed. **"
@echo "** The demo collection and submit configurations **"
@echo "** have been preserved. **"
@echo "** **"
@echo "** Note that you can run 'make drop-demo-site' to drop **"
@echo "** the demo site fully. **"
@echo "**********************************************************"
CLEANFILES = *~
diff --git a/modules/miscutil/sql/tabcreate.sql b/modules/miscutil/sql/tabcreate.sql
index 95f70ae47..331d1c05c 100644
--- a/modules/miscutil/sql/tabcreate.sql
+++ b/modules/miscutil/sql/tabcreate.sql
@@ -1,3055 +1,3057 @@
-- $Id$
-- This file is part of CDS Invenio.
-- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
--
-- CDS Invenio is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation; either version 2 of the
-- License, or (at your option) any later version.
--
-- CDS Invenio is distributed in the hope that it will be useful, but
-- WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-- tables for bibliographic records:
CREATE TABLE IF NOT EXISTS bibrec (
id mediumint(8) unsigned NOT NULL auto_increment,
creation_date datetime NOT NULL default '0000-00-00',
modification_date datetime NOT NULL default '0000-00-00',
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib00x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib01x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib02x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib03x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib04x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib05x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib06x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib07x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib08x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib09x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib10x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib11x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib12x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib13x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib14x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib15x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib16x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib17x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib18x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib19x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib20x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib21x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib22x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib23x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib24x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib25x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib26x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib27x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib28x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib29x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib30x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib31x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib32x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib33x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib34x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib35x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib36x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib37x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib38x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib39x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib40x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib41x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib42x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib43x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib44x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib45x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib46x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib47x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib48x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib49x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib50x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib51x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib52x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib53x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib54x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib55x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib56x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib57x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib58x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib59x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib60x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib61x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib62x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib63x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib64x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib65x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib66x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib67x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib68x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib69x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib70x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib71x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib72x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib73x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib74x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib75x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib76x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib77x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib78x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib79x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib80x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib81x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib82x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib83x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib84x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib85x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib86x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib87x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib88x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib89x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib90x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib91x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib92x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib93x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib94x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib95x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib96x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib97x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib98x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bib99x (
id mediumint(8) unsigned NOT NULL auto_increment,
tag varchar(6) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (id),
KEY kt (tag),
KEY kv (value(35))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib00x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib01x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib02x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib03x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib04x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib05x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib06x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib07x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib08x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib09x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib10x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib11x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib12x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib13x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib14x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib15x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib16x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib17x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib18x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib19x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib20x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib21x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib22x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib23x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib24x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib25x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib26x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib27x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib28x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib29x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib30x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib31x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib32x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib33x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib34x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib35x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib36x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib37x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib38x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib39x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib40x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib41x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib42x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib43x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib44x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib45x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib46x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib47x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib48x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib49x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib50x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib51x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib52x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib53x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib54x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib55x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib56x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib57x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib58x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib59x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib60x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib61x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib62x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib63x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib64x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib65x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib66x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib67x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib68x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib69x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib70x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib71x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib72x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib73x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib74x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib75x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib76x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib77x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib78x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib79x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib80x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib81x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib82x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib83x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib84x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib85x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib86x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib87x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib88x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib89x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib90x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib91x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib92x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib93x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib94x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib95x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib96x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib97x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib98x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bib99x (
id_bibrec mediumint(8) unsigned NOT NULL default '0',
id_bibxxx mediumint(8) unsigned NOT NULL default '0',
field_number smallint(5) unsigned default NULL,
KEY id_bibxxx (id_bibxxx),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
-- tables for bibliographic records formatted:
CREATE TABLE IF NOT EXISTS bibfmt (
id mediumint(8) unsigned NOT NULL auto_increment,
id_bibrec int(8) unsigned NOT NULL default '0',
format varchar(10) NOT NULL default '',
last_updated datetime NOT NULL default '0000-00-00',
value longblob,
PRIMARY KEY (id),
KEY id_bibrec (id_bibrec),
KEY format (format)
) TYPE=MyISAM;
-- tables for index files:
CREATE TABLE IF NOT EXISTS idxINDEX (
id mediumint(9) unsigned NOT NULL,
name varchar(50) NOT NULL default '',
description varchar(255) NOT NULL default '',
last_updated datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxINDEXNAME (
id_idxINDEX mediumint(9) unsigned NOT NULL,
ln char(5) NOT NULL default '',
type char(3) NOT NULL default 'sn',
value varchar(255) NOT NULL,
PRIMARY KEY (id_idxINDEX,ln,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxINDEX_field (
id_idxINDEX mediumint(9) unsigned NOT NULL,
id_field mediumint(9) unsigned NOT NULL,
regexp_punctuation varchar(255) NOT NULL default "[\.\,\:\;\?\!\"]",
regexp_alphanumeric_separators varchar(255) NOT NULL default "[\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~]",
PRIMARY KEY (id_idxINDEX,id_field)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD01F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD01R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD02F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD02R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD03F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD03R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD04F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD04R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD05F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD05R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD06F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD06R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD07F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD07R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD08F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD08R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD09F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD09R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD10F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxWORD10R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE01F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE01R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE02F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE02R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE03F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE03R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE04F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE04R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE05F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE05R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE06F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE06R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE07F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE07R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE08F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE08R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE09F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE09R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE10F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS idxPHRASE10R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
-- tables for ranking:
CREATE TABLE IF NOT EXISTS rnkMETHOD (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(20) NOT NULL default '',
last_updated datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkMETHODNAME (
id_rnkMETHOD mediumint(9) unsigned NOT NULL,
ln char(5) NOT NULL default '',
type char(3) NOT NULL default 'sn',
value varchar(255) NOT NULL,
PRIMARY KEY (id_rnkMETHOD,ln,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkMETHODDATA (
id_rnkMETHOD mediumint(9) unsigned NOT NULL,
relevance_data longblob,
PRIMARY KEY (id_rnkMETHOD)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS collection_rnkMETHOD (
id_collection mediumint(9) unsigned NOT NULL,
id_rnkMETHOD mediumint(9) unsigned NOT NULL,
score tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_collection,id_rnkMETHOD)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkWORD01F (
id mediumint(9) unsigned NOT NULL auto_increment,
term varchar(50) default NULL,
hitlist longblob,
PRIMARY KEY (id),
UNIQUE KEY term (term)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkWORD01R (
id_bibrec mediumint(9) unsigned NOT NULL,
termlist longblob,
type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT',
PRIMARY KEY (id_bibrec,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkPAGEVIEWS (
id_bibrec mediumint(8) unsigned default NULL,
id_user int(15) unsigned default '0',
client_host int(10) unsigned default NULL,
view_time datetime default '0000-00-00 00:00:00',
KEY view_time (view_time),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkDOWNLOADS (
id_bibrec mediumint(8) unsigned default NULL,
download_time datetime default '0000-00-00 00:00:00',
client_host int(10) unsigned default NULL,
id_user int(15) unsigned default NULL,
id_bibdoc mediumint(8) unsigned default NULL,
file_version smallint(2) unsigned default NULL,
file_format text,
KEY download_time (download_time),
KEY id_bibrec (id_bibrec)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS rnkCITATIONDATA (
citation_data longblob,
citation_data_reversed longblob
) TYPE=MyISAM;
-- tables for collections and collection tree:
CREATE TABLE IF NOT EXISTS collection (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL,
dbquery text,
nbrecs int(10) unsigned default '0',
reclist longblob,
restricted varchar(255) default NULL,
PRIMARY KEY (id),
UNIQUE KEY name (name),
KEY dbquery (dbquery(50))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS collectionname (
id_collection mediumint(9) unsigned NOT NULL,
ln char(5) NOT NULL default '',
type char(3) NOT NULL default 'sn',
value varchar(255) NOT NULL,
PRIMARY KEY (id_collection,ln,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS collection_collection (
id_dad mediumint(9) unsigned NOT NULL,
id_son mediumint(9) unsigned NOT NULL,
type char(1) NOT NULL default 'r',
score tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_dad,id_son)
) TYPE=MyISAM;
-- tables for OAI sets:
CREATE TABLE IF NOT EXISTS oaiARCHIVE (
id mediumint(9) unsigned NOT NULL auto_increment,
setName varchar(255) NOT NULL default '',
setSpec varchar(255) NOT NULL default '',
setCollection varchar(255) NOT NULL default '',
setDescription text NOT NULL default '',
setDefinition text NOT NULL default '',
setRecList longblob,
p1 text NOT NULL default '',
f1 text NOT NULL default '',
m1 text NOT NULL default '',
p2 text NOT NULL default '',
f2 text NOT NULL default '',
m2 text NOT NULL default '',
p3 text NOT NULL default '',
f3 text NOT NULL default '',
m3 text NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS oaiHARVEST (
id mediumint(9) unsigned NOT NULL auto_increment,
baseurl varchar(255) NOT NULL default '',
metadataprefix varchar(255) NOT NULL default 'oai_dc',
arguments text,
comment text,
bibconvertcfgfile varchar(255),
name varchar(255) NOT NULL,
lastrun datetime,
frequency mediumint(12) NOT NULL default '0',
postprocess varchar(20) NOT NULL default 'h',
bibfilterprogram varchar(255) NOT NULL default '',
setspecs text NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
-- tables for portal elements:
CREATE TABLE IF NOT EXISTS collection_portalbox (
id_collection mediumint(9) unsigned NOT NULL,
id_portalbox mediumint(9) unsigned NOT NULL,
ln char(5) NOT NULL default '',
position char(3) NOT NULL default 'top',
score tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_collection,id_portalbox,ln)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS portalbox (
id mediumint(9) unsigned NOT NULL auto_increment,
title text NOT NULL,
body text NOT NULL,
UNIQUE KEY id (id)
) TYPE=MyISAM;
-- tables for search examples:
CREATE TABLE IF NOT EXISTS collection_example (
id_collection mediumint(9) unsigned NOT NULL,
id_example mediumint(9) unsigned NOT NULL,
score tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_collection,id_example)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS example (
id mediumint(9) unsigned NOT NULL auto_increment,
type text NOT NULL default '',
body text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
-- tables for collection formats:
CREATE TABLE IF NOT EXISTS collection_format (
id_collection mediumint(9) unsigned NOT NULL,
id_format mediumint(9) unsigned NOT NULL,
score tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_collection,id_format)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS format (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL,
code varchar(6) NOT NULL,
description varchar(255) default '',
content_type varchar(255) default '',
PRIMARY KEY (id),
UNIQUE KEY code (code)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS formatname (
id_format mediumint(9) unsigned NOT NULL,
ln char(5) NOT NULL default '',
type char(3) NOT NULL default 'sn',
value varchar(255) NOT NULL,
PRIMARY KEY (id_format,ln,type)
) TYPE=MyISAM;
-- tables for search options and MARC tags:
CREATE TABLE IF NOT EXISTS collection_field_fieldvalue (
id_collection mediumint(9) unsigned NOT NULL,
id_field mediumint(9) unsigned NOT NULL,
id_fieldvalue mediumint(9) unsigned,
type char(3) NOT NULL default 'src',
score tinyint(4) unsigned NOT NULL default '0',
score_fieldvalue tinyint(4) unsigned NOT NULL default '0',
KEY id_collection (id_collection),
KEY id_field (id_field),
KEY id_fieldvalue (id_fieldvalue)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS field (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL,
code varchar(255) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY code (code)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS fieldname (
id_field mediumint(9) unsigned NOT NULL,
ln char(5) NOT NULL default '',
type char(3) NOT NULL default 'sn',
value varchar(255) NOT NULL,
PRIMARY KEY (id_field,ln,type)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS fieldvalue (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL,
value text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS field_tag (
id_field mediumint(9) unsigned NOT NULL,
id_tag mediumint(9) unsigned NOT NULL,
score tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_field,id_tag)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS tag (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL,
value char(6) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
-- tables for file management
CREATE TABLE IF NOT EXISTS bibdoc (
id mediumint(9) unsigned NOT NULL auto_increment,
status varchar(50) NOT NULL default '',
docname varchar(250) NOT NULL default 'file',
creation_date datetime NOT NULL default '0000-00-00',
modification_date datetime NOT NULL default '0000-00-00',
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibrec_bibdoc (
id_bibrec mediumint(9) unsigned NOT NULL default '0',
id_bibdoc mediumint(9) unsigned NOT NULL default '0',
type varchar(255),
KEY (id_bibrec),
KEY (id_bibdoc)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bibdoc_bibdoc (
id_bibdoc1 mediumint(9) unsigned NOT NULL,
id_bibdoc2 mediumint(9) unsigned NOT NULL,
type varchar(255),
KEY (id_bibdoc1),
KEY (id_bibdoc2)
) TYPE=MyISAM;
-- tables for publication requests:
CREATE TABLE IF NOT EXISTS publreq (
id int(11) NOT NULL auto_increment,
host varchar(255) NOT NULL default '',
date varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
email varchar(255) NOT NULL default '',
address text NOT NULL,
publication text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
-- table for sessions and users:
CREATE TABLE IF NOT EXISTS session (
session_key varchar(32) NOT NULL default '',
session_expiry int(11) unsigned NOT NULL default '0',
session_object blob,
uid int(15) unsigned NOT NULL,
UNIQUE KEY session_key (session_key),
KEY uid (uid)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS user (
id int(15) unsigned NOT NULL auto_increment,
email varchar(255) NOT NULL default '',
password tinyblob default NULL,
note varchar(255) default NULL,
settings blob default NULL,
nickname varchar(255) NOT NULL default '',
last_login datetime NOT NULL default '0000-00-00 00:00:00',
+ reset_date date NOT NULL default '0000-00-00',
+ reset_key BINARY(32) NULL default NULL,
UNIQUE KEY id (id),
KEY email (email),
KEY nickname (nickname)
) TYPE=MyISAM;
-- tables for usergroups
CREATE TABLE IF NOT EXISTS usergroup (
id int(15) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
description text default '',
join_policy char(2) NOT NULL default '',
login_method varchar(255) NOT NULL default 'INTERNAL',
PRIMARY KEY (id),
UNIQUE KEY login_method_name (login_method(70), name),
KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS user_usergroup (
id_user int(15) unsigned NOT NULL default '0',
id_usergroup int(15) unsigned NOT NULL default '0',
user_status char(1) NOT NULL default '',
user_status_date datetime NOT NULL default '0000-00-00 00:00:00',
KEY id_user (id_user),
KEY id_usergroup (id_usergroup)
) TYPE=MyISAM;
-- tables for access control engine
CREATE TABLE IF NOT EXISTS accROLE (
id int(15) unsigned NOT NULL auto_increment,
name varchar(32),
description varchar(255),
firerole_def_ser tinyblob NULL,
firerole_def_src tinytext NULL,
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS user_accROLE (
id_user int(15) unsigned NOT NULL,
id_accROLE int(15) unsigned NOT NULL,
PRIMARY KEY (id_user, id_accROLE)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS accACTION (
id int(15) unsigned NOT NULL auto_increment,
name varchar(32),
description varchar(255),
allowedkeywords varchar(255),
optional ENUM ('yes', 'no') NOT NULL default 'no',
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS accARGUMENT (
id int(15) unsigned NOT NULL auto_increment,
keyword varchar (32),
value varchar(64),
PRIMARY KEY (id),
KEY KEYVAL (keyword, value)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS accROLE_accACTION_accARGUMENT (
id_accROLE int(15),
id_accACTION int(15),
id_accARGUMENT int(15),
argumentlistid mediumint(8),
KEY id_accROLE (id_accROLE),
KEY id_accACTION (id_accACTION),
KEY id_accARGUMENT (id_accARGUMENT)
) TYPE=MyISAM;
-- tables for personal/collaborative features (baskets, alerts, searches, messages, usergroups):
CREATE TABLE IF NOT EXISTS user_query (
id_user int(15) unsigned NOT NULL default '0',
id_query int(15) unsigned NOT NULL default '0',
hostname varchar(50) default 'unknown host',
date datetime default NULL,
KEY id_user (id_user,id_query)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS query (
id int(15) unsigned NOT NULL auto_increment,
type char(1) NOT NULL default 'r',
urlargs text NOT NULL,
PRIMARY KEY (id),
KEY urlargs (urlargs(100))
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS user_query_basket (
id_user int(15) unsigned NOT NULL default '0',
id_query int(15) unsigned NOT NULL default '0',
id_basket int(15) unsigned NOT NULL default '0',
frequency varchar(5) NOT NULL default '',
date_creation date default NULL,
date_lastrun date default '0000-00-00',
alert_name varchar(30) NOT NULL default '',
notification char(1) NOT NULL default 'y',
PRIMARY KEY (id_user,id_query,frequency,id_basket),
KEY alert_name (alert_name)
) TYPE=MyISAM;
-- baskets
CREATE TABLE IF NOT EXISTS bskBASKET (
id int(15) unsigned NOT NULL auto_increment,
id_owner int(15) unsigned NOT NULL default '0',
name varchar(50) NOT NULL default '',
date_modification datetime NOT NULL default '0000-00-00 00:00:00',
nb_views int(15) NOT NULL default '0',
PRIMARY KEY (id),
KEY id_owner (id_owner),
KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bskREC (
id_bibrec_or_bskEXTREC int(16) NOT NULL default '0',
id_bskBASKET int(15) unsigned NOT NULL default '0',
id_user_who_added_item int(15) NOT NULL default '0',
score int(15) NOT NULL default '0',
date_added datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (id_bibrec_or_bskEXTREC,id_bskBASKET),
KEY id_bibrec_or_bskEXTREC (id_bibrec_or_bskEXTREC),
KEY id_bskBASKET (id_bskBASKET),
KEY score (score),
KEY date_added (date_added)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bskEXTREC (
id int(15) unsigned NOT NULL default '0',
creation_date datetime NOT NULL default '0000-00-00 00:00:00',
modification_date datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bskEXTFMT (
id int(15) unsigned NOT NULL auto_increment,
id_bskEXTREC int(15) unsigned NOT NULL default '0',
format varchar(10) NOT NULL default '',
last_updated datetime NOT NULL default '0000-00-00 00:00:00',
value longblob,
PRIMARY KEY (id),
KEY id_bskEXTREC (id_bskEXTREC),
KEY format (format)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS user_bskBASKET (
id_user int(15) unsigned NOT NULL default '0',
id_bskBASKET int(15) unsigned NOT NULL default '0',
topic varchar(50) NOT NULL default '',
PRIMARY KEY (id_user,id_bskBASKET),
KEY id_user (id_user),
KEY id_bskBASKET (id_bskBASKET)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS usergroup_bskBASKET (
id_usergroup int(15) unsigned NOT NULL default '0',
id_bskBASKET int(15) unsigned NOT NULL default '0',
topic varchar(50) NOT NULL default '',
date_shared datetime NOT NULL default '0000-00-00 00:00:00',
share_level char(2) NOT NULL default '',
PRIMARY KEY (id_usergroup,id_bskBASKET),
KEY id_usergroup (id_usergroup),
KEY id_bskBASKET (id_bskBASKET)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS bskRECORDCOMMENT (
id int(15) unsigned NOT NULL auto_increment,
id_bibrec_or_bskEXTREC int(16) NOT NULL default '0',
id_bskBASKET int(15) unsigned NOT NULL default '0',
id_user int(15) unsigned NOT NULL default '0',
title varchar(255) NOT NULL default '',
body text NOT NULL,
date_creation datetime NOT NULL default '0000-00-00 00:00:00',
priority int(15) NOT NULL default '0',
PRIMARY KEY (id),
KEY id_bskBASKET (id_bskBASKET),
KEY id_bibrec_or_bskEXTREC (id_bibrec_or_bskEXTREC),
KEY date_creation (date_creation)
) TYPE=MyISAM;
-- tables for messaging system
CREATE TABLE IF NOT EXISTS msgMESSAGE (
id int(15) unsigned NOT NULL auto_increment,
id_user_from int(15) unsigned NOT NULL default '0',
sent_to_user_nicks text NOT NULL default '',
sent_to_group_names text NOT NULL default '',
subject text NOT NULL default '',
body text default NULL,
sent_date datetime NOT NULL default '0000-00-00 00:00:00',
received_date datetime NULL default '0000-00-00 00:00:00',
PRIMARY KEY id (id),
KEY id_user_from (id_user_from)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS user_msgMESSAGE (
id_user_to int(15) unsigned NOT NULL default '0',
id_msgMESSAGE int(15) unsigned NOT NULL default '0',
status char(1) NOT NULL default 'N',
PRIMARY KEY id (id_user_to, id_msgMESSAGE),
KEY id_user_to (id_user_to),
KEY id_msgMESSAGE (id_msgMESSAGE)
) TYPE=MyISAM;
--tables for WebComment
CREATE TABLE IF NOT EXISTS cmtRECORDCOMMENT (
id int(15) unsigned NOT NULL auto_increment,
id_bibrec int(15) unsigned NOT NULL default '0',
id_user int(15) unsigned NOT NULL default '0',
title varchar(255) NOT NULL default '',
body text NOT NULL default '',
date_creation datetime NOT NULL default '0000-00-00 00:00:00',
star_score tinyint(5) unsigned NOT NULL default '0',
nb_votes_yes int(10) NOT NULL default '0',
nb_votes_total int(10) unsigned NOT NULL default '0',
nb_abuse_reports int(10) NOT NULL default '0',
PRIMARY KEY (id),
KEY id_bibrec (id_bibrec),
KEY id_user (id_user)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS cmtACTIONHISTORY (
id_cmtRECORDCOMMENT int(15) unsigned NULL,
id_bibrec int(15) unsigned NULL,
id_user int(15) unsigned NULL default NULL,
client_host int(10) unsigned NOT NULL,
action_time datetime NOT NULL default '0000-00-00 00:00:00',
action_code char(1) NOT NULL,
KEY id_cmtRECORDCOMMENT (id_cmtRECORDCOMMENT),
KEY client_host (client_host),
KEY id_user (id_user),
KEY action_code (action_code)
) TYPE=MyISAM;
-- tables for BibFormat in Python
CREATE TABLE IF NOT EXISTS fmtKNOWLEDGEBASES (
id mediumint(8) unsigned NOT NULL auto_increment,
name varchar(255) default '',
description text default '',
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS fmtKNOWLEDGEBASEMAPPINGS (
id mediumint(8) unsigned NOT NULL auto_increment,
m_key varchar(255) NOT NULL default '',
m_value text NOT NULL default '',
id_fmtKNOWLEDGEBASES mediumint(8) NOT NULL default '0',
PRIMARY KEY (id),
KEY id_fmtKNOWLEDGEBASES (id_fmtKNOWLEDGEBASES)
) TYPE=MyISAM;
-- tables for BibFormat, formely known as FlexElink:
CREATE TABLE IF NOT EXISTS flxFORMATS (
name varchar(255) NOT NULL default '',
value text,
doc text,
serialized longtext,
PRIMARY KEY (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxKBS (
kb_name varchar(255) NOT NULL default '',
kb_table varchar(255) NOT NULL default '',
doc text,
PRIMARY KEY (kb_name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxKBDBCOLLID2COLL (
vkey varchar(255) NOT NULL default '',
value text,
PRIMARY KEY (vkey)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxKBDBCOLLID2BIBTEX (
vkey varchar(255) NOT NULL default '',
value text,
PRIMARY KEY (vkey)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxKBEJOURNALS (
vkey varchar(255) NOT NULL default '',
value text,
PRIMARY KEY (vkey)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxLINKTYPES (
linktype varchar(255) NOT NULL default '',
check_exists enum('Y','N') NOT NULL default 'N',
solvingtype enum('INT','EXT') NOT NULL default 'EXT',
base_file varchar(255) NOT NULL default '',
base_url varchar(255) NOT NULL default '',
PRIMARY KEY (linktype)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxLINKTYPECONDITIONS (
linktype varchar(255) NOT NULL default '',
eval_order int(11) NOT NULL default '0',
el_condition text NOT NULL,
el_action text NOT NULL,
solvingtype enum('INT','EXT') NOT NULL default 'EXT',
base_file varchar(255) NOT NULL default '',
base_url varchar(255) NOT NULL default '',
PRIMARY KEY (linktype,eval_order)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxLINKTYPECONDITIONSACTIONS (
linktype varchar(255) NOT NULL default '',
eval_order int(11) NOT NULL default '0',
apply_order int(11) NOT NULL default '0',
el_code text,
PRIMARY KEY (linktype,eval_order,apply_order)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxLINKTYPECONDITIONSFILEFORMATS (
linktype varchar(255) NOT NULL default '',
eval_order int(11) NOT NULL default '0',
fname varchar(30) NOT NULL default '',
PRIMARY KEY (linktype,eval_order,fname)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxFILEFORMATS (
name varchar(30) NOT NULL default '',
text varchar(255) default '',
extensions text,
PRIMARY KEY (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxLINKTYPEPARAMS (
linktype varchar(255) NOT NULL default '',
pname varchar(78) NOT NULL default '',
ord tinyint(4) NOT NULL default '0',
PRIMARY KEY (linktype,pname),
UNIQUE KEY IDX_LINKTYPE_PARAMS_ORD (linktype,ord)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxXMLMARCEXTRULES (
type varchar(8) NOT NULL default '',
varname varchar(50) NOT NULL default '',
att_id varchar(150) default NULL,
att_i1 varchar(150) default NULL,
att_i2 varchar(150) default NULL,
mvalues enum('S','N') NOT NULL default 'S',
ftype enum("DATAFIELD", "CONTROLFIELD") not null,
PRIMARY KEY (type,varname)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxXMLMARCEXTRULESUBFIELDS (
type varchar(8) NOT NULL default '',
varname varchar(50) NOT NULL default '',
sfname varchar(50) NOT NULL default '',
att_label varchar(150) default NULL,
PRIMARY KEY (type,varname,sfname)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxBEHAVIORCONDITIONSACTIONS (
otype varchar(40) NOT NULL default '',
eval_order int(11) NOT NULL default '0',
apply_order int(11) NOT NULL default '0',
locator text,
el_code text,
PRIMARY KEY (otype,eval_order,apply_order)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxBEHAVIORCONDITIONS (
otype varchar(40) NOT NULL default '',
eval_order int(11) NOT NULL default '0',
el_condition text NOT NULL,
PRIMARY KEY (otype,eval_order)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxBEHAVIORS (
name varchar(40) NOT NULL default '',
type enum('NORMAL','IENRICH') NOT NULL default 'NORMAL',
doc text,
PRIMARY KEY (name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxUDFS (
fname varchar(100) NOT NULL default '',
code text NOT NULL,
rtype enum('STRING','BOOL') NOT NULL default 'STRING',
doc text,
PRIMARY KEY (fname)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxUDFPARAMS (
fname varchar(100) NOT NULL default '',
pname varchar(100) NOT NULL default '',
ord tinyint(4) NOT NULL default '0',
PRIMARY KEY (fname,pname),
UNIQUE KEY IDX_UDFS_PARAMS_ORD (fname,ord)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxUSERS (
id int(11) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS flxREFORMAT (
id int(10) unsigned NOT NULL auto_increment,
user varchar(50) NOT NULL,
date DATETIME NOT NULL,
reg_select text,
otypes varchar(40) not null,
state varchar(20),
PRIMARY KEY (id)
) TYPE=MyISAM;
-- tables for webSubmit:
CREATE TABLE IF NOT EXISTS sbmACTION (
lactname text,
sactname char(3) NOT NULL default '',
dir text,
cd date default NULL,
md date default NULL,
actionbutton text,
statustext text,
PRIMARY KEY (sactname)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmALLFUNCDESCR (
function varchar(40) NOT NULL default '',
description tinytext,
PRIMARY KEY (function)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmAPPROVAL (
doctype varchar(10) NOT NULL default '',
categ varchar(50) NOT NULL default '',
rn varchar(50) NOT NULL default '',
status varchar(10) NOT NULL default '',
dFirstReq datetime NOT NULL default '0000-00-00 00:00:00',
dLastReq datetime NOT NULL default '0000-00-00 00:00:00',
dAction datetime NOT NULL default '0000-00-00 00:00:00',
access varchar(20) NOT NULL default '0',
PRIMARY KEY (rn)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmCOLLECTION (
id int(11) NOT NULL auto_increment,
name varchar(100) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS sbmCOLLECTION_sbmCOLLECTION (
id_father int(11) NOT NULL default '0',
id_son int(11) NOT NULL default '0',
catalogue_order int(11) NOT NULL default '0'
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS sbmCOLLECTION_sbmDOCTYPE (
id_father int(11) NOT NULL default '0',
id_son char(10) NOT NULL default '0',
catalogue_order int(11) NOT NULL default '0'
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS sbmCATEGORIES (
doctype varchar(10) NOT NULL default '',
sname varchar(75) NOT NULL default '',
lname varchar(75) NOT NULL default '',
score tinyint unsigned NOT NULL default 0,
PRIMARY KEY (doctype, sname),
KEY doctype (doctype),
KEY sname (sname)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmCHECKS (
chname varchar(15) NOT NULL default '',
chdesc text,
cd date default NULL,
md date default NULL,
chefi1 text,
chefi2 text,
PRIMARY KEY (chname)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmDOCTYPE (
ldocname text,
sdocname varchar(10) default NULL,
cd date default NULL,
md date default NULL,
description text
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmFIELD (
subname varchar(13) default NULL,
pagenb int(11) default NULL,
fieldnb int(11) default NULL,
fidesc varchar(15) default NULL,
fitext text,
level char(1) default NULL,
sdesc text,
checkn text,
cd date default NULL,
md date default NULL,
fiefi1 text,
fiefi2 text
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmFIELDDESC (
name varchar(15) NOT NULL default '',
alephcode varchar(50) default NULL,
marccode varchar(50) NOT NULL default '',
type char(1) default NULL,
size int(11) default NULL,
rows int(11) default NULL,
cols int(11) default NULL,
maxlength int(11) default NULL,
val text,
fidesc text,
cd date default NULL,
md date default NULL,
modifytext text,
fddfi2 text,
cookie int(11) default '0',
PRIMARY KEY (name)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmFORMATEXTENSION (
FILE_FORMAT text NOT NULL,
FILE_EXTENSION text NOT NULL
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmFUNCTIONS (
action varchar(10) NOT NULL default '',
doctype varchar(10) NOT NULL default '',
function varchar(40) NOT NULL default '',
score int(11) NOT NULL default '0',
step tinyint(4) NOT NULL default '1'
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmFUNDESC (
function varchar(40) NOT NULL default '',
param varchar(40) default NULL
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmGFILERESULT (
FORMAT text NOT NULL,
RESULT text NOT NULL
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmIMPLEMENT (
docname varchar(10) default NULL,
actname char(3) default NULL,
displayed char(1) default NULL,
subname varchar(13) default NULL,
nbpg int(11) default NULL,
cd date default NULL,
md date default NULL,
buttonorder int(11) default NULL,
statustext text,
level char(1) NOT NULL default '',
score int(11) NOT NULL default '0',
stpage int(11) NOT NULL default '0',
endtxt varchar(100) NOT NULL default ''
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmPARAMETERS (
doctype varchar(10) NOT NULL default '',
name varchar(20) NOT NULL default '',
value varchar(200) NOT NULL default '',
PRIMARY KEY (doctype,name)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS sbmPUBLICATION (
doctype varchar(10) NOT NULL default '',
categ varchar(50) NOT NULL default '',
rn varchar(50) NOT NULL default '',
status varchar(10) NOT NULL default '',
dFirstReq datetime NOT NULL default '0000-00-00 00:00:00',
dLastReq datetime NOT NULL default '0000-00-00 00:00:00',
dAction datetime NOT NULL default '0000-00-00 00:00:00',
accessref varchar(20) NOT NULL default '',
accessedi varchar(20) NOT NULL default '',
access varchar(20) NOT NULL default '',
referees varchar(50) NOT NULL default '',
authoremail varchar(50) NOT NULL default '',
dRefSelection datetime NOT NULL default '0000-00-00 00:00:00',
dRefRec datetime NOT NULL default '0000-00-00 00:00:00',
dEdiRec datetime NOT NULL default '0000-00-00 00:00:00',
accessspo varchar(20) NOT NULL default '',
journal varchar(100) default NULL,
PRIMARY KEY (doctype,categ,rn)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmPUBLICATIONCOMM (
id int(11) NOT NULL auto_increment,
id_parent int(11) default '0',
rn varchar(100) NOT NULL default '',
firstname varchar(100) default NULL,
secondname varchar(100) default NULL,
email varchar(100) default NULL,
date varchar(40) NOT NULL default '',
synopsis varchar(255) NOT NULL default '',
commentfulltext text,
PRIMARY KEY (id)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmPUBLICATIONDATA (
doctype varchar(10) NOT NULL default '',
editoboard varchar(250) NOT NULL default '',
base varchar(10) NOT NULL default '',
logicalbase varchar(10) NOT NULL default '',
spokesperson varchar(50) NOT NULL default '',
PRIMARY KEY (doctype)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmREFEREES (
doctype varchar(10) NOT NULL default '',
categ varchar(10) NOT NULL default '',
name varchar(50) NOT NULL default '',
address varchar(50) NOT NULL default '',
rid int(11) NOT NULL auto_increment,
PRIMARY KEY (rid)
) TYPE=MyISAM PACK_KEYS=1;
CREATE TABLE IF NOT EXISTS sbmSUBMISSIONS (
email varchar(50) NOT NULL default '',
doctype varchar(10) NOT NULL default '',
action varchar(10) NOT NULL default '',
status varchar(10) NOT NULL default '',
id varchar(30) NOT NULL default '',
reference varchar(40) NOT NULL default '',
cd datetime NOT NULL default '0000-00-00 00:00:00',
md datetime NOT NULL default '0000-00-00 00:00:00'
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS sbmCOOKIES (
id int(15) unsigned NOT NULL auto_increment,
name varchar(100) NOT NULL,
value text,
uid int(15) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
-- Scheduler tables
CREATE TABLE IF NOT EXISTS schTASK (
id int(15) unsigned NOT NULL auto_increment,
proc varchar(20) NOT NULL,
host varchar(255) NOT NULL,
user varchar(50) NOT NULL,
runtime datetime NOT NULL,
sleeptime varchar(20),
arguments mediumblob,
status varchar(50),
progress varchar(255),
PRIMARY KEY (id),
KEY status (status),
KEY runtime (runtime)
) TYPE=MyISAM;
-- External collections
CREATE TABLE IF NOT EXISTS collection_externalcollection (
id_collection mediumint(9) unsigned NOT NULL default '0',
id_externalcollection mediumint(9) unsigned NOT NULL default '0',
type tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (id_collection, id_externalcollection)
) TYPE=MyISAM;
CREATE TABLE IF NOT EXISTS externalcollection (
id mediumint(9) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=MyISAM;
-- end of file
diff --git a/modules/websession/lib/webaccount.py b/modules/websession/lib/webaccount.py
index e9e19f66c..c06867112 100644
--- a/modules/websession/lib/webaccount.py
+++ b/modules/websession/lib/webaccount.py
@@ -1,327 +1,331 @@
## $Id$
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
__revision__ = "$Id$"
import sys
import string
import cgi
import re
from invenio.config import \
CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS, \
CFG_CERN_SITE, \
cdslang, \
cdsname, \
supportemail, \
sweburl, \
version, \
weburl
from invenio.access_control_config import CFG_EXTERNAL_AUTHENTICATION
from invenio.webpage import page
from invenio.dbquery import run_sql
from invenio.webuser import getUid,isGuestUser, get_user_preferences, \
set_user_preferences, collect_user_info
from invenio.access_control_admin import acc_findUserRoleActions
from invenio.messages import gettext_set_language
from invenio.external_authentication import WebAccessExternalAuthError
import invenio.template
websession_templates = invenio.template.load('websession')
# perform_info(): display the main features of CDS personalize
def perform_info(req, ln):
out = ""
uid = getUid(req)
return websession_templates.tmpl_account_info(
ln = ln,
uid = uid,
guest = isGuestUser(uid),
CFG_CERN_SITE = CFG_CERN_SITE,
);
def perform_display_external_user_settings(settings, ln):
"""show external user settings which is a dictionary."""
_ = gettext_set_language(ln)
html_settings = ""
print_settings = False
settings_keys = settings.keys()
settings_keys.sort()
for key in settings_keys:
value = settings[key]
if key.startswith("EXTERNAL_") and not "HIDDEN_" in key:
print_settings = True
key = key[9:].capitalize()
html_settings += websession_templates.tmpl_external_setting(ln, key, value)
return print_settings and websession_templates.tmpl_external_user_settings(ln, html_settings) or ""
def perform_youradminactivities(user_info, ln):
"""Return text for the `Your Admin Activities' box. Analyze
whether user UID has some admin roles, and if yes, then print
suitable links for the actions he can do. If he's not admin,
print a simple non-authorized message."""
your_role_actions = acc_findUserRoleActions(user_info)
your_roles = []
your_admin_activities = []
guest = isGuestUser(user_info['uid'])
for (role, action) in your_role_actions:
if role not in your_roles:
your_roles.append(role)
if action not in your_admin_activities:
your_admin_activities.append(action)
if "superadmin" in your_roles:
for action in ["runbibedit", "cfgbibformat", "cfgbibharvest", "cfgbibrank", "cfgbibindex", "cfgwebaccess", "cfgwebcomment", "cfgwebsearch", "cfgwebsubmit"]:
if action not in your_admin_activities:
your_admin_activities.append(action)
return websession_templates.tmpl_account_adminactivities(
ln = ln,
uid = user_info['uid'],
guest = guest,
roles = your_roles,
activities = your_admin_activities,
weburl = weburl,
)
# perform_display_account(): display a dynamic page that shows the user's account
def perform_display_account(req,username,bask,aler,sear,msgs,grps,ln):
# load the right message language
_ = gettext_set_language(ln)
uid = getUid(req)
user_info = collect_user_info(req)
#your account
if isGuestUser(uid):
user = "guest"
login = "%s/youraccount/login?ln=%s" % (sweburl, ln)
accBody = _("You are logged in as guest. You may want to %(x_url_open)slogin%(x_url_close)s as a regular user.") %\
{'x_url_open': '',
'x_url_close': ''}
accBody += "
"
bask=aler=msgs= _("The %(x_fmt_open)sguest%(x_fmt_close)s users need to %(x_url_open)sregister%(x_url_close)s first") %\
{'x_fmt_open': '',
'x_fmt_close': '',
'x_url_open': '',
'x_url_close': ''}
sear= _("No queries found")
else:
user = username
accBody = websession_templates.tmpl_account_body(
ln = ln,
user = user,
)
return websession_templates.tmpl_account_page(
ln = ln,
weburl = weburl,
accBody = accBody,
baskets = bask,
alerts = aler,
searches = sear,
messages = msgs,
groups = grps,
administrative = perform_youradminactivities(user_info, ln)
)
# template_account() : it is a template for print each of the options from the user's account
def template_account(title, body, ln):
return websession_templates.tmpl_account_template(
ln = ln,
title = title,
body = body
)
# warning_guest_user(): It returns an alert message,showing that the user is a guest user and should log into the system
def warning_guest_user(type, ln=cdslang):
# load the right message language
_ = gettext_set_language(ln)
return websession_templates.tmpl_warning_guest_user(
ln = ln,
type = type,
)
## perform_delete():delete the account of the user, not implement yet
def perform_delete(ln):
return websession_templates.tmpl_account_delete(ln = ln)
def perform_set(email, ln, verbose=0):
"""Perform_set(email,password): edit your account parameters, email and
password.
"""
try:
res = run_sql("SELECT id, nickname FROM user WHERE email=%s", (email,))
uid = res[0][0]
nickname = res[0][1]
except:
uid = 0
nickname = ""
CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL = CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS
prefs = get_user_preferences(uid)
if CFG_EXTERNAL_AUTHENTICATION.has_key(prefs['login_method']) and CFG_EXTERNAL_AUTHENTICATION[prefs['login_method']][0]:
CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL = 3
out = websession_templates.tmpl_user_preferences(
ln = ln,
email = email,
email_disabled = (CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL >= 2),
password_disabled = (CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL >= 3),
nickname = nickname,
)
if len(CFG_EXTERNAL_AUTHENTICATION) > 1:
try:
uid = run_sql("SELECT id FROM user where email=%s", (email,))
uid = uid[0][0]
except:
uid = 0
current_login_method = prefs['login_method']
methods = CFG_EXTERNAL_AUTHENTICATION.keys()
# Filtering out methods that don't provide user_exists to check if
# a user exists in the external auth method before letting him/her
# to switch.
for method in methods:
if CFG_EXTERNAL_AUTHENTICATION[method][0]:
try:
if not CFG_EXTERNAL_AUTHENTICATION[method][0].user_exists(email):
methods.remove(method)
except (AttributeError, WebAccessExternalAuthError):
methods.remove(method)
methods.sort()
if len(methods) > 1:
out += websession_templates.tmpl_user_external_auth(
ln = ln,
methods = methods,
current = current_login_method,
method_disabled = (CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS >= 4)
)
try:
current_group_records = prefs['websearch_group_records']
except KeyError:
current_group_records = 10
try:
show_latestbox = prefs['websearch_latestbox']
except KeyError:
show_latestbox = True
try:
show_helpbox = prefs['websearch_helpbox']
except KeyError:
show_helpbox = True
out += websession_templates.tmpl_user_websearch_edit(
ln = ln,
current = current_group_records,
show_latestbox = show_latestbox,
show_helpbox = show_helpbox,
)
if verbose >= 9:
for key, value in prefs.items():
out += "%s:%s " % (key, value)
out += perform_display_external_user_settings(prefs, ln)
return out
## create_register_page_box(): register a new account
def create_register_page_box(referer='', ln=cdslang):
return websession_templates.tmpl_register_page(
referer = referer,
ln = ln,
level = CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS,
supportemail = supportemail,
cdsname = cdsname
)
## create_login_page_box(): ask for the user's email and password, for login into the system
def create_login_page_box(referer='', ln=cdslang):
# List of referer regexep and message to print
_ = gettext_set_language(ln)
login_referrer2msg = (
(re.compile(r"/search"), _("This collection is restricted. If you think you have right to access it, please authenticate yourself.")),
)
msg = None
for regexp, txt in login_referrer2msg:
if regexp.search(referer):
msg = txt
break
internal = None
for system in CFG_EXTERNAL_AUTHENTICATION.keys():
if not CFG_EXTERNAL_AUTHENTICATION[system][0]:
internal = system
break
register_available = CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS <= 1 and internal
methods = CFG_EXTERNAL_AUTHENTICATION.keys()
methods.sort()
selected = ''
for method in methods:
if CFG_EXTERNAL_AUTHENTICATION[method][1]:
selected = method
break
return websession_templates.tmpl_login_form(
ln = ln,
referer = referer,
internal = internal,
register_available = register_available,
methods = methods,
selected_method = selected,
supportemail = supportemail,
msg = msg,
)
# perform_logout: display the message of not longer authorized,
def perform_logout(req, ln):
return websession_templates.tmpl_account_logout(ln = ln)
#def perform_lost: ask the user for his email, in order to send him the lost password
def perform_lost(ln):
return websession_templates.tmpl_lost_password_form(ln)
+#def perform_reset_password: ask the user for a new password to reset the lost one
+def perform_reset_password(ln, email, reset_key, msg=''):
+ return websession_templates.tmpl_reset_password_form(ln, email, reset_key, msg)
+
# perform_emailSent(email): confirm that the password has been emailed to 'email' address
def perform_emailSent(email, ln):
return websession_templates.tmpl_account_emailSent(ln = ln, email = email)
# peform_emailMessage : display a error message when the email introduced is not correct, and sugest to try again
def perform_emailMessage(eMsg, ln):
return websession_templates.tmpl_account_emailMessage( ln = ln,
msg = eMsg
)
# perform_back(): template for return to a previous page, used for login,register and setting
def perform_back(mess,act,linkname='', ln='en'):
if not linkname:
linkname = act
return websession_templates.tmpl_back_form(
ln = ln,
message = mess,
act = act,
link = linkname,
)
diff --git a/modules/websession/lib/websession_config.py b/modules/websession/lib/websession_config.py
index c421083ae..5e648b13a 100644
--- a/modules/websession/lib/websession_config.py
+++ b/modules/websession/lib/websession_config.py
@@ -1,72 +1,73 @@
# -*- coding: utf-8 -*-
##
## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# pylint: disable-msg=C0301
"""WebSession configuration parameters."""
__revision__ = "$Id$"
CFG_WEBSESSION_GROUP_JOIN_POLICY = {'VISIBLEOPEN': 'VO',
'VISIBLEMAIL': 'VM',
'INVISIBLEOPEN': 'IO',
'INVISIBLEMAIL': 'IM',
'VISIBLEEXTERNAL' : 'VE'
}
CFG_WEBSESSION_USERGROUP_STATUS = {'ADMIN': 'A',
'MEMBER':'M',
'PENDING':'P'
}
+CFG_WEBSESSION_RESET_PASSWORD_EXPIRE_IN_DAYS = 3
CFG_WEBSESSION_ERROR_MESSAGES = {
'ERR_WEBSESSION_DB_ERROR': '_("Sorry there was an error with the database.")',
'ERR_WEBSESSION_GROUP_NO_RIGHTS': '_("Sorry, You don\'t have sufficient rights on this group.")'
}
CFG_WEBSESSION_WARNING_MESSAGES = {
'WRN_WEBSESSION_NO_GROUP_NAME': '_("Please enter a group name.")',
'WRN_WEBSESSION_NOT_VALID_GROUP_NAME': '_("Please enter a valid group name.")',
'WRN_WEBSESSION_GROUP_NAME_EXISTS': '_("Group name already exists. Please choose another group name.")',
'WRN_WEBSESSION_NO_JOIN_POLICY': '_("Please choose a group join policy.")',
'WRN_WEBSESSION_MULTIPLE_GROUPS': '_("Please select only one group.")',
'WRN_WEBSESSION_NO_GROUP_SELECTED': '_("Please select one group.")',
'WRN_WEBSESSION_GROUP_ALREADY_DELETED': '_("The group has already been deleted.")',
'WRN_WEBSESSION_ALREADY_MEMBER': '_("You are already member of the group.")',
'WRN_WEBSESSION_NO_MEMBER_SELECTED': '_("Please choose a member if you want to remove him from the group.")',
'WRN_WEBSESSION_NO_USER_SELECTED_ADD': '_("Please choose a user from the list if you want him to be added to the group.")',
'WRN_WEBSESSION_ALREADY_MEMBER_ADD': '_("The user is already member of the group.")',
'WRN_WEBSESSION_ALREADY_MEMBER_REJECT': '_("The user request for joining group has already been rejected.")',
'WRN_WEBSESSION_NO_USER_SELECTED_DEL': '_("Please choose a user from the list if you want him to be removed from waiting list.")'
}
CFG_WEBSESSION_INFO_MESSAGES = {"GROUP_CREATED": 'You have successfully created a new group.',
"JOIN_GROUP": 'You have successfully joined a new group.',
"GROUP_UPDATED": 'You have successfully updated a group.',
"GROUP_DELETED": 'You have successfully deleted a group.',
"MEMBER_DELETED": 'You have successfully deleted a member.',
"MEMBER_ADDED": 'You have successfully added a new member.',
"MEMBER_REJECTED": 'You have successfully removed a waiting member from the list.',
"JOIN_REQUEST": 'The group administrator has been notified of your request.',
"LEAVE_GROUP": 'You have successfully left a group.'
}
diff --git a/modules/websession/lib/websession_regression_tests.py b/modules/websession/lib/websession_regression_tests.py
index 346c6792f..5549e1b7e 100644
--- a/modules/websession/lib/websession_regression_tests.py
+++ b/modules/websession/lib/websession_regression_tests.py
@@ -1,114 +1,114 @@
# -*- coding: utf-8 -*-
##
## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
"""WebSession Regression Test Suite."""
__revision__ = \
"$Id$"
import unittest
from mechanize import Browser
from invenio.config import sweburl, adminemail
from invenio.testutils import make_test_suite, warn_user_about_tests_and_run, \
test_web_page_content, merge_error_messages
from invenio.dbquery import run_sql
class WebSessionWebPagesAvailabilityTest(unittest.TestCase):
"""Check WebSession web pages whether they are up or not."""
def test_your_account_pages_availability(self):
"""websession - availability of Your Account pages"""
baseurl = sweburl + '/youraccount/'
_exports = ['', 'edit', 'change', 'lost', 'display',
'send_email', 'youradminactivities',
'delete', 'logout', 'login', 'register']
error_messages = []
for url in [baseurl + page for page in _exports]:
error_messages.extend(test_web_page_content(url))
if error_messages:
self.fail(merge_error_messages(error_messages))
return
def test_your_groups_pages_availability(self):
"""websession - availability of Your Groups pages"""
baseurl = sweburl + '/yourgroups/'
_exports = ['', 'display', 'create', 'join', 'leave', 'edit', 'members']
error_messages = []
for url in [baseurl + page for page in _exports]:
error_messages.extend(test_web_page_content(url))
if error_messages:
self.fail(merge_error_messages(error_messages))
return
class WebSessionLostYourPasswordTest(unittest.TestCase):
"""Test Lost Your Passwords functionality."""
def test_lost_your_password_for_internal_accounts(self):
"""websession - sending lost password for internal admin account"""
try_with_account = adminemail
# click on "send lost password" for adminemail internal account
browser = Browser()
browser.open(sweburl + "/youraccount/lost")
browser.select_form(nr=0)
browser['p_email'] = try_with_account
try:
browser.submit()
except Exception, e:
# Restore the admin password (send_email set it to random number)
run_sql("UPDATE user SET password=AES_ENCRYPT(email, '')"
"WHERE id=1")
- self.fail("Obtained %s: probably the email server is not installed"
+ self.fail("Obtained %s: probably the email server is not installed "
"correctly." % e)
# verify the response:
- expected_response = "Okay, password has been emailed to " + \
+ expected_response = "Okay, request for a new password has been emailed to " + \
try_with_account
lost_password_response_body = browser.response().read()
try:
lost_password_response_body.index(expected_response)
except ValueError:
# Restore the admin password (send_email set it to random number)
run_sql("UPDATE user SET password=AES_ENCRYPT(email, '')"
"WHERE id=1")
self.fail("Expected to see %s, got %s." % \
(expected_response, lost_password_response_body))
def tearDown(self):
# Restore the admin password (send_email set it to random number)
run_sql("UPDATE user SET password=AES_ENCRYPT(email, '')"
"WHERE id=1")
test_suite = make_test_suite(WebSessionWebPagesAvailabilityTest,
WebSessionLostYourPasswordTest)
if __name__ == "__main__":
warn_user_about_tests_and_run(test_suite)
diff --git a/modules/websession/lib/websession_templates.py b/modules/websession/lib/websession_templates.py
index 415c5a5f1..fe851cf25 100644
--- a/modules/websession/lib/websession_templates.py
+++ b/modules/websession/lib/websession_templates.py
@@ -1,2068 +1,2117 @@
## $Id$
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
__revision__ = "$Id$"
import urllib
import time
import cgi
import gettext
import string
import locale
from invenio.config import \
CFG_CERN_SITE, \
bibformat, \
cdslang, \
cdsname, \
cdsnameintl, \
supportemail, \
sweburl, \
version, \
weburl
from invenio.access_control_config import CFG_EXTERNAL_AUTH_USING_SSO, \
CFG_EXTERNAL_AUTH_LOGOUT_SSO
+from invenio.websession_config import CFG_WEBSESSION_RESET_PASSWORD_EXPIRE_IN_DAYS
from invenio.urlutils import make_canonical_urlargd
from invenio.messages import gettext_set_language
from invenio.textutils import indent_text
from invenio.websession_config import CFG_WEBSESSION_GROUP_JOIN_POLICY
class Template:
def tmpl_back_form(self, ln, message, act, link):
"""
A standard one-message-go-back-link page.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'message' *string* - The message to display
- 'act' *string* - The action to accomplish when going back
- 'link' *string* - The link text
"""
out = """
""" % (key, value)
return out
def tmpl_external_user_settings(self, ln, html_settings):
_ = gettext_set_language(ln)
out = """
%(external_user_settings)s
%(html_settings)s
%(external_user_groups)s
%(consult_external_groups)s
""" % {
'external_user_settings' : _('External account settings'),
'html_settings' : html_settings,
'consult_external_groups' : _('You can consult the list of your external groups directly in the %(x_url_open)sgroups page%(x_url_close)s.') % {
'x_url_open' : '' % ln,
'x_url_close' : ''
},
'external_user_groups' : _('External user groups'),
}
return out
def tmpl_user_preferences(self, ln, email, email_disabled, password_disabled, nickname):
"""
Displays a form for the user to change his email/password.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'email' *string* - The email of the user
- 'email_disabled' *boolean* - If the user has the right to edit his email
- 'password_disabled' *boolean* - If the user has the right to edit his password
- 'nickname' *string* - The nickname of the user (empty string if user does not have it)
"""
# load the right message language
_ = gettext_set_language(ln)
out = """
%(edit_params)s
""" % {
'change_user' : _("If you want to change your email or set for the first time your nickname, please set new values in the form below."),
'edit_params' : _("Edit login credentials"),
'nickname_label' : _("Nickname"),
'nickname' : nickname,
'nickname_prefix' : nickname=='' and ' '+_("Example")+':johnd' or '',
'new_email' : _("New email address"),
'mandatory' : _("mandatory"),
'example' : _("Example"),
'note' : _("Note"),
'set_values' : _("Set new values"),
'email' : email,
'email_disabled' : email_disabled and "readonly" or "",
'sweburl': sweburl,
}
if not password_disabled and not CFG_EXTERNAL_AUTH_USING_SSO:
out += """
""" % {
'change_pass' : _("If you want to change your password, please enter the old one and set the new value in the form below."),
'mandatory' : _("mandatory"),
'old_password' : _("Old password"),
'new_password' : _("New password"),
'optional' : _("optional"),
'note' : _("Note"),
'password_note' : _("The password phrase may contain punctuation, spaces, etc."),
'old_password_note' : _("You must fill the old password in order to set a new one."),
'retype_password' : _("Retype password"),
'set_values' : _("Set new password"),
'password_disabled' : password_disabled and "disabled" or "",
'sweburl': sweburl,
}
elif not CFG_EXTERNAL_AUTH_USING_SSO and CFG_CERN_SITE:
out += "
"
elif CFG_EXTERNAL_AUTH_USING_SSO and CFG_CERN_SITE:
out += "
" + _("""You can change or reset your CERN account password by means of the %(x_url_open)sCERN account system%(x_url_close)s.""") % \
{'x_url_open' : '', 'x_url_close' : ''} + "
"
return out
def tmpl_user_websearch_edit(self, ln, current = 10, show_latestbox = True, show_helpbox = True):
_ = gettext_set_language(ln)
out = """
""" % {
'update_settings' : _("Update settings"),
'select_group_records' : _("Number of search results per page"),
}
return out
def tmpl_user_external_auth(self, ln, methods, current, method_disabled):
"""
Displays a form for the user to change his authentication method.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'methods' *array* - The methods of authentication
- 'method_disabled' *boolean* - If the user has the right to change this
- 'current' *string* - The currently selected method
"""
# load the right message language
_ = gettext_set_language(ln)
out = """
""" % {
'select_method' : _("Select method"),
}
return out
def tmpl_lost_password_form(self, ln):
"""
Displays a form for the user to ask for his password sent by email.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'msg' *string* - Explicative message on top of the form.
"""
# load the right message language
_ = gettext_set_language(ln)
- out = "
" + _("If you have lost password for your %(cdsname)s %(x_fmt_open)sinternal account%(x_fmt_close)s, then please enter your email address in the following form and having a new password emailed to you.") % {'x_fmt_open' : '', 'x_fmt_close' : '', 'cdsname' : cdsnameintl[ln]} + "
"
+ out = "
" + _("If you have lost password for your %(cdsname)s %(x_fmt_open)sinternal account%(x_fmt_close)s, then please enter your email address in the following form and having a request link for a new password emailed to you.") % {'x_fmt_open' : '', 'x_fmt_close' : '', 'cdsname' : cdsnameintl[ln]} + "
"
out += """
""" % {
'ln': ln,
'email' : _("Email address"),
'send' : _("Send new password"),
}
if CFG_CERN_SITE:
out += "
" + _("Note that if you have been using an external login system, then we cannot do anything and you have to ask there.") + " "
out += _("Alternatively, you can ask %s to change your login system from external to internal.") % ("""%(email)s""" % { 'email' : supportemail }) + "
"
return out
def tmpl_account_info(self, ln, uid, guest, CFG_CERN_SITE):
"""
Displays the account information
Parameters:
- 'ln' *string* - The language to display the interface in
- 'uid' *string* - The user id
- 'guest' *boolean* - If the user is guest
- 'CFG_CERN_SITE' *boolean* - If the site is a CERN site
"""
# load the right message language
_ = gettext_set_language(ln)
out = """
%(account_offer)s
""" % {
'account_offer' : _("%s offers you the possibility to personalize the interface, to set up your own personal library of documents, or to set up an automatic alert query that would run periodically and would notify you of search results by email.") % cdsnameintl[ln],
}
if not guest:
out += """
""" % {
'ln' : ln,
'your_settings' : _("Your Settings"),
'change_account' : _("Set or change your account email address or password. Specify your preferences about the look and feel of the interface.")
}
out += """
%(basket_explain)s""" % {
'ln' : ln,
'your_searches' : _("Your Searches"),
'search_explain' : _("View all the searches you performed during the last 30 days."),
'your_baskets' : _("Your Baskets"),
'basket_explain' : _("With baskets you can define specific collections of items, store interesting records you want to access later or share with others."),
}
if guest:
out += self.tmpl_warning_guest_user(ln = ln, type = "baskets")
out += """
%(explain_alerts)s""" % {
'ln' : ln,
'your_alerts' : _("Your Alerts"),
'explain_alerts' : _("Subscribe to a search which will be run periodically by our service. The result can be sent to you via Email or stored in one of your baskets."),
}
if guest:
out += self.tmpl_warning_guest_user(type="alerts", ln = ln)
out += "
""" % {
'your_loans' : _("Your Loans"),
'explain_loans' : _("Check out book you have on loan, submit borrowing requests, etc. Requires CERN ID."),
}
out += """
"""
return out
def tmpl_warning_guest_user(self, ln, type):
"""
Displays a warning message about the specified type
Parameters:
- 'ln' *string* - The language to display the interface in
- 'type' *string* - The type of data that will get lost in case of guest account (for the moment: 'alerts' or 'baskets')
"""
# load the right message language
_ = gettext_set_language(ln)
if (type=='baskets'):
msg = _("You are logged in as a guest user, so your baskets will disappear at the end of the current session.") + ' '
elif (type=='alerts'):
msg = _("You are logged in as a guest user, so your alerts will disappear at the end of the current session.") + ' '
msg += _("If you wish you can %(x_url_open)slogin or register here%(x_url_close)s.") % {'x_url_open': '',
'x_url_close': ''}
return """
%s
""" % msg
def tmpl_account_body(self, ln, user):
"""
Displays the body of the actions of the user
Parameters:
- 'ln' *string* - The language to display the interface in
- 'user' *string* - The username (nickname or email)
"""
# load the right message language
_ = gettext_set_language(ln)
out = _("You are logged in as %(x_user)s. You may want to a) %(x_url1_open)slogout%(x_url1_close)s; b) edit your %(x_url2_open)saccount settings%(x_url2_close)s.") %\
{'x_user': user,
'x_url1_open': '',
'x_url1_close': '',
'x_url2_open': '',
'x_url2_close': '',
}
return out + "
"
def tmpl_account_template(self, title, body, ln):
"""
Displays a block of the your account page
Parameters:
- 'ln' *string* - The language to display the interface in
- 'title' *string* - The title of the block
- 'body' *string* - The body of the block
"""
out =""
out +="""
%s
%s
""" % (title, body)
return out
def tmpl_account_page(self, ln, weburl, accBody, baskets, alerts, searches, messages, groups, administrative):
"""
Displays the your account page
Parameters:
- 'ln' *string* - The language to display the interface in
- 'weburl' *string* - The URL of CDS Invenio
- 'accBody' *string* - The body of the heading block
- 'baskets' *string* - The body of the baskets block
- 'alerts' *string* - The body of the alerts block
- 'searches' *string* - The body of the searches block
- 'messages' *string* - The body of the messages block
- 'groups' *string* - The body of the groups block
- 'administrative' *string* - The body of the administrative block
"""
# load the right message language
_ = gettext_set_language(ln)
out = ""
out += self.tmpl_account_template(_("Your Account"), accBody, ln)
out += self.tmpl_account_template(_("Your Messages"), messages, ln)
out += self.tmpl_account_template(_("Your Baskets"), baskets, ln)
out += self.tmpl_account_template(_("Your Alert Searches"), alerts, ln)
out += self.tmpl_account_template(_("Your Searches"), searches, ln)
groups_description = _("You can consult the list of %(x_url_open)syour groups%(x_url_close)s you are administering or are a member of.")
groups_description %= {'x_url_open': '',
'x_url_close': ''}
out += self.tmpl_account_template(_("Your Groups"), groups_description, ln)
submission_description = _("You can consult the list of %(x_url_open)syour submissions%(x_url_close)s and inquire about their status.")
submission_description %= {'x_url_open': '',
'x_url_close': ''}
out += self.tmpl_account_template(_("Your Submissions"), submission_description, ln)
approval_description = _("You can consult the list of %(x_url_open)syour approvals%(x_url_close)s with the documents you approved or refereed.")
approval_description %= {'x_url_open': '',
'x_url_close': ''}
out += self.tmpl_account_template(_("Your Approvals"), approval_description, ln)
out += self.tmpl_account_template(_("Your Administrative Activities"), administrative, ln)
return out
def tmpl_account_emailMessage(self, ln, msg):
"""
Displays a link to retrieve the lost password
Parameters:
- 'ln' *string* - The language to display the interface in
- 'msg' *string* - Explicative message on top of the form.
"""
# load the right message language
_ = gettext_set_language(ln)
out =""
out +="""
%(msg)s %(try_again)s
""" % {
'ln' : ln,
'msg' : msg,
'try_again' : _("Try again")
}
return out
- def tmpl_account_lost_password_email_body(self, username, password, ln=cdslang):
+ def tmpl_account_reset_password_email_body(self, email, reset_key, ip_address, ln=cdslang):
"""
The body of the email that sends lost internal account
passwords to users.
"""
_ = gettext_set_language(ln)
out = """\
%(hello)s:
-%(here_are_your_user_credentials_for)s %(cdsnameintl)s:
+%(intro)s
- %(label_username)s: %(username)s
- %(label_password)s: %(password)s
+%(intro2)s
-%(you_can_login_at)s:
+<%(link)s>
- <%(login_url)s>
+%(outro)s
+
+%(outro2)s
%(best_regards)s
--
%(cdsnameintl)s <%(weburl)s>
%(need_intervention_please_contact)s <%(supportemail)s>
""" % {
'hello': _("Hello"),
- 'here_are_your_user_credentials_for': _("Here are your user credentials for"),
- 'cdsnameintl': cdsnameintl.get(ln, cdsname),
- 'label_username': _("username"),
- 'username': username,
- 'label_password': _("password"),
- 'password': password,
- 'you_can_login_at': _("You can login at"),
- 'login_url': "%s/youraccount/login?ln=%s" % (sweburl, ln),
+ 'intro': _("Somebody (possibly you) coming from %(ip_address)s "
+ "have asked for a\npassword reset for %(cdsname)s for "
+ "the account \"%(email)s\"." % {
+ 'cdsname' :cdsnameintl.get(ln, cdsname),
+ 'email' : email,
+ 'ip_address' : ip_address,
+ }
+ ),
+ 'intro2' : _("If you want to reset the password for this account, please go to:"),
+ 'link' : "%s/youraccount/resetpassword%s" %
+ (sweburl, make_canonical_urlargd({
+ 'ln' : ln,
+ 'e' : email,
+ 'k' : reset_key
+ }, {})),
+ 'outro' : _("and follow the instructions presented there."),
+ 'outro2' : _("Please note that this URL will remain valid only for about %(days)s day(s).") % {'days' : CFG_WEBSESSION_RESET_PASSWORD_EXPIRE_IN_DAYS},
'best_regards': _("Best regards"),
+ 'cdsnameintl' :cdsnameintl.get(ln, cdsname),
'weburl': weburl,
'need_intervention_please_contact': _("Need human intervention? Contact"),
'supportemail': supportemail
- }
+ }
return out
def tmpl_account_emailSent(self, ln, email):
"""
Displays a confirmation message for an email sent
Parameters:
- 'ln' *string* - The language to display the interface in
- 'email' *string* - The email to which the message has been sent
"""
# load the right message language
_ = gettext_set_language(ln)
out =""
- out += _("Okay, password has been emailed to %s.") % email
+ out += _("Okay, request for a new password has been emailed to %s.") % email
return out
def tmpl_account_delete(self, ln):
"""
Displays a confirmation message about deleting the account
Parameters:
- 'ln' *string* - The language to display the interface in
"""
# load the right message language
_ = gettext_set_language(ln)
out = "
" + _("""Deleting your account""") + '
'
return out
def tmpl_account_logout(self, ln):
"""
Displays a confirmation message about logging out
Parameters:
- 'ln' *string* - The language to display the interface in
"""
# load the right message language
_ = gettext_set_language(ln)
out = _("You are no longer recognized by our system.") + ' '
if CFG_EXTERNAL_AUTH_USING_SSO and CFG_EXTERNAL_AUTH_LOGOUT_SSO:
out += _("""You are still recognized by the centralized
%(x_fmt_open)sSSO%(x_fmt_close)s system. You can
%(x_url_open)slogout from SSO%(x_url_close)s, too.""") % \
{'x_fmt_open' : '', 'x_fmt_close' : '',
'x_url_open' : '' % CFG_EXTERNAL_AUTH_LOGOUT_SSO,
'x_url_close' : ''}
out += ' '
out += _("If you wish you can %(x_url_open)slogin here%(x_url_close)s.") % \
{'x_url_open': '',
'x_url_close': ''}
return out
def tmpl_login_form(self, ln, referer, internal, register_available, methods, selected_method, supportemail, msg=None):
"""
Displays a login form
Parameters:
- 'ln' *string* - The language to display the interface in
- 'referer' *string* - The referer URL - will be redirected upon after login
- 'internal' *boolean* - If we are producing an internal authentication
- 'register_available' *boolean* - If users can register freely in the system
- 'methods' *array* - The available authentication methods
- 'selected_method' *string* - The default authentication method
- 'supportemail' *string* - The email of the support team
- 'msg' *string* - The message to print before the form, if needed
"""
# load the right message language
_ = gettext_set_language(ln)
if msg is None:
out = "
%(please_login)s" % {
'please_login' : _("If you already have an account, please login using the form below.")
}
if CFG_CERN_SITE:
out += "
" + _("If you don't own a CERN account yet, you can register a %(x_url_open)snew CERN external account%(x_url_close)s.") % {'x_url_open' : '', 'x_url_close' : ''} + "
"
else:
if register_available:
out += "
"+_("If you don't own an account yet, please %(x_url_open)sregister%(x_url_close)s an internal account.") %\
{'x_url_open': '',
'x_url_close': ''} + "
"
else:
out += "
" + _("It is not possible to create an account yourself. Contact %s if you want an account.") % ('%s' % (supportemail, supportemail)) + "
"
else:
out = "
%s
" % msg
out += """"""
out += """
%(note)s: %(note_text)s
""" % {
'note' : _("Note"),
'note_text': _("You can use your nickname or your email address to login.")}
return out
def tmpl_lost_your_password_teaser(self, ln=cdslang):
"""Displays a short sentence to attract user to the fact that
maybe he lost his password. Used by the registration page.
"""
_ = gettext_set_language(ln)
out = ""
out += """%(maybe_lost_pass)s""" % {
'ln' : ln,
'maybe_lost_pass': ("Maybe you have lost your password?")
}
return out
+ def tmpl_reset_password_form(self, ln, email, reset_key, msg=''):
+ """Display a form to reset the password."""
+
+ _ = gettext_set_language(ln)
+
+ out = ""
+ out = "
%s
" % _("Your request is valid. Please set the new "
+ "desired password in the following form.")
+ if msg:
+ out += """
%s
""" % msg
+ out += """
+""" % {
+ 'ln' : ln,
+ 'reset_key' : reset_key,
+ 'email' : email,
+ 'set_password_for' : _('Set a new password for'),
+ 'type_new_password' : _('Type the new password'),
+ 'type_it_again' : _('Type again the new password'),
+ 'set_new_password' : _('Set the new password')
+ }
+ return out
+
def tmpl_register_page(self, ln, referer, level, supportemail, cdsname):
"""
Displays a login form
Parameters:
- 'ln' *string* - The language to display the interface in
- 'referer' *string* - The referer URL - will be redirected upon after login
- 'level' *int* - Login level (0 - all access, 1 - accounts activated, 2+ - no self-registration)
- 'supportemail' *string* - The email of the support team
- 'cdsname' *string* - The name of the installation
"""
# load the right message language
_ = gettext_set_language(ln)
out = ""
if level <= 1:
out += _("Please enter your email address and desired nickname and password:")
if level == 1:
out += _("It will not be possible to use the account before it has been verified and activated.")
out += """
%(note)s: %(explain_acc)s""" % {
'referer' : cgi.escape(referer),
'email_address' : _("Email address"),
'nickname' : _("Nickname"),
'password' : _("Password"),
'mandatory' : _("mandatory"),
'optional' : _("optional"),
'example' : _("Example"),
'note' : _("Note"),
'password_contain' : _("The password phrase may contain punctuation, spaces, etc."),
'retype' : _("Retype Password"),
'register' : _("register"),
'explain_acc' : _("Please do not use valuable passwords such as your Unix, AFS or NICE passwords with this service. Your email address will stay strictly confidential and will not be disclosed to any third party. It will be used to identify you for personal services of %s. For example, you may set up an automatic alert search that will look for new preprints and will notify you daily of new arrivals by email.") % cdsname,
}
return out
def tmpl_account_adminactivities(self, ln, weburl, uid, guest, roles, activities):
"""
Displays the admin activities block for this user
Parameters:
- 'ln' *string* - The language to display the interface in
- 'weburl' *string* - The address of the site
- 'uid' *string* - The used id
- 'guest' *boolean* - If the user is guest
- 'roles' *array* - The current user roles
- 'activities' *array* - The user allowed activities
"""
# load the right message language
_ = gettext_set_language(ln)
out = ""
# guest condition
if guest:
return _("You seem to be a guest user. You have to %(x_url_open)slogin%(x_url_close)s first.") % \
{'x_url_open': '',
'x_url_close': ''}
# no rights condition
if not roles:
return "
" + _("You are not authorized to access administrative functions.") + "
"
# displaying form
out += "
" + _("You seem to be %(x_role)s.") % {'x_role': ('' + string.join(roles, ", ") + " ")} + '
'
out += _("Here are some interesting web admin links for you:")
# print proposed links:
activities.sort(lambda x, y: cmp(string.lower(x), string.lower(y)))
for action in activities:
if action == "runbibedit":
out += """ %s""" % (weburl, ln, _("Run BibEdit"))
if action == "cfgbibformat":
out += """ %s""" % (weburl, ln, _("Configure BibFormat"))
if action == "cfgbibharvest":
out += """ %s""" % (weburl, _("Configure BibHarvest"))
if action == "cfgbibindex":
out += """ %s""" % (weburl, ln, _("Configure BibIndex"))
if action == "cfgbibrank":
out += """ %s""" % (weburl, ln, _("Configure BibRank"))
if action == "cfgwebaccess":
out += """ %s""" % (weburl, ln, _("Configure WebAccess"))
if action == "cfgwebcomment":
out += """ %s""" % (weburl, ln, _("Configure WebComment"))
if action == "cfgwebsearch":
out += """ %s""" % (weburl, ln, _("Configure WebSearch"))
if action == "cfgwebsubmit":
out += """ %s""" % (weburl, ln, _("Configure WebSubmit"))
out += " " + _("For more admin-level activities, see the complete %(x_url_open)sAdmin Area%(x_url_close)s.") %\
{'x_url_open': '',
'x_url_close': ''}
return out
def tmpl_create_userinfobox(self, ln, url_referer, guest, username, submitter, referee, admin):
"""
Displays the user block
Parameters:
- 'ln' *string* - The language to display the interface in
- 'url_referer' *string* - URL of the page being displayed
- 'guest' *boolean* - If the user is guest
- 'username' *string* - The username (nickname or email)
- 'submitter' *boolean* - If the user is submitter
- 'referee' *boolean* - If the user is referee
- 'admin' *boolean* - If the user is admin
"""
# load the right message language
_ = gettext_set_language(ln)
out = """""" % weburl
if guest:
out += """%(guest_msg)s ::
%(login)s""" % {
'weburl' : weburl,
'sweburl': sweburl,
'ln' : ln,
'guest_msg' : _("guest"),
'session' : _("session"),
'alerts' : _("alerts"),
'baskets' : _("baskets"),
'login' : _("login"),
}
else:
out += """%(username)s ::
%(account)s ::
%(messages)s ::
%(baskets)s ::
%(alerts)s ::
%(groups)s :: """ % {
'username' : username,
'weburl' : weburl,
'sweburl' : sweburl,
'ln' : ln,
'account' : _("account"),
'alerts' : _("alerts"),
'messages': _("messages"),
'baskets' : _("baskets"),
'groups' : _("groups"),
}
if submitter:
out += """%(submission)s :: """ % {
'weburl' : weburl,
'ln' : ln,
'submission' : _("submissions"),
}
if referee:
out += """%(approvals)s :: """ % {
'weburl' : weburl,
'ln' : ln,
'approvals' : _("approvals"),
}
if admin:
out += """%(administration)s :: """ % {
'sweburl' : sweburl,
'ln' : ln,
'administration' : _("administration"),
}
out += """%(logout)s""" % {
'sweburl' : sweburl,
'ln' : ln,
'logout' : _("logout"),
}
return out
def tmpl_warning(self, warnings, ln=cdslang):
"""
Prepare the warnings list
@param warnings: list of warning tuples (warning_msg, arg1, arg2, etc)
@return html string of warnings
"""
from invenio.errorlib import get_msgs_for_code_list
span_class = 'important'
out = ""
if type(warnings) is not list:
warnings = [warnings]
if len(warnings) > 0:
warnings_parsed = get_msgs_for_code_list(warnings, 'warning', ln)
for (warning_code, warning_text) in warnings_parsed:
if not warning_code.startswith('WRN'):
#display only warnings that begin with WRN to user
continue
span_class = 'important'
out += '''
%(warning)s ''' % \
{ 'span_class' : span_class,
'warning' : warning_text }
return out
else:
return ""
def tmpl_warnings(self, warnings, ln=cdslang):
"""
Display len(warnings) warning fields
@param infos: list of strings
@param ln=language
@return html output
"""
if not((type(warnings) is list) or (type(warnings) is tuple)):
warnings = [warnings]
warningbox = ""
if warnings != []:
warningbox = "
\n Warning:\n"
for warning in warnings:
lines = warning.split("\n")
warningbox += "
"
for line in lines[0:-1]:
warningbox += line + " \n"
warningbox += lines[-1] + "
"
warningbox += "
\n"
return warningbox
def tmpl_display_all_groups(self,
infos,
admin_group_html,
member_group_html,
external_group_html = None,
warnings=[],
ln=cdslang):
"""
Displays the 3 tables of groups: admin, member and external
Parameters:
- 'ln' *string* - The language to display the interface in
- 'admin_group_html' *string* - HTML code for displaying all the groups
the user is the administrator of
- 'member_group_html' *string* - HTML code for displaying all the groups
the user is member of
- 'external_group_html' *string* - HTML code for displaying all the
external groups the user is member of
"""
_ = gettext_set_language(ln)
group_text = self.tmpl_infobox(infos)
group_text += self.tmpl_warning(warnings)
if external_group_html:
group_text += """
""" %(admin_group_html, member_group_html)
return group_text
def tmpl_display_admin_groups(self, groups, ln=cdslang):
"""
Display the groups the user is admin of.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'groups' *list* - All the group the user is admin of
- 'infos' *list* - Display infos on top of admin group table
"""
_ = gettext_set_language(ln)
img_link = """
%(text)s
"""
out = self.tmpl_group_table_title(img="/img/group_admin.png",
text=_("You are an administrator of the following groups:") )
out += """
%s
%s
""" %(_("Group"), _("Description"))
if len(groups) == 0:
out += """
%s
""" %(_("You are not an administrator of any groups."),)
for group_data in groups:
(grpID, name, description) = group_data
edit_link = img_link % {'weburl' : weburl,
'grpID' : grpID,
'ln': ln,
'img':"webbasket_create_small.png",
'text':_("Edit group"),
'action':"edit"
}
members_link = img_link % {'weburl' : weburl,
'grpID' : grpID,
'ln': ln,
'img':"webbasket_usergroup.png",
'text':_("Edit %s members") % '',
'action':"members"
}
out += """
%s
%s
%s
%s
""" % (cgi.escape(name), cgi.escape(description), edit_link, members_link)
out += """
""" % {'ln': ln,
'write_label': _("Create new group"),
}
return indent_text(out, 2)
def tmpl_display_member_groups(self, groups, ln=cdslang):
"""
Display the groups the user is member of.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'groups' *list* - All the group the user is member of
"""
_ = gettext_set_language(ln)
group_text = self.tmpl_group_table_title(img="/img/webbasket_us.png", text=_("You are a member of the following groups:"))
group_text += """
""" % {'ln': ln,
'join_label': _("Join new group"),
'leave_label':_("Leave group")
}
return indent_text(group_text, 2)
def tmpl_display_external_groups(self, groups, ln=cdslang):
"""
Display the external groups the user is member of.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'groups' *list* - All the group the user is member of
"""
_ = gettext_set_language(ln)
group_text = self.tmpl_group_table_title(img="/img/webbasket_us.png", text=_("You are a member of the following external groups:"))
group_text += """
"""
return indent_text(group_text, 2)
def tmpl_display_input_group_info(self,
group_name,
group_description,
join_policy,
act_type="create",
grpID="",
warnings=[],
ln=cdslang):
"""
Display group data when creating or updating a group:
Name, description, join_policy.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'group_name' *string* - name of the group
- 'group_description' *string* - description of the group
- 'join_policy' *string* - join policy
- 'act_type' *string* - info about action : create or edit(update)
- 'grpID' *string* - ID of the group(not null in case of group editing)
- 'warnings' *list* - Display warning if values are not correct
"""
_ = gettext_set_language(ln)
#default
hidden_id =""
form_name = "create_group"
action = weburl + '/yourgroups/create'
button_label = _("Create new group")
button_name = "create_button"
label = _("Create new group")
delete_text = ""
if act_type == "update":
form_name = "update_group"
action = weburl + '/yourgroups/edit'
button_label = _("Update group")
button_name = "update"
label = _('Edit group %s') % cgi.escape(group_name)
delete_text = """"""
delete_text %= (_("Delete group"),"delete")
if grpID != "":
hidden_id = """"""
hidden_id %= grpID
out = self.tmpl_warning(warnings)
out += """
"""
out %= {'action' : action,
'logo': weburl + '/img/webbasket_create.png',
'label': label,
'form_name' : form_name,
'name_label': _("Group name:"),
'delete_text': delete_text,
'description_label': _("Group description:"),
'join_policy_label': _("Group join policy:"),
'group_name': cgi.escape(group_name, 1),
'group_description': cgi.escape(group_description, 1),
'button_label': button_label,
'button_name':button_name,
'cancel_label':_("Cancel"),
'hidden_id':hidden_id,
'ln': ln,
'join_policy' :self.__create_join_policy_selection_menu("join_policy",
join_policy,
ln)
}
return indent_text(out, 2)
def tmpl_display_input_join_group(self,
group_list,
group_name,
group_from_search,
search,
warnings=[],
ln=cdslang):
"""
Display the groups the user can join.
He can use default select list or the search box
Parameters:
- 'ln' *string* - The language to display the interface in
- 'group_list' *list* - All the group the user can join
- 'group_name' *string* - Name of the group the user is looking for
- 'group_from search' *list* - List of the group the user can join matching group_name
- 'search' *int* - User is looking for group using group_name
- 'warnings' *list* - Display warning if two group are selected
"""
_ = gettext_set_language(ln)
out = self.tmpl_warning(warnings)
search_content = ""
if search:
search_content = """
"""
out += """
"""
out %= {'action' : weburl + '/yourgroups/join',
'logo': weburl + '/img/webbasket_create.png',
'label': _("Join group"),
'group_name': cgi.escape(group_name, 1),
'label2':_("or find it") + ': ',
'list_label':_("Choose group:"),
'ln': ln,
'find_label': _("Find group"),
'cancel_label':_("Cancel"),
'group_list' :self.__create_select_menu("grpID",group_list, _("Please select:")),
'search_content' : search_content
}
return indent_text(out, 2)
def tmpl_display_manage_member(self,
grpID,
group_name,
members,
pending_members,
infos=[],
warnings=[],
ln=cdslang):
"""Display current members and waiting members of a group.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'grpID *string* - ID of the group
- 'group_name' *string* - Name of the group
- 'members' *list* - List of the current members
- 'pending_members' *list* - List of the waiting members
- 'infos' *tuple of 2 lists* - Message to inform user about his last action
- 'warnings' *list* - Display warning if two group are selected
"""
_ = gettext_set_language(ln)
out = self.tmpl_warning(warnings)
out += self.tmpl_infobox(infos)
out += """
"""
if members :
member_list = self.__create_select_menu("member_id", members, _("Please select:"))
member_text = """
""" % _("No members awaiting approval.")
header1 = self.tmpl_group_table_title(text=_("Current members"))
header2 = self.tmpl_group_table_title(text=_("Members awaiting approval"))
header3 = _("Invite new members")
link_open = ''
link_open %= (weburl, ln)
invite_text = _("If you want to invite new members to join your group, please use the %(x_url_open)sweb message%(x_url_close)s system.") % \
{'x_url_open': link_open,
'x_url_close': ''}
action = weburl + '/yourgroups/members?ln=' + ln
out %= {'title':_('Group: %s') % group_name,
'member_text' : member_text,
'pending_text' :pending_text,
'action':action,
'grpID':grpID,
'header1': header1,
'header2': header2,
'header3': header3,
'img_alt_header1': _("Current members"),
'img_alt_header2': _("Members awaiting approval"),
'img_alt_header3': _("Invite new members"),
'invite_text': invite_text,
'imgurl': weburl + '/img',
'cancel_label':_("Cancel"),
'ln':ln
}
return indent_text(out, 2)
def tmpl_display_input_leave_group(self,
groups,
warnings=[],
ln=cdslang):
"""Display groups the user can leave.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'groups' *list* - List of groups the user is currently member of
- 'warnings' *list* - Display warning if no group is selected
"""
_ = gettext_set_language(ln)
out = self.tmpl_warning(warnings)
out += """
"""
if groups:
groups = self.__create_select_menu("grpID", groups, _("Please select:"))
list_label = _("Group list")
submit = """""" % _("Leave group")
else :
groups = _("You are not member of any group.")
list_label = ""
submit = ""
action = weburl + '/yourgroups/leave?ln=%s'
action %= (ln)
out %= {'groups' : groups,
'list_label' : list_label,
'action':action,
'logo': weburl + '/img/webbasket_create.png',
'label' : _("Leave group"),
'cancel_label':_("Cancel"),
'ln' :ln,
'submit' : submit
}
return indent_text(out, 2)
def tmpl_confirm_delete(self, grpID, ln=cdslang):
"""
display a confirm message when deleting a group
@param ln: language
@return html output
"""
_ = gettext_set_language(ln)
action = weburl + '/yourgroups/edit'
out = """
"""% {'message': _("Are you sure you want to delete this group?"),
'ln':ln,
'yes_label': _("Yes"),
'no_label': _("No"),
'grpID':grpID,
'action': action
}
return indent_text(out, 2)
def tmpl_confirm_leave(self, uid, grpID, ln=cdslang):
"""
display a confirm message
@param ln: language
@return html output
"""
_ = gettext_set_language(ln)
action = weburl + '/yourgroups/leave'
out = """
"""% {'message': _("Are you sure you want to leave this group?"),
'ln':ln,
'yes_label': _("Yes"),
'no_label': _("No"),
'grpID':grpID,
'action': action
}
return indent_text(out, 2)
def __create_join_policy_selection_menu(self, name, current_join_policy, ln=cdslang):
"""Private function. create a drop down menu for selection of join policy
@param current_join_policy: join policy as defined in CFG_WEBSESSION_GROUP_JOIN_POLICY
@param ln: language
"""
_ = gettext_set_language(ln)
elements = [(CFG_WEBSESSION_GROUP_JOIN_POLICY['VISIBLEOPEN'],
_("Visible and open for new members")),
(CFG_WEBSESSION_GROUP_JOIN_POLICY['VISIBLEMAIL'],
_("Visible but new members need approval"))
]
select_text = _("Please select:")
return self.__create_select_menu(name, elements, select_text, selected_key=current_join_policy)
def __create_select_menu(self, name, elements, select_text, multiple=0, selected_key=None):
""" private function, returns a popup menu
@param name: name of HTML control
@param elements: list of (key, value)
"""
if multiple :
out = """