#!/usr/bin/perl # Filename: bc_content.pl # Generated with CodeCharge 2.0.5 # Perl 5.0.ccp build 01/23/2002 use strict "vars"; #------------------------------- # FritzNewsListe CustomIncludes begin use Common; # global functions and variables use header; # header functions # FritzNewsListe CustomIncludes end #------------------------------- my $sFileName = "bc_content.pl"; #=============================== # FritzNewsListe PageSecurity begin # FritzNewsListe PageSecurity end #=============================== #=============================== # FritzNewsListe Open Event start # FritzNewsListe Open Event end #=============================== #=============================== # FritzNewsListe OpenAnyPage Event start # FritzNewsListe OpenAnyPage Event end #=============================== #=============================== # Save the name of the form and type of action into the variables #------------------------------- my $sAction = GetParam("FormAction"); my $sForm = GetParam("FormName"); my $sID = GetParam("ID"); #=============================== # FritzNewsListe Show begin #=============================== # Display page #------------------------------- print $page_header. "Content-type: text/html\n\n"; print < BeraCom Beratung und Softwareentwicklung

END_OF_HTML Content_Show(); print "

\n"; print "\n"; exit 0; #=============================== # Display Grid Form #------------------------------- sub Content_Show { #------------------------------- # Initialize variables #------------------------------- my @db_rs; my $sWhere = ""; my $sCountWhere = ""; my $sOrder = ""; my $sSQL = ""; my $sCountSQL = ""; my $sFormTitle = "BeraCom - Aktuelles"; my $HasParam = ""; my $sSortParams = ""; $iRecordsPerPage = 50; my $iCounter = 0; my $iPage = 0; my $bEof = ""; my $iTmpI = 0; my $iTmpJ = 0; my $transit_params = ""; my $form_params = ""; $sWhere = " WHERE aktiv=1"; if ($sID ne "") { $sWhere = " $sWhere AND id = $sID"; } # Build ORDER BY statement $sOrder = " order by f.id Desc"; # BEGIN sorting # HTML column headers print< END_OF_HTML # Build base SQL statement my $sSQL = "select f.id as f_id, " . "f.titel as f_titel, " . "f.langtext as f_langtext " . " from bc_content f "; # Assemble full SQL statement $sSQL = $sSQL . $sWhere . $sOrder; if ($sCountSQL eq "") { $iTmpI = index(lc($sSQL), "select"); $iTmpJ = index(lc($sSQL), "from") - 1; $sCountSQL = replace($sSQL, substr($sSQL, $iTmpI + 6, $iTmpJ - 5), " count(*) "); $iTmpI = index(lc($sCountSQL), "order by"); if ($iTmpI > 1) { $sCountSQL = substr($sCountSQL, 0, $iTmpI - 1) } } $iPage = 1; # Open recordset @db_rs = openrs($sSQL, $iPage); $bEof = $is_last_page; # check if query has returned any records if($#db_rs == -1) { print " \n"; } else { # Show main table based on recordset foreach my $ref_db_record ( @db_rs ) { my $fldid = GetValue($ref_db_record, "f_id"); my $fldlangtext = GetValue($ref_db_record, "f_langtext"); my $fldtitel = GetValue($ref_db_record, "f_titel"); # Show begin print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $iCounter++; } } print "
Keine Datensätze vorhanden.
\n"; print "$fldtitel" . " \n"; print "
\n"; print "$fldlangtext" . " \n"; print "
\n"; }