dhempy
Posts: 40
|
Posted: 06/23/2004, 4:10 PM |
|
What is the likelihood of CCS generating .aspl code for use with PerlEx? It is extremely similar to .asp, except it uses perl for the exciting parts.
-dave
ps. As an example, gere is a typical .aspl file for listing all records in a table:
<%
$| = 1; # No output buffering.
$ENV{PATH}='';
use strict;
use PerlEx::DBI;
use KET::PerlEx;
use KET::Workflow;
use CGI;
my $cgi = new CGI;
my $dbh;
$dbh = DBI->connect('DBI:ODBC:workflow', '', '',
{PrintError=>1, LongReadLen=>2000});
%>
<%
# Select the rows:
my $row = {};
our $sth = $dbh->prepare("
select *
from system
order by system_abbrev
") or die "Can't prepare sth";
$sth->execute() or die "Can't execute \$sth";
%>
<html>
<head>
<title>Workflow | List All Systems</title>
</head>
<body>
<%= KET::Workflow::_ProcessDesignHeader() %>
<h1>List All Systems</h1>
<p>
<table border=1 cellspacing=0 cellpadding=5>
<tr>
<th colspan="2">System</th>
<th colspan="2">Edit</th>
</tr>
<% ######### Fetch the info:
my $id;
while ($row = $sth->fetchrow_hashref) {
$id = $row->{id};
%>
<tr>
<td>
<%= $row->{system_abbrev} %>
</td>
<td>
<%= $row->{system} %>
</td>
<td>
<a href="system_edit.aspl?id=<%=$id%>">Settings</a>
</td>
<td>
<a href="process_list.aspl?system_id=<%=$id%>">Processes</a>
</td>
</tr>
<%
}
if ($sth->err) {
print "There was an error fetching rows: " . $sth->err;
exit 1;
}
$sth->finish();
%>
</table>
<p>
<a href=system_edit.aspl>Create a new System</a> <br>
</p>
<p>
<a href=test.aspl>Test Processes</a> <br>
</p>
<%= KET::Workflow::_ProcessDesignFooter() %>
</body>
</html>
_________________
David Hempy
Director of Broadcast and Education Technology
Kentucky Educational Television
800-333-9764 |