#!/usr/bin/perl ### # use strict; use CGI::Carp qw(fatalsToBrowser) ; ### # required files - use lib "/home/sites/lai" ; use common::lai_Cookies ; use common::lai_Dates ; use common::lai_General ; use www::lai_www_Config ; use www::lai_www_Wrapper ; ### # get arguments sent by the link - This subroutine (&lai_General::get_params) gets the # arguments from any queries. # # Output: $params{'date'} - data requested for viewing my ($params) = &lai_General::get_params ; my %params = %$params ; ### # get script information - This subroutine (&lai_General::script_info) sends back # the information needed to be able to know what we are # going to provide. # # Input: none # # Output: $urlPath - where the script is located in respect to the URL # Output: $resourceName - name of the resource being used. # Output: $directoryName - name of the directory where the script resides. # Output: $scriptName - name of script currently running. my ($urlPath, $scriptName) = &lai_General::script_info($params{'info'}) ; ### # get cookie information - This subroutine (Cookies::get_cookieData('login') ; # my ($list_number, $name_first, $name_last, $list_type) = split(/\,/, &lai_Cookies::get_cookieData('login'), 4) ; ### # print Content type print qq~Content-type: text/html\n\n~ ; ### # open up the database stream - a data stream used to get information from the MySQL # database server. This is closed at the end of the # script. The $dbh is used throughout to reference the # stream for queries. # # Input: $ipAddress - address of the MySQL server my $ipAddress = qq~localhost~ ; # Input: $tableName - name of table to be acessed my $tableName = qq~lai~ ; # Input: $dbUser - username to access the database my $dbUser = qq~study~ ; # Input: $dbPassword - password to access the database my $dbPassword = qq~dziekuje~ ; # # Output: $dbh - handle of opened data stream my $dbh = &lai_General::open_dataStream($ipAddress, $tableName, $dbUser, $dbPassword) ; ### # get resource information # # Input: $resourceLocation - urlPath + scriptName my $resourceLocation = $urlPath . "/" . $scriptName ; # Input: $dbh - self explanatory my $resourceData = &lai_General::get_metaData($resourceLocation, $dbh) ; my @resourceData = @$resourceData ; ### # write header - This subroutine (&lai_www_Wrapper::Header) creates the top # half of the c-wrapper. Very straight-forward in how # it does it. NOTE: To send additional JavaScript, # use the $extraStuff variable. # Input: $metaInfo - taken from the script_info subroutine my $metaInfo = join "\t", @resourceData ; # Input: $dbh - received from opening database stream # Input: \*STDOUT - STDOUT shows that this is going to the display # Input: $leftColumn - Info used to build the left column my $leftColumn = qq~|~ ; # Input: $extraStuff - first part would be for the "onLoad" argument # additional JavaScript that needs to be executed my $extraStuff = qq~/~ ; # Input: $rssfeed - tells if there is a feed on this page my $rssfeed = qq~~ ; # Input: $keywords - sends the keywords searched on to the ad management software my $keywords = qq~~ ; # Input: $list_number - is user logged in? &lai_www_Wrapper::Header($metaInfo, $dbh, \*STDOUT, $leftColumn, $extraStuff, $rssfeed, $keywords, $list_number) ; ### # close database stream - This subroutine (&lai_General::close_dataStream) takes the # handle, $dbh, created in the initial opening of the # stream and now simply closes it. # # Input: $dbh - received from opening database stream &lai_General::close_dataStream($dbh) ;

About 'Live As If'

In March 2002, StudyLight.org started providing weekly articles to the internet community. These articles ranged from word studies to devotionals. Many people have been blessed by the talented writers that have freely written for the site. Now in 2006, 'Live As If' will be the new home for the articles and resources needed for living your faith.

The idea behind 'Live As If' is to provide tools to help authors reach out to their audience. More than just a blog, this will be a way for them to interact with and learn from the people they are addressing.

#!/usr/bin/perl use strict; use CGI::Carp qw(fatalsToBrowser) ; #### # write footer - This subroutine (&lai_Wrapper::Footer) takes one variable # and acts accordingly. The variable is either \*STDOUT # for sending the footer info to the screen or FILE which # tells the subroutine to send the info to a file. # # Input: \*STDOUT - STDOUT shows that this is going to the display &lai_www_Wrapper::Footer(\*STDOUT) ;