From 4630b49761493790dddb20b3418a62645463d0be Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 10 Oct 2002 16:15:36 +0000 Subject: [PATCH] merging 1.2 and bugfixes for auth and login : admin, members and reports home pages --- admin-home.pl | 31 +++++++++++++++++++++++++++++++ catalogue-home.pl | 23 +++++++++++++++++++++++ mainpage.pl | 15 +++++++++++++++ members-home.pl | 18 ++++++++++++++++++ reports-home.pl | 16 ++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100755 admin-home.pl create mode 100755 catalogue-home.pl create mode 100755 mainpage.pl create mode 100755 members-home.pl create mode 100755 reports-home.pl diff --git a/admin-home.pl b/admin-home.pl new file mode 100755 index 0000000000..0f6b09e21e --- /dev/null +++ b/admin-home.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Database; + +my $configfile=configfile(); +my $intranetdir=$configfile->{'intranetdir'}; + +my $query = new CGI; +my ($loggedinuser, $cookie, $sessionID) = checkauth($query); + +print $query->header(-cookie => $cookie); + +print startpage(); +print startmenu('catalogue'); + + +print "

Logged in as: $loggedinuser [Log Out]

\n"; + +open H, "$intranetdir/htdocs/admin/index.html"; +while () { + print $_; +} +close H; + + +print endpage(); +print endmenu('catalogue'); diff --git a/catalogue-home.pl b/catalogue-home.pl new file mode 100755 index 0000000000..9cb903d089 --- /dev/null +++ b/catalogue-home.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Database; +use HTML::Template; + +my $query = new CGI; +my ($loggedinuser, $cookie, $sessionID) = checkauth($query,1); +my $template = gettemplate("catalogue/catalogue-home.tmpl"); + +my $classlist=''; +#open C, "$intranetdir/htdocs/includes/cat-class-list.inc"; +#while () { +# $classlist.=$_; +#} +$template->param(loggedinuser => $loggedinuser, + classlist => $classlist, + opac => 0); + +print $query->header(-cookie => $cookie), $template->output; diff --git a/mainpage.pl b/mainpage.pl new file mode 100755 index 0000000000..45e4d53f8d --- /dev/null +++ b/mainpage.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl +use HTML::Template; +use strict; +require Exporter; +use C4::Database; +use C4::Output; # contains picktemplate +use CGI; +use C4::Auth; + +my $query = new CGI; +my ($loggedinuser, $cookie, $sessionID) = checkauth($query); + +my $template=gettemplate("intranet-main.tmpl"); + +print "Content-Type: text/html\n\n", $template->output; diff --git a/members-home.pl b/members-home.pl new file mode 100755 index 0000000000..28eb8176bf --- /dev/null +++ b/members-home.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; +use HTML::Template; + +my $query = new CGI; +my $flagsrequired; +$flagsrequired->{borrowers}=1; +my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, $flagsrequired); + +my $template = gettemplate("members/members-home.tmpl"); +$template->param(loggedinuser => $loggedinuser); + +print $query->header(-cookie => $cookie),$template->output; diff --git a/reports-home.pl b/reports-home.pl new file mode 100755 index 0000000000..422c1e7d8d --- /dev/null +++ b/reports-home.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; +use HTML::Template; + +my $query = new CGI; +my ($loggedinuser, $cookie, $sessionID) = checkauth($query); + +my $template = gettemplate("reports/reports-home.tmpl"); +$template->param(loggedinuser => $loggedinuser); + +print $query->header(-cookie => $cookie),$template->output; -- 2.39.5