From 1a91dc4218ba3994b8039086109269d4151ab351 Mon Sep 17 00:00:00 2001 From: miker Date: Sun, 24 Jul 2005 20:46:27 +0000 Subject: [PATCH] cleaning up for alpha git-svn-id: svn://svn.open-ils.org/ILS/trunk@1393 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/cgi-bin/config.html | 14 +- Open-ILS/src/cgi-bin/setup.pl | 3 - Open-ILS/src/cgi-bin/superuser-setup.cgi | 211 ------------------------------- Open-ILS/src/cgi-bin/user-profiles.cgi | 131 ------------------- 4 files changed, 6 insertions(+), 353 deletions(-) delete mode 100644 Open-ILS/src/cgi-bin/setup.pl delete mode 100755 Open-ILS/src/cgi-bin/superuser-setup.cgi delete mode 100755 Open-ILS/src/cgi-bin/user-profiles.cgi diff --git a/Open-ILS/src/cgi-bin/config.html b/Open-ILS/src/cgi-bin/config.html index edce602d16..0b4e7840fa 100644 --- a/Open-ILS/src/cgi-bin/config.html +++ b/Open-ILS/src/cgi-bin/config.html @@ -6,14 +6,12 @@

Open-ILS Bootstrapping Scripts


diff --git a/Open-ILS/src/cgi-bin/setup.pl b/Open-ILS/src/cgi-bin/setup.pl deleted file mode 100644 index 8f867c0b3a..0000000000 --- a/Open-ILS/src/cgi-bin/setup.pl +++ /dev/null @@ -1,3 +0,0 @@ -$main::config{dsn} = 'dbi:Pg:host=10.0.0.2;dbname=demo-dev'; -$main::config{usr} = 'postgres'; -$main::config{index} = '/config.html'; diff --git a/Open-ILS/src/cgi-bin/superuser-setup.cgi b/Open-ILS/src/cgi-bin/superuser-setup.cgi deleted file mode 100755 index 2ba6631e10..0000000000 --- a/Open-ILS/src/cgi-bin/superuser-setup.cgi +++ /dev/null @@ -1,211 +0,0 @@ -#!/usr/bin/perl -use strict; - -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; - -our %config; -do '../setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - -Home - -

Superuser Setup

-
- -HEADER - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %user_cols = ( - qw/id SysID active Active usrname Username profile UserProfile passwd Password prefix Prefix - first_given_name FirstName second_given_name MiddleName family_name LastName - suffix Suffix dob Birthdate email Email day_phone DayPhone evening_phone EveningPhone - other_phone CellPhone home_ou HomeLib ident_type IdentificationType - ident_value Identification_value photo_url PhotoURL/ ); - -my @col_display_order = ( - qw/id active usrname passwd profile prefix first_given_name second_given_name - family_name suffix dob email day_phone evening_phone other_phone - home_ou ident_type ident_value photo_url/ ); - -my @required_cols = ( qw/profile usrname passwd profile ident_type ident_value - first_given_name family_name dob/ ); - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Update Selected' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = actor::user->retrieve($id); - for my $col ( @col_display_order ) { - $u->$col( $cgi->param($col."_$id") ); - } - $u->active( 'f' ) unless ($cgi->param("active_$id")); - $u->update; - } - } elsif ( $action eq 'Add New' ) { - my $u = actor::user->create( - { map { defined($cgi->param($_)) ? ($_ => $cgi->param($_)) : () } keys %user_cols } - ); - $u->super_user('t'); - $u->update; - } -} - - -#------------------------------------------------------------------------------- -# Form part -#------------------------------------------------------------------------------- -{ - #----------------------------------------------------------------------- - # User form - #----------------------------------------------------------------------- - print "
". - "\n"; - - for my $col ( @col_display_order ) { - print th($user_cols{$col}); - } - - print ''; - - for my $row ( sort { $a->usrname cmp $b->usrname } actor::user->search( { super_user => 't' } ) ) { - - print "\n"; - - print td($row->id); - print td("active){"checked"}}.">"); - print td(""); - print td(""); - print ""; - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print ""; - print ""; - print td(""); - print td(""); - - print "\n"; - } - - print ""; - print td(); # id - print td(""); - print td(""); - print td(""); - print ""; - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print td(""); - print ""; - print ""; - print td(""); - print td(""); - - - print "
Update
"; - print " | "; - print ""; - "

"; -} - -print ""; - - diff --git a/Open-ILS/src/cgi-bin/user-profiles.cgi b/Open-ILS/src/cgi-bin/user-profiles.cgi deleted file mode 100755 index 301ec62083..0000000000 --- a/Open-ILS/src/cgi-bin/user-profiles.cgi +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/perl -use strict; - -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; - -our %config; -do '../setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - -Home - -

User Profile Setup

-
- -HEADER - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %profile_cols = ( qw/id SysID name Name/ ); - -my @col_display_order = ( qw/id name/ ); - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Remove Selected' ) { - for my $id ( ($cgi->param('id')) ) { - actor::profile->retrieve($id)->delete; - } - } elsif ( $action eq 'Update Selected' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = actor::profile->retrieve($id); - $u->name( $cgi->param("name_$id") ); - $u->update; - } - } elsif ( $action eq 'Add New' ) { - actor::profile->create( { name => $cgi->param("name") } ); - } -} - - -#------------------------------------------------------------------------------- -# Form part -#------------------------------------------------------------------------------- -{ - #----------------------------------------------------------------------- - # User form - #----------------------------------------------------------------------- - print "
". - "\n"; - - for my $col ( @col_display_order ) { - print th($profile_cols{$col}); - } - - print ''; - - for my $row ( sort { $a->name cmp $b->name } (actor::profile->retrieve_all) ) { - print Tr( - td( $row->id() ), - td(""), - td(""), - ); - } - - print "", - td(), - td(""), - td(), - ""; - print "
Action
"; - print " | "; - print " | "; - print "

"; -} - -print ""; - - -- 2.11.0