Commit 425c4b89 authored by Kevin Atkinson's avatar Kevin Atkinson
Browse files

Set the charset for all emulab pages to utf-8 which is needed to
display foreign names correctly.  Also added three rows to table_regex:
tinytext_utf8, text_utf8, fulltext_utf8

Enhanced form_defs.php:

  - Add Support for Textarea

  - Add Support for a vertical list, for example see Category in
    submitpub.php

  - Add support for dumping the form values in plain text, used in the
    email I send to testbed-ops.

  - Change Error Reporting text for subfields such as in a list so
    they also include the text from the outer field, for example in
    newosid "ping" will become "OS Features, ping".  I needed this
    since some of my subfields didn't have labels and it seamed like
    the right thing to do.

  - Set #return_value to 1 in FormRenderCheckBox if it not already
    specified

  - In FormRenderSelect, if the #value is not in the list add it to
    the end.

  - Add support for "display" type, to just display some text in the
    table

  - Possibly some other little things I forgot about.

New site variable PUBSUPPORT.

Implement FS#201: Provide users a way to add a paper that used Emulab
see (https://users.emulab.net/flyspray/?do=details&id=201), summary of
changes:

  - Controlled via the new site variable PUBSUPPORT.

  - The emulab_papers spread sheet is now frozen all new changes
    should be made using the new system.

  - New pages submitpub.php for users to submit a new publication
    with different views for admins and non-admins.

  - New page expubs.php to replace doc/expubs.html, lists publications
    in database.  Also allows admins to edit publications.

  - Project members can edit papers associated with the project as
    long as they have local_root or higher privileges. Papers for a
    project are listed under a new tab in the showproject page. I keep
    track of the last person to edit the paper submission in addition
    to who initially submitted it.

  - Users can modify papers they submitted which is needed if the
    project was N/A. Papers users submitted now appear in a new tab in
    the showuser page.

  - Script to import spreadsheet to the database is in
    utah/bibliography/emulab_pubs-import.pl.

  - Changes web pages that point to doc/expubs.html to instead point
    to expubs.php
parent 357df448
...@@ -1448,6 +1448,8 @@ done ...@@ -1448,6 +1448,8 @@ done
...@@ -1502,13 +1504,14 @@ OUTERBOSS_NODENAME="" ...@@ -1502,13 +1504,14 @@ OUTERBOSS_NODENAME=""
OUTERBOSS_XMLRPCPORT=3069 OUTERBOSS_XMLRPCPORT=3069
OUTERBOSS_SSLCERTNAME="/etc/outer_emulab.pem" OUTERBOSS_SSLCERTNAME="/etc/outer_emulab.pem"
PLABSUPPORT=0 PLABSUPPORT=0
PUBSUPPORT=0
WIKISUPPORT=0 WIKISUPPORT=0
TRACSUPPORT=0
BUGDBSUPPORT=0 BUGDBSUPPORT=0
OPSDBSUPPORT=0 OPSDBSUPPORT=0
MAILMANSUPPORT=0 MAILMANSUPPORT=0
WINSUPPORT=0 WINSUPPORT=0
CVSSUPPORT=0 CVSSUPPORT=0
TRACSUPPORT=0
CHATSUPPORT=0 CHATSUPPORT=0
STAMPS=0 STAMPS=0
ARCHIVESUPPORT=0 ARCHIVESUPPORT=0
...@@ -1740,7 +1743,6 @@ if test $ISOLATEADMINS -eq 1; then ...@@ -1740,7 +1743,6 @@ if test $ISOLATEADMINS -eq 1; then
EOF EOF
fi fi
if test $DYNAMICROOTPASSWORDS -eq 1; then if test $DYNAMICROOTPASSWORDS -eq 1; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define DYNAMICROOTPASSWORDS 1 #define DYNAMICROOTPASSWORDS 1
...@@ -1866,6 +1868,8 @@ fi ...@@ -1866,6 +1868,8 @@ fi
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define TBBASE "$TBBASE" #define TBBASE "$TBBASE"
EOF EOF
if test -z "$THISHOMEBASE"; then if test -z "$THISHOMEBASE"; then
THISHOMEBASE="Emulab.Net" THISHOMEBASE="Emulab.Net"
fi fi
...@@ -2122,17 +2126,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h ...@@ -2122,17 +2126,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2114: checking for $ac_hdr" >&5 echo "configure:2130: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2119 "configure" #line 2135 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2171,17 +2175,17 @@ for ac_hdr in linux/videodev.h ...@@ -2171,17 +2175,17 @@ for ac_hdr in linux/videodev.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2163: checking for $ac_hdr" >&5 echo "configure:2179: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2168 "configure" #line 2184 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2214,7 +2218,7 @@ done ...@@ -2214,7 +2218,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2206: checking for $ac_word" >&5 echo "configure:2222: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2293,7 +2297,7 @@ fi ...@@ -2293,7 +2297,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2285: checking for a BSD compatible install" >&5 echo "configure:2301: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2354,7 +2358,7 @@ esac ...@@ -2354,7 +2358,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args. # Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2 set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2346: checking for $ac_word" >&5 echo "configure:2362: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2811,8 +2815,8 @@ s%@OUTERBOSS_NODENAME@%$OUTERBOSS_NODENAME%g ...@@ -2811,8 +2815,8 @@ s%@OUTERBOSS_NODENAME@%$OUTERBOSS_NODENAME%g
s%@OUTERBOSS_XMLRPCPORT@%$OUTERBOSS_XMLRPCPORT%g s%@OUTERBOSS_XMLRPCPORT@%$OUTERBOSS_XMLRPCPORT%g
s%@OUTERBOSS_SSLCERTNAME@%$OUTERBOSS_SSLCERTNAME%g s%@OUTERBOSS_SSLCERTNAME@%$OUTERBOSS_SSLCERTNAME%g
s%@PLABSUPPORT@%$PLABSUPPORT%g s%@PLABSUPPORT@%$PLABSUPPORT%g
s%@PUBSUPPORT@%$PUBSUPPORT%g
s%@WIKISUPPORT@%$WIKISUPPORT%g s%@WIKISUPPORT@%$WIKISUPPORT%g
s%@TRACSUPPORT@%$TRACSUPPORT%g
s%@MAILMANSUPPORT@%$MAILMANSUPPORT%g s%@MAILMANSUPPORT@%$MAILMANSUPPORT%g
s%@BUGDBSUPPORT@%$BUGDBSUPPORT%g s%@BUGDBSUPPORT@%$BUGDBSUPPORT%g
s%@OPSDBSUPPORT@%$OPSDBSUPPORT%g s%@OPSDBSUPPORT@%$OPSDBSUPPORT%g
...@@ -2850,9 +2854,8 @@ s%@FRISEBEEMCASTADDR@%$FRISEBEEMCASTADDR%g ...@@ -2850,9 +2854,8 @@ s%@FRISEBEEMCASTADDR@%$FRISEBEEMCASTADDR%g
s%@FRISEBEEMCASTPORT@%$FRISEBEEMCASTPORT%g s%@FRISEBEEMCASTPORT@%$FRISEBEEMCASTPORT%g
s%@WINSUPPORT@%$WINSUPPORT%g s%@WINSUPPORT@%$WINSUPPORT%g
s%@CVSSUPPORT@%$CVSSUPPORT%g s%@CVSSUPPORT@%$CVSSUPPORT%g
s%@TRACSUPPORT@%$TRACSUPPORT%g
s%@CHATSUPPORT@%$CHATSUPPORT%g s%@CHATSUPPORT@%$CHATSUPPORT%g
s%@ISOLATEADMINS@%$ISOLATEADMINS%g
s%@DYNAMICROOTPASSWORDS@%$DYNAMICROOTPASSWORDS%g
s%@STAMPS@%$STAMPS%g s%@STAMPS@%$STAMPS%g
s%@ARCHIVESUPPORT@%$ARCHIVESUPPORT%g s%@ARCHIVESUPPORT@%$ARCHIVESUPPORT%g
s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g
...@@ -2860,6 +2863,8 @@ s%@MIN_UNIX_GID@%$MIN_UNIX_GID%g ...@@ -2860,6 +2863,8 @@ s%@MIN_UNIX_GID@%$MIN_UNIX_GID%g
s%@DELAYTHRESH@%$DELAYTHRESH%g s%@DELAYTHRESH@%$DELAYTHRESH%g
s%@PELABSUPPORT@%$PELABSUPPORT%g s%@PELABSUPPORT@%$PELABSUPPORT%g
s%@ELVIN_COMPAT@%$ELVIN_COMPAT%g s%@ELVIN_COMPAT@%$ELVIN_COMPAT%g
s%@ISOLATEADMINS@%$ISOLATEADMINS%g
s%@DYNAMICROOTPASSWORDS@%$DYNAMICROOTPASSWORDS%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
s%@TBROBOCOPSEMAIL@%$TBROBOCOPSEMAIL%g s%@TBROBOCOPSEMAIL@%$TBROBOCOPSEMAIL%g
......
...@@ -155,6 +155,7 @@ AC_SUBST(OUTERBOSS_NODENAME) ...@@ -155,6 +155,7 @@ AC_SUBST(OUTERBOSS_NODENAME)
AC_SUBST(OUTERBOSS_XMLRPCPORT) AC_SUBST(OUTERBOSS_XMLRPCPORT)
AC_SUBST(OUTERBOSS_SSLCERTNAME) AC_SUBST(OUTERBOSS_SSLCERTNAME)
AC_SUBST(PLABSUPPORT) AC_SUBST(PLABSUPPORT)
AC_SUBST(PUBSUPPORT)
AC_SUBST(WIKISUPPORT) AC_SUBST(WIKISUPPORT)
AC_SUBST(MAILMANSUPPORT) AC_SUBST(MAILMANSUPPORT)
AC_SUBST(BUGDBSUPPORT) AC_SUBST(BUGDBSUPPORT)
...@@ -256,6 +257,7 @@ OUTERBOSS_NODENAME="" ...@@ -256,6 +257,7 @@ OUTERBOSS_NODENAME=""
OUTERBOSS_XMLRPCPORT=3069 OUTERBOSS_XMLRPCPORT=3069
OUTERBOSS_SSLCERTNAME="/etc/outer_emulab.pem" OUTERBOSS_SSLCERTNAME="/etc/outer_emulab.pem"
PLABSUPPORT=0 PLABSUPPORT=0
PUBSUPPORT=0
WIKISUPPORT=0 WIKISUPPORT=0
BUGDBSUPPORT=0 BUGDBSUPPORT=0
OPSDBSUPPORT=0 OPSDBSUPPORT=0
......
...@@ -43,6 +43,7 @@ ELVIN_COMPAT=1 ...@@ -43,6 +43,7 @@ ELVIN_COMPAT=1
# #
# This next group will not work outside of Utah (yet). # This next group will not work outside of Utah (yet).
# #
PUBSUPPORT=1
WIKISUPPORT=1 WIKISUPPORT=1
TRACSUPPORT=1 TRACSUPPORT=1
BUGDBSUPPORT=1 BUGDBSUPPORT=1
......
...@@ -147,6 +147,8 @@ REPLACE INTO exported_tables VALUES ('state_triggers'); ...@@ -147,6 +147,8 @@ REPLACE INTO exported_tables VALUES ('state_triggers');
REPLACE INTO exported_tables VALUES ('table_regex'); REPLACE INTO exported_tables VALUES ('table_regex');
REPLACE INTO exported_tables VALUES ('testsuite_preentables'); REPLACE INTO exported_tables VALUES ('testsuite_preentables');
REPLACE INTO exported_tables VALUES ('webdb_table_permissions'); REPLACE INTO exported_tables VALUES ('webdb_table_permissions');
REPLACE INTO exported_tables VALUES ('emulab_pubs_month_map');
-- --
-- Dumping data for table `foreign_keys` -- Dumping data for table `foreign_keys`
...@@ -944,6 +946,10 @@ REPLACE INTO table_regex VALUES ('user_pubkeys','verify','text','redirect','defa ...@@ -944,6 +946,10 @@ REPLACE INTO table_regex VALUES ('user_pubkeys','verify','text','redirect','defa
REPLACE INTO table_regex VALUES ('user_pubkeys','user','text','redirect','users:uid',0,0,NULL); REPLACE INTO table_regex VALUES ('user_pubkeys','user','text','redirect','users:uid',0,0,NULL);
REPLACE INTO table_regex VALUES ('user_pubkeys','keyfile','text','regex','^[-_\\w\\.\\/:+]*$',1,256,NULL); REPLACE INTO table_regex VALUES ('user_pubkeys','keyfile','text','regex','^[-_\\w\\.\\/:+]*$',1,256,NULL);
REPLACE INTO table_regex VALUES ('default','tinytext_utf8','text','regex','^(?:[\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,256,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
REPLACE INTO table_regex VALUES ('default','text_utf8','text','regex','^(?:[\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,65535,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
REPLACE INTO table_regex VALUES ('default','fulltext_utf8','text','regex','^(?:[\\x09\\x0A\\x0D\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,65535,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
-- --
-- Dumping data for table `testsuite_preentables` -- Dumping data for table `testsuite_preentables`
-- --
...@@ -1002,3 +1008,34 @@ REPLACE INTO webdb_table_permissions VALUES ('projects',1,1,0); ...@@ -1002,3 +1008,34 @@ REPLACE INTO webdb_table_permissions VALUES ('projects',1,1,0);
REPLACE INTO webdb_table_permissions VALUES ('osidtoimageid',1,0,1); REPLACE INTO webdb_table_permissions VALUES ('osidtoimageid',1,0,1);
REPLACE INTO webdb_table_permissions VALUES ('table_regex',1,1,1); REPLACE INTO webdb_table_permissions VALUES ('table_regex',1,1,1);
--
-- Dumping data for table `emulab_pubs_month_map`
--
REPLACE INTO `emulab_pubs_month_map` VALUES (1,0.0,'');
REPLACE INTO `emulab_pubs_month_map` VALUES (2,1.0,'Jan');
REPLACE INTO `emulab_pubs_month_map` VALUES (3,2.0,'Feb');
REPLACE INTO `emulab_pubs_month_map` VALUES (4,3.0,'Mar');
REPLACE INTO `emulab_pubs_month_map` VALUES (5,4.0,'Apr');
REPLACE INTO `emulab_pubs_month_map` VALUES (6,5.0,'May');
REPLACE INTO `emulab_pubs_month_map` VALUES (7,6.0,'Jun');
REPLACE INTO `emulab_pubs_month_map` VALUES (8,7.0,'Jul');
REPLACE INTO `emulab_pubs_month_map` VALUES (9,8.0,'Aug');
REPLACE INTO `emulab_pubs_month_map` VALUES (10,9.0,'Sep');
REPLACE INTO `emulab_pubs_month_map` VALUES (11,10.0,'Oct');
REPLACE INTO `emulab_pubs_month_map` VALUES (12,11.0,'Nov');
REPLACE INTO `emulab_pubs_month_map` VALUES (13,12.0,'Dec');
REPLACE INTO `emulab_pubs_month_map` VALUES (14,1.5,'Jan-Feb');
REPLACE INTO `emulab_pubs_month_map` VALUES (15,2.5,'Feb-Mar');
REPLACE INTO `emulab_pubs_month_map` VALUES (16,3.5,'Mar-Apr');
REPLACE INTO `emulab_pubs_month_map` VALUES (17,4.5,'Apr-May');
REPLACE INTO `emulab_pubs_month_map` VALUES (18,5.5,'May-Jun');
REPLACE INTO `emulab_pubs_month_map` VALUES (19,6.5,'Jun-Jul');
REPLACE INTO `emulab_pubs_month_map` VALUES (20,7.5,'Jul-Aug');
REPLACE INTO `emulab_pubs_month_map` VALUES (21,8.5,'Aug-Sep');
REPLACE INTO `emulab_pubs_month_map` VALUES (22,9.5,'Sep-Oct');
REPLACE INTO `emulab_pubs_month_map` VALUES (23,10.5,'Oct-Nov');
REPLACE INTO `emulab_pubs_month_map` VALUES (24,11.5,'Nov-Dec');
REPLACE INTO `emulab_pubs_month_map` VALUES (25,12.5,'Dec-Jan');
...@@ -4545,3 +4545,8 @@ last_net_act,last_cpu_act,last_ext_act); ...@@ -4545,3 +4545,8 @@ last_net_act,last_cpu_act,last_ext_act);
alter table interfaces add `uuid` varchar(40) NOT NULL default ''; alter table interfaces add `uuid` varchar(40) NOT NULL default '';
alter table interfaces add KEY `uuid` (`uuid`); alter table interfaces add KEY `uuid` (`uuid`);
update interfaces set uuid=UUID(); update interfaces set uuid=UUID();
4.156: Create emulab_pubs and related tables.
Add support for UTF-8 fields in table_regex.
mysql tbdb < emulab_pubs.sql
drop table if exists emulab_pubs;
create table `emulab_pubs` (
`idx` int unsigned not null primary key auto_increment,
`uuid` varchar(40) not null unique,
`created` datetime not null,
`owner` mediumint(8) unsigned not null,
`submitted_by` mediumint(8) unsigned not null,
`last_edit` datetime not null,
`last_edit_by` mediumint(8) unsigned not null,
`type` tinytext not null,
`authors` tinytext not null,
`affil` tinytext not null,
`title` tinytext not null,
`conf` tinytext not null,
`conf_url` tinytext not null,
`where` tinytext not null,
`year` tinytext not null,
`month` float(3,1) not null,
`volume` tinytext not null,
`number` tinytext not null,
`pages` tinytext not null,
`url` tinytext not null,
`evaluated_on_emulab` tinytext not null,
`category` tinytext not null,
`project` tinytext not null,
`cite_osdi02` tinyint(1),
`no_cite_why` tinytext not null,
`notes` text not null,
`visible` tinyint(1) default 1 not null,
`deleted` tinyint(1) default 0 not null,
`editable_owner` tinyint(1) default 1 not null,
`editable_proj` tinyint(1) default 1 not null
);
drop table if exists emulab_pubs_month_map;
create table `emulab_pubs_month_map` (
`display_order` int unsigned not null unique auto_increment,
`month` float(3,1) not null primary key,
`month_name` char(8) not null
);
insert into emulab_pubs_month_map (`month`, `month_name`) values
(0, ''),
(1, 'Jan'),
(2, 'Feb'),
(3, 'Mar'),
(4, 'Apr'),
(5, 'May'),
(6, 'Jun'),
(7, 'Jul'),
(8, 'Aug'),
(9, 'Sep'),
(10, 'Oct'),
(11, 'Nov'),
(12, 'Dec'),
(1.5, 'Jan-Feb'),
(2.5, 'Feb-Mar'),
(3.5, 'Mar-Apr'),
(4.5, 'Apr-May'),
(5.5, 'May-Jun'),
(6.5, 'Jun-Jul'),
(7.5, 'Jul-Aug'),
(8.5, 'Aug-Sep'),
(9.5, 'Sep-Oct'),
(10.5, 'Oct-Nov'),
(11.5, 'Nov-Dec'),
(12.5, 'Dec-Jan');
REPLACE INTO table_regex VALUES ('default','tinytext_utf8','text','regex','^(?:[\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,256,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
REPLACE INTO table_regex VALUES ('default','text_utf8','text','regex','^(?:[\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,65535,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
REPLACE INTO table_regex VALUES ('default','fulltext_utf8','text','regex','^(?:[\\x09\\x0A\\x0D\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,65535,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
...@@ -25,6 +25,7 @@ $TBWWW = "@TBWWW@"; ...@@ -25,6 +25,7 @@ $TBWWW = "@TBWWW@";
$THISHOMEBASE = "@THISHOMEBASE@"; $THISHOMEBASE = "@THISHOMEBASE@";
$ELABINELAB = @ELABINELAB@; $ELABINELAB = @ELABINELAB@;
$PLABSUPPORT = @PLABSUPPORT@; $PLABSUPPORT = @PLABSUPPORT@;
$PUBSUPPORT = @PUBSUPPORT@;
$WIKISUPPORT = @WIKISUPPORT@; $WIKISUPPORT = @WIKISUPPORT@;
$TRACSUPPORT = @TRACSUPPORT@; $TRACSUPPORT = @TRACSUPPORT@;
$BUGDBSUPPORT = @BUGDBSUPPORT@; $BUGDBSUPPORT = @BUGDBSUPPORT@;
......
...@@ -88,3 +88,8 @@ else { ...@@ -88,3 +88,8 @@ else {
} }
?> ?>
This diff is collapsed.
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<br> <br>
<li> <li>
<font size="+1"> <font size="+1">
<a href="docwrapper.php3?docname=expubs.html" <a href="../expubs.php"
>Published papers that have used Emulab</a> >Published papers that have used Emulab</a>
</font> </font>
</li> </li>
...@@ -31,3 +31,4 @@ ...@@ -31,3 +31,4 @@
</font> </font>
</li> </li>
</ul> </ul>
<?php
include("pub_defs.php");
$optargs = OptionalPageArguments("printable", PAGEARG_BOOLEAN);
if (!isset($printable))
$printable = 0;
$this_user = null;
$isadmin = null;
if (!$printable && LoginStatus()) {
if (!$HTTPS) {
# redirect to secure site, otherwise CheckLoginOrDie will die
$new_url = "https://$WWWHOST$REQUEST_URI";
header("Location: $new_url");
PAGEHEADER("Bibliography");
echo "<p>Please use $new_url when logged in.</p>";
PAGEFOOTER();
return;
} else {
$this_user = CheckLoginOrDie();
$isadmin = ISADMIN();
}
}
#
# Standard Testbed Header
#
if ($printable) {
#
# Need to spit out some header stuff.
#
echo "<html>
<head>
<link rel='stylesheet' href='../tbstyle-plain.css' type='text/css'>
</head>
<body>\n";
} else {
PAGEHEADER("Bibliography");
echo "<b><a href=$REQUEST_URI?printable=1>
Printable version of this document</a></b><br>\n";
}
?>
<p>
This page summarizes publications about Emulab as well as publications
that used Emulab to validate research they present. For additional publications
see <a href="http://www.isi.edu/deter/publications.php"
>Publications Made Possible By DETERlab</a>.
<p>
If you have a publications that used Utah's Emulab to validate your
research please use <a href="submitpub.php">this form</a> to add it.
For other updates or corrections please email
<a href="mailto:papers@emulab.net">papers@emulab.net</a>.
</p>
<?php
$query_result = GetPubs("`visible`");
echo MakeBibList($this_user, $isadmin, $query_result);
if ($isadmin) {
echo '<p><a href="deleted_pubs.php">Show Deleted Publications</a></p>';
}
#
# Standard Testbed Footer
#
if ($printable) {
echo "</body>
</html>\n";
}
else {
PAGEFOOTER();
}
?>
...@@ -98,13 +98,12 @@ function FormRenderTextField($name, $attrs) ...@@ -98,13 +98,12 @@ function FormRenderTextField($name, $attrs)
function FormRenderCheckBox($name, $attrs) function FormRenderCheckBox($name, $attrs)
{ {
$html = "<input type=checkbox name=\"formfields[$name]\" "; $html = "<input type=checkbox name=\"formfields[$name]\" ";
if (isset($attrs['#return_value'])) { $return_value = isset($attrs['#return_value']) ? $attrs['#return_value'] : 1;
$html .= "value=\"" . $attrs['#return_value'] . "\" "; $html .= "value=\"" . $return_value . "\" ";
if (isset($attrs['#value']) && if (isset($attrs['#value']) &&
$attrs['#value'] == $attrs['#return_value']) { $attrs['#value'] == $return_value) {
$html .= "checked "; $html .= "checked ";
} }
}
if (isset($attrs['#class'])) { if (isset($attrs['#class'])) {
$html .= "class=\"" . $attrs['#class'] . "\" "; $html .= "class=\"" . $attrs['#class'] . "\" ";
} }
...@@ -174,14 +173,20 @@ function FormRenderSelect($name, $attrs) ...@@ -174,14 +173,20 @@ function FormRenderSelect($name, $attrs)
} }
$html .= ">\n"; $html .= ">\n";
if (!@$attrs['#no_default']) {
if (isset($attrs['#default'])) if (isset($attrs['#default']))
$default = $attrs['#default']; $default = $attrs['#default'];
else else
$default = "Please Select"; $default = "Please Select";
$html .= "<option value=''>$default &nbsp</option>\n"; $html .= "<option value=''>$default &nbsp</option>\n";
}
if (isset($attrs['#options'])) { if (isset($attrs['#options'])) {
while (list ($selectvalue, $selectlabel) = each ($attrs['#options'])) { $options = $attrs['#options'];
if (isset($attrs['#value']) && $attrs['#value'] != ''
&& !isset($options[$attrs['#value']]))
$options[$attrs['#value']] = $attrs['#value'];
foreach ($options as $selectvalue => $selectlabel) {
$selected = ""; $selected = "";
if (isset($attrs['#value']) && $attrs['#value'] == $selectvalue) { if (isset($attrs['#value']) && $attrs['#value'] == $selectvalue) {
$selected = "selected"; $selected = "selected";
...@@ -217,6 +222,32 @@ function FormRenderFile($name, $attrs) ...@@ -217,6 +222,32 @@ function FormRenderFile($name, $attrs)
return $html; return $html;
} }
function FormRenderTextArea($name, $attrs)
{
$html = "<textarea name=\"formfields[$name]\" ";
if (isset($attrs['#javascript'])) {
$html .= $attrs['#javascript'] . " ";
}
if (isset($attrs['#class'])) {
$html .= "class=\"" . $attrs['#class'] . "\" ";
}
else {
$html .= "class=\"form-text\" ";
}
if (isset($attrs['#cols'])) {
$html .= "cols=" . $attrs['#cols'] . " ";