DBIx-glueHTML

 view release on metacpan or  search on metacpan

glueHTML.pm  view on Meta::CPAN

1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
    my $table   = shift;
 
    # Run the SQL
    my $sql = $self->_updateSql ($table);
    my $cursor = $self->_execSql ($sql);
    $cursor->finish;
 
    # Tell the people what we did
    $self->_printHeader('Modification Successful', 'Record modified successfully.');
    print "<UL>";
    print "<LI><A HREF=\"" . $self->_backLink . "\">Main Menu</A>";
    print "</UL>";
    $self->_printFooter;
 
    # Log it, if logging is enabled
    $self->_logEvent("Record modified from $table", $sql);
}
 
# Internal function to execute a SQL delete
sub _deleteRecord {
    my $self    = shift;

glueHTML.pm  view on Meta::CPAN

1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
# Require confirmation of the delete
    if ($self->{CGI}->param('confirm')) {
    # Run the SQL
    my $sql = $self->_deleteSql($table);
    my $cursor = $self->_execSql ($sql);
    $cursor->finish;
 
    # Tell the people what we did
    $self->_printHeader('Deletion Successful', 'Record deleted successfully.');
    print "<UL>";
    print "<LI><A HREF=\"" . $self->_backLink . "\">Main Menu</A>";
    print "</UL>";
    $self->_printFooter;
 
    # Log it, if logging is enabled
    $self->_logEvent("Record deleted from $table", $sql);
    } else {
    # Ask them to confirm their action
    $self->_printHeader('Confirm Delete', 'Confirm Delete');
    print $self->{CGI}->b('Press back to cancel. Press Confirm to delete.');
    print $self->{CGI}->startform;

glueHTML.pm  view on Meta::CPAN

1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
    # Run the SQL
    my $sql = $self->_insertSql ($table);
    my $cursor = $self->_execSql ($sql);
    $cursor->finish;
 
    # Tell the people what we did
    $self->_printHeader('Addition Successful', 'Record added successfully.');
    print "<UL>";
    print "<LI><A HREF=\"" . $self->_repeatLink . "\">Add Another</A>";
    print "<LI><A HREF=\"" . $self->_backLink . "\">Main Menu</A>";
    print "</UL>";
    $self->_printFooter;
 
    # Log it, if logging is enabled
    $self->_logEvent("Record added to $table", $sql);
}
 
# _insertSql - internal function to generate insert statements for $table, inserting all values in
# $self->{CGI}->param which match the table column names.
sub _insertSql {



( run in 0.501 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )