Changeset 449 for branches/htmlform/cgi-bin/main.cgi
- Timestamp:
- 07/27/10 17:06:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/main.cgi
r448 r449 13 13 use CGI::Carp qw(fatalsToBrowser); 14 14 use CGI::Simple; 15 use HTML::Template; 15 16 use DBI; 16 17 use CommonWeb qw(:ALL); … … 49 50 } 50 51 initIPDBGlobals($ip_dbh); 52 53 # Set up some globals 54 ##fixme - need to autofill this somehow 55 $ENV{HTML_TEMPLATE_ROOT} = '/home/kdeugau/dev/ipdb/trunk/templates'; 51 56 52 57 # Headerize! Make sure we replace the $$EXTRA0$$ bit as needed. … … 173 178 finish($ip_dbh); 174 179 175 print qq(<div align=right style="position: absolute; right: 30px;">).176 qq(<a href="/ip/cgi-bin/admin.cgi">Admin tools</a></div><br>\n)177 if $IPDBacl{$authuser} =~ /A/;180 #print qq(<div align=right style="position: absolute; right: 30px;">). 181 # qq(<a href="/ip/cgi-bin/admin.cgi">Admin tools</a></div><br>\n) 182 # if $IPDBacl{$authuser} =~ /A/; 178 183 179 184 # We print the footer here, so we don't have to do it elsewhere. 180 printFooter; 185 my $footer = HTML::Template->new(filename => "footer.tmpl"); 186 # include the admin tools link in the output? 187 $footer->param(adminlink => ($IPDBacl{$authuser} =~ /A/)); 188 189 print $footer->output; 190 181 191 # Just in case something waaaayyy down isn't in place 182 192 # properly... we exit explicitly. … … 1181 1191 # Relatively simple SQL transaction here. 1182 1192 my $sql; 1183 ##fixme: SQL parameters (#34)1184 # need to make sure we log roughly the same info1185 1193 if (my $pooltype = ($webvar{alloctype} =~ /^(.)i$/) ) { 1186 1194 $sql = "update poolips set custid='$webvar{custid}',notes='$webvar{notes}',". … … 1413 1421 1414 1422 1423 # going, going, gone... this sub to be removed Any Day Real Soon Now(TM) 1415 1424 sub exitError { 1416 1425 my $errStr = $_[0]; … … 1420 1429 </center> 1421 1430 ); 1422 printFooter(); 1431 1432 # We print the footer here, so we don't have to do it elsewhere. 1433 my $footer = HTML::Template->new(filename => "footer.tmpl"); 1434 # include the admin tools link in the output? 1435 $footer->param(adminlink => ($IPDBacl{$authuser} =~ /A/)); 1436 1437 print $footer->output; 1438 1423 1439 exit; 1424 1440 } # errorExit
Note:
See TracChangeset
for help on using the changeset viewer.