#!/usr/bin/env perl use strict; use warnings; use CGI (); my $q = CGI->new(); use lib $ENV{UICNEWS_LIB}; use UIC::UICNews (); my $current_issue_id = UIC::UICNews::get_current_issue_id(); my $issue_id = $q->param('issueId') || $current_issue_id; $q->param(-name => 'issueId', -value => $issue_id); $q->param(-name => 'currentIssueId', -value => $current_issue_id); print $q->header(); print $q->start_html( -title => "UIC News", -style => { -src=>"default.css" }, -script => { -language=>"javascript", -src=>"functions.js" }, -meta => { description => "UIC News is the newspaper for the faculty, staff and students of the University of Illinois at Chicago.", keywords => "UIC News, newspaper, university, chicago", }, -head => [ $q->Link({ -rel => "alternate", -title => "UIC News Webpage RSS", -href => "http://www.uic.edu/news/rss/UICNews.rss", -type => "application/rss+xml", }), ], ); UIC::UICNews::print_header( $q ); my $issue = UIC::UICNews::get_issue( $issue_id ); my @articles = UIC::UICNews::get_homepage_articles( $issue_id ); if( $issue_id ne $current_issue_id ) { my $date = $issue->{dDate}; $date =~ s{\d\d(\d\d)-(\d+)-(\d+)}{$2/$1/$3}; print $q->div({-class=>"dateline"},"Issue: $date"); } print $q->img({-src=>"img/top_stories.gif",-alt=>"Top News Stories",-style=>"border: none; display: block"}); my $first = 1; for my $article ( @articles ) { print $q->start_div({-class=>"article-area"}); print $q->h2({-class=>"article-title"}, $article->{'tTitle'} ); if( $article->{'homepic'} ) { print $q->img({ -class=>($first ? "article-firstimage" : "article-image"), -src=>"Article/img/pic1-$article->{iArticleID}$article->{homepic}", -alt=>$article->{'homepicalt'}}, ); } print $q->div({-class=>"article-description"}, $article->{'mdescription'}, $q->a({-href=>"articledetail.cgi?id=$article->{iArticleID}"}, $q->img({-src=>'img/more.gif',-border=>0,-align=>'right',-alt=>"Read More"}), ), ); print $q->br({-clear=>"all"}); print $q->end_div; $first = 0; } UIC::UICNews::print_footer( $q ); print $q->end_html; exit 0;