#!/usr/bin/perl -w ################################################################# # $Id: ipc-draft-index,v 1.2 2002/12/12 13:23:06 ocm Exp $ # IPC Members Index for draft phase # # Copyright (c) 2001-2002 Juan A. de la Puente # Copyright (c) 2001-2002 José A. Pulido # # This file is part of the OCM distribution. OCM is free software # and is distributed under the terms of the GNU General Public # License. See file COPYING for the details. ################################################################# $|=1; require 5.004; use strict; use locale; use POSIX qw/locale_h/; use vars qw($VERSION); $VERSION = '3.0'; use CGI qw(:standard *table); use CGI::Carp; use DBI; $CGI::POST_MAX = 10*1024; # max 10 K posts $CGI::DISABLE_UPLOADS = 1; # no uploads #-- global variables ------------------------------------------------- do "/WWW/submissionIncom2006/install/incom2006.cfg"; # read configuration data use vars qw/$database/; # configuration variables use vars qw/$query $dbh/; # script variables use vars qw/$ident $access/; # user ident, access rights #-- main ------------------------------------------------------------- setlocale(LC_CTYPE,"spanish"); $query = new CGI; $dbh = DBI->connect("dbi:Pg:dbname=$database","vercouter","vercouter") or croak($DBI::errstr); #=================================================== # Modif G. SIX #=================================================== print header(), start_html(-title => "IPC Index", -style => {'src'=>'/submissionIncom2006/style.css'}, -class => 'texte', -leftmargin =>'0', -topmargin =>'0', -marginwidth =>'0', -marginheight=>'0', -bgcolor=>'#FFFFFF', -text=>'#000000'), top(); #=================================================== print_index(); print signature(), end_html(); $dbh->disconnect; exit; #== subroutines ===================================================== sub print_index { check_user(); unless ($access =~ 'ipcm|ipc|admn|nocm') { print h2(font({color=>'#CC00FF'},"Access denied")); return 0; } else { print start_table({width=>"100%"}); print Tr( td({align=>'center'}, h1(font({color=>'darkblue',align=>'center'}, "WORKING AREA")))); print end_table(); print start_table({width=>"100%",cellspacing=>"0",cellpadding=>"2"}), Tr(td({bgcolor=>'#9FB3CE',align=>'center'},strong("Technical Program"))), end_table(); print start_table({width=>"100%",cellspacing=>"0",cellpadding=>"2"}), Tr({valign=>'top', align=>'center'}, # td( # li(a({href=>"/submissionIncom2006/perl/restricted/select-persons"},"Persons"), # br, " "," ", # small(a({href=>"/submissionIncom2006/perl/restricted/select-person-summary"}, # "[Statistics]")))), td(li(a({href=>"/submissionIncom2006/perl/restricted/select-papers"}, "Papers"))), # td(li(a({href=>"/submissionIncom2006/perl/restricted/select-sessions"}, # "Sessions"))), td(li(a({href=>"/submissionIncom2006/perl/restricted/select-reviews"}, "Reviews")))); print end_table(); # print # # start_table({width=>"100%",cellspacing=>"0",cellpadding=>"2"}), # Tr(td({bgcolor=>'#9FB3CE',align=>'center'},strong("Quick search"))), # end_table(); # print if ($access =~ 'ipcc|ipcs|admn|nocm') { start_table({width=>"100%",cellspacing=>"0",cellpadding=>"2"}), Tr( td({align=>'right'}, start_form ('post','/submissionIncom2006/perl/restricted/print-paper-data'), strong("Find paper no.")), td({align=>'left'}, textfield ('key', "", 4, 6), endform()), td( start_form ('post','/submissionIncom2006/perl/restricted/search-person'), strong("Find person with name:"), " ", textfield ('name', "", 30, 30), endform())); # Tr( # td({align=>'right'}, # start_form ('post','/submissionIncom2006/perl/restricted/print-session-data'), # strong("Find session no.")), # td({align=>'left'}, # textfield ('key', "", 4, 4), # endform())); print end_table(); } } } #--------------------------------------------------------------------- sub check_user { # identify user's access my $login = $query->remote_user() || ""; my ($ident,$access_code,$first_name,$last_name) = $dbh->selectrow_array(q{select ident,access,first_name,last_name from person where login = ?}, undef, $login); $access = $access_code; } #--------------------------------------------------------------------- sub print_banner { my $text = shift; print Tr(td({colspan=>"1",bgcolor=>'#9FB3CE',align=>'center'},strong($text))); } #-- top -------------------------------------------------------------- #=================================================== # Modif G. SIX #=================================================== sub top { return table ({-cellspacing=>'0', -cellpadding=>'0', -width =>'760', -border =>'0'}, Tr ({ -align=>'left', -valign=>'top'}, td (img({-src =>'/submissionIncom2006/img/ban_incom.jpg', -width=>'760', -height=>'70', -border=>'0'})))), table ({-cellspacing=>'0', -cellpadding=>'0', -width =>'760', -height =>'26', -background =>'/submissionIncom2006/img/degrade_barre.gif', -border =>'0'}, Tr ({ -align=>'left', -valign=>'top'}, td (' '))), table({-cellspacing=>'0', -cellpadding=>'0', -width =>'760', -border =>'0'}, Tr ( td (img({-src=>'/submissionIncom2006/img/pix.gif', width=>'100%', height=>'10', border=>'0'}))) ); } #=================================================== #-- signature -------------------------------------------------------- #=================================================== # Modif G. SIX #=================================================== sub signature { return table({-cellspacing=>'0', -cellpadding=>'0', -width =>'760', -border =>'0'}, Tr ( td ({-colspan=>'5'}, img({-src=>'/submissionIncom2006/img/pix.gif', width=>'100%', height=>'10', border=>'0'}))), Tr ( td ({-colspan=>'5', -bgcolor=>'#093A7F'}, img({-src=>'/submissionIncom2006/img/pix.gif', width=>'100%', height=>'2', border=>'0'}))), Tr ( td ({-colspan=>'5'}, img({-src=>'/submissionIncom2006/img/pix.gif', width=>'100%', height=>'10', border=>'0'}))), Tr ({-valign=>'top'}, td ({-width=>'10'}, img({-src=>'/submissionIncom2006/img/pix.gif', width=>'10', height=>'10', border=>'0'})), td ({-width=>'140'}, startform(), button({name=>'Home', value=>'Home', onClick=>"window.location='/submissionIncom2006/'"}), button({name=>'Back', value=>'Back', onClick=>'history.back()'}), endform()), td ({-width=>'350'}, address(small("Issued on", scalar(localtime).".",br(), "Report problems to the ", a({href=>'mailto:vercouter@emse.fr', class=>'liensPage'},"webmaster."),br(), "Copyright © 2002 Juan A. de la Puente, José A. Pulido"))), td ({-align=>'center', -width=>'130'}, small(i("Site hosted by")), br(), a({href=>'http://www.emse.fr/en/transfert/g2i/', -target=>'_blank'}, img({-src=>'/submissionIncom2006/img/bandeau_droite_g2i_new.jpg', -alt=>'G2I', -width=>'97', -height=>'60', -border=>'0'}))), td ({-align=>'center', -width=>'130'}, small(i("Powered by")), br(), a({href=>'http://www.dit.upm.es/ocm', -target=>'_blank'}, img({-src=>'/submissionIncom2006/img/ocm_new.gif', -alt=>'OCM', -width=>'97', -height=>'60', -border=>'0'}))) ) ); } #===================================================