HTML_tests.pl
63 lines of code
1
#!/usr/local/bin/perl
2
3
binmode(STDIN, ":utf8");
4
binmode(STDOUT, ":utf8");
5
6
# must have's!
7
use strict;
8
use warnings;
9
use CGI::Carp qw(fatalsToBrowser);
10
use DBI;
11
use URI::Escape;
12
13
use lib "/var/www/html/Pm";
14
15
use Html qw(table_wide);
16
use Html;
17
use Bc_chef;
18
use Bc_misc;
19
use Bc_sql;
20
21
use Security;
22
use Redir;
23
24
my $DEBUG = 0;
25
26
my $output;
27
28
if (not user_exists($LOGGEDIN) or banned($LOGGEDIN)) {
29
  my $msg =  "Access Denied";
30
  if ($DEBUG) { $msg .= " (HTML_tests.pl)"; }
31
  $output = error_redir("/", $msg);
32
} else {
33
  ############################################################
34
35
  ### YOUR CONTENT HERE
36
  $output .= pre_html_header();
37
  $output .= header("HTML.pm Tests");
38
39
  my $cells = tdata("cell 1");
40
  $cells .= tdata("", "", "spacerx", "");
41
  $cells .= tdata("cell 3");
42
43
  my $rows = trow($cells);
44
  $rows .= trow($cells);
45
  $rows .= trow($cells);
46
47
  my $cell_spacery = tdata("", "", "spacery", "colspan=3");
48
  $rows .= trow($cell_spacery);
49
50
  my $cell_span3 = tdata("cell span 3<br>\ncentered<br>text", "", "", "align=center colspan=3");
51
  $rows .= trow($cell_span3);
52
53
  my $table = table_void($rows, "", "", 0, "border=1 cellpadding=0 cellspacing=0");
54
  $output .= table_wide($table, "", "", 1, "tdalign=center");
55
56
  $output .= footer2("");
57
58
  ############################################################
59
}
60
61
print $output;
62
63
exit 1;