Browse Source

merging 1.2 and bugfixes for auth and login : admin, members and reports home pages

3.0.x
tipaul 20 years ago
parent
commit
4630b49761
  1. 31
      admin-home.pl
  2. 23
      catalogue-home.pl
  3. 15
      mainpage.pl
  4. 18
      members-home.pl
  5. 16
      reports-home.pl

31
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 "<p align=left>Logged in as: $loggedinuser [<a href=/cgi-bin/koha/logout.pl>Log Out</a>]</p>\n";
open H, "$intranetdir/htdocs/admin/index.html";
while (<H>) {
print $_;
}
close H;
print endpage();
print endmenu('catalogue');

23
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 (<C>) {
# $classlist.=$_;
#}
$template->param(loggedinuser => $loggedinuser,
classlist => $classlist,
opac => 0);
print $query->header(-cookie => $cookie), $template->output;

15
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;

18
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;

16
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;
Loading…
Cancel
Save