#!/usr/bin/perl use DBI; use CGI; use locale; #Needed for the lc and ucfirst functions use strict; use Digest::MD5 qw(md5 md5_hex md5_base64); use POSIX; use URI::Escape; use mysql; use errorcapture; require 'common.pl'; my $myid = "contactinfo.html"; my $myversion = "2014.8.10.1.4426"; my ($errMsg, $focus); my $query = new CGI; my $errorobj = new errorcapture(); $errorobj->setFile($myid.$myversion); my ($dbh, $sth, $sql, $rows); my $sqlobj = new mysql(); $dbh = $sqlobj->MySqlLogon(); ################ #User Verification my %cookies = &getCookies; # store cookies in %cookies my $cookieID = $cookies{uid}; my $key = $cookies{key}; if ("contactinfo.html" eq "login.pl") { if ($cookieID && $key) { if (defined $dbh) { $sql = qq{ SELECT userKey FROM session WHERE userKey = ? AND cookieID = ? AND logoutTime >= now() }; eval { $rows = $dbh->selectrow_array($sql, {}, $key, $cookieID); }; if ($@) { $errorobj->writeerror($@, $sql); } if ($rows != 0){ print $query->redirect(-location => '/cgi-bin/datapages/welcome.pl'); $sqlobj->MySqlLogoff(); exit; } ################ } else { print $query->header(); $errorobj->writeerror($sqlobj->errorstring); $errorobj->webFatal("An error log has been started. A fatal program error occurred and halted the application."); } } } print $query->header(); my $action = substr($query->param('action'), 0, 5); if ($action eq "save") { my $fullname = substr($query->param('fullname'), 0, 50); my $email = substr($query->param('email'), 0, 50); my $message = substr($query->param('message'), 0, 2000); $fullname = $dbh->quote( $fullname ); $email = $dbh->quote( $email ); $message = $dbh->quote( $message ); $sql = qq{ INSERT INTO contactus (fullname, email, message, datecreated) VALUES ($fullname, $email, $message, NOW()) }; eval { $dbh->do($sql); }; if ($@) { $errorobj->writeerror($@, $sql); } else { $errMsg = "Message Sent"; } } print < Contact Info, Sports management, team websites, find players, teams and leagues
 
GO
























Company Address
Sparesports Productions,
Rideau St,
Ottawa, Ontario

Contact Form
Your full name:

E-mail address:

Your message:
Copyright © 2014 SpareSports Productions.
All Rights Reserved.
Team/Spare Search Version 7 Build 12.22
EOT $sqlobj->MySqlLogoff(); 1;